Thread: Borland C++ Builder 6 question

  1. #1
    Join Date
    Jan 2005
    Right behind you....

    Borland C++ Builder 6 question

    Ok. I'm having trouble figuring this out.

    How do I create windows, and link the buttons to do things like

    OK would close the one box
    Cancel would close ALL boxes

    And link text to the internet!

    Also, I managed to make a window! BUT I can't get its source code, or the program to run the window!

  2. #2
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    >How do I create windows

    Click on File->New Form. In BCB speak, windows are forms.

    >I'm having trouble figuring this out

    Probably because you're thinking about it from the wrong angle. A lot of stuff is done in the IDE without having to write code.

    >BUT I can't get its source code

    See above.

    There is source code there, but it's in a native format - the same used by Delphi. If you right click on a design time form, and select View as Text, you will see it.

    Normally you just drag things around and write the code behind the events.

    However, BCB is at the end of the day a standard C++ compiler with some design time stuff tagged on. You can write apps the standard way if you like, but you will have to create a different type of project other than the default one.

    >And link text to the internet!

    Assign an on-click event to something and call:

    ShellExecute(Handle, "open", webUrl.c_str(), 0, 0, SW_SHOWNORMAL);

    >or the program to run the window!

    Err? Try "New Project" & "Run". This would automatically give you a running exe with a blank window.
    Last edited by Davros; 02-15-2005 at 07:57 PM.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Replies: 2
    Last Post: 10-03-2006, 04:48 PM
  3. THE END - Borland C++ Builder, Delphi, J Builder?
    By Davros in forum A Brief History of
    Replies: 5
    Last Post: 02-28-2006, 11:23 PM
  4. Builder Canvas & TListBox question
    By Joan Lesas in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2003, 01:13 AM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM