hoi,
ik ben voor het eerst met VB.NET bezig en woei ! ik heb een probleempje..
waarom werkt hij niet ?, hij geeft een foutmelding (zie commentaar..)
ik ben voor het eerst met VB.NET bezig en woei ! ik heb een probleempje..
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If File.Exists("g:\logon\alert_window.txt") Then
objStreamReader = New StreamReader("g:\logon\alert_window.txt")
'Read the first line of text.
strLine = objStreamReader.ReadLine
'Continue to read until you reach the end of the file.
Do While Not strLine Is Nothing
'Write the line to the Console window.
strshow = strshow & strLine & Environment.NewLine
'Read the next line.
strLine = objStreamReader.ReadLine
Loop
'Close the file.
objStreamReader.Close()
Console.ReadLine()
RichTextBox1.Text = strshow
Else
Form1.ActiveForm.Close() 'DEZE WERKT NIET??
End If
End Sub
Private Sub close_window_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles close_window.Click
Form1.ActiveForm.Close()
End Sub |
waarom werkt hij niet ?, hij geeft een foutmelding (zie commentaar..)