Is it possible to change the opacity on a Panel control. I have search but all i could find was about window forms.
Thanks
Is it possible to change the opacity on a Panel control. I have search but all i could find was about window forms.
Thanks
Last edited by john tindell; Jan 28th, 2005 at 09:31 AM.
[MindlessAnt.co.uk] [MSDN] [Paging Records With MS SQL] [Virtual CD-ROM Drive From Images] [WorldOverRide.co.uk] [Create PDF's using pure PHP] [PHP.net Search Bars]
[PHP: Check Password Strength][PHP: BB Code] [PHP: Date Select]
If you Question has been answered please mark the thread as [RESOLVED]
I have a quivk VB sample here... Havent got C# at homeShouldn't be hard to translate.
VB Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'timer event handler Static aa As Integer Panel1.BackColor = Color.FromArgb(aa, 255, 0, 0) aa += 10 'amount of opacity change for each timer tick If aa > 255 Then Timer1.Enabled = False 'finished fade-in End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 100 '10 times a second Timer1.Enabled = True 'go! End Sub
That should get you started. It simply uses a timer to increase the Alpha component of the panel's backcolor. Its a bit flickery but you could always use a backbuffer to solve that problem, if you can be bothered![]()
Last edited by wossname; Jan 23rd, 2005 at 04:38 AM.
I don't live here any more.
Is it possible to do it somehow to work on a Transparent Panel? I want all the contents of the panel to fade away, not the panel itself![]()
Currently using: VS 2010 Ultimate on Win7 Ultimate x64.
CodeBank: All Threads Colors ComboBox Fading & Gradient Form MoveItemListBox/MoveItemListView MultilineListBox MenuButton ToolStripCheckBox Start with Windows
So put those buttons on a panel that's on the other panel, that way you can fade the buttons only panel like you want.
Currently using: VS 2010 Ultimate on Win7 Ultimate x64.
CodeBank: All Threads Colors ComboBox Fading & Gradient Form MoveItemListBox/MoveItemListView MultilineListBox MenuButton ToolStripCheckBox Start with Windows