Code: Select all
OnErrorGoto(ErrorInfo)
#Window_0 = 0
#Button_Run = 0
#Button_About = 1
#Button_Exit = 2
If OpenWindow(#Window_0, 277, 316, 341, 220, #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_WindowCentered , "VCD Viewer")
If CreateGadgetList(WindowID())
ButtonGadget(#Button_Run, 10, 10, 320, 60, "Run Vcd")
ButtonGadget(#Button_Exit, 10, 150, 320, 60, "Exit")
OnErrorGoto(ErrorInfo)
EndIf
EndIf
Repeat
EventID=WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
If EventGadgetID()=#Button_Run
RunProgram("PowerDVD", "", "C:\Program Files\CyberLink\PowerDVD\", 0)
OnErrorGoto(ErrorInfo)
EndIf
If EventGadgetID()=#Button_Exit
Quit=1
OnErrorGoto(ErrorInfo)
EndIf
EndSelect
Until EventID = #PB_EventCloseWindow Or Quit=1
ErrorInfo:
GetErrorCounter()
GetErrorAdress()
GetErrorDescription()
numerrors=GetErrorCounter()
adress=GetErrorAdress()
description$=GetErrorDescription()
MessageRequester("Error:","Error: "+description$+" At Adress: "+adress,0)
OpenFile(0, "C:\Debug.txt")
WriteString("Debug Info")
WriteLong(numerrors)
WriteLong(adress)
WriteString(description$)
CloseFile(0)
End
thx i advance
dbellis