473,662 Members | 2,454 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in working with childforms in vb.net


hello to all

i got some problem with child forms in my vb.net application.
in my application i need to maximize some child forms when they are loaded
(set the windowstate to maximized at design time).

if i do so then, the next form opened which is not be maximized and the
windowstate is also set to "normal" at design time also getting maximized
(awwwwww it sucks). why this happens so ?. (i guess its setting the prev.
forms window state .... )

i have set the maximizebox to "flase" for all the forms which i don't want
to maximize and set the formboaderstyle to "fixedsingl e"

to solve my problem what should i do ?

in short >> i want to retain the childforms windowstate property set at
design time (not to be changed automatically at run time)

please some body help me out ...

adv. thanks

Nov 21 '05 #1
4 1194
Sympatico,

In the way you understand it is it in my opinion something as setting a
switch which tells about the windowstate of your forms and use that when you
"load" a form. (The registry is a very good place for that in my opinion,
because than the next time it is as well in the previous state)

I hope this helps?

Cor
Nov 21 '05 #2
Hi Cor,

I find that this is not true. The status of the active child form controls
the status of all others. If you maximize a child form, all of them become
maximized; if you change to normal, all the others change to normal.

Bernie Yaeger

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:uF******** ******@TK2MSFTN GP12.phx.gbl...
Sympatico,

In the way you understand it is it in my opinion something as setting a
switch which tells about the windowstate of your forms and use that when you "load" a form. (The registry is a very good place for that in my opinion,
because than the next time it is as well in the previous state)

I hope this helps?

Cor

Nov 21 '05 #3
Bernie,

You are right, thank you for making me attent on it, made a to quick simple
answer without real thinking maybe. You should see the wound on my head from
hitting on it.

Thank you for making me attent on this mistake, I keep it in mind.

Cor
Nov 21 '05 #4
sympatico,

Bernie made me attent I gave you a wrong messages.
Maybe you can use this (changed and shorten) code I use for it.

\\\
Private Sub mnuFrmHandling( ByVal frmName As String)
For Each frm As Form In Me.MdiChildren
If frm.Name = frmName Then
frm.BringToFron t()
Exit Sub
End If
Next
Dim frmNew As Form
Select Case frmName
Case "Persons"
frmNew = New frmPersons
Case Else
frmNew = New frmStandard(frm Name)
End Select
frmNew.MdiParen t = Me
frmNew.Show()
frmNew.WindowSt ate = FormWindowState .Maximized
frmNew.Name = frmName
frmNew.BringToF ront()
End Sub
///
I hope this helps?

Cor
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
5203
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass(); .... and then call the virtual method, why is it that the base class's method is called instead of the overridden method? How do I fix this if I don't know at runtime what the child class is? I'm using Activator.CreateInstance() to load the...
2
1271
by: pei_world | last post by:
I have a contextMenu in MDIparent form, but why it also show up in my MDIchild form as well. how to get rid of it? thanks
3
5610
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent window. I have set all my child windows to be WindowState.Maximized but after showing 2 or 3 windows, the windows all drop back to Normal state. I have tried various things to overcome this inclusing overriding OnResize etc but none seem to give...
0
1087
by: Dumdidum | last post by:
Hello I am a newbie to VB.NET, normally I code in VB6! Now I have a big problem: I want to have a server which has a windows media player-Control on it. With the client I should remotly remote windows media player! Therefore I took the sample "Sockets" from 101 samples for VB.NET from microsoft
1
1172
by: | last post by:
Any help would be greatly appreciated. I'm trying to loop through my child forms.I've seen the "for...each" loop to do this somewhere but can't find it now. I'm thinking storing the form names in an arraylist maybe? For each form(not right) in System.Windows.Forms.Form(not right) Thank You!
2
1475
by: andreas | last post by:
Hi, How to minimize with code all de childforms in the parentform. I want to put a menuitem with text "MInimize all" in a parent form to minimize all the child forms in the parent form at once. How to code ?
2
1562
by: SL33PY | last post by:
Hi and thank you for taking the time to read about my problem. I have a simple MDI parent form frmMain with a menu (file, edit, window, help). Under file you can create new childforms called SelectSample. Under Window there are a bunch of (standard) options, like tile horizontal/vertical and cascade. I also have an entry "Center Window". What I want to obtain here is that when a childwindow exist (the check is
1
1952
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and accessing the webservice each min. It was working 100% fine. Problem: But now in actual deployment, we have deployed webservice in Win Server 2003 and we have used all the default configurations. Now the clients are accessing that service the same way...
4
1757
nev
by: nev | last post by:
how to code this? i don't wanna check each childforms if they are visible or not. i tried... if mdiparent.hasopenchildforms then msgbox("childform/s open") end if of course this will not work because there is no method like that.
0
8432
marktang
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...
0
8856
Oralloy
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...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7365
agi2029
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...
1
6185
isladogs
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...
0
5653
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();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.