implementing multiple forms in a windows app dilemma

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helloise
    New Member
    • Nov 2008
    • 1

    implementing multiple forms in a windows app dilemma

    i want to do the following:

    1. Click a button on Main menu.
    2. Close main menu ( I would use hide if possible)
    3. Open form2
    4. Open other forms and hide or close the previous form. \\ will not do now
    5. Eventually able to go back to Main form.

    my main form code: public partial class EntryForm : Form
    {
    //EventClass myEventClass = new EventClass();
    public EntryForm()
    {
    InitializeCompo nent();
    }

    private void button1_Click(o bject sender, EventArgs e) \\ click button event
    {
    FireBirdClass firebirdConvert = new FireBirdClass() ;
    List<string> fireBirdTables = firebirdConvert .HandleFireBird Data();
    fireBirdTables. Sort();
    SqlConvertClass sqlConvert = new SqlConvertClass (); \\ what to do here
    List<string> sqlTables = sqlConvert.Conv ertToSQL(fireBi rdTables); \\ passing list of tables to a method in the second form
    } \\ not quite sure now....

    my second form's code:
    public partial class SqlConvertClass : Form
    {
    \\ some code

    public SqlConvertClass ()
    {
    InitializeCompo nent();
    }

    public List<string> ConvertToSQL(Li st<string> sqlTables)
    {
    \\ some code
    }
    }
    }

    the above form contains only display info gathered in method: public List<string> ConvertToSQL(Li st<string> sqlTables)

    how do i this please i am desperate!!!!!! !!!!!!
  • manontheedge
    New Member
    • Oct 2006
    • 175

    #2
    you say you want multiple forms, but your code ... all I can tell from it is that you're trying to work with some data from a database. What does that have to do with multiple forms in C++?

    anyway, if you want multiple forms ... what compiler are you using? if you're using visual studio look into using MFC. If using another one, there are other options, but your code doesn't really fit your question.

    Comment

    Working...