HyperLink in menu item
Posted: Thu May 31, 2012 11:38 am
is there a tip for use HyperLink into a pop-up menu or menu or sub-menu items?
i search in forums and don't find a thing.
i search in forums and don't find a thing.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Procedure Win()
;--------------
If OpenWindow(0, 0, 0, 200, 140, "Links Menu",#PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
If CreateMenu(0, WindowID(0))
MenuTitle("Hyperlinks")
MenuItem(1, "PB Website")
MenuItem(2, "PB Blog")
MenuItem(3, "PB Forum")
EndIf
EndIf
EndProcedure
Procedure WaitForUser()
;---------------------
Repeat
iEvent.i = WaitWindowEvent(1)
Select iEvent
Case #PB_Event_Menu
Select EventMenu()
Case 1 : RunProgram("http://www.purebasic.com")
Case 2 : RunProgram("http://www.purebasic.fr/blog")
Case 3 : RunProgram("http://www.purebasic.fr/english/index.php")
EndSelect
EndSelect
Until iEvent = #PB_Event_CloseWindow
EndProcedure
;###Main Entry Point
Win()
WaitForUser()
End