Purpose
Code: Select all
Automatically resizing gadgets, monitoring window size and position
http://gnozal.ucoz.com/PureRESIZE_.htm
Example
Code: Select all
If OpenWindow(0, 0, 0, 500, 300, #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered, "Mini-Browser")
CreateGadgetList(WindowID())
ButtonGadget(1, 0, 0, 50, 25, "Back")
ButtonGadget(2, 50, 0, 50, 25, "Next")
ButtonGadget(3, 100, 0, 50, 25, "Stop")
StringGadget(4, 150, 3, 325, 20, "C:\Program Files\Nvu\gnozal\index.html")
ButtonGadget(5, 475, 0, 25 , 25, "Go")
Frame3DGadget(6, 1, 30, 500, 2, "", 2)
If WebGadget(10, 5, 35, 490, 260, "") = 0
MessageRequester("Error", "ATL.dll not found", 0)
End
EndIf
AddKeyboardShortcut(0, #PB_Shortcut_Return, 0)
; Define callback
SetWindowCallback(@WindowCallBack())
; Set window minimum size
PureRESIZE_SetWindowMinimumSize(0, 450, 250)
; Set gadget resize options
PureRESIZE_SetGadgetResize(4, #True, #True, #True, #False)
PureRESIZE_SetGadgetResize(5, #False, #True, #True, #False)
PureRESIZE_SetGadgetResize(6, #True, #True, #True, #False)
PureRESIZE_SetGadgetResize(10, #True, #True, #True, #True)
;PureRESIZE_SetWindowMonitoring(0, #PureRESIZE_Monitoring_DontMove)
;PureRESIZE_SetWindowMonitoring(0, ~#PureRESIZE_Monitoring_DontMove)
;PureRESIZE_SetWindowMonitoring(0, #PureRESIZE_Monitoring_DontResize)
;PureRESIZE_SetWindowMonitoring(0, ~#PureRESIZE_Monitoring_DontResize)
; Envent loop
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadgetID()
Case 1
SetGadgetState(10, #PB_Web_Back)
Case 2
SetGadgetState(10, #PB_Web_Forward)
Case 3
SetGadgetState(10, #PB_Web_Stop)
Case 5
SetGadgetText(10, GetGadgetText(4))
EndSelect
Case #PB_Event_Menu
SetGadgetText(10, GetGadgetText(4))
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
Only available for Purebasic Windows x86
PB3.94 : http://gnozal.ucoz.com/PureRESIZE.zip
PB4.0x-4.20 : http://gnozal.ucoz.com/PureRESIZE_.zip
PB4.3x : http://gnozal.ucoz.com/PureRESIZE_430.zip
PB4.4x : http://gnozal.ucoz.com/PureRESIZE_440.zip
PB4.5x : http://gnozal.ucoz.com/PureRESIZE_450.zip
PB4.6x : http://gnozal.ucoz.com/PureRESIZE_460.zip
PB5.0x : http://gnozal.ucoz.com/PureRESIZE_500.zip
PB5.1x : http://gnozal.ucoz.com/PureRESIZE_510.zip
Other libs and tools at http://gnozal.ucoz.com/