WindowsMove

Share your advanced PureBasic knowledge/code with the community.
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

WindowsMove

Post by Droopy »

Code updated For 5.20+

Everything is in the Title

Code: Select all

;/ Author : Franco / Example by Droopy

Procedure WindowsMove(WindowID,State)
  RemoveMenu_(GetSystemMenu_(WindowID,State),1,#MF_DISABLED|#MF_BYPOSITION)
  DrawMenuBar_(WindowID)
EndProcedure


;/ Test
#CheckBox=0
Handle=OpenWindow(0,0,0,200,50,"Move me ?",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)

CheckBoxGadget(#CheckBox,10, 10,250,20,"Checked = Moving Enabled")
SetGadgetState(#CheckBox,#True)

Repeat
  Event=WaitWindowEvent()
  If Event= #PB_Event_Gadget And EventGadget()=0
    WindowsMove(Handle,GetGadgetState(0))
  EndIf
Until Event=#PB_Event_CloseWindow
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

very nice.
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

Thanks, very useful !
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Nice one :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Thanks Droopy!
:D
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

@Droopy
where did you find my old code?
:wink:
I used this name only in the 1st PureBasic Forum...

... the good old times 8)
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

Restored from previous forum by BackupUser, i think :wink:
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

That's useful. Thanks. :D
I may look like a mule, but I'm not a complete ass.
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: WindowsMove

Post by NoahPhense »

Very nice!

- np
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

Thanks to Franko, just the example is mine :wink:
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

Droopy wrote:Thanks to Franko, just the example is mine :wink:
Franco :wink:
Post Reply