Positioning winform to the center screen does not work - c#

I have an issue regarding the location of the window in my Winforms application.
I need to position the window in the center of the screen during start up. I tried the following but that didn't work. The form always opens at the top left corner.
I tried these in the load event:
this.CenterToScreen();
this.Location = new Point((Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2,
(Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2);
Update: i have given the form maximum and minimum size as 1090,726.
my designer file has this code:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GrayText;
this.ClientSize = new System.Drawing.Size(1074, 688);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1090, 726);
this.MinimumSize = new System.Drawing.Size(1090, 726);
this.Name = "Mail_Remainder";
this.RightToLeftLayout = true;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Remainder";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Mail_Remainder_Load);
this.Resize += new System.EventHandler(this.Mail_Remainder_Resize);
this.ResumeLayout(false);
this.PerformLayout();
Any other way to do this?
Please help.

Give a look at the following:
Form1.StartPosition = FormStartPosition.CenterScreen;
Form1.Show();
Edit:
The line
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
is the one causing the decentering.
If you comment it:
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GrayText;
this.ClientSize = new System.Drawing.Size(1074, 688);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1090, 726);
this.MinimumSize = new System.Drawing.Size(1090, 726);
this.Name = "Mail_Remainder";
this.RightToLeftLayout = true;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Remainder";
// this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Mail_Remainder_Load);
this.Resize += new System.EventHandler(this.Mail_Remainder_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
the window appears on the center of the screen.

Just set the StartPosition property of your form to be CenterScreen .....

I had a similar problem; after CenterToScreen () the form was off-center. Then I noticed I was doing this BEFORE InitializeComponent (). I moved it after InitializeComponent and it worked fine.

Related

The size of picturebox is different than what was initialized as

Just for testing I have created a new windows forms project with a picturebox on the form and changed the size of it to 100x100. This is the InitializeComponents function:
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(13, 13);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(100, 100);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.pictureBox1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
This is my From1_Load function:
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show(pictureBox1.Size.ToString());
}
And this is what I get when I run the app:
Why do I get width=67 height= 65 when it is clear in init that it was meant to be 100x100?
My monitor res is 3840x2160 with change of size of text as 125% Tweaking these settings do not change the result.
Add an image reference.
pictureBox1.Image = Properties.Resources.myImage;
See what happens then, I just need more information to help...

Winform Designer border glitch in Windows 10

i have a PictureBoxin a Form, Dock Property of PictureBox is set to Fill.
now to keep only borders of the form, i set ControlBox property to false and FormBorderStyle to SizableToolWindow.
in Windows 7, it looks like below
but in Windows 10 same code looks like below
can anybody explain why this white border appears at top? i tried removing padding, margin & Rebuild Solution. none of that helped!
in windows 10 (Visual Studio 2015, Designer) form looks normal (without white top border)
.Net target framework version: v4.6
P.S: Image taken from here
Update: here's the Windows Form Designer generated code
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Preview_Image));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(284, 261);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// Preview_Image
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 261);
this.ControlBox = false;
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "Preview_Image";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}

Fit-width custom control in FlowLayoutPanel

I am trying to have my custom control somehow auto-fit into the flow layout panel at horizontal edges.
What I am trying to accomplish is a vertical list of shown custom control. But what I get is below:
Code for my custom control is:
namespace CustomControl
{
partial class ChatMessage
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChatMessage));
this.ContentsTable = new System.Windows.Forms.TableLayoutPanel();
this.DateTimeLabel = new System.Windows.Forms.Label();
this.NumberLabel = new System.Windows.Forms.Label();
this.NameLabel = new System.Windows.Forms.Label();
this.MessageLabel = new System.Windows.Forms.Label();
this.DirectionLabel = new System.Windows.Forms.Label();
this.ContentsTable.SuspendLayout();
this.SuspendLayout();
//
// ContentsTable
//
this.ContentsTable.AutoSize = true;
this.ContentsTable.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ContentsTable.BackColor = System.Drawing.Color.White;
this.ContentsTable.ColumnCount = 2;
this.ContentsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.ContentsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.ContentsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.ContentsTable.Controls.Add(this.DateTimeLabel, 1, 2);
this.ContentsTable.Controls.Add(this.NumberLabel, 1, 0);
this.ContentsTable.Controls.Add(this.NameLabel, 0, 0);
this.ContentsTable.Controls.Add(this.MessageLabel, 0, 1);
this.ContentsTable.Controls.Add(this.DirectionLabel, 0, 2);
this.ContentsTable.Dock = System.Windows.Forms.DockStyle.Fill;
this.ContentsTable.Location = new System.Drawing.Point(48, 0);
this.ContentsTable.Name = "ContentsTable";
this.ContentsTable.RowCount = 3;
this.ContentsTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.ContentsTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.ContentsTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.ContentsTable.Size = new System.Drawing.Size(592, 54);
this.ContentsTable.TabIndex = 0;
//
// DateTimeLabel
//
this.DateTimeLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.DateTimeLabel.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.DateTimeLabel.ForeColor = System.Drawing.SystemColors.ControlDark;
this.DateTimeLabel.Location = new System.Drawing.Point(299, 104);
this.DateTimeLabel.Name = "DateTimeLabel";
this.DateTimeLabel.Size = new System.Drawing.Size(290, 20);
this.DateTimeLabel.TabIndex = 0;
this.DateTimeLabel.Text = "Date / Time";
this.DateTimeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NumberLabel
//
this.NumberLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.NumberLabel.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NumberLabel.Location = new System.Drawing.Point(299, 0);
this.NumberLabel.Name = "NumberLabel";
this.NumberLabel.Size = new System.Drawing.Size(290, 20);
this.NumberLabel.TabIndex = 1;
this.NumberLabel.Text = "Number or ID";
this.NumberLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NameLabel
//
this.NameLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.NameLabel.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NameLabel.Location = new System.Drawing.Point(3, 0);
this.NameLabel.Name = "NameLabel";
this.NameLabel.Size = new System.Drawing.Size(290, 20);
this.NameLabel.TabIndex = 2;
this.NameLabel.Text = "Name";
this.NameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// MessageLabel
//
this.MessageLabel.AutoSize = true;
this.ContentsTable.SetColumnSpan(this.MessageLabel, 2);
this.MessageLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.MessageLabel.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MessageLabel.Location = new System.Drawing.Point(3, 20);
this.MessageLabel.Name = "MessageLabel";
this.MessageLabel.Size = new System.Drawing.Size(586, 84);
this.MessageLabel.TabIndex = 3;
this.MessageLabel.Text = resources.GetString("MessageLabel.Text");
//
// DirectionLabel
//
this.DirectionLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.DirectionLabel.ForeColor = System.Drawing.Color.LightGray;
this.DirectionLabel.Location = new System.Drawing.Point(3, 104);
this.DirectionLabel.Name = "DirectionLabel";
this.DirectionLabel.Size = new System.Drawing.Size(290, 20);
this.DirectionLabel.TabIndex = 4;
this.DirectionLabel.Text = "Direction";
this.DirectionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ChatMessage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Controls.Add(this.ContentsTable);
this.MinimumSize = new System.Drawing.Size(320, 0);
this.Name = "ChatMessage";
this.Padding = new System.Windows.Forms.Padding(48, 0, 0, 0);
this.Size = new System.Drawing.Size(640, 54);
this.ContentsTable.ResumeLayout(false);
this.ContentsTable.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel ContentsTable;
private System.Windows.Forms.Label DateTimeLabel;
private System.Windows.Forms.Label NumberLabel;
private System.Windows.Forms.Label NameLabel;
private System.Windows.Forms.Label MessageLabel;
private System.Windows.Forms.Label DirectionLabel;
}
}
You can see my custom control overflows form size.
Note: Flow layout panel used in the picture has a dock fill, flow direction = top down & wrap contents = false.
Can anyone please suggest?
Using the custom label class from this page for the message label inside panel as suggested by #Reza Aghaei did the job. See the result below, this is exactly what I wanted.

TableLayoutPanel isn't showing padding on bottom when scrollbar is visible

I'm trying to build "dashboard" like layout for my WinForms application.
I was able to build simple concept using TableLayoutPanel.
I'm able to add columns, rows and controls to tlp (TableLayoutPanel), but I get unwanted behaviour:
I have padding set to 5 on tlp, but after adding two rows that padding disappears - I can scroll to bottom, but I'd like that padding to be visible when scrollbar is at bottom.
I'm adding new row with this code:
private void newButton_Click(object sender, EventArgs e)
{
var x = tableLayoutPanel1.RowStyles.Count - 1;
tableLayoutPanel1.RowStyles.Insert(x,new RowStyle(SizeType.Absolute,100));
var b = new Button
{
Dock = DockStyle.Fill,
Text = "New"+x.ToString(),
UseVisualStyleBackColor = true
};
tableLayoutPanel1.RowCount++;
x = tableLayoutPanel1.RowStyles.Count - 2;
tableLayoutPanel1.Controls.Add(b,0,x);
}
Is this behaviour by design or can I change it? Basically I'd like that bottom padding to be visible when I scroll to bottom on tlp.
As requested this is my tlp design code:
private void InitializeComponent()
{
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.AutoScrollMargin = new System.Drawing.Size(10, 10);
this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.button1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.button2, 1, 0);
this.tableLayoutPanel1.Cursor = System.Windows.Forms.Cursors.Default;
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(459, 221);
this.tableLayoutPanel1.TabIndex = 0;
//
// button1 - button in top left cell in tlp
//
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
this.button1.Location = new System.Drawing.Point(8, 8);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(218, 94);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
//
// button2 - button in top right cell in tlp
//
this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
this.button2.Location = new System.Drawing.Point(232, 8);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(219, 94);
this.button2.TabIndex = 1;
this.button2.Text = "button2";
this.button2.UseVisualStyleBackColor = true;
//
// button5 - "Test" button
//
this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button5.Location = new System.Drawing.Point(12, 427);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(75, 23);
this.button5.TabIndex = 1;
this.button5.Text = "Test";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(755, 462);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.button5);
this.Name = "Form2";
this.Text = "Form2";
this.Load += new System.EventHandler(this.Form2_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
At first I have 2 rows, first set to 100 pixels absolute size, second to autofill, when I click "Test" button I'm inserting row that has same properties as first (absolute size, 100 px height)
Thanks to #Sinatr and #TaW I've solved my problem.
As You may see after adding more rows and scrolling to bottom padding is still visible (desirable effect).
The key was to put TableLayoutPanel inside UserControl.
Here are properties that must be set:
TableLayoutPanel (inside UserControl):
Dock:Top
AutoSize:True
AutoScroll:False
UserControl:
AutoScroll:True
Below is designer code from my UserControl:
private void InitializeComponent()
{
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.34F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33F));
this.tableLayoutPanel1.Cursor = System.Windows.Forms.Cursors.Default;
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(443, 10);
this.tableLayoutPanel1.TabIndex = 1;
//
// Dashboard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScroll = true;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "Dashboard";
this.Size = new System.Drawing.Size(443, 208);
this.Load += new System.EventHandler(this.Dashboard_Load);
this.MouseEnter += new System.EventHandler(this.Dashboard_MouseEnter);
this.ResumeLayout(false);
this.PerformLayout();
}
I hope this help anyone having same problem.

resizing in the FlowLayoutPanel

hii
I am having a form in which there is one datagridview which is in the flowlayoutpanel and there is other controls such as button an text box at the bottom
I need to resize the datagrid view when the form is resized.but it shud not fill the entire form because the button and text box should not be get affected.but i need the datagrid to fill the maximum part of the screen leaving space for text box and button at the bottom..help me plz...
I think you don't need the FlowLayoutPanel for this purpose. Just try this code in your Designer.cs and tell me if this looks the way you like.
private void InitializeComponent()
{
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(520, 406);
this.dataGridView1.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 376);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(520, 30);
this.panel1.TabIndex = 1;
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(3, 5);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(433, 20);
this.textBox1.TabIndex = 0;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(442, 4);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
//
// FormMain
//
this.ClientSize = new System.Drawing.Size(520, 406);
this.Controls.Add(this.panel1);
this.Controls.Add(this.dataGridView1);
this.Name = "FormMain";
this.Text = "FormMain";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;

Categories