[VB.net] Saving text without text files problem... menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [VB.net] Saving text without text files problem...

    I dont want it saved to any text files like .txt or .rtf etc... dont like when anyone can jsut go there and open the file + i already got it working with adressbook.txt so thats np.... if you just could tell any file that would work with exact same code as i got to save it to txt files it would be great.

    if its possible and not way to hard i would like text files saved in MPQ files ;O
    but i guess its kinda hard in VB.net ..... but anything like MPQ files could work aswell, but as i know MPQs abit i know what the hell it is.... but if its not possible to save text files in some other file i want it as stated above, NO TEXTFILES... =3

    i would like a way like this:
    Click button1 to save textbox1.text in a file
    after its saved it should popup in combobox1 list


    Ask if you dont understand what i mean, will try to explain better ^^

    EDIT: I did find something earlier... but didnt want to work for me... was some .brm files but it failed when i put it into my mailer stuff....

    ----------------------------------------------------------------

    [VB.net] Saving text without text files problem...
  2. #2
    Bacanze's Avatar Member
    Reputation
    3
    Join Date
    May 2009
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So your saying you want your own file format which can't typically be opened by normal application such as notepad etc?

  3. #3
    Vivisnai's Avatar Private
    Reputation
    1
    Join Date
    Jan 2010
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what you mean, but try this.

    If you want done on the desktop

    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
    My.Computer.FileSystem.WriteAllText(My.Computer.FileSystem.SpecialDirectories.Desktop & "\NameOfFile.txt", TextBox1.Text , True)
    If you want done in the program directory:

    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
    My.Computer.FileSystem.WriteAllText( "\NameOfFile.txt", TextBox1.Text , True)

  4. #4
    soulchief's Avatar Member
    Reputation
    5
    Join Date
    May 2009
    Posts
    79
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you want a text file that cant be viewed in any other program? Just add your own encryption/decryption function to your system.. encrypt the data before saving so something like "Now you see, now you dont" becomes "{Q*$p]q9@O q9is0 ae29o[[] 2e9apw3a" if opened in notepad.

  5. #5
    d3rrial's Avatar Contributor Authenticator enabled
    Reputation
    127
    Join Date
    Apr 2010
    Posts
    527
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
        Private Sub Savetofile()
            Dim Filenumber As Object = FreeFile()
            FileOpen(Filenumber, "C:\PATHTOYOURFOLDER\Textfile.mpq", OpenMode.Output)
            Write(Filenumber, TextBox1.Text)
            FileClose(Filenumber)
        End Sub
    Didnt get it to work to make it choosable from the Combobox, since the Combobox is read only >_>

Similar Threads

  1. Text File with Alot of VB.NET Codes
    By Mitron in forum Programming
    Replies: 0
    Last Post: 07-06-2009, 09:46 AM
  2. [HOW TO] Read a text file (.txt) to a textbox
    By Ebonesser in forum Programming
    Replies: 0
    Last Post: 06-19-2009, 05:22 PM
  3. [HELP] writing to the bottom of a text file
    By SacredSpenny in forum Programming
    Replies: 4
    Last Post: 05-10-2009, 10:31 PM
  4. how to import a text file?
    By lethalllama in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 08-23-2008, 03:44 AM
  5. how to change a text file for a itmem to a sql file
    By lolzz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-12-2008, 01:18 AM
All times are GMT -5. The time now is 02:17 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search