09-10-16, 07:58 PM
12-11-16, 05:51 AM
السلام عليكم
جرب التالي
PHP كود :
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 Command1_Click()
Dim Counter, A As Long
Set Wrd = CreateObject("Word.Application")
Wrd.Visible = True
X = Wrd.Documents.Open(App.Path & "\word.doc", , 1)
Counter = 1
Do While Counter > 0
A = FindWindow("OpusApp", vbNullString)
Counter = A
If A Then
X1 = SetParent(A, Me.hwnd)
End If
Loop
End Sub
بالتوفيق .