Forms :: Form Has Focus Over Others With Project?

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


ADVERTISEMENT

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

Forms Within Form Got/change Focus?

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

Forms :: Focus() Method Fails With Second Show Form?

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

Forms :: Base Window Events Are Triggered When Focus Is On Another Form On Its Top?

Apr 3, 2009

I am migrating my code from vb.net 1.1 framework to vb.net 3.5In my windows application, the base window has some buttons and events are written for the same.I have shortcuts defined for these buttons also, for example: ctrl+d, DEL (keyboard) etc.Now i open a property Grid form on top of my base window for a selected object.Even when the focus is on this property grid, i am noticing that my base window events are firing on pressing those shortcuts.

example:I select some text in my property grid and hit delete button from keyboard. The delete event that i have written for the selected object gets fired and the text is not deleting.I fail to understand why is it happening. It wasnt behaving like this in .net 1.1.In .net 1.1 it would delete the text and only when the focus is back on the base window, hitting Delete would call the event.How do i control such a behavior? Is there some property that i need to set for property grid in .net 3.5 to prevent base window events from firing till the time focus is on property grid form?

View 1 Replies

Forms :: Restore A Windows Form Which Is Minimized And Has Lost Focus?

Dec 2, 2009

I have created an app which has a timer control which, when activated and meets a certain criteria, launches a second form with an alert for the user to review and action. this works just fine. Except.... when the main app is minimised and has lost focus, instead of launching the second form to a normal windows state it opens and sits in a minimized state itself and just flashes. How can I get the the second form to restore to a normal windows state?I have tried form2.focus and tried the windowsstate=normal etc but I'm still barking up the wrong tree.

View 2 Replies

Windows Forms: Unable To Click To Focus A MaskedTextBox In A Non TopLevel Form

May 20, 2010

I've got a Child form being shown with it's TopLevel property set to False and I am unable to click a MaskedTextBox control that it contains (in order to bring focus to it). I can bring focus to it by using TAB on the keyboard though.

The child form contains other regular TextBox controls and these I can click to focus with no problems, although they also exhibit some odd behavior: for example if I've got a value in the Textbox and I try to drag-click from the end of the string to the beginning, nothing happens. In fact I can't use my mouse to move the cursor inside the TextBox's text at all (although they keyboard arrow keys work).I'm not too worried about the odd TextBox behavior, but why can't I activate my MaskedTextBox by clicking on it?

Below is the code that shows the form:

Dim newReportForm As New Form
Dim formName As String
Dim FullTypeName As String
Dim FormInstanceType As Type

[code].....

View 3 Replies

Forms :: Changing The Backcolor Of A Control When It Has Focus And Lost Focus?

Feb 16, 2011

Is there a more efficient/easier way changing the backcolor of a control when it has focus and lost focus? Let's say I've got 10 text boxes. Right now I would have 20 different events...10 for Enter event and 10 for Leave event. Of course, entering would change the back color to "green" and leaving would change it back to "white".

[Code]....

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

Forms :: Access Another Form In A Different Project In The Same Solutions

Jun 1, 2011

i have tried googling this and cant find a way to do this, i hav 2 projects in the same solutions, i am trying to write a bit for Solution1_Project1_Form1 to open a windowsForm in Solution1_Project2_Form2.

Start main application & View 2nd application FROM within the main application.

Start the 2nd application WITHOUT using the main application.

both applications need to read and write to a database, i dont think this makes a big diferance but thought i would mention it

View 2 Replies

All Project Forms Not In Application > Startup Form Combo Box

Jun 3, 2011

I am wanting to change my startup form for my application in Visual Studio for VB.Net. I double clicked "My Project" in the Solution Explorer and then clicked on the Application tab. For some reason I only see 12 forms out of the 6 forms I have in my project when the "Enable Application Framework" check box is True. When the check box is False I see all my forms, why?

View 9 Replies

Include Contact Project Into Another Project / Add More Items To Database / Forms In New Project?

May 6, 2009

I have a project that I have created, it something like a contact database.It is complete with its own sql server database, and controls and forms.I kinda of understand that I can include this project into another project.This is the tricky part,Can I include my contact project into another project and add more items to the database and forms in a new project?What I'm after is like using classes.My contact database would be like the base class, and the new project would be adding more features to that project.

View 10 Replies

Me.Focus - Return Focus To The Form

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

Set Focus To My Webbrowser Within My Project?

Aug 16, 2010

I'm looking for a way to set focus to my webbrowser within my project.[code]...

View 2 Replies

In-project Components Fail If Project Is Opened With In-project Component Used On Initially Open Form?

Dec 20, 2010

Public Class ExtendedDateTimePicker Inherits DateTimePicker

View 5 Replies

VS 2008 - Timer - Project A References Project B So Can Open A Large Form In Project B

May 5, 2010

For reasons that are beyond my control, I have three Projects. Projects A and B reference project C. Project A references project B so that it can open a large form in project B. I now need to open that large form from project C, but VB won't allow me to add a reference from C to B because that would create a circular dependency. I found a way around it, though. I created a Timer in A, and when I opened C from A, I passed in that timer. When the user performs a certain action, I enable the Timer from A, and this causes C to open B for me.

View 2 Replies

Excel Window Of A VSTO Project Is Active/in Focus?

Apr 27, 2009

Anyone know of a way to see if the Excel window of a VSTO project is active/in focus?

I'm looking for an equivalent of System.Windows.Window.IsActive.

View 2 Replies

IDE :: Windows Forms Classes Appear As Class Modules Not Form Modules In Project Explorer

Jan 7, 2011

Yesterday I opened Visual Studio (2008 v 9.0.30729.1) and all the winform classes in my project display with class module icons with the little 'VB', instead of form module icons with the little form icon!

When I double click on a form module, the form designer doesn't open, just the code module.

When I run the project, it runs fine. There are no errors. The project builds fine.

I did Project --> show all files, and I can see the designer and resx files below the form module which doesn't look or act like a form module.

I can't open my forms to design them!

View 1 Replies

Forms :: Add A Sub To Run Whenever One Of Then Gets Focus?

Jul 19, 2010

I have a form with ~70 textboxes, and I would like to add a sub to run whenever one of then gets focus. I have:

[Code]...

View 2 Replies

Can't Set Focus On A Windows Forms Textbox?

Jun 9, 2011

I can't seem to get input focus on a textbox when a tab page first comes up (I'm using Windows Forms, VB.NET 3.5). I have a textbox on a panel on a tab page, and I want the focus to be on the textbox when the tab page comes up. I want the user to be able to start typing immediately in the focused textbox without having to click on the textbox. I have tab stops set in the order I want and the textbox is the first tab stop. The tab stops work except that when the tab page comes up the focus is not on the textbox, i.e. the one that's first in the tab order.

In the Enter event handler of the tab page I call the Focus method of the text box, but it returns False and does nothing, no error messages. I know I can access the text box because at the same point in the code I can set the text of the text box.If it matters, the layout of the tab page is a little complicated:[URL]..I want to set the focus on TextBox1.

What's the best way to get the focus on the desired textbox? If setting focus is the best way, why is the textbox.Focus() method failing?

View 5 Replies

Forms :: Difference Between .Focus And .Select?

Jul 3, 2009

In VB6, Something.SetFocus sets the focus to that Something. No problems there - in .Net it's called .Focus.On another thread I was told (twice!) to use Something.Select in a particular scenario (which works fine by the way).

View 4 Replies

Forms :: Focus On The Very Last Word In The TextBox?

Jun 9, 2009

I make the TextBox1 properties become multiline and has vertical scroll. This is my code :

[Code]...

I made this code accidently. And it works. But I wonder, Is there a better to do it?

View 2 Replies

Forms :: Unable To Set Cursor Focus In Sub Window?

Dec 20, 2009

currently I have a Customer Master screen. Inside the screen, I have a button which call the Customer sub window.

When I call the sub window, I want the set the cursor at Textbox1.

The problem is, when I call the window for 1st time, the cursor stops at Textbox1. When I call the window for 2nd or 3rd time, the cursor stops at other textbox or buttons inside the sub window.

Seems like Textbox1.focus is not working.

'***************Calling sub window from main screen**********
Private Sub BTN_CUSTOMER_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SEARCH.Click

[Code]....

View 1 Replies

Forms :: Use The Focus Events Of The Combobox's To Determine?

Jan 7, 2010

I have two questions for anyone who can throw some idea's my way question 1:I am currently working on a control with three combo box's. This control will be nested on a form, and I want the on-board timer to track how long each control is active. I am trying to use the focus events of the combobox's to determine if the control is active so the program will know when the timer should be started and stopped. My problem is, for example, when the user causes the text property of the combo boxes to change, the folowing code runs:

[Code]...

As you can see, there are points in this sub-routine that can cause the focus to shift, as well as fire the text changed event. While this all happens faster than is really noticable, I would like to eliminate the extra cycles if at all possible. As I mentioned in question one, I am adding this control to a form, to be more clear I am adding multiple instances of this control to a single form, and I am trying to use the focus events to determine which of the controls within the form are active; however, when the form itself is no longer the active application, whether it is minimized, behind another application or otherwise, all of the timers stop. I want whichever control was active at the time that the form was deactivated, to continue as if nothing changed.

View 2 Replies

VS 2008 - Working With Two Forms (Focus On Both) At Same Time

Jan 18, 2011

I have a form from which I am visually representing data (from access database). I have set up a user log on a separate form (allows user to make comments as they scroll through the data and see any points of interest etc). The second form is linked via a textbox in terms of a common field in this case the field name is "Datetime".

What I want to do is be able to scroll through the data and make notes on the second form and add them to another table in the database. I have managed to do all the above but obviously loose focus of the second form when i scroll through the data on the first. Is there any way of being able to interact with both forms at the same time?

View 6 Replies

Forms :: Creating A Sub Main In A Windows Forms Project?

Sep 13, 2010

What is the vb.net equivalent to accomplishing this?

static void Main()
{
frmCalcView view = new frmCalcView();

[code].....

View 5 Replies

Mdi Application - Open The Form But Focus Remain On Tree View Until Click On The The Form

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

C# - Set Focus To A Deeply Nested Control In Windows Forms?

Jul 19, 2011

I have a main form that contains a vertical SplitContainer.Inside the SplitContainer's left panel, I have a TreeView control.Inside the SplitContainer's right panel, I have another SplitContainer (this one horizontal). This container is fixed, with headings above the split and a Panel control below it.I dynamically load my own user controls into the Panel control whenever the tree view changes.

Most of the user controls that are dynamically loaded have a DataGridView that should receive focus when the control is initialized. Sometimes this grid is on the UserControl surface directly; sometimes it's in a GroupBox; etc.What is the best way to programmatically set focus on the DataGridView control, given that it may placed within a variable number of control containers? I've tried the obvious - .Select, .Focus, .ActiveControl, etc. None of these seem to work - the TreeView item that I selected is still highlighted, and even though a record is selected in the DataGridView, it doesn't have focus.

Here's the code where I add the user control within the main form:

Private Sub LoadRightPanel(ByVal section As String, ByVal moduleName As String)
Heading.Text = String.Empty
SuspendLayout()
RightPanel.Controls.Clear()

[code]....

View 1 Replies

Access A Project's Forms From Another Project #2

Aug 15, 2011

I have two projects: SQLtesting and Controls. Their physical locations are:

[Code]...

View 5 Replies

Access A Project's Forms From Another Project?

Aug 15, 2011

I have two projects: SQLtesting and Controls. Their physical locations are:

C:My DocumentsVisual Studio 2010ProjectsSQLtestingSQLtesting [forms reside here]
C:My DocumentsVisual Studio 2010ProjectsControlsControls [forms reside here]

The code shown below works fine. I run it from the project SQLtesting. It loads a listbox and a checkedlistbox with the controls found on a form. I can change the value of the FormName field to any form within the SQLtesting project and get the form's controls. The forms are not actually opened/shown.I would like to be able to access forms in other projects i.e.

C:My DocumentsVisual Studio 2010ProjectsControlsControls

while running the code from the SQLtesting project.

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim <strong>FormName </strong>As String = "Form1"
Dim FullTypeName As String

[code]....

View 4 Replies







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