Code: Select all
Global Window_0
Global Image_0, Text_0, Button_0, Editor_0, Text_1, Text_2
Global Img_Window_0_0
UsePNGImageDecoder()
Img_Window_0_0 = LoadImage(#PB_Any,"C:\Data\PB\PFP\ba_logo.png")
Enumeration FormFont
#Font_Window_0_0
#Font_Window_0_1
EndEnumeration
LoadFont(#Font_Window_0_0,"Arial", 18, #PB_Font_Bold)
LoadFont(#Font_Window_0_1,"Arial", 12, #PB_Font_Bold)
Procedure OpenWindow_0(x = 0, y = 0, width = 590, height = 610)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, "Prepare for Print", #PB_Window_SystemMenu)
SetWindowColor(Window_0, RGB(255,255,255))
Image_0 = ImageGadget(#PB_Any, 60, 10, 470, 120, ImageID(Img_Window_0_0))
Text_0 = TextGadget(#PB_Any, 70, 140, 450, 40, "Prepare for Print", #PB_Text_Center)
SetGadgetColor(Text_0, #PB_Gadget_FrontColor,RGB(17,98,165))
SetGadgetColor(Text_0, #PB_Gadget_BackColor,RGB(255,255,255))
SetGadgetFont(Text_0, FontID(#Font_Window_0_0))
Button_0 = ButtonGadget(#PB_Any, 230, 190, 100, 40, "Start")
Editor_0 = EditorGadget(#PB_Any, 70, 270, 450, 290)
SetGadgetColor(Editor_0, #PB_Gadget_BackColor,RGB(255,255,255))
Text_1 = TextGadget(#PB_Any, 70, 250, 450, 20, "Processing Status", #PB_Text_Center)
SetGadgetColor(Text_1, #PB_Gadget_FrontColor,RGB(17,98,165))
SetGadgetColor(Text_1, #PB_Gadget_BackColor,RGB(255,255,255))
SetGadgetFont(Text_1, FontID(#Font_Window_0_1))
Text_2 = TextGadget(#PB_Any, 70, 580, 450, 25, "", #PB_Text_Center)
SetGadgetColor(Text_2, #PB_Gadget_FrontColor,RGB(0,0,0))
SetGadgetColor(Text_2, #PB_Gadget_BackColor,RGB(255,255,255))
EndProcedure
Code: Select all
IncludeFile "PFP.pbf"
;--------------------------------------------------------------------------------
; MAIN PROGRAM STARTS HERE
;--------------------------------------------------------------------------------
Define.l event
OpenWindow_0()
SetGadgetText(Text_2, #VERSION)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case Button_0
ClearGadgetItems(Editor_0)
Process()
EndSelect
EndSelect
Until event = #PB_Event_CloseWindow
End
Code: Select all
AddGadgetItem(Editor_0, -1, "***ERROR*** - failed to pass XML validation. Program aborting...")
Thanks.
/Dave