borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Question about NetUserEnum)Next Topic (Minimize and Restore) New Topic New Poll Post Reply
AndreaVB Forum : API : Set Parent... help
Poster Message
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876

icon Set Parent... help

here's the code...


Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As _
            String, ByVal lpWindowName As String) As Long
Private Declare Function SetParent Lib "user32" _
        (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Click()
    Counter = 1
    Do While Counter > 0
        hmessagebox = FindWindow("OpusApp", vbNullString)
        Counter = hmessagebox
        If hmessagebox Then
            x = SetParent(hmessagebox, Me.hWnd)
        End If
    Loop
End Sub


and here's the problem... i need some help as to how i can make the execution of this code better... please try this code, run the program, then try openning a word document...
it actually becomes the mother form of the document, but other settings are just really hard to deal with, like the way it reacts to the mousedrag...

help. thanks in advanced!



____________________________
Been busy trying to take a second degree <--it's not working out...

30-10-2002 at 07:51 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : API : Set Parent... help
Previous Topic (Question about NetUserEnum)Next Topic (Minimize and Restore) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder