Activity Stream
48,167 MEMBERS
62233 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 4 of 4
  1.     
    #1
    Member
    Website's:
    mkspot.org

    Talking Assistance for delphi

    Hello,
    I have one problem in delphi with saving some text. I want to save text from memo
    and i want this text to save in .txt format. I try to find help with google but....
    i know i need to insert SaveDialogs , to define dialog variable, Give the dialog a title,Set the default extension, i know code for that but how to get text from memo and save i dont know

    Can you help me?

    if i post this in wrong forum sorry i dont know where is correct to post
    NightLightW Reviewed by NightLightW on . Assistance for delphi Hello, I have one problem in delphi with saving some text. I want to save text from memo http://pic.mk/images/k129K.jpg and i want this text to save in .txt format. I try to find help with google but.... i know i need to insert SaveDialogs , to define dialog variable, Give the dialog a title,Set the default extension, i know code for that but how to get text from memo and save i dont know:'( Can you help me? if i post this in wrong forum sorry i dont know where is correct to post Rating: 5


  2.   Sponsored Links

  3.     
    #2
    Member
    Memo1.lines.SaveToFile('C:\...\FILENAME.txt');

    You can change the path and filename, or add a save dialog.

    Memo1.Lines.SaveToFile(SaveDialog1.FileName);

    you can do

    If SaveDialog1.Execute then begin
    // your code here
    end;

  4.     
    #3
    Member
    Website's:
    mkspot.org
    Thanks for help StillCyco

    If SaveDialog1.Execute then begin
    // your code here
    [what can i inset here ?]

    end;

    I try with this code but i cant save
    begin
    // Create the save dialog object - assign to our save dialog variable
    saveDialog := TSaveDialog.Create(self);

    // Give the dialog a title
    saveDialog.Title := 'Save your text or word file';

    // Set up the starting directory to be the current one
    saveDialog.InitialDir := GetCurrentDir;

    // Allow only .txt and .doc file types to be saved
    saveDialog.Filter := 'Text file|*.txt|Word file|*.doc';

    // Set the default extension
    saveDialog.DefaultExt := 'txt';

    // Select text files as the starting filter type
    saveDialog.FilterIndex := 1;

    // Display the open file dialog
    if saveDialog.Execute
    then ShowMessage('File : '+saveDialog.FileName)
    else ShowMessage('Save file was cancelled');

    // Free up the dialog
    saveDialog.Free;
    end;
    This is how look my form


  5.     
    #4
    Member
    Website's:
    mkspot.org
    Hey i fix this problem with this code
    Code: 
    procedure TForm1.Button5Click(Sender: TObject);
    
    begin
    if SaveDialog1.Execute then
      BBCodeoutput.Lines.SaveToFile(SaveDialog1.FileName);
      end;
      
    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    SaveDialog1.Filter := 'Text files (*.txt)|*.TXT';
    end;
    And here is final product
    Code: 
    http://*******/xEn1X
    But i need to make more better saving files in txt format now you need to write ex. VA - Malubi Vol.3 (2012).txt is not auto


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. need DNS assistance
    By sillyman in forum Server Management
    Replies: 1
    Last Post: 26th Apr 2012, 09:35 PM
  2. Need Assistance
    By sycokiller in forum Technical Help Desk Support
    Replies: 7
    Last Post: 9th Apr 2012, 04:03 PM
  3. Need assistance for filesharing...
    By vakkomboyz in forum File Host Discussion
    Replies: 0
    Last Post: 21st Oct 2011, 08:51 AM
  4. Need Assistance!
    By ZeroAT in forum General Discussion
    Replies: 15
    Last Post: 26th Jan 2011, 11:34 PM
  5. [Selling] Delphi source code for login and posting into a vBulletin Board
    By geskill in forum Completed Transactions
    Replies: 0
    Last Post: 4th Dec 2010, 05:38 PM

Tags for this Thread

BE SOCIAL