Please refer to the code shown below........
OBJECT MainForm As Form
Left=247
Top=118
Caption="New Form"
ClientHeight=383
ClientWidth=684
OBJECT StatusBar1 As StatusBar
Width=1000
Height=19
AddPanel
PanelWidth(0)=MainForm.Width-265
PanelText(0)=""
AddPanel
PanelWidth(1)=125
PanelText(1)="Darren James Smith"
SimplePanel=False
AddPanel
PanelWidth(2)=140
PanelText(2)="Build Date 20-01-2014"
SimplePanel=False
END OBJECT
OBJECT Button1 AS Button
Left=144
Top=144
Width=75
Height=25
Caption="Test"
TabOrder=1
OnClick=Button1_Click()
END OBJECT `{Button1}
END OBJECT `{MainForm}
Dim TempString As String
MainForm.ShowModal
Sub Button1_Click()
TempString = "HELLO"
UpdateStatusPanel
Run ("C:MechToolsConfigure.exe", SW_ShowNormal)
TempString = "GOODBYE!!!"
UpdateStatusPanel
End Sub
Sub UpdateStatusPanel()
StatusBar1.PanelText(0) = TempString
End Sub
I am trying to do the following (the above is a test only!)
1] CLICK THE BUTTON AND THE STATUS BAR SHOULD DISPLAY "HELLO"
2] RUN A PROGRAM AND WAIT FOR IT TO FINISH (END)
3) THE STATUS BAR SHOULD THEN DISPLAY "GOODBYE!!!"
However,
The StatusBar does not show the word "HELLO" before it runs the program
Does anybody know what I am doing wrong???
You will have to change the text:-
Run ("C:MechToolsConfigure.exe", SW_ShowNormal)
To suit your exe file (Eg NotePad.exe)
Many thanks in advance!!!!
Darren
StatusBar Problem????
StatusBar Problem????
Darren,
? ?But it certainly SHOWS the StatusBar the word "HELLO" before it runs the program. Try to modify the program to:
Sub Button1_Click()
? ? TempString = "HELLO"
? ? UpdateStatusPanel
` and TRY THIS:
showmessage "stop"
? ? Run ("C:MechToolsConfigure.exe", SW_ShowNormal)
? ? TempString = "GOODBYE!!!"
? ? UpdateStatusPanel
End Sub
PaPi
? ?But it certainly SHOWS the StatusBar the word "HELLO" before it runs the program. Try to modify the program to:
Sub Button1_Click()
? ? TempString = "HELLO"
? ? UpdateStatusPanel
` and TRY THIS:
showmessage "stop"
? ? Run ("C:MechToolsConfigure.exe", SW_ShowNormal)
? ? TempString = "GOODBYE!!!"
? ? UpdateStatusPanel
End Sub
PaPi
StatusBar Problem????
You can do also something like this:
Sub Button1_Click()
TempString = "HELLO"
UpdateStatusPanel
``==== adding these lines will do also
mainform.repaint
sleep 500
``==========================
Run ("C:WindowsSystem32NotePad.exe", SW_ShowNormal)
TempString = "GOODBYE!!!"
UpdateStatusPanel
End Sub
Sub Button1_Click()
TempString = "HELLO"
UpdateStatusPanel
``==== adding these lines will do also
mainform.repaint
sleep 500
``==========================
Run ("C:WindowsSystem32NotePad.exe", SW_ShowNormal)
TempString = "GOODBYE!!!"
UpdateStatusPanel
End Sub