I want to be able to open the program's link.
Ideally, I would like to open the menu with the right mouse button, but this event does not exist for the button.
I press F2 to show the menu for the active button.
Code: Select all
hMenuURL = CreatePopupMenu(#MenuURL)
If hMenuURL
MenuItem(mF22, "Open url")
AddKeyboardShortcut(#Window, #PB_Shortcut_F2, mF2)
EndIf
;..........................
Case mF2
If SelectElement(BtnLst() , btnactive) And Asc(BtnLst()\url)
DisplayPopupMenu(#MenuURL, hGUI)
EndIf
Case mF22
RunProgram(BtnLst()\url)
Code: Select all
Case #WM_COMMAND
nNotifyCode = wParam >> 16 ; HiWord
If nNotifyCode = #BN_DOUBLECLICKED
ForEach BtnLst()
If GadgetID(BtnLst()\id) = LParam
If SelectElement(BtnLst() , btnactive) And Asc(BtnLst()\url)
RunProgram(BtnLst()\url)
EndIf
EndIf
Next
EndIf
Code: Select all
Select g_event
Case 0 To d
If GetAsyncKeyState_(#VK_F1)
Message(g_event)
Else
EventBtnMenu(g_event)
EndIf
EndSelect