The code style looks odd to me in terms of being not what I'm used to seeing, couldn't see much wrong though, see 'thoughts' below.
I don't have the PVDynamic lib so had to comment those lines out. Moved SetWindowCallback(@WindowCallback()) into the Window_Main() Procedure, Declared the Procedures, replaced longs with integers, added End after the Main Loop, declared the BubbleTipStyle directly. Changed the names of vars where they clash with PB function names, e.g. GadgetID changed to iGadgetID.
It compiles to an exe in PB4.60 on WinXP 32bit.
Thoughts:
It could be that the version of PVDynamic lib you are using does not match the version of PB you are using. The PB trial version may not compile exes that use User libs. May be PB did not install 100% correctly, a re-install with a fresh download could be worth a try.
Code that compiled at first attempt:
Code:
;AvevaLauncher.pb
Declare WindowCallback(iWindowID,Message,wParam,lParam)
Declare Window_Main()
XIncludeFile "AvevaLauncher_Constants.pb"
XIncludeFile "AvevaLauncher_Windows.pb"
Procedure WindowCallback(iWindowID,Message,wParam,lParam)
ReturnValue = #PB_ProcessPureBasicEvents
If Message=#WM_GETMINMAXINFO
;ReturnValue = PVDynamic_LockWindow(iWindowID,lParam)
EndIf
If Message=#WM_SIZE
;ReturnValue = PVDynamic_Resize(iWindowID)
EndIf
ProcedureReturn ReturnValue
EndProcedure
;- Main Loop
If Window_Main()
quitMain = 0
Repeat
iEventID = WaitWindowEvent()
iMenuID = EventMenu()
iGadgetID = EventGadget()
iWindowID = EventWindow()
Select iEventID
Case #PB_Event_CloseWindow
If iWindowID = #Window_Main
quitMain = 1
EndIf
EndSelect
Until quitMain
CloseWindow(#Window_Main)
EndIf
End
Code:
; AvevaLauncher_Constants.pb
;- Global Variables and Constants
Global BubbleTipStyle.i = 0
;- Window Constants
Enumeration 1
#Window_Main
EndEnumeration
#WindowIndex = #PB_Compiler_EnumerationValue
;- Gadget Constants
Enumeration 1
;Window_Main
#Gadget_Main_fApplications
#Gadget_Main_oApplication1
#Gadget_Main_oApplication2
#Gadget_Main_oApplication3
#Gadget_Main_fPDMSVOL
#Gadget_Main_tsPDMSVOL
#Gadget_Main_fServers
#Gadget_Main_lServers
#Gadget_Main_bCheck
#Gadget_Main_tsCheck
#Gadget_Main_fProjects
#Gadget_Main_lProjects
#Gadget_Main_fAdminOptions
#Gadget_Main_lAdminOptions
#Gadget_Main_bGo
#Gadget_Main_bRemoteSupport
#Gadget_Main_bCancel
EndEnumeration
#GadgetIndex = #PB_Compiler_EnumerationValue
Code:
; AvevaLauncher_Windows.pb
Procedure Window_Main()
If OpenWindow(#Window_Main,184,98,390,660,"Aveva Launcher",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered|#PB_Window_Invisible)
Frame3DGadget(#Gadget_Main_fApplications,5,5,240,60," Applications: ")
OptionGadget(#Gadget_Main_oApplication1,20,25,75,20,"PDMS")
OptionGadget(#Gadget_Main_oApplication2,90,25,75,20,"Review")
OptionGadget(#Gadget_Main_oApplication3,160,25,75,20,"Implant")
Frame3DGadget(#Gadget_Main_fPDMSVOL,275,5,100,60," PDMSVOL ")
TextGadget(#Gadget_Main_tsPDMSVOL,310,25,20,20,"J:",#PB_Text_Center)
Frame3DGadget(#Gadget_Main_fServers,5,75,380,60," Licence Servers; ")
ComboBoxGadget(#Gadget_Main_lServers,15,95,220,20)
ButtonGadget(#Gadget_Main_bCheck,255,95,60,20,"Check")
TextGadget(#Gadget_Main_tsCheck,325,95,40,20,"0",#PB_Text_Center|#PB_Text_Border)
Frame3DGadget(#Gadget_Main_fProjects,5,140,380,260,"Projects: ")
ListIconGadget(#Gadget_Main_lProjects,15,160,360,230,"Number",60,#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(#Gadget_Main_lProjects,1,"Title",220)
AddGadgetColumn(#Gadget_Main_lProjects,2,"Code",40)
AddGadgetColumn(#Gadget_Main_lProjects,3,"Stat.",36)
Frame3DGadget(#Gadget_Main_fAdminOptions,5,405,380,220,"Administrator Options: ")
ListIconGadget(#Gadget_Main_lAdminOptions,15,425,360,190,"Module",120,#PB_ListIcon_CheckBoxes|#PB_ListIcon_MultiSelect|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(#Gadget_Main_lAdminOptions,1,"MDB",116)
AddGadgetColumn(#Gadget_Main_lAdminOptions,2,"PASSWORD",120)
ButtonGadget(#Gadget_Main_bGo,5,635,60,20,"Go")
ButtonGadget(#Gadget_Main_bRemoteSupport,120,635,120,20,"Remote Support")
ButtonGadget(#Gadget_Main_bCancel,325,635,60,20,"Cancel")
; PVDynamic_AddLockWindow(#Window_Main,0,0,1)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_fApplications,2)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_fPDMSVOL,2)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_fServers,2)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_fProjects,1)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_lProjects,1)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_fAdminOptions,1)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_lAdminOptions,1)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_bGo,4)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_bRemoteSupport,4)
; PVDynamic_AddGadget(#Window_Main,#Gadget_Main_bCancel,4)
HideWindow(#Window_Main,0)
SetWindowCallback(@WindowCallback())
ProcedureReturn WindowID(#Window_Main)
EndIf
EndProcedure