MDI Application - How To Get Active Form

Mar 11, 2010

I have a mdi application. When some childforms are open (but only one is active) and the user press a button, I want to know, what form is open, because depending on this, an event will fire up. I imagine this so: at first I determine the active form with a separate function. And then with a select case statement the event will be fired up. How can I make this?

View 2 Replies


ADVERTISEMENT

Active Form In Windows Application?

Oct 7, 2009

I am developing a Windows Forms application. I have four forms which is inherited from Baseform in another project. In all four forms I am using a label to show some transaction count based on network status. I have implemented a thread which gets the active form of application and setting up the text. The code works fine if application screen is active. If I minimize and open any other application, I am getting an null error exception.

How do I get the active form of an application?
Private Sub StartThread()
pollThread =New Thread(AddressOf PollfileStatus)
pollThread.IsBackground =True
running =True
pollThread.Start()
[Code] .....

View 2 Replies

FlashWindowEx Doesn't Work While The Application Is Active But Does When Another Application Is Active

Apr 2, 2010

I have a standard Visual Studio 2008 VB.Net WinForm application, running on Vista Business. One of the forms has a timer that passes Me.Handle to FlashWindowEx. This works as intended as long as none of the windows that belong to this application are the Foreground window. If this program is running and another application's window is the Foreground window, then it flashes as intended. If, however, any of this application's windows are the Foreground window, then it doesn't flash.

[Code]...

View 2 Replies

Exit Application When Parent Form Active?

Jun 9, 2012

I have created an application which has a parent form and various child forms, when all child forms are closed and only the parent form is viewable would it be possible to exit the application?[code]...

View 3 Replies

Forms :: Get All The Active MDI Child Form In An Application?

May 28, 2011

how to get all the active mdi child in an application..it is possible to work? me.ActiveMdiChild.Name

View 1 Replies

VS 2005 Get The Active Control Of The Active Form?

Mar 30, 2009

I want to get the active control (control which has the focus or where the cursor is on) each time the cursor moves to another control or each time a control receives a focus.

View 5 Replies

VS 2010 Retrieve Currently Active Application Window From Another Application Just Starting Up

May 26, 2011

I am in need of a small application, that will allways be topmost and will send keystrokes to the last active application (typically notepad or an explorer window). My problem is retrieving the current active form (or application), when my application is started up. Every search seems to return old and rather complex solutions using Win32 library functions, but I was kinda hoping, that .Net allowed for a neater and more simple solution.I need a code example or link on how to retrieve the currently active application window from another application just starting up.

View 2 Replies

Write Text From A Parent Form To The Active Mdi Child Form VB 2010

Jan 28, 2012

It has to be a simple line of code but I do not know how to construct it. Using VB 2010 Express, I have a MDI parent form and many child forms. I want the parent form to determine what child form is active and load data into the RichTextBox1 on the child form. Each Child form has a RichTextBox1. The parent form gets its data by loading a file.

I am close to a solution but just can't get there. You will see in the code below, if I make a direct reference to a specific child form, it works great. What I want to do is to use the Active Form function to determine which form to write to. I have looked at the MS tutorial which gets me close.

Private
Sub OpenToolStripMenuItem_Click(ByVal sender
As System.Object,

[Code].....

View 6 Replies

C# - Active Handler In One Application From Another?

Apr 26, 2010

How I can run handler from one application to another, for example:
In application one I have form1 and button.
In application two I have also form1 and button.
Now how I can run handler for button on form1 in first application from application two?

View 2 Replies

.net - Minimize All Active Forms In An Application?

Feb 23, 2011

How do I minimize all active forms in my application with a single button click?I have multiple forms visible at a time, and I want all my active forms to minimize when I click on a single button on one of the forms.

View 2 Replies

Know If The Windows Run Key Pressed - Application Active

Jul 14, 2009

I want to know if the Windows Run key pressed. How can it be possible? What's the constant or ascii code for this key? The second: How can I know if the program, I wanted to use, is activated? What's the correct func. for this?

View 2 Replies

Reading Keydown Regardless Of Active Application?

Feb 27, 2010

I have created a program which should perform a certain action whenever a certain group of keys is pressed at the same time. The program must be able to run in the background, or in the system tray or something. Essentially, this should work like the KeyDown event on a form, except the form in this case is everything.

I'm not certain if there is a way to do this directly from within the .net API, but if there is I certainly have not found it.

View 1 Replies

Send 'a' And Capslock To The Active Application?

Mar 13, 2012

I'm looking for a simple sendinput example, f. e. how can I send 'a' and capslock to the active application?

View 1 Replies

Setting An Application As An Active Window?

Apr 13, 2009

I've tried everything to set my window as active after I've been working on another external App... I have my system on auto and need to send some keystrokes to the program using sendkeys, so I need that app active. I've tried almost everything I can think of, bringtofront, setfocus, windowstate, setactivewindow, setforegroundwindow (For the last 2, hwnd doesnt work - I'm using VB 2008 Express) but none of them seem to be working.

View 4 Replies

Bring A Form To The Front As Active Form

Jul 14, 2009

I am trying to have any only one form type eg Countries, Projects, or Vendors etc. open at the same time. So, if a user has the Country form open and goes to open it again from the menu I would like the applaication to bring the form to the Front of the MDI container. I have tried a number of things like BringToFront, ActivateMdiChild, etc.

[Code]....

View 3 Replies

Cannot Terminate Application - Process Remains Active

Nov 6, 2009

I'm having troubles with terminating an application. When I close the main form everything disappears but the process remains active. I think I know the cause, a certain activeX component will not release properly. As soon as I create one, I can't close normally...

dim someActiveXcomponent = new X()
...
<formClosing>
someActiveXcomponent = nothing
GC.Collect()
GC.WaitForPendingFinalizers ' here it hangs

Probably a bug in that component, but the problem is that I don't have much of a choice, I'll have to use that component for now.

Calling
System.Runtime.InteropServices.Marshal.ReleaseComO bject( myObject )
will kill the reference and now the application closes properly.

View 6 Replies

Get Information About What Application Is Active On A Computer At Anytime?

Aug 1, 2011

I want to build a logger that shows how much time I use on difffifernet applications on my pc.

How can I get info about what what application is has the focus.

I'm new to .Net, OOP and this forum but love it!

View 7 Replies

Keyboard Input - Send ALT + 1 Key To The Active Application

Apr 5, 2009

I amtrying to send ALT + 1 Key to the active application but the problem i am having is when i use SendKeys.SendWait("%1") the program ignores the alt key and jsut enters the 1. is there a way i can get this done?

View 11 Replies

Forms :: Make An Application That Allows The Manager Of The Company Whether The Employees Are Truly Active?

Sep 18, 2011

I want to make an application that allows the manager of the company whether the employees are truly active: screenshot and a "timer" to measure the time of the activity of the employee Can be controlled using the mouse or keyboard while the application is not active, but in execution.Is it possible in vb.net to know if the user of the machine is using the mouse or keyboard? My idea is to set a "Timer" which triggers automatically after the connection of the employee and every 10 seconds the application checks whether the mouse position has changed or a letter is entered on the keyboard except the"Timer" Will Be stopped until have a new mouse position or activity on the keyboard. But the problem is: is the application able to know the position of the mouse or to capture all keyboard input even if the application n 'is not active(not in the foreground)?

View 2 Replies

Obtain Information From Active Directory In A VB 2008 Console Application?

Dec 29, 2009

I am new to VB; am developing my first VB program; and require some help in getting started. I wish to query information from an Active Directory server using a Visual Basic 2008 console application. I have .NET Framwork 3.5 installed and VB 2008 Express installed. Do I need to install anything else (any additional libraries or components)? Is VB 2008 Express capable of accessing information from Active Directory? Where can I find information about the classes and methods I should use query information from Active Directory?

View 6 Replies

Can Zoom Form While It Is Active

Mar 20, 2012

i want to know is there any way i can zoom my form in vb.net. i could resize the form and byanchoring all controls to left top right bottom i can make it look like zoom. but it is not actually zooming. it is resizing. while font size and other formats are still as same.

View 1 Replies

Determine Active Form Name?

Apr 20, 2010

When debugging in VB6 it was easy to find the name of the active form because it was automatically highlighted in the Project Explorer.

How do I find the name of the active form in VS2010?

View 7 Replies

Get Active Control Of Form?

Mar 30, 2009

I want to get the active control (control which has the focus or where the cursor is on) each time the cursor moves to another control or each time a control receives a focus.

View 1 Replies

Get The Text Of The Active Form?

Apr 6, 2010

I need to build a program that can get the form's name of whatever window/application that is currently active/in focus. How do I do that?

View 2 Replies

How To Put An Active Login Form

Jul 30, 2010

I would like to put an active login form where by if one fails toput the correct password after 3 trials the program exits

View 1 Replies

Active Directory Groups In Form

Sep 18, 2008

I am writing an application where active directory validation is required before accessing the main form. There are 2 forms. Form 2 is the login form and form 1 is the main form. The main form would have a simple look, with about 10 checkboxes.I have managed to get the authentication working great but what now need to do is validate groups. Say if "user A" is in "groups A,B and C" and "user B" is in "groups B and C" i would like for them to use my login form, once they log in, the groups that they are members of would appear in a listbox on either form, (whichever is easiest) and is hidden from the user ... if they are in group A, then the main form would show only the first 3 checkboxes, if they are in group B, then it would show the 4th and 5th checkboxes, if in both groups then show the first 5 checkboxes etc.It is a simple idea, but is complicated to explain.As i said, the login form is working with the active directory... here is the code for the login form:[code]Form1 in the code is my main form, and wish for it to change according to which groups the user is in.

View 9 Replies

Forms :: Detecting If Form Is Active

Jun 2, 2011

I am new to vb.net and what I want to do is change the bg color if my form is active.
I have tried searches and try and fail but I cant figure it out

View 9 Replies

Forms :: Set The Form As The Active Window?

Mar 4, 2011

I was wondering if there's a method to set the form as the active window (not topmost obviously), if it's currently not the active window (meaning another window is currently the active one). By active I mean "selected".

View 1 Replies

Get Active Form Caption Color?

Aug 3, 2009

How can i get the color of the caption of the active form in winforms?

View 1 Replies

Get The Contents Of The Active Child MDI Form?

Jul 20, 2010

I want to get the contents of the active child MDI form, how do you do that? Here's what I did to create a child form.

childForm += 1
If childForm > UBound(childForms) Then
ReDim childForms(childForm)

[Code].....

So say I want to get the text from an active form. How can I get the active form id so I can just do this?

childforms(childform).textbox1.text

View 1 Replies







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