Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. vb 6, ep. 3

vb 6, ep. 3

Scheduled Pinned Locked Moved The Weird and The Wonderful
helpquestioncareer
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lutoslaw
    wrote on last edited by
    #1

    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 Sub

    Private Sub Command6_Click()
    Form4.Show
    End Sub

    Private Sub Command7_Click()
    Frame1.Visible = True
    Frame2.Visible = False
    Frame3.Visible = False
    Frame4.Visible = False
    File1.Refresh
    End Sub

    Private Sub Command8_Click()
    Frame1.Visible = False
    Frame2.Visible = True
    Frame3.Visible = False
    Frame4.Visible = False
    File2.Refresh
    End Sub

    Private Sub Command9_Click()
    Frame1.Visible = False
    Frame2.Visible = False
    Frame3.Visible = True
    Frame4.Visible = False
    File3.Refresh
    End Sub

    Private 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

    OriginalGriffO _ 2 Replies Last reply
    0
    • L Lutoslaw

      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 Sub

      Private Sub Command6_Click()
      Form4.Show
      End Sub

      Private Sub Command7_Click()
      Frame1.Visible = True
      Frame2.Visible = False
      Frame3.Visible = False
      Frame4.Visible = False
      File1.Refresh
      End Sub

      Private Sub Command8_Click()
      Frame1.Visible = False
      Frame2.Visible = True
      Frame3.Visible = False
      Frame4.Visible = False
      File2.Refresh
      End Sub

      Private Sub Command9_Click()
      Frame1.Visible = False
      Frame2.Visible = False
      Frame3.Visible = True
      Frame4.Visible = False
      File3.Refresh
      End Sub

      Private 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

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      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.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      L 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        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.

        L Offline
        L Offline
        Lutoslaw
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • L Lutoslaw

          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

          M Offline
          M Offline
          Matt Gerrans
          wrote on last edited by
          #4

          And we hope you have adopted more meaningful method naming habits. Not that "Command1_click" isn't a lovely name...

          Matt Gerrans

          L 1 Reply Last reply
          0
          • M Matt Gerrans

            And we hope you have adopted more meaningful method naming habits. Not that "Command1_click" isn't a lovely name...

            Matt Gerrans

            L Offline
            L Offline
            Lutoslaw
            wrote on last edited by
            #5

            That time I didn't know that method/control names can be changed.

            Greetings - Jacek

            M 1 Reply Last reply
            0
            • L Lutoslaw

              That time I didn't know that method/control names can be changed.

              Greetings - Jacek

              M Offline
              M Offline
              Matt Gerrans
              wrote on last edited by
              #6

              In that case, you must have been thinking "What a stupid system where everything has to be named Command[digit]_click"

              Matt Gerrans

              L 1 Reply Last reply
              0
              • M 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

                L Offline
                L Offline
                Lutoslaw
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • L Lutoslaw

                  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 Sub

                  Private Sub Command6_Click()
                  Form4.Show
                  End Sub

                  Private Sub Command7_Click()
                  Frame1.Visible = True
                  Frame2.Visible = False
                  Frame3.Visible = False
                  Frame4.Visible = False
                  File1.Refresh
                  End Sub

                  Private Sub Command8_Click()
                  Frame1.Visible = False
                  Frame2.Visible = True
                  Frame3.Visible = False
                  Frame4.Visible = False
                  File2.Refresh
                  End Sub

                  Private Sub Command9_Click()
                  Frame1.Visible = False
                  Frame2.Visible = False
                  Frame3.Visible = True
                  Frame4.Visible = False
                  File3.Refresh
                  End Sub

                  Private 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

                  _ Offline
                  _ Offline
                  _Erik_
                  wrote on last edited by
                  #8

                  looooooooooooooooooooooooooooool Oh my god!!! Two questions come to my mind: How many times did you come and go from designer view to code view and vice versa? How many mouses did you wreck?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups