Set Focus When Form EnabledChanged?
Jan 18, 2012
The form is the main form, this form is Disabled while the user goes to a different form and then Enabled once returned (this is so some functions are automatically processed when this happens using Handles EnabledChanged) within this I want to set the focus to a certain text box i have tried setting the textbox to the lowest TabIndex but i don't think this will make a difference as this isn't the first time the form is opened and I have also tried textbox.focus() but neither of these have worked.
View 3 Replies
ADVERTISEMENT
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
Oct 25, 2011
After I did a sendkeys to another program from my form, i wanted to return focus to the form. i tried me.focus = true but that doesn't work.
View 1 Replies
Jun 11, 2009
I have mdi application, on main form which is mdi container and has a tree view. i open the child form on afterselect even of treeview. the issue i'm facing that i open the form but focus remain on tree view until i click on the the form. my question is how i can give focus to form rather it stays on treeview. i tried frm.focus also activatemdichild(frm) no sucess.
View 21 Replies
Jan 23, 2010
[code].....
View 4 Replies
Nov 29, 2010
how do you keep focus on a particular form...
like i have playagain.focus()
but if i click on my other form it playagain goes behind it
View 2 Replies
Dec 19, 2011
I have a form where in it there's a webbrowser control doing some autonomous tasks. I leave it running in the background but, due to the navigation in the webbrower control, the window pops-up in front of all others and this is really annoying when Im doing something else.
Is there a way to disable the form from auto-focus or whats doing? Even if I hide the form using Hide() it still is able to remove the focus from whatever window has it.
View 12 Replies
Jun 2, 2012
i have this form, lets call it form1, i dont want the user to be able to click outside the form or let the form lose focus, kind of like when you are setting an options for a program and you click outside of the options settings and the options dialogue box flashes and refocuses your mouse on it and wont let you click anywhere until after you hit ok. i also dont want the user to do a cntrl + alt+ delete and open that options box thing that takes over your screen
View 2 Replies
Mar 6, 2009
I'm working on a program to wish my girlfriend a happy birthday, my idea is to show a label like a notification, similar to the one used in messenger, but I want it to be on top of whatever she is working on the computer at the time, even games (she's a hardcore gamer). Is this possible??what I'm asking for is a form on top of everything, not stealing focus, and if she presses a key, for example "q", the message activates no matter what she is doing. I'm a beginner, and I know how to do the label, the key press, but I don't know how to do the above mentioned
View 6 Replies
Sep 29, 2009
I want to create a program that gets if the user has pressed a code, for example F8, but without the user having to have focus on the form. I want the program to start hidden, and while the user works normally (say browses the internet (Go Google Chrome)), he just presses F8 and the form shows up. So I ask, is there any way to get key presses outside the form? [code]
View 2 Replies
Nov 4, 2010
i have two Forms. The first one is my Main Form and the second one my Child Form. From the menu in Form1 i open Form2, butnot as ShowDialog(). After showing Form2 this form has the user can do something. But at the same time he is, and he msut due to application function, able to do something in Form1.Basically this works, but the problem is when the user klicks on Form2 on a Button and then he wants to clicks on a Button on Form1 he has to click two times1. time to set the focus for form12. time to click the button
View 1 Replies
Apr 2, 2010
Whenever you have a messagebox, it grabs attention from your main window and doesn't let you click back into your form until you hit okay.I want to make a form that does kind of the same thing. I have this for that shows download progress and I don't want the user to be able to click back into the main form until the download form is finished.
View 4 Replies
Nov 10, 2009
Is it any way to loop so a form always is in focus?
View 3 Replies
Oct 26, 2010
I am just getting into the learning curve of .net. I have thus many tinyl hitches to get some quick fix. Thus if my questions are dumb or too down right primitive, please pardon the novice.I have a few text boxes in a form1st QI want to get to a particular 1st_txtbox when the form opens. Hence in the load event i place a line: 1st_txtbox.focus()But on reopening the form the 2nd time, if user has already moved to 2nd_txtbox, the cursor gets to 2nd_txtbox. Where did i go wrong?
View 3 Replies
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
Mar 10, 2009
When I run my VB.NET Winforms app I do not want it to steal the focus from the other open apps. FYI, my app is started from the command line but that shouldn't make a difference. I've seen question 577076 but that doesn't seem to work.
View 2 Replies
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
Mar 5, 2010
I have made a program with a main Form and several auxilary forms. Is it possible to modify the auxilary form in a way like a msgbox. It stays always in focus, and you cannot interact with the main form. What I did find was the Form.enabled (True or False) method, but then the main form completely greys out, but I don't like the way it looks.
View 1 Replies
Oct 28, 2009
I have two mdi children forms open. I would think that clicking on the non active form would change the focus from the active form to the form I just clicked on. It only does this if I click on the title bar. Then the focus changes. But if I click on a control on the non-active form, focus does not transfer.
View 5 Replies
Mar 4, 2009
On my Form_Load event, I simply have a code which is simply Text1.Focus and Text1.SelectAll. Neither of these actually works. I've also tried this on the Visible_Changed event and checked if the form is visible.
I can create a button with this code in and it works fine. Is this something to do with the text box not actually being visible at the time when the code is executed? It's driving me mad!
View 14 Replies
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
May 3, 2010
I have a mdi form and two child forms ina VB.net application. When i load the mdi both of these child forms are shown, one of the form is in focus while other is not. Now the problem is if i clickon the body of the second form it does not get
View 1 Replies
Feb 3, 2010
I'm making a loginsystem and I want the form that I'm making it in will keep focus so if the "user" try click on another program there is running my form will take focus again, so the user cant get into the other programs there is running.
View 3 Replies
Feb 4, 2009
is it possible to have the same effect as a dialogue box, with form focus? eg, when using the open dialogue box, if you try to focus on another form within the app, it doesn't' let you and starts flashing. But when you switch to another app, it doesn't interfere.
View 2 Replies
Jan 23, 2011
I have 1 form with about 5 other forms added into it. How can I check which form the user is currently on. I have tried using gotfocus for the 5 forms within, but it doesn't work. is there another way of seeing when focus has changed within the form?
View 3 Replies
Dec 4, 2010
I need to dynamically show/hide a form without loosing focus from the original form. How to do this?.
View 1 Replies
Jan 21, 2011
I am using VB.Net 2010. I have two dialog forms open at once. the form that does not have focus I am trying to close and reopen to show the value changes. Below is what I have.
[code]...
the form associated with f never closes, however does open with the new values. I have tried Application.DoEvents and that hasn't worked.
View 11 Replies
Jan 22, 2011
I have a borderless form displayed as a progress object. This is displayed via childform.show().
I'm overriding CS_DROPSHADOW to give it the shadow (pictured), when the form loses focus (parent clicked or another formapplication) the shadow is lost.
How can I keep the form focusedselected similar to a modal form? (I cannot use showdialog due this being called from various threads other than UI) Using Me.TopMost = True works, but obviously puts the form above all others rather than just the parent.
View 1 Replies
Jul 12, 2010
I how can I make my form not get focus when it, or a control on it, is clicked?
Basically i want to be able to click a button on the form, and the buttonclick event occurs, but the current window retains focus. How can I do that?
View 20 Replies
Nov 30, 2009
I have three forms frmStudent, frmClass and frmMain. I want to add code so that if the user focuses on another form without saving a message box will appear to prompt the user to save. This is necessary because If the user starts entering data on another, related formand assumes that the changes from the first form were saved, then there could be integrity issues.
I have tried formating the deactivate event, but when I hit yes it just deletes the record entered.
Private Sub frmStudent_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate
If GradebookDataSet.HasChanges Then
[Code].....
View 1 Replies