Home All Groups Group Topic Archive Search About

Q: Floating Windows in VB6

Author
31 Jan 2006 5:03 PM
Richard J
Hello group,

If you look at the query designer in Microsoft Access, or even .NET, the
diagram pane allows you to move and resize the table window within it.

Is there anyway to duplicate this feature in VB6 that does not involve
sub-classing?

Thanks.
Richard

Author
31 Jan 2006 5:46 PM
J French
On Tue, 31 Jan 2006 09:03:31 -0800, =?Utf-8?B?UmljaGFyZCBK?=
<Richa***@discussions.microsoft.com> wrote:

>Hello group,
>
>If you look at the query designer in Microsoft Access, or even .NET, the
>diagram pane allows you to move and resize the table window within it.
>
>Is there anyway to duplicate this feature in VB6 that does not involve
>sub-classing?

Form2.Show vbModeless, Me

This will keep Form2 on top of its owner (Form1) although the second
Form can be moved off the first

Private Sub Command1_Click()
   Form2.Show vbModeless, Me
   OldParent = SetParent(Form2.hWnd, Me.hWnd)
End Sub

And the above will keep Form2 (sort of) inside Form1

I'm not sure what the two examples you mention look like, but
personally I would probably use a UserControl (not OCXed) and send it
WM_NCLBUTTONDOWN after a ReleaseCapture and that will allow you to
resize it and drag it around