Help with saving program

Discussion in 'Programming General' started by kridan500, Jun 27, 2008.

Help with saving program
  1. Unread #1 - Jun 27, 2008 at 3:37 AM
  2. kridan500
    Joined:
    Feb 11, 2007
    Posts:
    217
    Referrals:
    1
    Sythe Gold:
    0

    kridan500 Active Member
    Banned

    Help with saving program

    Hello i need help.
    I am making a sort of "database":p
    I whanna save 2 image and 2 text.
    And i whant to change name then i whanna have many places u know so that i cas save one named "anton" and it got a pic of my head a pic of my fingerprint and then 2 text. Then i can save a new person and it will get to a new box thet is on the side of the first. You guys understand?
    Im sorry im swedish so i suck on english.
    Ask if u dont understand.
     
  3. Unread #2 - Jun 28, 2008 at 1:13 PM
  4. Visual Basic Matt
    Joined:
    Jan 29, 2008
    Posts:
    647
    Referrals:
    2
    Sythe Gold:
    56
    Discord Unique ID:
    223154494878253056

    Visual Basic Matt Apprentice

    Help with saving program

    Ok,
    (Uses vb picturebox and textbox control)
    Create 2 .dat file's in the app's path 1 named dat1 2 named dat2
    Create 2 empty pic's in the app's path named what ever you want.
    text1 is your first text
    text2 is your second text

    Code:
    Private Sub Form_Load()
    'text1
    Open App.Path & "\dat1.dat" For Input As #1
        Do While Not EOF(1)
            If Text1.Text = "" Then
                Line Input #1, inputline
                Text1.Text = inputline
            Else
                Line Input #1, inputline
                Text1.Text = Text1.Text & vbCrLf & inputline
            End If
        Loop
    Close #1
    'text2
    Open App.Path & "\dat2.dat" For Input As #1
        Do While Not EOF(1)
            If Text2.Text = "" Then
                Line Input #1, inputline
                Text2.Text = inputline
            Else
                Line Input #1, inputline
                Text2.Text = Text2.Text & vbCrLf & inputline
            End If
        Loop
    Close #1
    End Sub
    Code:
    Private Sub Form_Unload(Cancel As Integer)
    'text1
    Open App.Path & "\dat1.dat" For Output As #1
        Print #1, Text1.Text
    Close #1
    'text2
    Open App.Path & "\dat2.dat" For Output As #1
        Print #1, Text2.Text
    Close #1
    End Sub
    The images is pretty much the same as the text but you just save it and load it as an image. In all it is pretty simple. :)
     
< New RsBot RuneTool 1st Release | Visual basic 8 Keygen? or portable? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site