6. Work With Forms

Working with Forms in Web Windows Forms

User Interface (UI) Principles

The User Interface (UI) in web development refers to the graphical layout of an application. It includes everything that a user interacts with, such as buttons, text entries, sliders, and more.

Key Points:

User Experience (UX) Principles

User Experience (UX), on the other hand, is focused on the overall feel of the experience and the perception of the user as they use the application.

Key Points:

Parent Child Forms

One of the core components of web windows forms is the concept of Parent Child forms. This is a way of organizing and passing information between two forms.

There are 3 main ways to pass information between parent and child forms:

To communicate from one form to another (for instance, when an event occurs in one form and another form needs to be notified), we use an EventHandler.

Let's look at an example in C#:

public partial class ParentForm : Form
{
    public ParentForm()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        ChildForm childForm = new ChildForm("Hello, Child!");
        childForm.ShowDialog(this);
    }
}

public partial class ChildForm : Form
{
    public ChildForm(string message)
    {
        InitializeComponent();
        lblMessage.Text = message;
    }
}

In this example, button1_Click event in the ParentForm creates a new instance of ChildForm, passing a message string to it. ChildForm then displays this message in a label (lblMessage).

Reference

The content in this document is based on the original notes provided in Azerbaijani. For further details, you can refer to the original document using the following link:

Original Note - Azerbaijani Version