Click here to Skip to main content
15,922,512 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionReading Icons Pin
Quecumber25615-Feb-06 8:42
Quecumber25615-Feb-06 8:42 
AnswerRe: Reading Icons Pin
Dave Kreskowiak15-Feb-06 10:35
mveDave Kreskowiak15-Feb-06 10:35 
GeneralRe: Reading Icons Pin
Quecumber25615-Feb-06 13:52
Quecumber25615-Feb-06 13:52 
GeneralRe: Reading Icons Pin
Dave Kreskowiak15-Feb-06 15:14
mveDave Kreskowiak15-Feb-06 15:14 
QuestionCreating larger controls Pin
K. Shaffer15-Feb-06 5:47
K. Shaffer15-Feb-06 5:47 
AnswerRe: Creating larger controls Pin
Dave Kreskowiak15-Feb-06 10:22
mveDave Kreskowiak15-Feb-06 10:22 
QuestionHow to Place a MDI Child on Parent form panel control Pin
GetFree123GetFree15-Feb-06 5:03
GetFree123GetFree15-Feb-06 5:03 
AnswerRe: How to Place a MDI Child on Parent form panel control Pin
Dave Kreskowiak15-Feb-06 10:13
mveDave Kreskowiak15-Feb-06 10:13 
A couple of things...

First, you can't add an MDIChild form to another control. It'll only work inside an MDIParent form, in its MDIClient control, which is hidden, but plainly obvious on your MDIParent form. THe MDIClient control is docked to take up the entire unused area of an MDIParent form. You can get a reference to the MDIClient control in the MDIParent form using:
Dim mdiClient As MDIClient
For Each ctrl As Control In Me.Controls
    If TypeOf ctrl Is MDIClient Then
        mdiClient = ctrl
        Exit For
    End If
Next
If mdiClient Is Nothing Then
    Throw New Exception("MDIClient control not found!")
End If

Don't get any cute ideas, there can only be one MDIClient control on a form. You can get more information on it here[^], but it's not very well documented. Also, Windows does NOT support a window being both an MDIParent AND an MDIChild, so you can NOT create a form that is both and nest as many MDIChild forms as you want inside each other.

You CAN, however, treat a form as a control! Ever notice that the Form class inherits from the Control class? Well, in .NET 1.0 and 1.1, it inherits from Control. In .NET 2.0 it inherits from ContainerControl, which eventually inherits from Control, and so does any Windows Forms control, like Button or Label or TextBox. Hmmmm... How could you get a Form to behave like any other Control?

It's not as simple as adding it to another forms Controls collection, but it's very close! Click here[^] for the answer.




RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome


-- modified at 16:14 Wednesday 15th February, 2006
GeneralRe: How to Place a MDI Child on Parent form panel control Pin
GetFree123GetFree16-Feb-06 4:29
GetFree123GetFree16-Feb-06 4:29 
QuestionReport Pin
Greeky15-Feb-06 2:45
Greeky15-Feb-06 2:45 
QuestionTextBox Names Pin
Konstantin_progr15-Feb-06 2:41
Konstantin_progr15-Feb-06 2:41 
AnswerRe: TextBox Names Pin
Greeky15-Feb-06 3:04
Greeky15-Feb-06 3:04 
GeneralRe: TextBox Names Pin
Konstantin_progr15-Feb-06 3:41
Konstantin_progr15-Feb-06 3:41 
GeneralRe: TextBox Names Pin
Greeky15-Feb-06 3:51
Greeky15-Feb-06 3:51 
GeneralRe: TextBox Names Pin
Konstantin_progr15-Feb-06 4:05
Konstantin_progr15-Feb-06 4:05 
QuestionStart windows app from windows service Pin
drodriguez15-Feb-06 1:38
drodriguez15-Feb-06 1:38 
AnswerRe: Start windows app from windows service Pin
albertino callientes15-Feb-06 7:18
albertino callientes15-Feb-06 7:18 
Joke[Message Deleted] Pin
Hari Om Prakash Sharma15-Feb-06 0:19
Hari Om Prakash Sharma15-Feb-06 0:19 
AnswerRe: How to show icon keeping flat style=system on button? Pin
Dave Kreskowiak15-Feb-06 7:44
mveDave Kreskowiak15-Feb-06 7:44 
AnswerRe: How to show icon keeping flat style=system on button? Pin
Joshua Quick15-Feb-06 8:28
Joshua Quick15-Feb-06 8:28 
QuestionCrystal Reports Pin
Mfirdous15-Feb-06 0:00
Mfirdous15-Feb-06 0:00 
QuestionDiscussing coding style of non-fixed length Multi-dimension Array Pin
cylix200014-Feb-06 22:50
cylix200014-Feb-06 22:50 
AnswerRe: Discussing coding style of non-fixed length Multi-dimension Array Pin
Guffa15-Feb-06 3:01
Guffa15-Feb-06 3:01 
AnswerRe: Discussing coding style of non-fixed length Multi-dimension Array Pin
Qhalis15-Feb-06 9:46
Qhalis15-Feb-06 9:46 
QuestionHow can I auto-populate two MS Word document fields (customer name) and (address) Pin
kenn_rosie14-Feb-06 20:36
kenn_rosie14-Feb-06 20:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.