Sep 4th, 2001, 07:47 PM
#1
Thread Starter
Frenzied Member
MDIForm
ok...i have a MDIForm with a regular form inside of it..now when i click New i want it to come up with the same form1 over again..like in MSWord when you click new..and a new document comes up over and over and over again? yeah...anyone understand this post at all?
Sep 4th, 2001, 08:04 PM
#2
PowerPoster
Use this code for the New thing in your MDI form
VB Code:
Private Sub mnuNew_Click()
Static lDocumentCount As Long
Dim frmD As Form1
lDocumentCount = lDocumentCount + 1
Set frmD = New Form1
frmD.Caption = "Document " & lDocumentCount
frmD.Show
End Sub
Sep 4th, 2001, 08:14 PM
#3
Thread Starter
Frenzied Member
Ok that worked but...when i clicked new..it came up with the form1 and then another window with Document 1....how would i fix it?
Sep 4th, 2001, 08:19 PM
#4
PowerPoster
Sep 4th, 2001, 08:22 PM
#5
Thread Starter
Frenzied Member
send me that program you made..i'll check what i did....
Sep 4th, 2001, 08:23 PM
#6
PowerPoster
Ah! I didn't save it...hang on have to build it again.
A "please" wouldn't go amiss either!
Sep 4th, 2001, 08:24 PM
#7
Addicted Member
Did you put the frmD MDIChild property to true? If no, this maybe your problems.
Sep 4th, 2001, 08:26 PM
#8
PowerPoster
Attached Files
Sep 4th, 2001, 08:32 PM
#9
Thread Starter
Frenzied Member
Oh..oops..lol sorry..i was kinda rushing and crap..here..if this will make you happy..
Can i please please pleaaaaase have that program you made?
ok...well since it's here..thanks..i'll check it out.
Sep 4th, 2001, 08:33 PM
#10
Addicted Member
It works well on my computer
Sep 4th, 2001, 08:39 PM
#11
Thread Starter
Frenzied Member
ohhh i found the problem..look..this is what i did....now i need help again..
VB Code:
'this is for Form1 (the MDIChild)
Private Sub Form_Resize()
RichTextBox1.Width = Form1.Width - 100
RichTextBox1.Height = Form1.Height - 400
End Sub
and every time it does that..it brings up this.....
Attached Images
Sep 4th, 2001, 08:53 PM
#12
PowerPoster
Try this instead. You can't reference Form1 directly anymore.
VB Code:
Private Sub Form_Resize()
RichTextBox1.Width = Me.ScaleWidth - 120
RichTextBox1.Height = Me.ScaleHeight - 120
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