:D probleme web
Publié : jeu. 24/juin/2004 3:20
Bonjour j'ai un probleme regarder car le web gadget et pas bien placer jecomprend pas il chevauchent la statu bar et ne prend pas tt l'ecrans sur le coter regarder yAu fait mon bloc note et finie merci a tt ceux qui mon aider a sa realisation ct mon premier projet
merci a tous.
Code : Tout sélectionner
;-SPEEDYONE WEB projet d'explorer web de garzul
;Enumeration des constant
Enumeration
;enumeration menu
#MenuBar_0
#MENU_4
#MENU_6
#MENU_7
#MENU_12
#StatusBar_0
;fin d'enumeration menu
EndEnumeration
Procedure Open_Window_1()
If OpenWindow(1, 0, 0, 600, 300, #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget, "SPEEDYONE WEB") And CreateGadgetList(WindowID(1))
WebGadget(1, 20, 30, WindowWidth() - 20, WindowHeight() - 60, "http://www.purebasic.fr")
SetClassLong_(WindowID(1), #GCL_HBRBACKGROUND, CreateSolidBrush_(RGB(100, 120, 255)))
StringGadget(0, 150, 5, 306, 20, "http://www.")
AddKeyboardShortcut(1, #PB_Shortcut_Return, 1)
;*************************creation des menu*********************************************************
If CreateMenu(#MenuBar_0, WindowID())
MenuTitle("Fichier")
MenuItem(#MENU_4, "Fermer")
MenuTitle("Favoris")
MenuItem(#MENU_6, "Ajouter")
MenuTitle("?")
MenuItem(#MENU_7, "A propos de SPEEDYONE WEB")
MenuBar()
MenuItem(#MENU_12, "Aide")
EndIf
;^^^^^^^^^^^^^^^^^^^^^^^^^^creation status bar^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If CreateStatusBar(#StatusBar_0, WindowID())
AddStatusBarField(550)
StatusBarText(#StatusBar_0, 0, "Bienvenue sur le garzul note")
AddStatusBarField(450)
EndIf
If CreateGadgetList(WindowID())
EndIf
EndIf
ResizeGadget(0,-1,-1,WindowWidth()-20,WindowHeight()-60)
EndProcedure
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Boucle$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Open_Window_1()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
result = MessageRequester("ATTENTION","Vous quittez SPEEDYONE WEB ,voulez vous revenir a SPEEDYONE WEB?",#PB_MessageRequester_yesno)
If result <> 6 ; si il n'a pa clicker sur oui
quit = 1 ; on quitte
EndIf
Case #PB_Event_SizeWindow
ResizeGadget(0,-1,-1,WindowWidth()-20,WindowHeight()-60)
FreeStatusBar(#StatusBar_0)
If CreateStatusBar(#StatusBar_0, WindowID())
AddStatusBarField(WindowWidth()/3)
AddStatusBarField((WindowWidth()/3)*2)
StatusBarText(#StatusBar_0, 0, "")
EndIf
;- Choisir l'ouverture des menu cool:)
;RIENNNNNN
Select EventMenuID()
Case #PB_Event_Menu
MenuID = EventMenuID()
If MenuID = 1
url$ = GetGadgetText(0)
If Left(url$, 7) = "http://"
SetGadgetText(1, url$)
EndIf
EndIf
Case #WM_SIZE
WebGadget(1, 20, 30, WindowWidth() - 20, WindowHeight() - 60, "http://www.purebasic.fr")
EndSelect
;DEBUG
Debug "menu numero "+Str(menuID):; cette ligne va afficher le numero du menu choisi !!
; a toi dans faire ce que tu veux !!
Case #PB_Event_Gadget
GadgetID = EventGadgetID(): ; lequel ??
EndSelect
Debug GadgetID
StatusBarText(#StatusBar_0, 0, FormatDate("%dd/%mm/%yyyy", Date()) + " " + FormatDate("%hh:%ii:%ss", Date()))
Until Quit
End
