Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,456 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,905 people online right now. Registration is fast and FREE... Join Now!




Checking if a form is open

 
Reply to this topicStart new topic

Checking if a form is open

LudwigNel
25 Jul, 2008 - 03:35 AM
Post #1

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 3

I have MDIParent form with a menustrip.
I do not want a save button on each child form.
How do I check which form is open so I'll know which save function to run?
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Checking If A Form Is Open
25 Jul, 2008 - 05:01 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,993



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Is this like your other thread where you're using VB.NET (I imagine so)?
User is offlineProfile CardPM
+Quote Post

LudwigNel
RE: Checking If A Form Is Open
25 Jul, 2008 - 05:45 AM
Post #3

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 3

Yes, sorry.
I meant to mention that it was in VB.NET
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Checking If A Form Is Open
25 Jul, 2008 - 09:30 AM
Post #4

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 3,906



Thanked: 34 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
Moved.
User is offlineProfile CardPM
+Quote Post

AdamSpeight2008
RE: Checking If A Form Is Open
25 Jul, 2008 - 09:55 AM
Post #5

LINQ D.I.C.
Group Icon

Joined: 29 May, 2008
Posts: 799



Thanked: 51 times
Dream Kudos: 2175
My Contributions
Have you tried seeing if the form is visible?

vb

Public Function FormOpen(ByRef thisForm As Form) As Boolean
Return thisForm.Visible
End Function

User is offlineProfile CardPM
+Quote Post

ResoluteTechie
RE: Checking If A Form Is Open
25 Jul, 2008 - 10:19 AM
Post #6

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 1

To check active child form, You can check by using ActiveMdiChild property in your MDI form.

CODE
Me.ActiveMdiChild.Name

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:36PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month