Floating Form in VB 6

How do I create a floating form in Visual Basic v6.0?
drago97Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Erick37Commented:
If you mean a form that is always on top, the answer is here:

"HOWTO: Create a Form That Always Stays on Top"

http://support.microsoft.com/support/kb/articles/q184/2/97.asp
0
drago97Author Commented:
I want to have 2 forms open and one smaller one floating that you can move around and is always on top.
0
sdland1Commented:
go to http://lightning.prohosting.com/~shell123/ search the sniplets section for Always On Top
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

drago97Author Commented:
I was told to do the following:

Sub FloatingForm(frmParent as Form, frmFloater as form) frmFloater.show ,frmParent
End Sub

How exactly do I use this so it works?  what are the steps?
0
KDivadCommented:
Based on that, just substitute your normal Form2.Show line (assuming Form2 is the form you want floating) with this one: Form2.show, Form1 (assuming Form1 is the name of the form that Form2 is floating over).
0
sdland1Commented:
sdland1 changed the proposed answer to a comment
0
drago97Author Commented:
KDivad:
can you plz whip up a quick sample of this for VB6 to me at asian_arowana@hotmail.com and I'll give you 50 points for it. Thanks!
0
MaximkaCommented:
Just Put the code into You Form or Modul:


' SetWindowPos Flags
Private Const HWND_TOPMOST = -1

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long


Public Sub MySetTopMost(ByVal liHwnd As Long)
   
10        Call SetWindowPos(liHwnd, HWND_TOPMOST, 0, 0, 0, 0, _
                            SWP_NOSIZE Or SWP_NOMOVE)
   
End Sub

And in Form_Load put the sentence

call MySetTopMost(me.hwnd)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KDivadCommented:
drago97,

It's on it's way to your mailbox.
For those who are reading, it's a project with two forms. Form1 is the startup and has a single line of code in it's Form_Load event: Form2.Show , Form1.

Later,
0
drago97Author Commented:
Adjusted points to 50
0
drago97Author Commented:
As a promised, 50 points for a working file...  thanks!!
0
drago97Author Commented:
opppsss!!  I think I gave the points to the wrong guy!!  How can I undo this?  Sorry KDivad!!
0
KDivadCommented:
No problem! ;-) It happens occasionally.

The last I heard, the points can't be taken back out of Maximka'a account.
If you want to, you can post a new question with a title that is something like "Points for KDivad" and the "question" being something like "For your help with http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10272763 ". You can also use the "Community Support" link at the bottom of this page to see if they can return the points so that you can make the new question. I don't know if they will or not, but it's always worth checking on. If you don't want to post another question or go through the bother of contacting Support, then don't worry about it.

Later,
KDivad
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.