Dẫn nhập
Sức mạnh của hệ điều hành Window là không thể chối cãi. Và để tạo nên sức mạnh đó không thể thiếu những ứng dụng mạnh mẽ. Vậy để tạo ra những ứng dụng đó, người lập trình viên cần học cái gì?
Cùng nhau tìm hiểu serial Lập trình Winform.
Nội dung
chúng tôi
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowGUI { public partial class fMain : Form { public fMain() { InitializeComponent(); } int i = 0; { i++; } } }
Form1.Designer.cs
namespace WindowGUI { partial class fMain { private System.ComponentModel.IContainer components = null; protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fMain)); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.SuspendLayout(); chúng tôi = new System.Drawing.Font("Mistral", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.Location = new System.Drawing.Point(436, 60); chúng tôi = "button1"; chúng tôi = new System.Drawing.Size(87, 23); this.button1.TabIndex = 0; chúng tôi = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.UseWaitCursor = true; this.button2.Location = new System.Drawing.Point(199, 59); chúng tôi = "button2"; chúng tôi = new System.Drawing.Size(75, 23); this.button2.TabIndex = 1; chúng tôi = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.UseWaitCursor = true; this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Control; this.BackgroundImage = global::WindowGUI.Properties.Resources.Kteam_vector_copy_2; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.ClientSize = new System.Drawing.Size(885, 487); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Cursor = System.Windows.Forms.Cursors.WaitCursor; this.DoubleBuffered = true; this.ForeColor = System.Drawing.SystemColors.MenuHighlight; chúng tôi = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); chúng tôi = "fMain"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; chúng tôi = "HowKteam.com"; this.TransparencyKey = System.Drawing.Color.Yellow; this.UseWaitCursor = true; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.ResumeLayout(false); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; } }
Download project
Kết luận
Bài sau chúng ta sẽ cùng tìm hiểu về Label trong lập trình C# Winform.
Nếu bạn có bất kỳ khó khăn hay thắc mắc gì về khóa học, đừng ngần ngại đặt câu hỏi trong phần bên dưới hoặc trong mục HỎI & ĐÁP trên thư viện chúng tôi để nhận được sự hỗ trợ từ cộng đồng.