473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Set Opacity when dragging a form

EinToR
20
I'm trying to set the opacity = .50 when dragging a windows form. Here's what I've got:

Expand|Select|Wrap|Line Numbers
  1.         public Form1()
  2.         {
  3.             InitializeComponent();
  4.             this.Move += new EventHandler(Dragging);
  5.         }
  6.  
  7.         private void Dragging(object sender, EventArgs e)
  8.         {
  9.             Opacity = .50;
  10.         }
When I run the application, the Move event is fired from the get-go. What 2 events can be overloaded to set the opacity "OnDragStart" and "OnDragStop"?

Thanks,
Aug 7 '08 #1
2 1483
joedeene
583 512MB
you could possibly use the resizebegin and resizeend form events, heres an event in visual basic.net

Expand|Select|Wrap|Line Numbers
  1. Private Sub MainForm_ResizeBegin(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResizeBegin
  2.  
  3. Me.Opacity = 0.6
  4.  
  5. End Sub
  6.  
  7. Private Sub MainForm_ResizeEnd(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResizeEnd
  8.  
  9. Me.Opacity = 1
  10.  
  11. End Sub
Aug 8 '08 #2
EinToR
20
That worked GREAT!!! Thank's for your help.
Aug 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: chris | last post by:
I've used JavaScript DOM scripting to create a table element and alter its opacity. Bizarrely, the contents of the table appear to vanish when the opacity changes. One important note is that I...
2
by: Adam | last post by:
Hi everyone, I have a simple timer which decreases the Opacity from 1.0 to 0.0 and back again. The problem I have is, when it changes from 1.0 to 0.99, the whole form flickers completely...
6
by: Robert A. Boudra | last post by:
As you will probably guess, I'm just starting out with VB.net although I'm a long time VB developer. I was playing around with the Opacity property of a form and have found that I can set the...
1
by: Brian | last post by:
If your like me, you have probably seen way too many demos of the opacity property of a form. Well I finally have a need for it and I am having an issue. I am trying to create a splash screen...
1
by: yosh | last post by:
Trying to make a splashscreen, i can make it work if i in sub new() on the main form set opacity to 0, show the splashscreen and then in the splashscreen set the main forms opacity to 100 right...
5
by: Webmaster | last post by:
The following style sets the opacity or semi-transparency in Mozilla and Explorer browsers for an image: #myImage{ filter: alpha(opacity=50); -moz-opacity:0.50; opacity: 0.50; } <img...
2
by: reidarT | last post by:
I want a windows form to act like the one in Outlook when you get a new message and it is visible for about a couple of seconds and then the opacity decreases and the form dissapears in the end I...
3
by: Boki | last post by:
Hi All, I saw the paint.net program, when mouse hover, the color palette become 100% opacity. I try the code below, the issue is I also have some other controls ( textbox/button ) in my form,...
1
by: akshaycjoshi | last post by:
I am ShowDialoging one form in which the activate event increases the opacity from 0 to 1. I set the opacity to 0 in it's constructor.The problem is that during the showing of the form it becomes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.