VS 2008 Get The Opacity To Be Reduced When The Form Loses Focus?

Jun 18, 2009

I have my form set up to be able to be kept on top if the user so chooses. When it is set to be kept on top, I want the opacity to be reduced when the form loses focus. When I set opacity on init, it works fine. When I use this code, it doesn't work:

Private Sub Form1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.LostFocus
Me.Opacity = 0.2
End Sub

[code]....

Maybe I misunderstand how LostFocus and GotFocus work, but according to MSDN this appeared to be what I wanted.

View 4 Replies


ADVERTISEMENT

[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

Form Loses Focus After A Messagebox?

Feb 13, 2012

I have a form which contains a progressbar and a Listbox which update as the code runs through and performs some sometimes time-consuming calculations.

At one point in the code, it breaks to ask the user to enter a number using :

Usedefault = MsgBox("Do you want to use the default value of " & Default_No & "?", vbYesNo)
If Usedefault = vbNo Then

[Code].....

this works fine but I find that once the data entry is complete, and the code continues to run, the form loses focus and the progressbar and the Listbox updates cannot be seen until the code finished its calculations.

View 1 Replies

Form Loses Focus After Clicking Button?

Jul 22, 2010

when clicking on the start button in the code below, the form seems to lose focus and I need to click the stop button twice to stop the count. (First click to activate the form, second to click the button) Can someone please explain this behavior or offer a better alternative?

[Code]...

View 1 Replies

Delaying A Form Opening Until Wordpad Is Closed/loses Focus?

Jan 13, 2010

I have a question regarding waiting for closing a window or changing focus back to my app. What i have is an app that creates a few tables, that then puts the tables into a temp file that wordpad opens for the user to check they are correct, this is where i need help, i would like to now wordpad is open wait until the user closes wordpad or changes the focus away from wordpad until i open the next form which is responsible for using the tables and converting them into xml.

Which event should i look at using that fires when a program is exited or gets focus?

View 1 Replies

Forms :: "Counter" On Form Quits Counting When Form Loses Focus?

Mar 15, 2009

Most of my experience in Visual Basic programming is in VBA. I'm currently trying to build a VB.NET Windows application that basically consists of a form that has one button and one label. When the button is clicked, the label should serve as a "counter" that counts from 0 to infinity until the user closes the window with the "x" button. I do this by putting a loop with a sleep statement in the onclick sub. The loop iterates the integer that is displayed in the label and does a "Me.Refresh".The problem is when the window loses focus. When it loses focus (when I click off of it), the counter stops. Even when I click back on it, the counter doesn't resume.

View 19 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

Print Dialog Loses Focus

May 4, 2011

I have a form with a "print" toolstrip button. When I click that button I run the code shown below. The print dialog box appears. The title is dark blue seeming to indicate it has focus. The main form is lighter blue indicating it does not have focus. But hovering over the "Print" button (or the cancel button) does not cause it to change color. If you click on the print button, then the color changes and the second click causes the appropriate action. Same with the cancel button. If you click on the dialog label or on the main form the only thing that happens is the print button will then become "active" and a click there then works. If you click on the main form once, nothing happens, but if you click on it a second time you get the "bonk" sound indicating you ae clicking on the wron modal. As if this isn't strange enough, this action just started recently. I made a few unrelated (as far as I can tell) changes, and discovered this action.[code]....

View 15 Replies

Call Function Once The Listbox Loses Focus?

May 26, 2010

I have a listbox on a form and when the user selects a value and the listbox loses focus I want to validate the value the user chose. How do I call my function once the listbox loses focus?

I tried using a custom validator but it gives me an object is missing error.
Mike

View 9 Replies

Way To Have A Richtextbox Display Highlight When It Loses Focus?

Mar 18, 2011

I have a richtextbox, when I leave it for example to go to another panel where I want to manipulate the selected text I can no longer see the selected text. Is there a way to make it still show the highlight?

View 1 Replies

ASP.NET - Fill/update Row In Gridview When A Textbox Loses Focus?

Apr 22, 2012

I have the following gridview that is inside an updatepanel:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" Text="Novo Artigo" />

[code]....

View 1 Replies

Context Menu Will Not Proceed With Command When It Loses Focus

Jun 3, 2009

i have a checkbox, when checked, contextmenu shows and remains visible until unchecked.. then i ran into a problem.. if i click any other control on my form, the context menu disappears and the checkbox remains checked. i have tried placing

[Code]...

View 5 Replies

Make A Program Stay Above Task Bar Even When It Loses Focus

Mar 3, 2010

How can i make a program stay above the task bar even when it loses focus with visual basic 2008?

View 1 Replies

Removing Leading Zeroes From A Textfield When It Loses Focus

Feb 27, 2012

I'm trying to have a Textfield lose it's leading zeroes when the user leaves the field. I made the following "Leave" event but it's not working. It works for the first half however to set it back to 1 if it's blank or if a user entered 0. I tried following the advice on this answer, but it didn't work:

[Code]...

View 1 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

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

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

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 - 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

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

VS 2008 : Setting The Form Opacity Programatically In The MouseEnter And MouseLeave Events?

Feb 14, 2010

setting the form opacity programatically in the MouseEnter and MouseLeave events.The problem isn't with the actual events, the problem is that the events occur in places where I don't want it to happen.So in my project, I have a form with 3 user controls in it. The user controls are docked in the form so no actual space from the form is available to the user.

I have the methods:

Form1_MouseEnter(~) Handles Form1.MouseEnter, UserControl1.MouseEnter, UserControl2.MouseEnter, UserControl3.MouseEnter
Form1_MouseLeave(~) Handles Form1.MouseLeave, UserControl1.MouseLeave, UserControl2.MouseLeave, UserControl3.MouseLeave

when you enter the form, the form opacity is set to 1. And when left, the form opacity is set to 0.7 .However, what happens right now is obviously that when the user changes the mouse position from one user control to another, the form opacity flickers (turns to 0.7 and back to 1 really fast).

View 15 Replies

Detect When Application Loses "focus"?

Jul 22, 2010

Is there anyway to detect if the vb app I am developing loses focus, ie, if a user switches to another task. Maybe is there a way to detect which process in windows is active ?

View 6 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

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

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

Forms :: Form Losing Focus - Keeps Loosing Focus ?

Nov 26, 2009

I have two forms in an application. One is he background and then I show another keypad form called with the show() method (not showDialog) because I need to perform some validations on btn click.

The kepad has 10 buttons and an Enter Button. The problem is that the form keeps loosing focus (I checked this with a messagebox which keeps poping up once for focus=true and again for focus=false, it continuously keeps losing and gaining focus) so it does not process any keypress events untill i click somewhere on the form. I tried using me.focus() in form load event but to no avail. The forms TopMost property is also set to true.

View 5 Replies

2008 - Form Gains Focus On Its Own

Sep 9, 2008

i am working on a System. But everytime i show another Form, or Focus Something Else, One Particular Form gains Focus on it's own right after. Does anyone know how i can Fix this?

View 6 Replies

VS 2008 Form 'steals' Focus

Jul 26, 2010

form1 (startup) has buttons which show form2 and form3. when I press the button to show from2, form3 or form4 and set focus to a txtbox in form2, it does that, but after 2 to 5 seconds focus jumps back to form1 without my doing anything. This happens only on starting the program - if I click on form2 where I want to be, everything does OK from then on, but I don't want the user to have to do that. There is no timer on any of the forms. forms 1, 2, and 3 stay visible at the same time per design, but the focus always reverts to form1. I have tried many combinations of showing form2 and form3 (and form4), but with no change. I have also changed properties of the forms which I think may have something to do with the problem - no luck.I can't find anything in the help file which addresses "form focus changing". [code]

View 1 Replies







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