Hey All,
im trying to simply display an image depending on whether a text box has been populated or not. To do this im using the String.IsNullOr Empty(My String) approach.
Becuase the image will change depending on the textbox field state the String.IsNullOr Empty(My String) is placed in a DO LOOP and Thread
The Boolean return of Gif then determines the visible property of the image(picturebo x)
This is all being used as a 'cheat' (Due to time constraints) to display a gif image during any times when a delay in results is expected (Like a progress bar)
The text field being populated is returning the results of a trace route.
IF the text field is empty (Waiting for the process to finish and System.IO.Strea mReader to read to end) then the gif will be displayed. Once the text field has been populated with the results (System.IO.Stre amWriter writing to it) the gif image will not be displayed anymore.
Any thoughts? If you want to see the whole code let me know :P
Thanks in advance as always,
Sy
im trying to simply display an image depending on whether a text box has been populated or not. To do this im using the String.IsNullOr Empty(My String) approach.
Becuase the image will change depending on the textbox field state the String.IsNullOr Empty(My String) is placed in a DO LOOP and Thread
Code:
Private Sub backgroundprocess()
Dim Results As String = Results_TextBox2.Text
Do
If String.IsNullOrEmpty(Results) = True Then
Gif = True
Else
Gif = False
End If
Loop
Application.DoEvents()
Thread.Sleep(1000)
End Sub
Code:
Private Sub Button1_Click
If GIf = True Then
PictureBox1.Visible = True
ElseIf GIf = False Then
PictureBox1.Visible = False
End If
The text field being populated is returning the results of a trace route.
IF the text field is empty (Waiting for the process to finish and System.IO.Strea mReader to read to end) then the gif will be displayed. Once the text field has been populated with the results (System.IO.Stre amWriter writing to it) the gif image will not be displayed anymore.
Any thoughts? If you want to see the whole code let me know :P
Thanks in advance as always,
Sy
Comment