Page 1 of 1

example of the setparent_ api command

Posted: Sat Nov 23, 2002 11:51 pm
by BackupUser
Code updated For 5.20+

Restored from previous forum. Originally posted by crown.

Code: Select all

; CaptureWin - crown

hwnd= OpenWindow( 1, 100,100,400,300,"CaptureWin - crown", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget )
CapWin=FindWindow_(0,"PureBasic")
SetParent_(CapWin, hwnd)
Repeat
  Delay(1)
  EventID.l = WaitWindowEvent()
  SetWindowPos_(CapWin, 1, 0, 0, 400, 300, 0)
Until EventID = #PB_Event_CloseWindow
SendMessage_(CapWin, #WM_CLOSE, 0, 0)
End

(registered PureBasic user)

Posted: Sun Nov 24, 2002 7:52 am
by BackupUser
Restored from previous forum. Originally posted by Rings.

very nice example.thx for sharing

Its a long way to the top if you wanna .....CodeGuru