|
-
Jan 27th, 2003, 04:13 PM
#1
Thread Starter
Hyperactive Member
Child Form
I want to make it when a child form is moved it will push back to centerscreen on the parent form...
Any suggestions?
Anjari
P.s. and yes I did try center to parent but that didnt work... center to screen did but that made it uneven...
Thanks again
-
Jan 27th, 2003, 05:38 PM
#2
Sleep mode
Set the startposition property of child to centerparent
VB Code:
'this code goes inside child form
Me.StartPosition = FormStartPosition.CenterParent
I hope this help
-
Jan 28th, 2003, 10:32 AM
#3
Thread Starter
Hyperactive Member
Sorry...
Maybe I should have made myself a little bit clearer... What I want to do is place code into the "Move" event that will replace the form to the center of the parent if it is moved...
Basically I just don't want the person to move the form ... Maybe I am going about it the wrong way...
Any Tips?
Code Below:
Thanks,
Anjari
P.S. - The above code doesnt work either that appears to be "Startup" settings...
Code:
Protected Overrides Sub OnClosed(ByVal e As System.EventArgs)
'Show Menu Items
Dim MainForm As New frmMain()
MainForm = Me.ParentForm
MainForm.mnuCompanyCompanyInformation.Visible = True
MainForm.mnuCompanySpacer1.Visible = True
End Sub
Protected Overrides Sub OnMove(ByVal e As System.EventArgs)
'Restore to Center Screen if Moved
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
'Close Form
Me.Close()
End Sub
Last edited by Anjari; Jan 28th, 2003 at 11:02 AM.
-
Jan 28th, 2003, 01:12 PM
#4
Sleep mode
look at this if it helps if not let me know then :
-
Jan 30th, 2003, 11:54 PM
#5
Junior Member
Is
Me.Left = Me.MdiParent.Width /2 - (Me.Width /2)
Me.Top = Me.MdiParent.Height /2 - (Me.Height / 2)
What your trying to do?
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
|