novice in c # and in general [closed]

-3

How about? I just registered in this great forum, and wanted to say hello and ask for ideas about the creation of a rural house management program in c #. Create the database in MySql (nothing of the other world), I was wondering if to make an application with windows forms and make a menuStrip, is it better that each item is a form or how it would be well implemented? I am open to ideas or examples a greeting and thanks in advance.

    
asked by Rubiopitxi 06.04.2016 в 21:51
source

1 answer

-1

Depends on the design of the application, but the common thing is that a menu item opens a new window. This could be implemented in a MDI design, where the windows open inside a form defined as a container.

Introduction to MDI Forms with C #

Then the menu items open windows contained in this form.

If you do not want to use MDI you can use a base form with Panel and open user control inside. In this case the menu item will create an instance of user control that you add as a control within Panel

public void menustripAltaProducto_Click(..){

     ucAltaProducto uc = new ucAltaProducto();
     Panel1.Controls.Add(uc);
}

This way you do not open modal windows, but you use User Control as form

A variant to this would be to use TabControl , where in each tab you open a user control with the functionality of the screen

How to: Add and Remove Tabs with the Windows Forms TabControl

public void menustrip1_Click(..){

     TabPage tab = new TabPage("Alta Producto");

     ucAltaProducto uc = new ucAltaProducto();
     tab.Controls.Add(uc);

     tabControl1.TabPages.Add(tab);
}
    
answered by 06.04.2016 / 22:37
source