For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > January 2006 > Q: Floating Windows in VB6









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Q: Floating Windows in VB6
Richard J

2006-01-31, 6:55 pm

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
J French

2006-01-31, 6:55 pm

On Tue, 31 Jan 2006 09:03:31 -0800, =?Utf-8?B?UmljaGFyZCBK?=
<RichardJ@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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com