vbgen Level: Moderator
 Registered: 10-10-2002 Posts: 876
|
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...
|