Well, Steve, since no one's answered this all day, lemme take a shot at it. I'm not sure at what point the Form's Layout event fires, but I'm betting it's during the Load sometime. How about if you try adding a public method to your form that does the .SetBounds() and then call that method after you instantiate the form, but before you .Show() it ... something like this (hope I got the VB syntax right):
Dim oForm As New MyForm()
oForm.SetTheBounds("parms here if needed")
oForm.Show()
You probably won't need the Layout eventhandler in your form now. But, if I'm wrong about when the Layout event fires, then this might not work. I haven't tested it, but try it out and see what happens. If it doesn't work, I'm sure there's some variation on the theme that will.
~~Bonnie
>Hi:
>
>I’m trying to programmatically move a form to a different location from another form. When I’m in a form I can do the following:
>
>Private Sub oForm_Layout(ByVal sender As Object, ByVal e As System.Windows.Forms.LayoutEventArgs) Handles MyBase.Layout
>
> oForm.SetBounds(0, 0, 100, 300)
>
>end sub
>
>And it works great. However, I want to move this form from say another form. Any idea’s?
>
>Thanks, Steve