Form DropShadow
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
I know this is possible, but I was wondering, how do you add a dropshadow to a form???
Hello,
I think to do this it would be better to have a second form open behind your main form and set it slightly off-center so it looks like a shadow and have it move when you move the main form.
But you can try this code which works on XP but not guaranteed to work on Vista/7. Just add it at the very top of your code after "Public Class From..":
I think to do this it would be better to have a second form open behind your main form and set it slightly off-center so it looks like a shadow and have it move when you move the main form.
But you can try this code which works on XP but not guaranteed to work on Vista/7. Just add it at the very top of your code after "Public Class From..":
Code: Select all
Private Const CS_DROPSHADOW As Integer = 131072
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
Dim Shadow As CreateParams = MyBase.CreateParams
Shadow.ClassStyle = Shadow.ClassStyle Or CS_DROPSHADOW
Return Shadow
End Get
End Property
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
I tried that before, and it didn't seem to work with my app, or even a new app with nothing on it, but a button with a messagebox.
Hello,
Do you have the shadow effects switched on in your display settings?
Right-click on desktop > Properties > Appearance > Effects ..then click "Show shadows under menus"
If that option isnt selected then it wont work.
Do you have the shadow effects switched on in your display settings?
Right-click on desktop > Properties > Appearance > Effects ..then click "Show shadows under menus"
If that option isnt selected then it wont work.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
That was why it didn't work lol. At least I learned another new thing, which makes this all worth while.
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023