|
-
Nov 30th, 2006, 04:17 AM
#1
Thread Starter
Hyperactive Member
-
Nov 30th, 2006, 04:38 AM
#2
Addicted Member
Re: Form inside a From
Use MDI form to make your first form as container of other forms.
Set IsMDIContainer to true. Remember, this is read only property, which mean only can be set at design time.
To make your form1 appear first, go to project properties, select application tab. At startup form, select the form that you desired as startup.
Regards
Michael
-
Nov 30th, 2006, 05:08 AM
#3
Thread Starter
Hyperactive Member
Re: Form inside a From
@ michaelrawi - Thx for the tips. Now the form1 is being debugged 1st. The report button opens the form2. But the form2 is being opened as a popup. How can i set it to be shown inside de MDI container?
Thx for teh help Michael
Rafael
-
Nov 30th, 2006, 05:16 AM
#4
Lively Member
Re: Form inside a From
Something like
VB Code:
Dim frmRpt as frmReport = new frmReport
frmRpt .MdiParent = me
frmRpt.Show()
-
Nov 30th, 2006, 05:18 AM
#5
Thread Starter
Hyperactive Member
Re: Form inside a From
works perfect 
thx lingsn
-
Nov 30th, 2006, 05:29 AM
#6
Re: [RESOLVED] Form inside a From
Another way if you want the second form to be easily made to look like a part of the first form (the user can't drag it etc.)
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim InsideForm As New Form2
InsideForm.TopLevel = False
Me.Controls.Add(InsideForm)
InsideForm.FormBorderStyle = FormBorderStyle.None
'where to show the from, the coordinates are relative to the mother form, not the screen
InsideForm.Left = 20
InsideForm.Top = 20
InsideForm.BackColor = Color.Blue 'just a demonstration where the second form is
InsideForm.Show()
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|