I'm making an application for a touchscreen-computer-scanner CK3; I made severa开发者_运维技巧l standardized forms(list, detail, dialog) and I made em inherit from a Class I made that is inheriting from the Form class.
public class Formulier : Form
{
private const int WIDTH = 248;
private const int HEIGHT = 328;
public Formulier()
{
this.Font = new Font("Microsoft Sans Serif", 10f);
//this.Height = HEIGHT;
//this.Width = WIDTH;
//this.MinimumSize = new Size(Width, Height);
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
}
}
namespace WarehouseManagement {
public partial class FormPikbonDetail : Formulier {
public FormPikbonDetail() {
InitializeComponent();
}
}
}
It worked fine for the Font and the FormBorderStyle but the WindowState didn't get maximized. What am I doing wrong here?
Change the WindowState after the form is actually really created - constructor is too early. By BrokenGlass
精彩评论