473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

About Multi-MDI

yxq
Hello
There is two buttons(button1 and button2) in left of a parent
Form(frmParent), i want to show two MDI Form(subForm1 and subForm2) on
right, when click button1, subForm1 shown, click button2, subForm2 shown. I
wirtten some code, but when maximize frmParent, subForm can not be shown
right. Please help me.

************************************************** ********
'frmMain

Private oSubForm1 As Form
Private oSubForm2 As Form

Private Sub frmParent_Load(...)
Me.IsMdiContainer = True
oSubForm1 = New subForm1
oSubForm1.MdiParent = Me
oSubForm1.Show()
End sub

Private sub button1_Click(...)
oSubForm1.Activate()
End sub

Private sub button2_Click(...)
If oSubForm2 Is Nothing Then
oSubForm2 = New subForm2()
oSubForm2.MdiParent = Me
oSubForm2.Show()
Else
subForm2.Activate()
End If
End sub

'subForm1
Private subForm1_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

'subForm
Private subForm2_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

************************************************** ************************
Nov 20 '05 #1
6 1263


----- yxq wrote: ----
subForm can not be shown right.


This statement is pretty vague. Can you elaborate?
Nov 20 '05 #2
Fix your date.

--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"yxq" <ga***@163.net> wrote in message news:ul**************@TK2MSFTNGP09.phx.gbl...
Hello
There is two buttons(button1 and button2) in left of a parent
Form(frmParent), i want to show two MDI Form(subForm1 and subForm2) on
right, when click button1, subForm1 shown, click button2, subForm2 shown. I
wirtten some code, but when maximize frmParent, subForm can not be shown
right. Please help me.

************************************************** ********
'frmMain

Private oSubForm1 As Form
Private oSubForm2 As Form

Private Sub frmParent_Load(...)
Me.IsMdiContainer = True
oSubForm1 = New subForm1
oSubForm1.MdiParent = Me
oSubForm1.Show()
End sub

Private sub button1_Click(...)
oSubForm1.Activate()
End sub

Private sub button2_Click(...)
If oSubForm2 Is Nothing Then
oSubForm2 = New subForm2()
oSubForm2.MdiParent = Me
oSubForm2.Show()
Else
subForm2.Activate()
End If
End sub

'subForm1
Private subForm1_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

'subForm
Private subForm2_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

************************************************** ************************

Nov 20 '05 #3
Fix your date
Nov 20 '05 #4
* "yxq" <ga***@163.net> scripsit:
Hello
There is two buttons(button1 and button2) in left of a parent
Form(frmParent), i want to show two MDI Form(subForm1 and subForm2) on
right, when click button1, subForm1 shown, click button2, subForm2 shown. I
wirtten some code, but when maximize frmParent, subForm can not be shown
right. Please help me.

************************************************** ********
'frmMain

Private oSubForm1 As Form
Private oSubForm2 As Form

Private Sub frmParent_Load(...)
Me.IsMdiContainer = True
oSubForm1 = New subForm1
oSubForm1.MdiParent = Me
oSubForm1.Show()
End sub

Private sub button1_Click(...)
oSubForm1.Activate()
End sub

Private sub button2_Click(...)
If oSubForm2 Is Nothing Then
oSubForm2 = New subForm2()
oSubForm2.MdiParent = Me
oSubForm2.Show()
Else
subForm2.Activate()
End If
End sub

'subForm1
Private subForm1_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

'subForm
Private subForm2_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub


If the child form is maximized, it covers the whole free space inside
the MDI container. If one child is maximized, the other children are
maximized too. That's by design.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5
* "yxq" <ga***@163.net> scripsit:
Could you please help me to test the code in accessories?


Your system date/time is still wrong.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
yxq
I have corrected my date.
Do you test the sample code in my accessories?

Thanks

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> дÈëÓʼþ
news:2i************@uni-berlin.de...
* "yxq" <ga***@163.net> scripsit:
Hello
There is two buttons(button1 and button2) in left of a parent
Form(frmParent), i want to show two MDI Form(subForm1 and subForm2) on
right, when click button1, subForm1 shown, click button2, subForm2 shown. I wirtten some code, but when maximize frmParent, subForm can not be shown
right. Please help me.

************************************************** ********
'frmMain

Private oSubForm1 As Form
Private oSubForm2 As Form

Private Sub frmParent_Load(...)
Me.IsMdiContainer = True
oSubForm1 = New subForm1
oSubForm1.MdiParent = Me
oSubForm1.Show()
End sub

Private sub button1_Click(...)
oSubForm1.Activate()
End sub

Private sub button2_Click(...)
If oSubForm2 Is Nothing Then
oSubForm2 = New subForm2()
oSubForm2.MdiParent = Me
oSubForm2.Show()
Else
subForm2.Activate()
End If
End sub

'subForm1
Private subForm1_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub

'subForm
Private subForm2_Load(...)
Me.ControlBox = False
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.Manual
End Sub


If the child form is maximized, it covers the whole free space inside
the MDI container. If one child is maximized, the other children are
maximized too. That's by design.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #7

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

Similar topics

0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
10
by: Robert Stearns | last post by:
In a table which has an animal id, its dam id and sire id, I want to see a combined list of all animal ids. I tried the following, which did not work, but did not give any error messages: select...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
23
by: Steven T. Hatton | last post by:
This is one of the first obstacles I encountered when getting started with C++. I found that everybody had their own idea of what a string is. There was std::string, QString, xercesc::XMLString,...
53
by: jaso | last post by:
Can you give any comments on this code? I used one goto, is it bad? #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <assert.h> #define NOT_NULL 1
6
by: jane | last post by:
HI, I had a special senario here.. I need to build a database which only around 50-70GB finally. But one of table would be 40GB finally. ( grow every year until to the retension period) ...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
1
by: mknoll217 | last post by:
I am recieving this error from my code: The multi-part identifier "PAR.UniqueID" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part identifier...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
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...
0
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,...

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.