Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

File Menu Dropdown menu thingy........

down4bmxdown4bmx Member Posts: 2
Well I am hoping that someone can give me the codeing so i can save, open, close, new and etc.....in the menu. If you have the codeing please reply or you may e-mail me at [email protected] Thanx
Peace Out!
Down4bmx

Comments

  • zibadianzibadian Member Posts: 6,349
    : Well I am hoping that someone can give me the codeing so i can save, open, close, new and etc.....in the menu. If you have the codeing please reply or you may e-mail me at [email protected] Thanx
    : Peace Out!
    : Down4bmx
    :
    Place a TMainMenu on your form and double-click it. This will bring you into the menu-designer. Now you can add menuitems to your menu.
    To make the menu item work, write the OnClick() event for that menu item. Here is a small example of a File|Open menu item for a simple notepad.
    [code]
    procedure TForm1.Open1Click(Sender: TObject);
    begin
    if OpenDialog1.Execute then
    Memo1.Lines.LoadFromFile(OpenDialog1.Filename);
    end;
    [/code]
    This code will first show the open dialog. If the user selects a file and clicks "OK", then that file is read into the memo.
    I hope that this gives you an idea of how to load and save. Often the loading and saving itself is highly dependent on the type of data your program needs. That is why I told you that the example is a notepad. The load and save codes for a database program might be far more complex.
  • down4bmxdown4bmx Member Posts: 2
    Hey thanx dude! it kinda help me out andI will try it tonite right now and see whats up now. Thanx for the help. If i need anymore i will just type it here in the message boards again thanx........
    Peace Out!
    Down4bmx

  • Andre YoungAndre Young USAMember Posts: 0

    ___ ( http://forcoder.org ) free video tutorials and ebooks about || R C++ Objective-C Visual Basic Scratch Python C# Swift Java Ruby PHP C PL/SQL Visual Basic .NET Assembly MATLAB Delphi Go JavaScript Perl Crystal Rust Lisp Prolog Erlang Kotlin VBScript Transact-SQL Logo Alice Ada Julia Bash Lua Apex Fortran Dart LabVIEW F# Hack D Scala Scheme Clojure SAS FoxPro COBOL ML ABAP Awk || _____

Sign In or Register to comment.