Show Form Without Losing Focus?
Aug 23, 2010
I've created a small form that acts like the office notifications (fades inout above the notification icon tray)I'm having problems showing this form, I want to display it without the focus being taken from my main application (or any other form), I've managed to get the attached code doing roughly this, (using Me.Activate to take back focus) But this isn't great - focus switches for an instant plus I want to show the form from various areas in my application...
Dim frm2 As New frmNotification()
frm2.TopMost = True
frm2.Show()
Me.Activate()
View 1 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
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
Jan 16, 2012
Is is possible to prevent a modeless form from losing its focus? I would like to force users to click the exit button of an addin form shown modeless before they wander into the main application. I need to show an user form of an addin modeless, in order to be able to interact with the document of main application. However, I would like to force them to exit this form before going into the main application.
View 5 Replies
Sep 12, 2010
I want to prevent my application from losing focus, untill I close it. (so that I can not click on ANYTHING else, untill I'm done with it. period.)I've tried using Me.Focus() on a timer, but that doesn't do s***...I've also tried countless API's out there, but I seriously can't get any of them to work.. my form simply does NOT want to stay in focus! It's driving me crazy! What the hell am I doing wrong?
View 2 Replies
May 18, 2012
I'm trying to fix all my project warning according to Microsoft code analysis (CA:XXXXX) One of the warning is "CA2000: Dispose objects before losing scope" My Code is:
[Code]...
View 2 Replies
Nov 18, 2010
I've written a short application that consists of a form, listviewbox and a timer, the program sits in the taskbar with the form invisible, the timer is set for 40 seconds and basically it queries a database held on an SQL 2000 server, when a certain change happens within the database my form pops up and shows some data in the listview, this happens well, the problem I have is when the check is going on (every 40 seconds) the user loses focus on what ever they're working on. Is there a way I can stop this?
View 2 Replies
Apr 19, 2009
I need to start multiple processes, with minimized windows - and I don't want whatever the current process is to lose focus.Something like this should be simple enough:
[Code]...
However, whatever application is running will lose focus when this code is executed. I've looked high and low, and there doesn't seem to be any relatively simple way to do this. I had some ideas about capturing whatever application has focus (I don't want to assume my program has focus), then running the above code, and then restoring focus. However, I'm fairly certain this will require win32 API calls, and I'm not sure how to do that.
View 4 Replies
Jan 23, 2011
code...
Dim sqlConn As New SqlConnection("server=.SQLEXPRESS;Integrated Security=true; Database=memberlist;")
sqlConn.Open()
Dim sqlComm As New SqlCommand("SELECT * FROM memberlist", sqlConn)
[code]....
when i do this the first msgbox pops up, i click ok, it then loses focus, i think its actually minimizing. I then have to click it in the task bar several times to get it to come back up. from then it will sometimes give each msgbox over and over just fine, sometimes it will minimizes random ones. the first one seems to be a constant.
View 5 Replies
Jun 14, 2009
I have 2 window forms, form1 has a button, which will send a msgbox when I click on, and form2 closes when it's deactivate-event raised. If I have form2 focused, and I click on the button of the form1, form2 will get focus and then close, but no msgbox showed from form1, what should I do to get the msgbox in that case?
View 5 Replies
Nov 23, 2011
I'm creating some software to keep my students on task. I've set it up so that I can control certain aspects of their computer from my computer. Problem is, I'm not sure how to control other applications from my application. I mostly just want to prevent it from being minimized. Some students like to switch screens quickly when I walk by. I would just like to make sure that it is always on top until I specify otherwise. I'm using VB.net, I'm using the 3.5 .net framework for compatibility reasons.
View 1 Replies
Sep 16, 2009
In VB .Net 3.5, is it possible to change the color of a DataGridViewCell (unbound) to a different color and have the cell visibly change before losing focus or leaving the cell? I have a timer that's running that queries with the data present and I'd like for the colors to change immediately instead of after the user leaves the cell.
I've tried DataGridView.Refresh and Me.Refresh and don't get results.
What am I doing wrong? (Below is the code I use to change the background)
''' <summary>
''' Sets or clears the passed cells background to Red
''' </summary>
[Code]....
View 2 Replies
Jan 10, 2011
On a .Net app, I got an AxDataGrid on a form. The DataSource of the grid is a RecordSet,created by parsing a comma-delimited text file.rom the UI, I add a new column with a defined size to the text file and then reload the data grid with a routine that creates a new ResultSet and binds it to the grid. Things are fine and the new column is shown.
View 1 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
May 16, 2012
I would like to show a Form without focus - PLUS - I would like to have 'Enable Application Framework' enabled on the My Project > Application form. Having 'Enable Application Framework' enabled allows trapping of unhandled exceptions project-wide.
I have added this to my code:
Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return True
[Code].....
View 8 Replies
May 4, 2011
What I am trying to accomplish is this: I want to be able to press the F5 key on my keyboard, while playing a PC game, to show (bring forward, focus, etc.) my program. My 3 attempts so far have failed. Any idea on how I could accomplish my goal? Similar posts on other forums say to set the form's key preview to true and use on keyPress... which failed.
View 1 Replies
Feb 7, 2010
I have a simple login field, which works fine with the exception of one quirk. The form is set up with the tab order to go to the UserID first and the Password text box second. This works fine when the form is used the first time, but when the form is used the second time the focus in placed in the Password field. If the form is used a third time, focus is moved the OK button, that is each time moves to the next tab order. I even tried to set the focus in the Load event as in Me.txtUserID.Focus(), but this doesn't change the behavior. Again, I should note that I close the form and not hide the form.
View 3 Replies
Nov 3, 2009
Q1: How can i make it so that my window that i want to show as a drop down does not appear to take the focus off the main form that is calling it?
Q2: The form that is dropping down has the FormBorderStyle Property set to None - thus the window does not have a drop down shadow - how can I make the popup window have a shadow?
View 1 Replies
Jan 11, 2010
How do i re-run the whole form again without losing the values stored as it run?
[Code]...
But they don't seem to work. Once the form reaches the end (after the user press enter), it just display a blank screen. But what i want is for the form to start all over again without losing the values. Is there a way to do that?
View 10 Replies
Jan 10, 2010
How can i reload/refresh the same form again without losing the data stored along with the form?
View 1 Replies
Dec 7, 2011
Having some issues with creating a simple control in vb.net.
I create a control with a single label in, I don't change anything except the colour of the control and the label and also making the label anchor to the edges ( with a small border around the edge)
When i then build it and add this control to a form. Some of the edges are cut off and it isn't anchored the way it was in the control.[url]...
as you can see in the second image the control has lost its white border at the right and bottom.
View 1 Replies
Apr 1, 2010
Problem displaying a graphics form from another forms button click event without losing the XY data plot.
If the Startup form is the GraphWindow form the Graphlib.vb calls create a XY data plot.
Code outline (not everything included):
(Sub GraphWindow_Paint(ByVal sender As Object, ByVal e As Sys�PaintEventArgs) _ Handles Me.Paint)
Call Graphscale(xmin, xmax, ymin, ymax)
Call DrawAxis(10,10)
[Code]...
View 2 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
Mar 5, 2010
The coding in under lostfocus event for a combo box. When user type in the some item that not in the list it will promt out a messagebo box telling the user that the item is not found in the list. Then i set the focus back on the combo box. But what happen now is, it keep promp the messagebox, like a infinite loop. Here is the sample coding. How i goin to make the message no more looping and focos on the combo box.
[Code]...
View 3 Replies
Oct 22, 2009
to be so simple turns out to have me scratching my head.I have a program that monitors input inside of Quickbooks. When a customer is entered into a sales order my program checks my database for any special information and if it exists, opens a TopMost window to the lower third of the screen with the information showing that is special to that customer. The problem I have is that when the customer is found and the window opens, focus is taken away from Quickbooks and given to my newly opened form. Is there a way to prevent this so that the users input isn't interrupted?
With frmMessage
.Width = Screen.PrimaryScreen.WorkingArea.Width
.TopMost = True
[code]......
View 3 Replies
Nov 9, 2010
If my form does not have focus and I click on a menu item (think File, Edit, View) the sub-menu does not appear. All it does it return focus to the form. I have to first click to give the form focus and then click on the menu. Most other programs do not behave this way. Is there anything that can be done to change it.
View 2 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
Jun 8, 2011
how do you show information from a datagrid cell to show up in a text box in another form, this is for a college project.
View 1 Replies
Dec 3, 2009
Example:
I have a main form: frmMain
and other secundary forms: frm1 and frm2
Main form has 2 buttons
BUTTON1: Open form1
[Code].....
Ok. 2 instances of frm1 are opened.
But now if the user clicks BUTTON1 will create a new instance. But I dont want this. How I can show (focus) the frm1 with tag "pepe".
Only I want create new instances if tag is different. If tag is the same, the form will be focused.
View 2 Replies
Jan 23, 2010
[code].....
View 4 Replies