example of the setparent_ api command

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

example of the setparent_ api command

Post 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)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post 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
Post Reply