shadow on form!

Use this board to post your code snippets - tips and tricks
14 posts Page 1 of 2
Contributors
User avatar
pip
VIP - Donator
VIP - Donator
Posts: 156
Joined: Tue Jul 12, 2011 3:13 am

shadow on form!
pip
Ok so my friend gave me this cool snippet all credits to him it is suppose to add a shadow to a form! omg;


Put this code in the form class and wala should add a shadow!
Code: Select all
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams

        Get
            Const CS_DROPSHADOW = &H20000
            Dim cParam As CreateParams = MyBase.CreateParams
            cParam.ClassStyle = cParam.ClassStyle Or CS_DROPSHADOW
            Return cParam
        End Get
    End Property
<a href="http://www.points2shop.com/s/xbox_point ... 5082"><img src="http://points2shop.com/images/promotion ... ricoxg.gif" border="0"/></a>
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: shadow on form!
Shim
explain more really i didnt get it :D
Find my programs on Softpedia
User avatar
Bogoh67
VIP - Site Partner
VIP - Site Partner
Posts: 656
Joined: Sun Apr 18, 2010 8:20 pm

Re: shadow on form!
Bogoh67
didnt mike just post about this? correct me if im wrong
User avatar
pip
VIP - Donator
VIP - Donator
Posts: 156
Joined: Tue Jul 12, 2011 3:13 am

Re: shadow on form!
pip
mshimranpro wrote:
explain more really i didnt get it :D
umm it is hard to explain but i guess it is suppose to make the border slightly more shiny lol i could not tell when i used it but it does have a difference i know that
<a href="http://www.points2shop.com/s/xbox_point ... 5082"><img src="http://points2shop.com/images/promotion ... ricoxg.gif" border="0"/></a>
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: shadow on form!
Shim
#pip do i have to add a new class and paste this in ? What is the place to paste this code ?

I havent seen this code before so i dont know about this code .
Find my programs on Softpedia
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: shadow on form!
clanc789
Bogoh67 wrote:
didnt mike just post about this? correct me if im wrong
This was my first thought too, but for me as well: correct me if im wrong!
Practice makes perfect!

VIP since: 6-10-2011
Vikhedgehog
VIP - Donator
VIP - Donator
Posts: 812
Joined: Fri Nov 05, 2010 6:24 pm

Re: shadow on form!
Vikhedgehog
mshimranpro wrote:
#pip do i have to add a new class and paste this in ? What is the place to paste this code ?

I havent seen this code before so i dont know about this code .
No, I don't think you have to create new class. I will try when I get on pc.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: shadow on form!
MrAksel
#mshimranpro you just paste it anywhere in an existing class. In your Form1.vb file (for example), paste it under "Public Class Form1" (or anywhere else for that sake).
#Bogoh67 #clanc789 Yea Mike just posted this, the only difference in the code is that pip uses hexadecimal numbers and not normal decimal numbers :P
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: shadow on form!
Dummy1912
:lol: funny i don't see any shadow :lol:
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: shadow on form!
Shim
MrAksel wrote:
#mshimranpro you just paste it anywhere in an existing class. In your Form1.vb file (for example), paste it under "Public Class Form1" (or anywhere else for that sake).
#Bogoh67 #clanc789 Yea Mike just posted this, the only difference in the code is that pip uses hexadecimal numbers and not normal decimal numbers :P
thanks for the help #MrAksel :D cooll; lmao;
Find my programs on Softpedia
14 posts Page 1 of 2
Return to “Quick Snips”