An earlier post of mine had some great tips and some great advice. I am happy to inform you that I have a working code with UI. This is what I was in need of.
Here is the code if you want to use it:
I have 3 followup questions. When you launch this program, you will see that each button labeled "Install Program" launches NOTEPAD. Simply changing NOTEPAD to the path of your file will be great and it works. Here is where I have my first followup question.
The installer that I am in need of creating will use this code, but will all be on CD/DVD. Since the drive letters of the CD/DVD may differ from one person to another, is there a way to code it to where it keeps the CD/DVD Drive letter or takes the CD Drive letter from the PC itself? "C:\" is the hard drive. Some people have more than one hard drive and it is letter "D:\." This leaves the CD/DVD drives to be another letter.
My second follow up question is using one of the buttons to close the window. I have searched and could not find the code. Can someone show me a good close window command please?
My third followup question is about an ICON file. I found a tutorial 'Adding Icons to BlitzMax Win32 Executables." This is not really a question. This is rather a work in progress.
I will keep you informed. Thanks again for all the advice.
Here is the code if you want to use it:
'Source Code created on 24 Sep 2007 19:32:18 with Logic Gui Version 2.2 Build 262 'John Doe '> > > HEADER FILE NOT FOUND !!! Import PUB.FreeProcess Local Logic_Gui:TGadget = CreateWindow:TGadget("Installer Selector",240,73,655,466,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_MENU |WINDOW_STATUS |WINDOW_CLIENTCOORDS ) Local Button1:TGadget = CreateButton:TGadget("Install Program",61,93,160,33,Logic_Gui:TGadget,BUTTON_PUSH) Local Button2:TGadget = CreateButton:TGadget("Install Program",61,156,161,35,Logic_Gui:TGadget,BUTTON_PUSH) Local Button3:TGadget = CreateButton:TGadget("Install Program",61,220,160,31,Logic_Gui:TGadget,BUTTON_PUSH) Local Button4:TGadget = CreateButton:TGadget("Install Program",62,282,159,28,Logic_Gui:TGadget,BUTTON_PUSH) Local Button5:TGadget = CreateButton:TGadget("Exit",62,333,159,33,Logic_Gui:TGadget,BUTTON_PUSH) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE Select EventSource() Case Logic_Gui Logic_Gui_WC( Logic_Gui:TGadget ) End Select Case EVENT_GADGETACTION Select EventSource() Case Button1 Button1_GA( Button1:TGadget ) Case Button2 Button2_GA( Button2:TGadget ) Case Button3 Button3_GA( Button3:TGadget ) Case Button4 Button4_GA( Button4:TGadget ) Case Button5 Button5_GA( Button5:TGadget ) End Select End Select Forever '> > > APPEND FILE NOT FOUND !!! Function Logic_Gui_WC( Window:TGadget ) DebugLog "Window Logic_Gui wants to be closed" ' HideGadget( Window:TGadget ) End End Function ' You will see from reading and playing around with this code ' that each button created launches the Notepad. You can simply ' change Notepad To whatever program you wish To install. Make ' sure the path is correct. Function Button1_GA( Button:TGadget ) Local proc:TProcess proc=TProcess.Create("Notepad",0) While proc.Status() Wend End Function Function Button2_GA( Button:TGadget ) Local proc:TProcess proc=TProcess.Create("Notepad",0) While proc.Status() Wend End Function Function Button3_GA( Button:TGadget ) Local proc:TProcess proc=TProcess.Create("Notepad",0) While proc.Status() Wend End Function Function Button4_GA( Button:TGadget ) Local proc:TProcess proc=TProcess.Create("Notepad",0) While proc.Status() Wend End Function Function Button5_GA( Button:TGadget ) DebugLog "Button Button5 was pressed" End Function
I have 3 followup questions. When you launch this program, you will see that each button labeled "Install Program" launches NOTEPAD. Simply changing NOTEPAD to the path of your file will be great and it works. Here is where I have my first followup question.
The installer that I am in need of creating will use this code, but will all be on CD/DVD. Since the drive letters of the CD/DVD may differ from one person to another, is there a way to code it to where it keeps the CD/DVD Drive letter or takes the CD Drive letter from the PC itself? "C:\" is the hard drive. Some people have more than one hard drive and it is letter "D:\." This leaves the CD/DVD drives to be another letter.
My second follow up question is using one of the buttons to close the window. I have searched and could not find the code. Can someone show me a good close window command please?
My third followup question is about an ICON file. I found a tutorial 'Adding Icons to BlitzMax Win32 Executables." This is not really a question. This is rather a work in progress.
I will keep you informed. Thanks again for all the advice.