vb 6, ep. 3
-
Oh, that was great days...
Private Sub Command16_Click()
Open asc & "Read" & File2.FileName For Input As #1
Line Input #1, dat
Line Input #1, doo
Line Input #1, od
Line Input #1, temat
Close
Form2.Text1 = "Answer - " & od
Form2.Text2 = doo
Form2.Text3 = "Answer - " & temat
Form2.Text4 = "This is an answer to a message received in " & dat & "."
Form2.Show
End SubPrivate Sub Command6_Click()
Form4.Show
End SubPrivate Sub Command7_Click()
Frame1.Visible = True
Frame2.Visible = False
Frame3.Visible = False
Frame4.Visible = False
File1.Refresh
End SubPrivate Sub Command8_Click()
Frame1.Visible = False
Frame2.Visible = True
Frame3.Visible = False
Frame4.Visible = False
File2.Refresh
End SubPrivate Sub Command9_Click()
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = True
Frame4.Visible = False
File3.Refresh
End SubPrivate Sub File1_DblClick()
If File1.ListIndex = -1 Then Exit Sub
sws = File1
Form3.Show
End Sub
'
' ( 22 handlers named Command1_Click to Command22_Click )
'
Private Sub Form_Load()
On Error GoTo 1
'Exit Sub
Label5 = "Welcome, it's " & Format$(Now, "long date") & ", time" & Time$
ChDir App.Path
asc = App.Path & "\"
Label4 = asc & "user.ini"
Command7.Picture = LoadPicture(asc & "unr.ico")
Command8.Picture = LoadPicture(asc & "read.ico")
Command9.Picture = LoadPicture(asc & "deleted.ico")
Command10.Picture = LoadPicture(asc & "user.ico")
If Len(App.Path) = 3 Then asc = App.Path
Close
On Error GoTo 6
7:
'Open asc & "opwp.ini" For Input As #1
' Line Input #1, ow
' owp = ow
'Close
Load Form8
Open asc & "InLookcon.ini" For Input As #1
Line Input #1, d1
Line Input #1, d2
Line Input #1, d3
Close #1
File1.Path = d1
If d2 = "ask" Then
If File1.ListCount = 0 Then
X = MsgBox("There are no new messages. Do you want to start InLook?", 32 + 4)
If Not X = 6 Then End
End If
ElseIf d2 = "norun" Then
End
End If
Label1 = d1
zapis = d3
On Error Resume Next
File2.Path = asc & "Read"
If Err > 0 Then
MkDir asc & "Read"
Err = 0
End If
File2.Path = asc & "Read"
Label2 = File2.Path
File3.Path = asc & "Deleted"
If Err > 0 Then
MkDir asc & "Deleted"
Err = 0
End If
File3.Path = asc & "Deleted"
Label3 = File3.Path
On Error GoTo 2
4:
Open asc & "user.ini" For Input As #1
3:
If Not EOF(1) Then
Line Input #1, a
List1.AddItem a
GoTo 3
End If
Close
Open asc & "usop.ini" For Input As -
Oh, that was great days...
Private Sub Command16_Click()
Open asc & "Read" & File2.FileName For Input As #1
Line Input #1, dat
Line Input #1, doo
Line Input #1, od
Line Input #1, temat
Close
Form2.Text1 = "Answer - " & od
Form2.Text2 = doo
Form2.Text3 = "Answer - " & temat
Form2.Text4 = "This is an answer to a message received in " & dat & "."
Form2.Show
End SubPrivate Sub Command6_Click()
Form4.Show
End SubPrivate Sub Command7_Click()
Frame1.Visible = True
Frame2.Visible = False
Frame3.Visible = False
Frame4.Visible = False
File1.Refresh
End SubPrivate Sub Command8_Click()
Frame1.Visible = False
Frame2.Visible = True
Frame3.Visible = False
Frame4.Visible = False
File2.Refresh
End SubPrivate Sub Command9_Click()
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = True
Frame4.Visible = False
File3.Refresh
End SubPrivate Sub File1_DblClick()
If File1.ListIndex = -1 Then Exit Sub
sws = File1
Form3.Show
End Sub
'
' ( 22 handlers named Command1_Click to Command22_Click )
'
Private Sub Form_Load()
On Error GoTo 1
'Exit Sub
Label5 = "Welcome, it's " & Format$(Now, "long date") & ", time" & Time$
ChDir App.Path
asc = App.Path & "\"
Label4 = asc & "user.ini"
Command7.Picture = LoadPicture(asc & "unr.ico")
Command8.Picture = LoadPicture(asc & "read.ico")
Command9.Picture = LoadPicture(asc & "deleted.ico")
Command10.Picture = LoadPicture(asc & "user.ico")
If Len(App.Path) = 3 Then asc = App.Path
Close
On Error GoTo 6
7:
'Open asc & "opwp.ini" For Input As #1
' Line Input #1, ow
' owp = ow
'Close
Load Form8
Open asc & "InLookcon.ini" For Input As #1
Line Input #1, d1
Line Input #1, d2
Line Input #1, d3
Close #1
File1.Path = d1
If d2 = "ask" Then
If File1.ListCount = 0 Then
X = MsgBox("There are no new messages. Do you want to start InLook?", 32 + 4)
If Not X = 6 Then End
End If
ElseIf d2 = "norun" Then
End
End If
Label1 = d1
zapis = d3
On Error Resume Next
File2.Path = asc & "Read"
If Err > 0 Then
MkDir asc & "Read"
Err = 0
End If
File2.Path = asc & "Read"
Label2 = File2.Path
File3.Path = asc & "Deleted"
If Err > 0 Then
MkDir asc & "Deleted"
Err = 0
End If
File3.Path = asc & "Deleted"
Label3 = File3.Path
On Error GoTo 2
4:
Open asc & "user.ini" For Input As #1
3:
If Not EOF(1) Then
Line Input #1, a
List1.AddItem a
GoTo 3
End If
Close
Open asc & "usop.ini" For Input AsI just love the error message "Required files are missing I suppose." It let's the user know just what you think about error checking! :laugh: I take it this was a very early example of your craft? I hope like hell this was a very early example of your craft?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
-
I just love the error message "Required files are missing I suppose." It let's the user know just what you think about error checking! :laugh: I take it this was a very early example of your craft? I hope like hell this was a very early example of your craft?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
OriginalGriff wrote:
I hope like hell this was a very early example of your craft?
Yes it is a very early code. There have been a lot of OOP education later (that time I didn't even know classses and methods -- that's why everything was put in event handlers which were generated by "double clicking" in designer).
Greetings - Jacek
-
OriginalGriff wrote:
I hope like hell this was a very early example of your craft?
Yes it is a very early code. There have been a lot of OOP education later (that time I didn't even know classses and methods -- that's why everything was put in event handlers which were generated by "double clicking" in designer).
Greetings - Jacek
And we hope you have adopted more meaningful method naming habits. Not that "Command1_click" isn't a lovely name...
Matt Gerrans
-
And we hope you have adopted more meaningful method naming habits. Not that "Command1_click" isn't a lovely name...
Matt Gerrans
-
In that case, you must have been thinking "What a stupid system where everything has to be named
Command[digit]_click
"Matt Gerrans
-
In that case, you must have been thinking "What a stupid system where everything has to be named
Command[digit]_click
"Matt Gerrans
Still verifying if I'm not an idiot? :-D :thumbsup: I was rather thinking that this is normal and this is a reason why being a programmer is so hard -- he has to remember what is what and so on. By the way, my first coding was made on a "programmable" calculator with BASIC. :cool:
Greetings - Jacek
-
Oh, that was great days...
Private Sub Command16_Click()
Open asc & "Read" & File2.FileName For Input As #1
Line Input #1, dat
Line Input #1, doo
Line Input #1, od
Line Input #1, temat
Close
Form2.Text1 = "Answer - " & od
Form2.Text2 = doo
Form2.Text3 = "Answer - " & temat
Form2.Text4 = "This is an answer to a message received in " & dat & "."
Form2.Show
End SubPrivate Sub Command6_Click()
Form4.Show
End SubPrivate Sub Command7_Click()
Frame1.Visible = True
Frame2.Visible = False
Frame3.Visible = False
Frame4.Visible = False
File1.Refresh
End SubPrivate Sub Command8_Click()
Frame1.Visible = False
Frame2.Visible = True
Frame3.Visible = False
Frame4.Visible = False
File2.Refresh
End SubPrivate Sub Command9_Click()
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = True
Frame4.Visible = False
File3.Refresh
End SubPrivate Sub File1_DblClick()
If File1.ListIndex = -1 Then Exit Sub
sws = File1
Form3.Show
End Sub
'
' ( 22 handlers named Command1_Click to Command22_Click )
'
Private Sub Form_Load()
On Error GoTo 1
'Exit Sub
Label5 = "Welcome, it's " & Format$(Now, "long date") & ", time" & Time$
ChDir App.Path
asc = App.Path & "\"
Label4 = asc & "user.ini"
Command7.Picture = LoadPicture(asc & "unr.ico")
Command8.Picture = LoadPicture(asc & "read.ico")
Command9.Picture = LoadPicture(asc & "deleted.ico")
Command10.Picture = LoadPicture(asc & "user.ico")
If Len(App.Path) = 3 Then asc = App.Path
Close
On Error GoTo 6
7:
'Open asc & "opwp.ini" For Input As #1
' Line Input #1, ow
' owp = ow
'Close
Load Form8
Open asc & "InLookcon.ini" For Input As #1
Line Input #1, d1
Line Input #1, d2
Line Input #1, d3
Close #1
File1.Path = d1
If d2 = "ask" Then
If File1.ListCount = 0 Then
X = MsgBox("There are no new messages. Do you want to start InLook?", 32 + 4)
If Not X = 6 Then End
End If
ElseIf d2 = "norun" Then
End
End If
Label1 = d1
zapis = d3
On Error Resume Next
File2.Path = asc & "Read"
If Err > 0 Then
MkDir asc & "Read"
Err = 0
End If
File2.Path = asc & "Read"
Label2 = File2.Path
File3.Path = asc & "Deleted"
If Err > 0 Then
MkDir asc & "Deleted"
Err = 0
End If
File3.Path = asc & "Deleted"
Label3 = File3.Path
On Error GoTo 2
4:
Open asc & "user.ini" For Input As #1
3:
If Not EOF(1) Then
Line Input #1, a
List1.AddItem a
GoTo 3
End If
Close
Open asc & "usop.ini" For Input As