SaveFileDialog to save automatically

Discussion in 'Mixed Languages' started by Muerto, May 12, 2012.

  1. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,855
    2,103
    60
    #1 Muerto, May 12, 2012
    Last edited: Jan 12, 2021
    ...
     
  2. stevemk14ebr

    stevemk14ebr MDL Senior Member

    Jun 23, 2010
    267
    48
    10
    #2 stevemk14ebr, May 12, 2012
    Last edited by a moderator: Apr 20, 2017
    Code:
    try
     Dim DBw As New StreamWriter("C:\ProgramData\OEMINFO.ini",
                                            False, System.Text.Encoding.UTF8)
                MySW.WriteLine("[General]")
                MySW.WriteLine("Manufacturer=" & oem_manufacturer.Text.ToString)
                MySW.WriteLine("Model=" & oem_model.Text.ToString & Environment.NewLine)
                MySW.WriteLine("[Support Information]")
                MySW.WriteLine("Line1=" & oem_support1.Text.ToString)
                MySW.WriteLine("Line2=" & oem_support2.Text.ToString)
                MySW.WriteLine("Line3=" & oem_support3.Text.ToString)
                MySW.Flush()
                MySW.Dispose()
                DBw.close
    catch ex as exception
                messagebox.show(ex.message)
                DBw.Close()
    end try
    see if that works, it just uses a stream writer
     
  3. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,855
    2,103
    60
    #3 Muerto, May 13, 2012
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  4. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,855
    2,103
    60
    #4 Muerto, May 13, 2012
    Last edited: Jan 12, 2021
    (OP)
    ...
     
  5. stevemk14ebr

    stevemk14ebr MDL Senior Member

    Jun 23, 2010
    267
    48
    10
    np, i was just giving u an idea of what to do, i knew it wouldnt be perfect for u first time. glad u got it working