I've got a timer on my MDI parent form. If there's no mouse movement
for a set number of minutes, the Visible property of all open forms is
set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error
after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms
If m.Name <> "frmMain" Then
m.Visible = False
End If
Next m
It won't list all the open forms if one of the child forms is showing
another modal form. And again, once it hides the first form, it bombs
out--something about my OpenForms collection changing. 11 2965
Kevin,
I try to avoid the my namespace, it is mainly created for VB6 developers,
while there were already good solutions, which are in my opinion less
confusing when you want to use OOP. (In some cases the my namespace has
handy features so don't understand me wrong).
In your parent you can use the mdichildren instead of that openforms http://msdn2.microsoft.com/en-us/lib...ichildren.aspx
This msdn page is in my idea confusing. It has to be me.mdichildren or just
mdichildren
There are more properties around the MDI form which are easy for you with
what you are busy,
I hope this helps,
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht
news:2h******** *************** *********@4ax.c om... I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms If m.Name <> "frmMain" Then m.Visible = False End If Next m
It won't list all the open forms if one of the child forms is showing another modal form. And again, once it hides the first form, it bombs out--something about my OpenForms collection changing.
I tried that too. The only problem is, I can't seem to open a
MDIChild form modally. I have to make them non-child forms to open
them modally, so they don't end up in the MDIChildren collection.
On Sat, 24 Jun 2006 07:16:02 +0200, "Cor Ligthert [MVP]"
<no************ @planet.nl> wrote: Kevin,
I try to avoid the my namespace, it is mainly created for VB6 developers, while there were already good solutions, which are in my opinion less confusing when you want to use OOP. (In some cases the my namespace has handy features so don't understand me wrong).
In your parent you can use the mdichildren instead of that openforms
http://msdn2.microsoft.com/en-us/lib...ichildren.aspx
This msdn page is in my idea confusing. It has to be me.mdichildren or just mdichildren
There are more properties around the MDI form which are easy for you with what you are busy,
I hope this helps,
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht news:2h******* *************** **********@4ax. com... I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms If m.Name <> "frmMain" Then m.Visible = False End If Next m
It won't list all the open forms if one of the child forms is showing another modal form. And again, once it hides the first form, it bombs out--something about my OpenForms collection changing.
you can't make a child form a modal form, its impossible... modal has to
have top level access and all parents behind it lose access at that time
(they get locked out of gaining focus) this is impossible to do when it is a
child of a MDI form inside a MDI window..
"Kevin" <ke****@cfl.rr. com> wrote in message
news:7u******** *************** *********@4ax.c om... I tried that too. The only problem is, I can't seem to open a MDIChild form modally. I have to make them non-child forms to open them modally, so they don't end up in the MDIChildren collection.
On Sat, 24 Jun 2006 07:16:02 +0200, "Cor Ligthert [MVP]" <no************ @planet.nl> wrote:
Kevin,
I try to avoid the my namespace, it is mainly created for VB6 developers, while there were already good solutions, which are in my opinion less confusing when you want to use OOP. (In some cases the my namespace has handy features so don't understand me wrong).
In your parent you can use the mdichildren instead of that openforms
http://msdn2.microsoft.com/en-us/lib...ichildren.aspx
This msdn page is in my idea confusing. It has to be me.mdichildren or just mdichildren
There are more properties around the MDI form which are easy for you with what you are busy,
I hope this helps,
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht news:2h****** *************** ***********@4ax .com... I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms If m.Name <> "frmMain" Then m.Visible = False End If Next m
It won't list all the open forms if one of the child forms is showing another modal form. And again, once it hides the first form, it bombs out--something about my OpenForms collection changing.
I bet you anything your exception is because you are modifying the
collection and the enumeration is changing
for each depends on the enumeration it stay constant... you cant change it
during the loop... so when you hide a form its probably removing it from the
enumeration of open forms and its like oh look i change cant keep going...
this also applies to looping through other collection enumerations like list
box items and such and like removing an item from the list while you are
going through it... the only way around it is drop the for each and use a
for i as integer = 0 to my.application. openforms.count -1 type of loop
this will not be affected by the collection changing like for each is
I started to do the For Next loop, but I'm not real sure how to call
each form.
On Sat, 24 Jun 2006 15:17:50 -0400, "Smokey Grindle"
<no****@dontspa mme.com> wrote: I bet you anything your exception is because you are modifying the collection and the enumeration is changing
for each depends on the enumeration it stay constant... you cant change it during the loop... so when you hide a form its probably removing it from the enumeration of open forms and its like oh look i change cant keep going... this also applies to looping through other collection enumerations like list box items and such and like removing an item from the list while you are going through it... the only way around it is drop the for each and use a for i as integer = 0 to my.application. openforms.count -1 type of loop this will not be affected by the collection changing like for each is
Than if you don't have MDI forms, why is your question about that?
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht
news:7u******** *************** *********@4ax.c om... I tried that too. The only problem is, I can't seem to open a MDIChild form modally. I have to make them non-child forms to open them modally, so they don't end up in the MDIChildren collection.
On Sat, 24 Jun 2006 07:16:02 +0200, "Cor Ligthert [MVP]" <no************ @planet.nl> wrote:
Kevin,
I try to avoid the my namespace, it is mainly created for VB6 developers, while there were already good solutions, which are in my opinion less confusing when you want to use OOP. (In some cases the my namespace has handy features so don't understand me wrong).
In your parent you can use the mdichildren instead of that openforms
http://msdn2.microsoft.com/en-us/lib...ichildren.aspx
This msdn page is in my idea confusing. It has to be me.mdichildren or just mdichildren
There are more properties around the MDI form which are easy for you with what you are busy,
I hope this helps,
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht news:2h****** *************** ***********@4ax .com... I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms If m.Name <> "frmMain" Then m.Visible = False End If Next m
It won't list all the open forms if one of the child forms is showing another modal form. And again, once it hides the first form, it bombs out--something about my OpenForms collection changing.
On Sun, 25 Jun 2006 00:17:33 GMT, Kevin <ke****@cfl.rr. com> wrote: I started to do the For Next loop, but I'm not real sure how to call each form.
For Each ChildForm As Form In Me.MdiChildren
ChildForm.Visib le = False
Next
Gene On Sat, 24 Jun 2006 15:17:50 -0400, "Smokey Grindle" <no****@dontsp amme.com> wrote:
I bet you anything your exception is because you are modifying the collection and the enumeration is changing
for each depends on the enumeration it stay constant... you cant change it during the loop... so when you hide a form its probably removing it from the enumeration of open forms and its like oh look i change cant keep going... this also applies to looping through other collection enumerations like list box items and such and like removing an item from the list while you are going through it... the only way around it is drop the for each and use a for i as integer = 0 to my.application. openforms.count -1 type of loop this will not be affected by the collection changing like for each is
you can access them by index...
for i as integer = 0 to my.application. openforms.count -1
my.application. openforms(i).vi sible = false
next
"Kevin" <ke****@cfl.rr. com> wrote in message
news:lf******** *************** *********@4ax.c om... I started to do the For Next loop, but I'm not real sure how to call each form.
On Sat, 24 Jun 2006 15:17:50 -0400, "Smokey Grindle" <no****@dontspa mme.com> wrote:
I bet you anything your exception is because you are modifying the collection and the enumeration is changing
for each depends on the enumeration it stay constant... you cant change it during the loop... so when you hide a form its probably removing it from the enumeration of open forms and its like oh look i change cant keep going... this also applies to looping through other collection enumerations like list box items and such and like removing an item from the list while you are going through it... the only way around it is drop the for each and use a for i as integer = 0 to my.application. openforms.count -1 type of loop this will not be affected by the collection changing like for each is
I have MDI forms , but occasionally I have to show a form modally. NOT
EVERY form can be a MDI Child form!
On Sun, 25 Jun 2006 07:16:10 +0200, "Cor Ligthert [MVP]"
<no************ @planet.nl> wrote: Than if you don't have MDI forms, why is your question about that?
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht news:7u******* *************** **********@4ax. com...I tried that too. The only problem is, I can't seem to open a MDIChild form modally. I have to make them non-child forms to open them modally, so they don't end up in the MDIChildren collection.
On Sat, 24 Jun 2006 07:16:02 +0200, "Cor Ligthert [MVP]" <no************ @planet.nl> wrote:
Kevin,
I try to avoid the my namespace, it is mainly created for VB6 developers, while there were already good solutions, which are in my opinion less confusing when you want to use OOP. (In some cases the my namespace has handy features so don't understand me wrong).
In your parent you can use the mdichildren instead of that openforms
http://msdn2.microsoft.com/en-us/lib...ichildren.aspx
This msdn page is in my idea confusing. It has to be me.mdichildren or just mdichildre n
There are more properties around the MDI form which are easy for you with what you are busy,
I hope this helps,
Cor
"Kevin" <ke****@cfl.rr. com> schreef in bericht news:2h***** *************** ************@4a x.com... I've got a timer on my MDI parent form. If there's no mouse movement for a set number of minutes, the Visible property of all open forms is set to False and the Log On form is displayed. I could do it in VB6.
In VB2005 I can get a list of all the open forms, but I get an error after hiding the first one.
This is what I'm trying to use:
For Each m In My.Application. OpenForms If m.Name <> "frmMain" Then m.Visible = False End If Next m
It won't list all the open forms if one of the child forms is showing another modal form. And again, once it hides the first form, it bombs out--something about my OpenForms collection changing. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: web_design |
last post by:
I put this together from some other scripts I am using on a site. I'm
trying to make a better email hiding script. It isn't working. Also, it
causes Internet Explorer 6 SP2 to block the script as "active content". :(
The idea is that if the user doesn't have JavaScript enabled, they will see
an image of the email address (that can't be read by email harvesting
programs). If JavaScript is enabled, the image will be hidden and the...
|
by: Bob Weiner |
last post by:
What is the purpose of hiding intead of overriding a method? I have googled
the question but haven't found anything that makes any sense of it.
In the code below, the only difference is that when the Poodle is upcast to
the Dog (in its wildest dreams) it then says "bow wow" where the bernard
always says "woof" (see code). Basically, it appears that I'm hiding the
poodle's speak method from everything except the poodle.
Why would I...
|
by: Mr Newbie |
last post by:
I was thinking about developing a workflow application yesterday and was
musing over the different approaches than one could take in restricting
specific actions on a ticket( Form ) at any said stage.
One approach I have used on other systems is to prevent the action buttons
appearing. For example, if one did not have the Role of Administrator, one
would be prevented from deleting a ticket not created by oneself.
However, it did occur...
|
by: Tom |
last post by:
I have a DLL that has a couple of class objects, and a few forms. When
someone uses my DLL (i.e. puts a reference to it in their program), I want
them to see the class objects that are public, but I -DON'T- want them to
see the forms (via intellisense). They should only be able to access the
forms by calling routines in the class libraries which then display the
forms.
What do I need to do to get this to occur? Declare each forms...
|
by: Ivan |
last post by:
I am used to VB6 and am not sure how to do this in
Vstudio .NET. I have a main form which calls other
forms. I want to disable that main form while other ones
are called. I tried hiding it and creating a new instance
of the main form when returning to it but than my
application is just creating more forms. How do I hide
the main form and return back to it when exiting another
form?
| |
by: c.verma |
last post by:
I am not able to hide a href element using javascript. Here is my code
written on aspx page.
On the click of "OK" button, I want to hide href element. But I am
getting message: Object required. Any ideas?
<asp:textbox id="txtWait" style="DISPLAY: none" runat="server"
Width="326px" BorderStyle="None" BorderColor="whitesmoke"
ForeColor="Red" ReadOnly="true" Font-Bold="True">Please wait while we
process your information...</asp:textbox><br>
|
by: Steve954 |
last post by:
I recently installed and started using VS2005 on a Windows XP Pro machine.
When creating a new windows forms project I find that I am unable to hide any
forms using the me.hide() or me.visible = False methods. As far as I can tell
these methods are available and should work in VB2005. Any help and advise
would be great as this is causing be a number of problems of two new
projects I am working on.
Many Thanks
|
by: Dom |
last post by:
Hi all
I'm developing a control, and I need to hide some properties to the
user. For example, suppose I need Text property to be completely
inacessible (from a Form/Code that is into another project/assembly).
I tried with attributes:
<Browsable(False), _
EditorBrowsable(EditorBrowsableState.Never), _
RefreshProperties(RefreshProperties.Repaint), _
|
by: Jordi Rico |
last post by:
Hi, I have an MDI Form which shows maximized mdi chil forms.
I don't want these forms to show its own icon, and I am not able to
hide it...
Is there any way of hiding my forms icons???
Thanks
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |