VS 2010 Main Form Focus?
Feb 22, 2012
I have an application that just stores shortcuts to most used applications on users desktops. My problem is that when the machine loads after they login the app window looses focus and sometimes doesn't show in the taskbar. I tried to use Me.Focus() but that just gives the treeview focus and not the form itself. I mean the parent has focus in the treeview but the form is not highlighted, I can then click on the form and it gets selected.
What is a good way to get the whole form focus? I used me.focus in the form load too.
View 8 Replies
ADVERTISEMENT
Mar 19, 2010
This should be fairly basic but maybe the search terms are too general to find relevant answers.I have an MDI form with a conventional toolbar. When I open a small non child form I want to set focus back to this main form so the user can click the help button on the toolbar if necessary.
Tried frmMain.Select() and frmMain.ToolStripButton0.Select() at end of small form load but it doesn't work. The user has to click the help button twice, once to select it and once to open it. A minor problem but annoying.
View 2 Replies
Sep 15, 2010
Me.Focus() doesn't do the trick, my program is hereQuote:
Public Class Form1
Declare Auto Function mouse_event Lib "user32.dll" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal dwData As Integer, ByVal dwExtraInfo As Integer) As
[code]......
View 2 Replies
Jul 7, 2009
I have an application with a main menu.
File , Menu B, Menu C ....
-1
-ServiceMenu
When the user run the application I would like to show the File menu->ServiceMenu form and the main menu should be allways on the background. I try the following: From the main menu load events call the ServiceMenu routin.
Private Sub ServiceMenu()
Dim szt As New sztetelek
Me.AddOwnedForm(szt)
[code]....
My problem the following the new ServiceMenu (szt form) show in the right position but cannot get focus. My user have to click on it to the form gets the focus however if the user click the File-ServiceMenu this forms works well and get the focus.I think the main menu get back the focus (If i press the ALT the File menu dropdown .... )
View 6 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
Jun 5, 2012
i am having some trouble in my Windows form application. i have 2 forms1st Main / Parent Form2nd Sub / Child Form (Menu)
View 7 Replies
Jan 28, 2012
My app has a main form (it's the startup form). It includes a number of menu items which typically open modal sub forms. However there are 2 menu items which just need to open an Outlook Explorer calendar for the user to manipulate appointments. My VB6 version used hidden sub forms to do this and handle the subsequent interaction between the user and the Outlook objects in the Calendar. I need to stop the user interacting with the main form while the Outlook Explorer is open, ie as if the Explorer window were a modal sub-form to the main form. So I manually disable the main form while the Outlook activity is going on, then (try to) enable it when the user closes the Outlook Explorer window. Problem is I can't seem to get a reference to the main form from the sub form to do this, nor pick up an event in the main form which I could use to trigger the enabling of the main form.An alternative might be to delete the hidden sub forms & put all the code in the main form, but this would be quite ugly; I think I would need to maintain two parallel sets of Outlook objects at the top level in the main form for each of the two functions (a number of the Outlook objects are declared With Events). I would have to have for example mobjOutlookExplorerFunction1 and mobjOutlookExplorerFunction2.
View 5 Replies
May 11, 2011
Namespace My
Partial Friend Class MyApplication
Protected Overrides Function OnInitialize(
[code].....
View 5 Replies
May 21, 2011
i want to make my login form when it is open the user cannot move or do anything until they login and also how to prevent user for closing a form.
View 4 Replies
Jul 22, 2011
I have MDI application and couple of child windows...This is how I'm opening one child window
Private Sub Membe*******tripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles Membe*******tripMenuItem.Click
Dim members As New members
members.MdiParent = Me
[code]....
My problem is that I dont have an idea how to check is that form already opened and if it is simply to focus it... Now I can open as many as I want same forms (on the picture this are couple same child forms, what I don't want...So I need simple check is this child form opened and if yes focus it?
View 3 Replies
May 7, 2011
I have a login form which I need to close without the entire application being terminated. I tried using Me.Close() , Me.Hide() as well. The login form is used as the main form as well.
View 2 Replies
Mar 20, 2012
I was just wondering how you can make classes import into your main Form.vb
Let's say I make a class with the following.
Public Class OtherStuff
Public Sub HideMe()
Form1.Hide()
[Code]....
How could I make the Form1.vb include the things that are in OtherStuff.vb.
All of the solutions that I have tried come up with the same error. Reference to a non-shared member requires an object reference.
View 2 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 17, 2010
I want to make a form the topmost form, but without giving it focus.Alternatively, I could check which window has focus, display my form, then give the original window focus again?
View 9 Replies
Nov 30, 2010
i am trying to convert netspell to VB.Net so instead of using the pop up dialog, i want it to use the richtextbox on the main form. I have nearly finished converting the whole project, but i have encountered a few errors, these are listed bellow.
Error11Property 'InnerHash' is 'ReadOnly'.C:UsersThomas Brentnalldocumentsvisual studio 2010ProjectsNetSpellVB.NetNetSpellVB.NetDictionaryAffixAffixRuleCollection.vb41113NetSpellVB.Net
Error12Property 'InnerHash' is 'ReadOnly'.C:UsersThomas Brentnalldocumentsvisual studio
[code]....
View 1 Replies
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
Aug 11, 2011
I want to make an auto log off feature, I want to detect if there is any user input, and if there isn't the user will be automatically logged off. So I want to know how to detect mouse wheel events when the form doesn't have focus.
View 1 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
Feb 18, 2012
I have a main form that has a dynamically generated treeview and also a panel control. Depending on the selection made within the treeview the panel docks 1 of three diffrent usercontrols which are full sub forms(done for ease of modifing design of sub form rather than layering panels on top of panels).Upon button click withing usercontrol i wish to trigger event within main form.For example delete button wich then triggers to remove current selected node from treeview. code for 1 of three diffrent user controls
Dim ctrlQ As New QuoteUC(TrViewQuotation.SelectedNode)
PnlSubFormDock1.Controls.Add(ctrlQ)
Code for delete button for which i need to raise event.
If MsgBox("Are you sure you wish to delete this customer ?", vbYesNo, "Delete Record") = vbYes Then
Deletecustomer(n)
End If
View 5 Replies
Jun 27, 2011
Just a quick question my textbox1.text seems to get focus when I run the APP.how do I cancel any focus to any textbox?I just don't want to select it or anything when I work with it only when the user select or uses it.
View 1 Replies
Aug 5, 2010
i have my main child form open. then i show the new form:
[Code]...
but when the form opens it flickers a lot. so i want move the new form behind the main form while it loads so the user does not see the flicker. once it is done loading i will set the form to topmost. how do i move the new form behind the main form?
View 12 Replies
Nov 20, 2009
I have a tool window that I want to stay above the main application form, but not stay on top of all windows forms. Similar to the floating properties window for visual studio - it always stays on top of the main VS window, but if I select another program, like internet explorer, the floating properties window will be behind internet explorer.
What I have is an application that has several forms that may be displayed at the same time. I have a Messages form that displays messages generated by the code in the form, that gives the status of the application. Obviously, the user would not normally be working on this form, but they may want it to be visible to see the status messages from the program (File saved confirmations, etc). So, my two options right now are I can set the form to be on top of all other windows forms or, when the user clicks on the main application form, the messages form would be hidden by the main form.
View 6 Replies
Jan 29, 2010
I have a main form with datagridview containing a list of contacts:
VB
Public Class Form1
Private Db As New DataClasses1DataContext
Private Sub Form1_Load
[Code]....
After saving, I get the correct message ("Saved"), and the DataGridView in the first form gets updated in real time.
But... when I take look at the data (or close and reopen the forms) the data in the database (SQL server) have not changed! What happens!
View 4 Replies
May 15, 2012
How do i load the Main form of a WPF so that a seperate thread goes and gets data from the database while the form is in an apartmentstate? (drag-able / movable) I Know this is possible with opening a new window from your main form like this :
Private Sub openOrderWindow()
Dim OrderWindow As Orders = New Orders
OrderWindow.ShowDialog()
End Sub
[code]....
I've tried putting MyBase.ShowDialog() and .Show() and .9000+ other things The only benefit I've got out of using a seperate thread to load from the databse is i can see the screen right away (as oppose to it being a transparent box until it loads) but i cannot move it around or minimize it?is there any way to make it Movable while it loads?
View 1 Replies
Apr 29, 2011
[Code] I want like to check if a file exist on main form, if not: force open settings form. And then when the user is closing the form with exit button = check if the file exist again. If it doesn't exist, close application. It's a huge application and I need optimized on most parts. Also, the settings form is asking the closing question two times.
View 1 Replies
Jul 9, 2010
How can I make the main form grey out/translucent black when a new form opens on top?
View 8 Replies
Aug 7, 2009
I'm having an interesting issue that I can't reproduce on a different project, but can consistently on this one. I have no clue what might be causing it, but am hoping that someone may have seen it before.
I have a main form, from which I run a series of checks. On this form, I have a listview control. Because of some issues with the refreshing of this listview control, I had to create my own messagebox. It's just a form that displays some text ( it also happens to look nicer than MsgBox; in my opinion, anyways ). It's been working great for months, until recently.
My problem is that on my main form's load event, I run this check, which returns an error within a try/catch block. I then call my custom messagebox with a message. It in turns calls it's ShowDialog() function.
In any other situation ( after the main form has been loaded ), I have no problems. The messagebox goes on the screen and behaves appropriately ( ie: waits for my input and acts as a modal dialog ( stops execution of my main form's thread ) ). However, on this onload event, my messagebox comes up and goes away almost immediately afterwards.
I've traced it all the way to the showdialog() call. For no explicable reason, it appears to skip right over this call, without me doing anything on the form.
Here's what the inner trace looks like ( when I put a breakpoint on the onclosing event for this messagebox form ):
CODE:
View 10 Replies
Aug 11, 2009
I have a program I've been working on for some time now and I'd like to try to streamline it somewhat. I have a main menu form that has a split panel, in the left panel is a treeview that displays forms you can open and when one is selected, it opens in a child window in the right panel. Each time I open form I called DWNForm, it does a series of dataset loads which are the populating items for a series of listviews.
What I would like to do is have these datasets load once during the mainMenu load and then have the DWNForm be able to access the datasets once it is called from the treeview selection.
View 8 Replies
Mar 22, 2011
I want to create an IMAGELIST in a main form and add to it then have it accessible within a child form. I found several MS examples on database shared access but this is NOT the concept I am after. Straight forward:
Child_Form.<function_to_execute_in_child_form>(The_Passed_Imagelist)
So, within the child form it want to do whatever I like to the IMAGELIST! I have tried passing the object by reference and anything I could think of.
View 3 Replies
Feb 3, 2010
I want to be able to check if there is currently a dialog or modal form shown for my form so that I can close it.
Is there a way to do this?
View 1 Replies