Changing Opacity Of A Form When The Mouse Leaves And Enters?

Mar 19, 2010

I want to make it so when someone places the mouse cursor inside the form the opacity is 100% but when it leaves then it drops to 75%. This is my code:

Private Sub Form1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.MouseEnter
Me.Opacity = 100%
End Sub

Private Sub Form1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.MouseLeave
Me.Opacity = 75%
End Sub

The forms default value is 75% and it works fine when I mouse over. However when the mouse leaves the opacity doesn't drop. What am I doing wrong?

View 3 Replies


ADVERTISEMENT

Trigger When The Mouse Leaves The Form

Apr 11, 2012

I'm trying to trigger when the mouse leaves the form, but I don't want to trigger the mouseleave when its over controls; as it is doing at the moment. Can you suggest ways to keep triggering the mousehover over form while on controls? but mouseleave works still when the mouse leaves the form (not when hovering controls) ?

View 1 Replies

[2008] Make A 100%-opacity-label With 50%-opacity-LabelBackground On A 50%-opacity-form?

Mar 5, 2009

When I set the opacity of a form to 50%, the opacity of a label on that form is also set to 50%, but I do not want so, is there anyway to make a 100%-opacity-label with 50%-opacity-LabelBackground on a 50%-opacity-form?

View 6 Replies

VS 2008 Change Form Opacity Without Changing Control Opactiy

Mar 16, 2011

I need to be able to change my form's opacity without changing the opacity of the components.

I really only need to do this on one form in my entire app, so this is getting a little frustrating

I've been researching for about half an hour now, trying to figure out if it's possible, but I'm coming up short.

I've seen some WPF examples and if it really comes to that, I'm more than willing to change the app from a WinForms app to a WPF app. I've made a WPF app before, so I'm familiar with it. But, I don't want to have to remake my entire project for this one form.

On that note, does anyone know if I can make a WPF form how I need it and just import it into a WinForm app? It doesn't seem possible, but it's better to ask than not. I'll look into this more.

View 19 Replies

Button Not Hiding When Mouse Leaves From Bottom?

Sep 29, 2010

I have a form where I want buttons at the very bottom edge of the form, with no gap to the border. These buttons shall be "auto-hide", so they only show when the mouse is in for example the lower 20 pixels of the form. So I use the MouseMove event to trigger this, like code below. However, if mouse leaves the form across the bottom edge, where the buttons are, then the buttons will obviously remain. But I want them to hide. So I need for this purpose to hide the buttons by some other event. Hence I try to hide them in the form's MouseLeave event. But this makes the buttons unclickable and in an erratic state, flashing on and off when the mouse goes over the button..

Private Sub ZgScale_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase. MouseMove

If e.Y > Me.ClientSize.Height - 30 Then
Button1.Visible = True
Else[code].......

View 2 Replies

Make The Form's Opacity Match The Opacity At Different Parts Of The Image?

Jan 13, 2007

I have a form with a PNG image as its background image. How can I make the form's opacity match the opacity at different parts of the image? (for example, I have a drop shadow that fades from black to transparent. How do I acheive this effect on a form?)

View 9 Replies

Set The Opacity Of A Form (not Form1) Down To 50% But Leaving The Buttons And TextBoxes At 100% Opacity?

Nov 1, 2011

How can I set the Opasity of a form (not form1) down to 50% but leaving the Buttons and TextBoxes at 100% Opacity?

View 9 Replies

Form Opacity = 0% And PictureBox Opacity = 100%

Jul 23, 2009

How can you make a form invisible...but leave the picture box visible?

[Code]...

View 3 Replies

Changing The Image Opacity?

Feb 10, 2011

[Code]...

When I click the button nothing happens. What am I doing wrong here ?

View 2 Replies

Changing Opacity Of Panel And Its Controls

Dec 9, 2009

Is there an efficient method of changing the opacity of a panel and it's controls?
OR
Is there an efficient method of changing the opacity of a MDI child?

View 4 Replies

VS 2008 - Changing Mouse Position Coords Based On Form?

Oct 18, 2011

Basically I want to move my mouse to the coords that is received based on the location of a certain coloured pixel. I can get the coords of the pixel but when using them on mouse position, the mouse position is based on the entire screen rather than the form. How could I change the position coords based on the form rather than the entire screen. E.G. If a certain coloured pixel is 2,2 in a form and I put that as the mouse position, it would go outside the form but I dont want that. I want it to hover of the pixel coords

This is my
Dim bmp As Bitmap = DirectCast(PictureBox1.Image, Bitmap)
For x As Integer = 0 To bmp.Width - 1
For y As Integer = 0 To bmp.Height - 1
If bmp.GetPixel(x, y) = (Color.FromArgb(108, 90, 60)) Then
Windows.Forms.Cursor.Position =
End If
Next
Next

View 2 Replies

Forms :: Increase A Forms Opacity Without Increasing The Opacity Of The Controls In The Form?

May 30, 2009

How to increase a forms opacity without increasing the opacity of the controls in the form?

View 1 Replies

VS 2008 - Autohide Panel Which Will Show When Mouse Enters Some Area

Oct 9, 2010

I'm trying to make some autohide panels, which will show when mouse enters some area, and hide when mouse leaves the panel. This is however not so straight forward. I can handle MouseMove event for the form, to trigger "show" panel, and I can handle MouseEnter event for the form, to trigger "hide" when mouse leaves the panel. But this is not consistent, since sometimes mouse will leave the panel directly onto another control, and sometimes it will leave the panel directly "from" a control on the panel, and not from the panel itself.

Of course I could do the slow work and make logic for each control, but that is not very neat. Is it possible in some way to capture the mousemove event regardless of which control mouse is above?

View 4 Replies

Change The Controls Opacity Without Change The Form Opacity?

Jul 29, 2009

I want to change my controls opacity .I know how can i change the form opacity but I want to change the controls opacity without change the the form opacity , such as : "I want to set my form opacity = %100 and the button opacity = %50 " or "I want to set my form opacity = %50 and the button opacity = %100 " I'm using visual studio 2005 .net .I want to do that in basic language

View 3 Replies

User Enters A Username In Textbox1 And Then Enters A Password In Textbox2?

Jul 2, 2009

I have a login form that I made. The user enters a username in textbox1 and then enters a password in textbox2. The user then hits the submit button (button2) and from there it works beautifully. The problem is, I would also like the user to be able to hit the "enter" key after they fill out the password textbox (textbox2) and have it be like they pressed the submit button. When the user hits enter right now, the form hides.

View 4 Replies

Richtextbox Opacity - Lower The Opacity Of Textbox So Can See The SWF In The Background

Sep 18, 2009

From the visual code requests as you can guess i think a good GUI is very important in an App. What i want is to lower the opacity of my textbox so u can see the SWF in the background, is this possible?

View 3 Replies

VS 2008 Opacity/Invisibility Of A Form Inside A MDI Form?

Oct 11, 2009

I have a MDI form containing 2 other forms that I first created via GUI and than manually added to the MDI form.Form1 = MDI formForm2 = Form containing a WMP and buttonForm3 = Form containing a butoon. This form's opacity is set to 50%, to make it semi invisible.My MDI Form looks like this

Public Class Form1
Dim f As New Form2
Dim g As New Form3

[code].....

View 20 Replies

Using Opacity Of A Form?

Feb 22, 2009

I searched around google for a couple of hours to see if I could find anything on what I wanted to do.

Needless to say, I didn't find much. Basically, what I want to do is, when my main form loads, I want to load another form that sticks to the desktop but is transparent (Opacity) except for the text I want in it.

The only thing I could find is how to reduce the opacity of the form. I don't want the form to have a border or be able to be moved around by the user. I still want the user to be able to put icons over it, but not mess with it. I also don't want it to show up on the task bar. Kind of like a background in it's own right.

I'm not even sure if a form is what I need to do this. I imagine that it can be done.

*Edit: I found an example of what I want, but I'm going to fill my form with different info [URl]..

View 5 Replies

Any Way To Reduce Opacity Of Form?

Jan 28, 2012

Is there anyway of reducing the opacity of a form to 80% but at the same time have my buttons and text boxes to remain unhindered at 100%? When I reduce the opacity of the from the opacity of the text boxes reduce as well. How could I stop this from happening

View 5 Replies

Partial Opacity Of The Form?

Dec 16, 2011

How can I make a partial opacity form something like this but with a working code:

me.opacity = 50
button1.opacity = 100
picturebox1.opacity = 100

How can i do this?

View 8 Replies

Show A Form In Two Different Opacity?

Aug 16, 2011

My situation is something like this.

I have a form as frmPopup which has a panel as pnlCtrlHolder. I'll using this form a popup and display a third form as control in this panel.

on form X.

dim frm as frmPopup
''Set the properties for this frmPopup
frm.Opacity=60

[Code]....

This makes entire form with frmContent with opacity =60, but I need this only on frmPopup but not on frmContent.

I am working on vb.net Winforms application. I understand that I am adding a form as control on a form with opacity as 60. But is there any way to achieve the desired result. .

View 3 Replies

Controlling Opacity Of Form Shown In A Form?

May 27, 2009

The end result we're looking for is a slideshow effect where a section of our main form shows a sequence of secondary forms which fade in/out on a timer.We can fade the forms in/out when they're shown individually, but the opacity setting doesn't seem to work when they're shown inside another form. What I've got, for testing, is code that should simply reduce the opacity to 10% after showing the inner form for a half-second, long enough to notice the reduction-except I don't see any change.

Dim f As New Form2()
f.TopLevel = False
Me.Controls.Add(f)[code]........

The opacity change takes effect without refreshing the form when shown 'stand-alone' but I've tried refreshing both the inner & outer form anyway, with no change.

View 3 Replies

Make A Form Invisible Without Using The Opacity?

Mar 18, 2012

make a Form invisible without using the opacity?I am using VB10.

View 5 Replies

Opacity Of A Form Controlled By User?

Mar 30, 2009

I would like to show a form... example: Form13.Show()However, I would like to have the Opacity of the form controlled by the user and I am having trouble figuring out the coding. Ideally I will have a track bar to choose the level of opacity and a "Show" button for the user to click. But I am trying to tackle one issue at a time. I am using VB 2008 Express edition if it makes a difference.

View 4 Replies

VS 2008 How To Make Form Opacity

Jul 6, 2009

Is there a way to change the opacity of the main form without changing the opacity of the controls within it? I'd like the background to be semi-transparent, without affecting the buttons, etc

View 4 Replies

[2008] Change The Form's Opacity?

Jan 21, 2009

would like to know how to program if i wanto change the programs opacity!I also got a drop down menu but idk how im gonna do..I was try like

If combobox1.text = "50%" then
Me.opacity = 50%
Else

[code].....

View 10 Replies

Load Form With Lower Opacity To Normal?

Jul 29, 2009

when i run form his opacity 0% to 100% autometic change...

View 6 Replies

Transparency/Opacity On Custom Shaped Form?

Sep 14, 2011

I have a custom shaped form with a transparency key of black. With the opacity set to 100%, I do not see the garbage around my custom shaped form As soon as I change the opacity, I see a transparent square(my borderless form) around my form.

How do I make it where my form retains its custom shape, and can have an opacity of less than 100%?

If you want something you've never had, you need to do something you've never done.

View 1 Replies

VS 2008 - Setting Mdi Form's Opacity Within Parent

Feb 26, 2011

I can't find a way to change the opacity of a mdi form within it's parent. I can change the parent form's opacity under properties, but can't change the embedded mdi form's opacity under it's properties. Opacity = 0.5 doesn't change the opacity of the mdi... works fine for the parent form. I was hoping that the embedded mdi forms functions would still be independent of the parent in order for me to change it's opacity.

View 2 Replies

How To Move Mouse Outside Of A Form And Make Mouse Click Outside Of Form

Jan 15, 2011

I'm a really beginner so i want to know if its possible to make the mouse move to certain co-ordinates outside of your form and then click , and then pause before repeating.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved