BÀI TẬP CODE LẬP TRÌNH TRỰC QUAN

I. Console a. Định nghĩa mảng /Mảng có dộ dài cố định phải chứa các đối tượng cùng loại. //Một mảng ArrayList có thể lưu trữ các đối tượng thuộc các loại khác nhau. namespace Baitap3_Container___Muctieu2 { class Program { static void Main(string[] args) { ArrayList al = new ArrayList(); al.Add("Hello"); al.Add("15,16,17"); al.Add(new DateTime(2010, 5, 30)); Console.WriteLine (al[0]); Console.WriteLine(); Console.WriteLine(al[1]); Console.WriteLine(); Console.WriteLine(al[2]); Console.WriteLine(); Console.ReadLine(); b. Container namespace Baitap3_Container___Muctieu3 { class Program { static void Main(string[] args) { Queue/*<string>*/ q = new Queue/*<string>*/(); q.Enqueue("ABC"); q.Enqueue("123"); q.Enqueue(new Decimal(15.30)); q.Enqueue(new DateTime(2002,5,10)); Console.WriteLine(q.Dequeue()); Console.WriteLine(q.Dequeue()); Console.WriteLine(q.Dequeue()); Console.WriteLine(q.Dequeue()); Console.ReadLine(); /*foreach ( String a in q) Console.WriteLine(q.Dequeue()); Console.ReadLine();*/ c. Định nghĩa Lớp namespace Baitap3_DinhNghiaLop { class Program { static void Main(string[] args) { A myA = new A(); A.Static_Member(); myA.Instance_Member(); Console.WriteLine(); B myB= new B(); myB.Instance_Member(); B.Static_Member(); Console.WriteLine(); Console.WriteLine("Bien X = " + myB.X); Console.Write(myB.Y); Console.WriteLine("Bien Y = " ); Console.WriteLine("Bien Z = " + myB.Z);

Lớp I91C – Minh - LTN

1

Console.ReadLine(); } class A { static public void Static_Member()//Khai bao static thi tu ham main co the goi truc tiep phuong thuc { Console.WriteLine("Calling from Static Member"); } public void Instance_Member()//Khai bao public thi ham Main fai new lop A moi goi dc phuong thuc { Console.WriteLine("Calling from Instance Member"); } } class B : A //Lop B ke thua tu A nen co the goi cac phuong thuc trong class A { private int x; private int y; private int z; public int X { get { return x; } } public int Y { set { y=value;} } public int Z { get { return z; } set {z=value;} d. Tính giá trị Max của biến Byte namespace TinhToan { class Tinhtoan { static void Main() { byte b; b = byte.MaxValue; Console.WriteLine("Maximum Byte is " + b.ToString ()); Console.ReadLine(); } e. Xuất ra 1 chuỗi namespace XuatChuoi { class Program { static void Main(string[] args) { int[] i = new int[5] { 40, 30, 60, 80, 100 }; int j; for (j = 0; j < 5; j++) { Console.WriteLine("Index = " + j.ToString() + " & Value = " + i[j].ToString()); Console.ReadLine(); } string[] str = new string[3] { "I", "LOVE", "U" }; int iStr; for (iStr = 0; iStr < 3; iStr++) { Console.WriteLine("Index = " + iStr.ToString() + " & Value = " + str[iStr]); Console.ReadLine();

Lớp I91C – Minh - LTN

2

} DateTime[] date = new DateTime[2] { new DateTime(2010, 3, 20,20,30,55), new DateTime(2009, 12, 30,9,40,59) }; int iDate; foreach (DateTime s in date) Console.WriteLine("Index = " + s.ToString() + " & Value = " + s.ToString()); Console.ReadLine();

I.

Graphics – Buoi 1
a. Tính tổng N

namespace TinhTongN { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button_tinh_Click(object sender, EventArgs e) { textBox_ketqua.Text = tinhtong().ToString(); } private void textBox_ketqua_TextChanged(object sender, EventArgs e) { } private int tinhtong() { int a= int.Parse(textBox_nhapn.Text); int tong = 0; for (int i = 0; i <= a; i++) { tong += i; } return tong; } private void button_thoat_Click(object sender, EventArgs e) { this.Close(); }

b. 4 phép tính cơ bản

Lớp I91C – Minh - LTN

3

ToDouble(txtsothunhat.LTN 4 .Text = Convert. double y = Convert.ToDouble(txtsothunhat. } private void button5_Click(object sender. } private void button6_Click(object sender.Exit(). double y = Convert. Lớp I91C – Minh . EventArgs e) { double x = Convert.Text).ToString(x .Text). lblKQ.Text). EventArgs e) { double x = Convert. lblKQ.namespace TinhBonPhepToan { public partial class Form1 : Form { public Form1() { InitializeComponent().Text).Text).Text). EventArgs e) { Application. } private void button1_Click(object sender.Text).y).Text). double y = Convert.ToString(x * y).ToString(x / y).ToDouble(txtsothuhai.Text = "Loi".Text = Convert. if (y != 0) lblKQ. EventArgs e) { txtsothunhat.ToDouble(txtsothuhai. double y = Convert. else lblKQ.ToDouble(txtsothuhai.Text = Convert. lblKQ.ToDouble(txtsothuhai. EventArgs e) { double x = Convert.Text = Convert. } private void button2_Click(object sender. } private void button3_Click(object sender. } private void button4_Click(object sender.ToDouble(txtsothunhat.ToString(x + y).Clear(). EventArgs e) { double x = Convert.ToDouble(txtsothunhat.

Year-1.Now. MessageBoxIcon. } private void Form1_Load(object sender. MessageBoxButtons. } } } c. "Mùi". "Thân".//Nam 2008 co chi la 0 (Ty). "Ngọ". Int64 SoCan.Clear(). i <= 5000. "Sửu".txtsothuhai. "Dậu".Add(i). "Dần".LTN 5 .SelectedIndex=DateTime. SoChi. } private void comboBox1_SelectedIndexChanged(object sender. n = (Nam . string[] chi={"Tý". m. "Thìn". i++) { comboBox1.Show("Lỗi nhập số". "Báo lỗi:". "Nhâm". try { so = Convert. "Canh".ToInt64(comboBox1. "Mậu". "Hợi"}. "Mẹo". cong 10 de sau khi chia lay du duoc so duong SoChi = (12 + 0 + m) % 12. } comboBox1. } } Lớp I91C – Minh . EventArgs e) { Int64 so. } catch { MessageBox. m = (Nam . } private string DocNamAmLich(Int64 Nam) { string[] can={"Giáp". "Kỷ". // label1. "Tân".Text = DocNamAmLich(so).2008) % 12.Items. "Bính". Đổi Dương lịch sang Âm lịch namespace NamAmLich { public partial class Form1 : Form { public Form1() { InitializeComponent(). SoCan = (10+4+n)%10. "Tuất". "Quý"}. EventArgs e) { for (int i = 1. n.Error). cong 12 de sau khi chia lay du duoc so duong return can[SoCan] + " " + chi[SoChi].SelectedItem).2008) % 10. //Nam 2008 co can la 4 (Mau). "Ất". "Tỵ".OK. "Đinh".

} catch { MessageBox.private void button1_Click_1(object sender.Parse(textBox_so2. } } } } d.Text). int b = int. } private void button_and_Click(object sender. EventArgs e) { } private int dichchuyentrai() { int a = int. "Báo lỗi:". EventArgs e) { Int64 so.Parse(textBox_so2.Close(). return c.Text).ToInt64(comboBox1. label1. Lớp I91C – Minh . int b = int. try { so = Convert.Parse(textBox_so1.Show("Lỗi nhập số".Text). MessageBoxIcon.Text). MessageBoxButtons.LTN 6 . int c = a << b.OK.Text). int c = a >> b.Error). EventArgs e) { this.Text = DocNamAmLich(so). Các phép toán số học & logic namespace Bai1d { public partial class Form1 : Form { private void button_thoat_Click(object sender.Parse(textBox_so1. } private int dichchuyenphai() { int a = int.

switch (so) { case 0: kq = "không".ToString(). } string DocMotSo(ulong so) { string kq = "".LTN 7 . EventArgs e) { textBox_kq. Lớp I91C – Minh . case 1: kq = "một".return c.ToString().Text = dichchuyentrai().Text = dichchuyenphai(). case 2: kq = "hai". break. break. } private void button_dichphai_Click(object sender. } e. Đọc số thành chữ namespace DoiSoThanhChu { public partial class Form1 : Form { public Form1() { InitializeComponent(). } private void button_dichtrai_Click(object sender. EventArgs e) { textBox_kq.

break. break. break. break. string kq = "". break. } string DocHaiSo(ulong so) { byte HDV=Convert. case 8: kq = "tám". if (so >= 0 && so <= 9) kq = DocMotSo(so). Lớp I91C – Minh . break. byte HC=Convert.ToByte(so/10). case 5: kq = "năm".ToByte(so%10). else if (so == 10) kq = "mười". case 7: kq = "bảy".LTN 8 . else if (so >= 11 && so <= 19) kq = "mười " + DocMotSo(HDV). } return kq. break. case 9: kq = "chín". case 4: kq = "bốn". case 6: kq = "sáu".break. case 3: kq = "ba". else if (so == 15) kq = "mười lăm".

ToByte(HaiSoSau % 10). byte HaiSoSau = Convert. else if (so == 25 || so == 35 || so == 45 || so == 55 || so == 65 || so == 75 || so == 85 || so == 95) kq = DocMotSo(HC) + " mươi lăm ".ToUInt64(so % 1000).ToByte(so % 100). } string DocSauSo(ulong so) { string kq = "".ToByte(HaiSoSau / 10).else if (so == 20 || so == 30 || so == 40 || so == 50 || so == 60 || so == 70 || so == 80 || so == 90) kq = DocMotSo(HC) + " mươi". return kq. else if (HC == 0) kq = DocMotSo(HT) + " trăm lẻ " + DocMotSo(HDV). byte HT = Convert. else kq = DocMotSo(HT) + " trăm " + DocHaiSo(HaiSoSau).ToByte(Basocuoi % 100). byte HDV = Convert.ToByte(so / 100). byte Haisocuoi = Convert. UInt64 Basocuoi = Convert.LTN 9 . Lớp I91C – Minh . return kq. UInt64 Basodau = Convert. if (so >= 0 && so <= 99) kq = DocHaiSo(so).ToUInt64(so / 1000). byte HC = Convert. } string DocBaSo(ulong so) { string kq = "". else if (so == 100 || so == 200 || so == 300 || so == 400 || so == 500 || so == 600 || so == 700 || so == 800 || so == 900) kq = DocMotSo(HT) + " trăm". else kq = DocMotSo(HC) + " mươi " + DocMotSo(HDV).

byte HC = Convert.Text). EventArgs e) { Application.ToByte(Haisocuoi / 10). Toạ độ trên form Lớp I91C – Minh . byte HT = Convert. Graphics – Buoi 3 a.Text = DocSauSo(n). else kq = DocBaSo(Basodau) + " ngàn " + DocBaSo(Basocuoi). else if (HT == 0) kq = DocBaSo(Basodau) + " ngàn không trăm " + DocBaSo(Basocuoi). } private void button2_Click(object sender. EventArgs e) { ulong n = Convert. else if (Basocuoi == 0) kq = DocBaSo(Basodau) + " ngàn".ToByte(Basocuoi / 100). } } } II. return kq. else if ((HT == 0) && (HC == 0)) kq = DocBaSo(Basodau) + " ngàn không trăm lẻ " + DocBaSo(Basocuoi).ToUInt64(textBox1.Exit().LTN 10 . if (so >= 0 && so <= 999) kq = DocBaSo(so). lblkq. } private void button1_Click(object sender.

Text = e. } private void button_up_Click(object sender. } #region Cac phuong thuc private void moveup() { Lớp I91C – Minh . } b. public Form1() { InitializeComponent().private void Form1_MouseMove(object sender. y. EventArgs e) { moveup().X.ToString().Text = e.x_old.Y.ToString(). int y. MouseEventArgs e) { x.LTN 11 . Điều khiển Control bằng tay namespace DieukhienControlbangtay { public partial class Form1 : Form { int x.y_old.

Drawing. pictureBox1. y .Y.Location. else timer_tg.Location.LTN 12 . y = pictureBox1.Point(x. EventArgs e) { reset(). EventArgs e) { if (checkBox_chay1chieu. y + 10). pictureBox1.Point(x-10 .Y. pictureBox1. y = pictureBox1.10).X.Point(x_old. pictureBox1. y = pictureBox1. Lớp I91C – Minh .Location.Drawing.Location.Point(x. } private void moveright() { x = pictureBox1. pictureBox1.Y. } #endregion private void button_down_Click(object sender.y_old). } private void Form1_Load(object sender. } private void checkBox_chay1chieu_CheckedChanged(object sender. } private void reset() { x = pictureBox1.Location.X.Point(x + 10.Drawing. y).X. y = pictureBox1.Drawing.Y. } private void button_left_Click(object sender. EventArgs e) { x_old = pictureBox1. EventArgs e) { movedown().Location = new System.Location = new System.y).X.Enabled = true.Location. } private void button_right_Click(object sender.Location = new System. } private void moveleft() { x = pictureBox1.X. } private void button_res_Click(object sender.Location = new System.Location.Drawing.Y.Location.Location.Location.x = pictureBox1.Enabled = false.Location. EventArgs e) { moveleft(). EventArgs e) { moveright().Checked) timer_tg. } private void movedown() { x = pictureBox1. y = pictureBox1.Location = new System.X.

Point(x + 10. p.Y. if (p.Location.Location = new System. y = pictureBox1. public DienkhienControl_Chay2chieu() { InitializeComponent().Drawing.X. EventArgs e) { Point p = pictureBox1.Y).LTN 13 .Location. y). else pictureBox1. } private void timer_h_Tick(object sender.Y.X .pictureBox1.X < 0) thuan = true. public Form1() { InitializeComponent(). Tự động chạy : (Chay 2chieu) namespace BTChuong3 { public partial class DienkhienControl_Chay2chieu : Form { bool thuan. } c. else if (p.Location = new Point(p.X >= (this.Width . } private void timer_tg_Tick(object sender. } private void DienkhienControl_Chay2chieu_Load(object sender.Location = new Point(p. Boolean chayxuong = true. EventArgs e) { x = pictureBox1. if (x >= this.5.Location = new System.Width)) thuan = false. pictureBox1. pictureBox1.Point(x + 10. y). EventArgs e) { thuan = true.Location.X + 5. Lớp I91C – Minh .Width) x = 0.Drawing. } } } d. Tự động chạy : (Chay 4chieu) namespace WindowsApplication1 { public partial class Form1 : Form { Boolean chayquaphai = true. if (thuan) pictureBox1. p.Location.Y).y_old = pictureBox1.

Location.Location = new Point(label1. } else chayquaphai = false.70)) { label1.X .Location. Hộp chữ chạy namespace Buoi3 { public partial class Form1 : Form { Lớp I91C – Minh .70) && (label1.X + 5.Location.Y + 5). } else if ((chayquaphai == false) && (chayxuong == false)) { if ((label1.Location.5 >= -10) && (label1. label1.Location. } else chayxuong = false.Location.Y -4).X .LTN 14 . else chayquaphai = true. } else if ((chayquaphai == true) && (chayxuong == false)) { if ((label1.Height .Y + 5 <= this.X-5.Location.Y + 5 <= this.Location.5.Height .5).X + 5 <= this.Y .Location = new Point(label1.Y + 3).X .70)) { label1.5 >= -30)) { label1. label1.X + 5 <= this.Location.5 >= -20) && (label1.Location. } else chayxuong = true.Location.Width .X + 5.Location.Location.Location = new Point(label1. label1. } } } } e. label1.Y .} private void timer1_Tick(object sender.60) && (label1.Location.Width .Location.Location = new Point(label1. EventArgs e) { if ((chayquaphai == true) && (chayxuong == true)) { if ((label1. } else if ((chayquaphai == false) && (chayxuong == true)) { if ((label1.5 >= -0)) label1.Location.Y .

Enabled = true.Text. } private void textbox_nhap_KeyDown(object sender. str = chuoidau + chuoicuoi.Text.LTN 15 .KeyData == Keys. ScrollEventArgs e) { timer1.Length .1). str = chuoicuoi + chuoidau.Length. EventArgs e) { if (radioButton_right.Enabled = true. Lớp I91C – Minh .ToString(). 1). } private void hScrollBar_dichuyen_Scroll(object sender.hScrollBar_dichuyen. timer1.Enter) { str = textbox_nhap. } } private void congkhoangtrang() { str = textbox_nhap.Substring(str. EventArgs e) { timer1.Length . textBox_chay. str. private void button_reset_Click(object sender. congkhoangtrang().Substring(1.Text = timer1. i < 75 .Interval.Enabled=true.Text = null. textbox_nhap.Substring(0. int len = str.Length . str.1).Value. KeyEventArgs e) { if (e. textBox_chay. label1.string str.Focus(). string chuoicuoi = str.Checked) { string chuoidau = str. } } private void radioButton_left_CheckedChanged(object sender. string chuoicuoi = str. EventArgs e) { textbox_nhap. } } private void Form1_Load(object sender.Text = str.Checked) { string chuoidau = str. } private void timer1_Tick(object sender.Text = str. i++) { str = str + " ". for (int i = 0.1). EventArgs e) { timer1.Substring(0.len.1. } private void radioButton_right_CheckedChanged(object sender. } else if(radioButton_left. EventArgs e) { congkhoangtrang().Interval = 100 .

txtThongBao.LTN 16 .Length. open.log|Tất cả các tập tin|*.*.ini.Text="Có tất cả "+text.Filter = "Các tập tin DLL|*. foreach (string s in text) { txtThongBao.InitialDirectory = "C:\\windows". } private void btnNhieuTapTin_Click(object sender.log|Tất cả các tập tin|*.Filter = "Các tập tin DLL|*.Title = "Chọn 1 tập tin".InitialDirectory = "C:\\windows".*".*". private void btn1ThuMuc_Click(object sender. open. open.ShowDialog().dll|Các tập tin INI và LOG|*.*. string[] text= open. open. open.Text += s + "\r\n".ini.FileName.Title = "Chọn 1 tập tin". EventArgs e) { open = new OpenFileDialog().ShowDialog(). } } FolderBrowserDialog folder. open.dll|Các tập tin INI và LOG|*. Lớp I91C – Minh . open.ToString()+" tập tin: \r\n".Text = open. private void btn1TapTin_Click(object sender. } OpenFileDialog open.Multiselect = true. txtThongBao. Hộp thoại thông dụng – Dialog namespace Dialog { public partial class Form1 : Form { public Form1() { InitializeComponent(). EventArgs e) { open = new OpenFileDialog(). open.f. EventArgs e) { folder = new FolderBrowserDialog(). open.FileNames.

SelectedPath = "C:\\windows".Drawing.BackColor = color.Font.Font = new System. DialogResult rs = font. folder.OK) txtThongBao.SandyBrown. txtThongBao. txtThongBao.Enabled = true. FormClosingEventArgs e) { //e. } private void timer2_Tick(object sender.Opacity >= 1) timer1.ShowDialog().Opacity <= 0) // Application.Color.01.Bold).Color.Font("Microsoft Sans Serif". else this. if (rs == DialogResult. EventArgs e) { if (this.folder. EventArgs e) { color = new ColorDialog().Opacity += 0. private void btnMauNen_Click(object sender.OK) txtThongBao. txtThongBao.01.Text= folder. EventArgs e) { txtThongBao.Cancel = true.Text = "Ví dụ lập trình C# sử dụng các hộp thoại thông dụng của hệ điều hành Windows".Exit(). } private void Form1_FormClosing(object sender. 10F. EventArgs e) { color = new ColorDialog().ShowDialog().Blue. private void btnFont_Click(object sender.Color.BackColor = System.Color. if (rs == DialogResult.Opacity -= 0. EventArgs e) { timer2.ForeColor = System. DialogResult rs=color.OK) txtThongBao. //if (this. txtThongBao. } ColorDialog color.Enabled = false. DialogResult rs = color. EventArgs e) { font = new FontDialog().ForeColor = color. if (rs == DialogResult.FontStyle. } FontDialog font. } private void timer1_Tick(object sender. } private void btnThoat_Click(object sender.SelectedPath.ShowDialog().Drawing.Drawing.ShowDialog(). } private void btnReset_Click(object sender. //else // this.Font = font. EventArgs e) Lớp I91C – Minh .Drawing. System. } private void btnMauChu_Click(object sender.LTN 17 .

byte val_green. byte blue) { pictureBox. } #endregion private void timer_blue_Tick(object sender. else val_blue++. bool haichieu_green. Pha màu namespace buoi4 { public partial class Form1 : Form { byte val_red. bool haichieu_red. byte val_blue. else val_blue--. bool haichieu_blue. EventArgs e) { if (radioButton_1chieu.LTN 18 .Color. public Form1() { InitializeComponent(). if (haichieu_blue) val_blue++.Opacity <= 0) Application.Drawing.Exit(). } g. if (val_blue == 255 && haichieu_blue == true) haichieu_blue = false. green. } #region private void phanmau(byte red. } else { if (val_blue == 0 && haichieu_blue == false) haichieu_blue = true.FromArgb(red.BackColor = System.{ if (this. else this.01. blue).Opacity -= 0. byte green. Lớp I91C – Minh .Checked) { if (val_blue == 255) val_blue = 0.

else Lớp I91C – Minh . } label_green.Checked) { if (val_green == 255) val_green = 0. else val_green--.Checked == true) timer_green. } else { if (val_green == 0 && haichieu_green == false) haichieu_green = true. } private void timer_green_Tick(object sender.Text=val_green.ToString(). } private void timer_red_Tick(object sender. phanmau(val_red.ToString().Value = val_blue. } label_red. val_green. else val_red--. val_blue). else val_red++. EventArgs e) { if (radioButton_1chieu. phanmau(val_red. vScrollBar_red. val_green. if (val_green == 255 && haichieu_green == true) haichieu_green = false. } else { if (val_red == 0 && haichieu_red == false) haichieu_red = true.Value = val_green. if (haichieu_green) val_green++. vScrollBar_green.Start(). EventArgs e) { if (radioButton_1chieu. } private void checkBox_green_CheckedChanged(object sender. else val_green++. val_blue).Text=val_blue. phanmau(val_red.Value=val_red.LTN 19 . EventArgs e) { if (checkBox_green. if (val_red == 255 && haichieu_red == true) haichieu_red = false. vScrollBar_blue.ToString().Checked) { if (val_red == 255) val_red = 0.} label_blue.Text=val_red. val_green. val_blue). if (haichieu_red) val_red++.

else timer_red.Enabled = !timer_blue. EventArgs e) { if (checkBox_red.Start(). EventArgs e) { timer_blue. } private void checkBox_red_CheckedChanged(object sender.Enabled. timer_green. timer_green.timer_green. Đồng hồ chạy ngược (nhập giờ hẹn) namespace HenGio { public partial class Form1 : Form { public Form1() { InitializeComponent().Interval = timer_blue. timer_red.ToString()) == 13) { timer_blue.Interval = timer_blue.Parse(e.Stop(). } } private void button_ngung_Click(object sender. } private void button_ngung_KeyPress(object sender. } private void hScrollBar1_ValueChanged(object sender.Enabled. EventArgs e) { timer_blue. } private void checkBox_blue_CheckedChanged(object sender.Stop().Enabled = !timer_green.Enabled.Interval = hScrollBar1.Enabled = !timer_red.Enabled. timer_red.LTN 20 .Enabled = !timer_green.KeyChar.Enabled. timer_green.Checked == true) timer_red.Interval + 20. else timer_blue.Enabled = !timer_blue. EventArgs e) { if (checkBox_blue.Stop().Value. } h.Start(). } Lớp I91C – Minh .Interval + 40.Checked==true) timer_blue. timer_red.Enabled. KeyPressEventArgs e) { if (byte.Enabled = !timer_red.

Text = "".Now. MessageBoxIcon.Text = dt.Now. dt= DateTime.Text = DateTime.ToString(dem). public Form1() { InitializeComponent().ToLongTimeString().Show("Đã tới giờ rồi???Học bài thôi!!!"). label2. Đồng hồ chạy ngược (nhập giây hẹn) namespace DongHoChayNguoc { public partial class Form1 : Form { DateTime dt = DateTime.Text = DateTime.Text = DateTime.ToString("dd/MM/yyyy hh:mm:ss"). Lớp I91C – Minh . } private void timer1_Tick(object sender.private void Form1_Load(object sender. EventArgs e) { SoGiayHen = Convert.Text = DateTime.Now. label2. } private void timer1_Tick(object sender. label5.ToString("dd/MM/yyyy hh:mm:ss"). dem = 0. } } private void button1_Click(object sender.Information).Visible = false. dt = dt.Now.ToString().Checked == true) if (textBox1. label5. EventArgs e) { //label2. label5. textBox1. if (dem == SoGiayHen) { MessageBox. EventArgs e) { //textBox1. "Thông báo". } } } i.Text).ToInt32(textBox1. int SoGiayHen. MessageBoxButtons.ToLongTimeString().Text = DateTime.Now.Now.Text == label2.Now.Text) MessageBox.dem.AddSeconds(-1).LTN 21 .Show("Hết giờ hẹn rồi".Text = Convert.Visible = true. label5. if (checkBox1. EventArgs e) { label1. dem++.OK.ToString().

Drawing.Drawing.Pen myPen. } private void button1_Click(object sender. EventArgs e) { colorDialog1.Dispose(). myPen = new System. } private void Form_MouseUp(object sender. 0.Y.Drawing. EventArgs e) { System.Graphics formGraphics = this. myPen. Y1 = e. MouseEventArgs e) { X1 = e. myPen. } private void button2_Click(object sender.DrawLine(myPen.} } } j.Dispose(). myPen = new System. public Form1() { InitializeComponent().LTN 22 . Y1. e. System.Pen(Mau). 100.CreateGraphics(). Y1. 300).DrawLine(myPen.Color. System.Graphics formGraphics = this.Y).CreateGraphics(). Lớp I91C – Minh .X.Dispose().Drawing.Pen myPen. } private void Form_MouseDown(object sender. formGraphics. formGraphics. formGraphics.Drawing. button2.Blue. e. 0.BackColor = colorDialog1. X1. Color Mau = Color.Drawing.X. MouseEventArgs e) { System. formGraphics. Vẽ Đường thẳng namespace VeDuongLine { public partial class Form1 : Form { int X1.ShowDialog().Pen(Mau).Dispose().

EventArgs e) { Application. } private void button3_Click(object sender.CreateGraphics(). EventArgs e) { System.ShowDialog(). 300).LTN 23 .Drawing. formGraphics. myPen = new System.CreateGraphics().Drawing.DrawLine(myPen.Clear(DefaultBackColor). } } } VE NHIEU DUONG THANG Lớp I91C – Minh . 0.Dispose(). } private void xóaCácLineToolStripMenuItem_Click(object sender. formGraphics.BackColor = colorDialog1. Mau = colorDialog1. 0. } private void vẽ1LineToolStripMenuItem_Click(object sender. myPen.Color. EventArgs e) { System.Graphics formGraphics = this.Pen myPen.Dispose(). EventArgs e) { colorDialog1. } private void chọnMàuToolStripMenuItem_Click(object sender.Drawing.Graphics formGraphics = this. System. formGraphics.Dispose().Graphics formGraphics = this.Clear(DefaultBackColor).Exit(). formGraphics. } private void thoátToolStripMenuItem_Click(object sender. 100.Color. formGraphics.Drawing.Dispose(). EventArgs e) { System.CreateGraphics().Pen(Mau).Mau = colorDialog1.Color. button2. formGraphics.Drawing.

int X1.Dispose(). Color mau = Color. X1. MouseEventArgs e) { X1 = e. } private void Form1_MouseMove(object sender.BackColor = colorDialog1.Color.OrangeRed. e. } private void Form1_MouseDown(object sender. formGraphics. MouseEventArgs e) { Dangve = false. myPen = new System. Lớp I91C – Minh .Drawing.Dispose(). EventArgs e) { colorDialog1.Y). button1.Graphics formGraphics = this. } private void button1_Click(object sender. } } private void Form1_MouseUp(object sender. e.Y. formGraphics.X.Pen(mau. bool Dangve = false. Y1 = e.CreateGraphics(). myPen.namespace veduongline2 { public partial class Form1 : Form { int dodaynetve.X.Pen myPen.Drawing.Color. public Form1() { InitializeComponent(). Y1. MouseEventArgs e) { if(Dangve) { System.DrawLine(myPen. System.dodaynetve).Drawing.ShowDialog().LTN 24 . mau = colorDialog1. Y1.

Point p1 = new Point(). EventArgs e) { listBox1. Pen Mypen = new Pen(Color. } private void Form1_Load(object sender.Graphics formGraphics=this. public Form1() { InitializeComponent(). g = this.SelectedIndex + 1. //Point p2 = new Point().CreateGraphics(). Vẽ Hình Chữ Nhật namespace VeHinhChuNhat { public partial class Form1 : Form { Graphics g.LTN 25 .Blue). } } } k. } private void button_chonmau_Click(object sender. EventArgs e) { if (colorDialog1. MouseEventArgs e) { this. formGraphics. 1).Blue. EventArgs e) { dodaynetve = listBox1.Dispose(). EventArgs e) { System.SelectedIndex = 0. } private void Form1_MouseDoubleClick(object sender.Clear(DefaultBackColor). } private void listBox1_SelectedIndexChanged(object sender. formGraphics. SolidBrush Mybrush = new SolidBrush(Color.CreateGraphics().Refresh(). } private void button2_Click(object sender.Drawing.ShowDialog() == DialogResult.Dangve = true.OK) Lớp I91C – Minh .

X.X.Color. //g. e.X .p1.X. // g.{ Mypen. e.Color = colorDialog1.Y.X.Y . } else g.Color = colorDialog1.Y.DrawRectangle(Mypen.p1. if (a < 0 && b < 0) { a = a * (-1). e. b).Y.Color. b = e. b).Y. p1. mybrush1 = new System.p1.Y.Y. g.p1.p1. } break.Drawing.DrawRectangle(Mypen.Y. } else if (a<0 && b>0) { a = a * (-1).X. } Lớp I91C – Minh . e.SolidBrush mybrush1.X. e. g. a = e. e.p1.X.FillRectangle(Mybrush. g.FillRectangle(Mybrush. p1. a. a.FillRectangle(mybrush1.DrawRectangle(Mypen. } else if (a > 0 && b < 0) { b = b * (-1).Y . g.X . a.X.Dispose(). int a. b). a.Dispose().Left: { int a. } private void Form1_MouseUp(object sender.Drawing.X. p1.Blue). a = e. e.X. //Mypen. a. b = b * (-1).Y).Right: { System.X . b.e.DrawRectangle(Mypen.SolidBrush(System.LTN 26 . } else if (a < 0 && b >0) { a = a * (-1).BackColor = colorDialog1. b). } button_chonmau.Color. p1. p1. b = b * (-1). MouseEventArgs e) { switch (e.Y. p1.Y.Drawing. e.Button) { case MouseButtons. Mybrush. b = e.X. b).p1. e.p1.p1.Y . if (a < 0 && b < 0) { a = a * (-1).Y). b. e. g.X . case MouseButtons.Y .Color.

Y = e. e.X. } break. e. EventArgs e) { this.X.Refresh().Y. } else g.X = e.Middle: { g.X.FillRectangle(Mybrush.else if (a > 0 && b < 0) { b = b * (-1). p1. } break.X .FillRectangle(Mybrush. e. p1.p1.Y. g.Y).X.p1. p1.X. p1.Y). a. MouseEventArgs e) { p1. } private void button_xoamau_Click(object sender. } } private void Form1_MouseDown(object sender.Y. } l. Vẽ Hình Eclipse Lớp I91C – Minh . b).LTN 27 .Y. e. e. case MouseButtons.X.DrawLine(Mypen. p1. p1.Y .

LTN 28 .m. Notepad Lớp I91C – Minh .

ToString() != "") { //Thay đổi font tại vị trí được tô đen richTextBoxNoiDung. } private void timesNewRomanToolStripMenuItem_Click(object sender.Checked = false.Font.Size. } private void arialToolStripMenuItem_Click(object sender. richTextBoxNoiDung.Style).ToString() != "") { //Thay đổi font tại vị trí được tô đen richTextBoxNoiDung.namespace NotePad { public partial class NotePad : Form { public NotePad() { InitializeComponent(). } private void ClearFont() { timesNewRomanToolStripMenuItem. richTextBoxNoiDung.Font. arialToolStripMenuItem.Font = new Font("Arial". richTextBoxNoiDung. richTextBoxNoiDung.Checked = false.Style). courierToolStripMenuItem. richTextBoxNoiDung.Checked = false.SelectionFont = new Font("Arial".LTN 29 . richTextBoxNoiDung. fontToolStripMenuItem.Checked = false.SelectionFont = new Font("Times New Roman".Font.Checked = true. } else richTextBoxNoiDung.Font.Checked = true. EventArgs e) { ClearFont(). } else richTextBoxNoiDung. timesNewRomanToolStripMenuItem.Font.Font. arialToolStripMenuItem. richTextBoxNoiDung.Style).SelectedText.Font.Font.Size. richTextBoxNoiDung.Style).Size.Size. if (richTextBoxNoiDung. if (richTextBoxNoiDung. EventArgs e) { ClearFont().Font= new Font("Times New Roman".SelectedText. } Lớp I91C – Minh .

ToString() != "") { //Text được chọn có màu gì thì thay thế bằng màu Red richTextBoxNoiDung.ToString() != "") richTextBoxNoiDung. if (richTextBoxNoiDung.private void courierToolStripMenuItem_Click(object sender.Checked = false.ToString() != "") { //Thay đổi font tại vị trí được tô đen richTextBoxNoiDung. courierToolStripMenuItem. greenToolStripMenuItem.ToString() != "") { richTextBoxNoiDung.SelectionColor = Color.Style).SelectionFont = f. EventArgs e) { ClearFont(). } private void greenToolStripMenuItem_Click(object sender. if (richTextBoxNoiDung.ShowDialog().Font.Size.SelectedText. } else richTextBoxNoiDung.SelectedText. if (richTextBoxNoiDung.Checked = true.ForeColor = Color. richTextBoxNoiDung. if (richTextBoxNoiDung.SelectedText.Font. EventArgs e) { ClearFont().Font.Checked = false.Checked = false. fontToolStripMenuItem.Font.Green. redToolStripMenuItem.ForeColor = Color.Size. } private void fontToolStripMenuItem_Click(object sender. greenToolStripMenuItem. else richTextBoxNoiDung. if (result == DialogResult. } Lớp I91C – Minh .SelectedText. richTextBoxNoiDung.Style).Red.Checked = true. DialogResult result=f.Cancel) return. blueToolStripMenuItem. colorToolStripMenuItem1.Font = f.Checked = true.Red.LTN 30 .SelectionColor = Color.SelectionFont = new Font("Courier". } private void ClearColor() { redToolStripMenuItem. } else richTextBoxNoiDung. richTextBoxNoiDung.Checked = true.Checked = false. EventArgs e) { ClearColor(). richTextBoxNoiDung. FontDialog f = new FontDialog().Font. } else richTextBoxNoiDung.Font = new Font("Courier".Font. EventArgs e) { ClearColor().Green. } private void redToolStripMenuItem_Click(object sender.

Cancel) return. if (richTextBoxNoiDung. colorToolStripMenuItem1. if (result == DialogResult.private void blueToolStripMenuItem_Click(object sender. EventArgs e) { richTextBoxNoiDung.ToString() != "") { richTextBoxNoiDung. } private void cutToolStripMenuItem_Click(object sender.Color. } private void selectAllToolStripMenuItem_Click(object sender.Checked = true. EventArgs e) { richTextBoxNoiDung.ToString(). a. } private void undoToolStripMenuItem_Click(object sender.Enabled=true. if (richTextBoxNoiDung.SelectedText. else richTextBoxNoiDung. ColorDialog c = new ColorDialog().SelectionColor = Color.Blue.SelectedText. EventArgs e) { a = new About(). } private void colorToolStripMenuItem1_Click(object sender.Color.Copy().Text = DateTime. private void aToolStripMenuItem_Click(object sender.Paste().LTN 31 . EventArgs e) { richTextBoxNoiDung. } else richTextBoxNoiDung. Lớp I91C – Minh . EventArgs e) { ClearColor(). EventArgs e) { richTextBoxNoiDung. } About a.Checked = true.SelectionColor = c. EventArgs e) { richTextBoxNoiDung.SelectAll().ForeColor = c. } private void timeDateToolStripMenuItem_Click(object sender. blueToolStripMenuItem. } private void pasteToolStripMenuItem_Click(object sender. timer1. EventArgs e) { richTextBoxNoiDung.Show().Blue.Now. } private void copyToolStripMenuItem_Click(object sender.Cut().ShowDialog().ToString() != "") richTextBoxNoiDung. EventArgs e) { ClearColor(). DialogResult result = c.ForeColor = Color.Undo().

FileName.Focus().Cancel) richTextBoxNoiDung.Close(). timer1.FilterIndex = 1.Lines) sw.UTF8).ShowDialog() == DialogResult.rtf|All Word Documents|*.Dispose().rtf|Document|*.Show(ex.doc". try { OpenFileDialog open = new OpenFileDialog().LTN 32 .Filter = "Text File|*.InitialDirectory = @"C:\".OverwritePrompt = true. richTextBoxNoiDung.Checked = true. } } private void saveToolStripMenuItem_Click(object sender.Text = save. open.Close(). } private void openToolStripMenuItem_Click(object sender. save.txt|Rich Text Format|*. save.WriteLine(line).Close(). sw. } } private void exitToolStripMenuItem1_Click(object sender. foreach (string line in richTextBoxNoiDung.ShowDialog() != DialogResult. EventArgs e) { a.Title = "Luu file lai". save. open. if (open.Checked = false. saveToolStripMenuItem.Text = "".Text = open.*". false.Filter = "Text File|*.Exit().Cancel) { StreamWriter sw = new StreamWriter(save.FileName. Lớp I91C – Minh . lblStatus.} private void timer1_Tick(object sender.FileName.FilterIndex = 1. richTextBoxNoiDung.FileName. open. SaveFileDialog save = new SaveFileDialog(). EventArgs e) { openToolStripMenuItem. } private void toolStripButton3_Click(object sender. } } catch (Exception ex) { MessageBox. lblStatus. EventArgs e) { richTextBoxNoiDung.ReadToEnd(). open. Encoding.txt|Rich Text Format|*.doc|Tất cả các file|*. Encoding. sr. if (save. saveToolStripMenuItem.Checked = false. EventArgs e) { openToolStripMenuItem.UTF8).Text = "".Title = "Chon 1 file text".Checked = true. save.Text = sr.Message). else { StreamReader sr = new StreamReader(open. EventArgs e) { Application.

Style ^ FontStyle. } } n.SelectionFont. EventArgs e) { richTextBoxNoiDung.SelectionFont. pageSetupDialog. pageSetupDialog.Size.AllowMargins = true.PageSettings. richTextBoxNoiDung.SelectionFont. richTextBoxNoiDung.Style ^ FontStyle. pageSetupDialog.ShowHelp = true. richTextBoxNoiDung. richTextBoxNoiDung.Size.ShowDialog() == System.Bold). EventArgs e) { richTextBoxNoiDung. EventArgs e) { printDialog. EventArgs e) { richTextBoxNoiDung.LTN 33 . if (printDialog.Italic).Document = printDocument. EventArgs e) { richTextBoxNoiDung.OK) printDocument. pageSetupDialog. pageSetupDialog.Document = printDocument.Forms.SelectionFont.EnableMetric = false. } private void GachDuoi_Click(object sender.Style ^ FontStyle. pageSetupDialog.SelectionFont = new Font(richTextBoxNoiDung. richTextBoxNoiDung. EventArgs e) { pageSetupDialog.ShowDialog() == DialogResult.OK) { printDocument. pageSetupDialog.SelectionFont.Name. } private void pagesetup_Click(object sender.Size. if (pageSetupDialog.Windows.DialogResult. richTextBoxNoiDung. } private void print_Click(object sender. pageSetupDialog.ShowNetwork = true.AllowPrinter = true.Name.} private void NotePad_Load(object sender.Print().Focus().Name. } private void InDam_Click(object sender.SelectionFont.Underline).SelectionFont.DefaultPageSettings.SelectionFont.AllowOrientation = true.SelectionFont.DefaultPageSettings = pageSetupDialog. } private void InNghieng_Click(object sender.PageSettings = printDocument.SelectionFont = new Font(richTextBoxNoiDung. MenuStrip Lớp I91C – Minh .AllowPaper = true.SelectionFont = new Font(richTextBoxNoiDung.

LTN 34 . Lớp I91C – Minh .namespace BaiThiMau { public partial class Form1 : Form { public Form1() { InitializeComponent().

EventArgs e) { Application. EventArgs e) { //menuStrip1.Yellow.Exit(). } private void tôMàuĐỏChoMenuFileToolStripMenuItem_Click(object sender.Form1(). EventArgs e) { menuStrip1. EventArgs e) { VeLine. EventArgs e) { AboutBox1 aboutbox = new AboutBox1(). } private void exitToolStripMenuItem_Click(object sender.Red. } private void tôMàuVàngChoMenuFileToolStripMenuItem_Click(object sender.} private void aboutUsToolStripMenuItem_Click(object sender. frm1.MdiParent = this. aboutbox.BackColor = Color. aboutbox.BackColor = Color. EventArgs e) Lớp I91C – Minh .Font menuStrip1.White. ListBoxMultiSelect private void LapTrinh_ListBox_Load(object sender.Show(). EventArgs e) { menuStrip1. } private void vẽLineToolStripMenuItem_Click(object sender. frm1.LTN 35 . } private void tôMàuTrắngChoMenuFileToolStripMenuItem_Click(object sender.BackColor = Color.Show(). } o.MdiParent = this.Form1 frm1 = new VeLine.

} catch { MessageBox. MessageBoxIcon.Show("Nhập số sai". "Báo lỗi".SelectedIndex = Convert. i < 20.Error).ToString() + " phần tử".Text = listBox1.Add(i). MessageBoxButtons. i < listBox1.Count > 0) { listBox1. i < listBox1. label2. label1. true).SelectedItem).SetSelected(Convert. } label1.SetSelected(i.Items. } } private void btn_xoatatca_dachon_Click(object sender. } private void btn_bochochiso_Click(object sender.ToString() + " phần tử".Remove(listBox1. "Báo lỗi". } private void btn_xoataichiso_Click(object sender.Error).ToString() + " phần tử". EventArgs e) { try { listBox1. MessageBoxButtons. MessageBoxButtons.Items. } private void btn_chontatca_Click(object sender. } catch { MessageBox. } } private void btn_chepqua_Click(object sender.Text).LTN 36 . i++) listBox1.SetSelected(i.Count.OK.ToInt16(txt_ChonLaiChiSo.Show("Nhập số sai".Items. EventArgs e) { for (int i = 0.Text = listBox1.Count.Count.{ for (int i = 0.Items.RemoveAt(Convert.Count.Text). false). i++) { listBox1.Text = listBox2. i++) listBox1.ToInt16(txt_XoaTaiChiSo.Error).Text)). EventArgs e) { try { listBox1.Count.Show("Nhập số sai".Items.OK. } catch { MessageBox. } } private void btn_bochon_Click(object sender.ToInt16(txt_BoChonTaiChiSo. "Báo lỗi". false). } private void btn_chonchiso_Click(object sender.Items.SelectedItems.Items.Count.Text = listBox1.Items. MessageBoxIcon. MessageBoxIcon. EventArgs e) { Lớp I91C – Minh . EventArgs e) { for (int i = 0. EventArgs e) { try { listBox1.Items.OK. } label1. EventArgs e) { while (listBox1.ToString().

Text = listBox2.Items.Items.Text = listBox2.Show("Nhập số sai".Clear(). for (int i = 0. "Báo lỗi".Items.Text). EventArgs e) { while (listBox1.Text). EventArgs e) { listBox2.SelectedItems) { listBox2.Count.Count.Add(ob.Items.Text = listBox1.Items. listBox1. EventArgs e) { listBox1.Items.Checked.Items.Items.Items. i < 20.ToString() + " phần tử".Items.foreach (object ob in listBox1.OK. } label2. Xem Hình Slideshow Lớp I91C – Minh . label2. } private void btn_Reset_Click(object sender.Text). label2.Remove(listBox1.Items.ToInt16(txt_ThemVaoTai.Count. i++) { listBox1. } private void checkBox1_CheckedChanged(object sender.Add(txt_ChuoiThemVao. EventArgs e) { label1.Items. label2.ToString() + " phần tử".Count.Text = listBox2.SelectedItem).Count.Count > 0) { listBox2.Items. MessageBoxButtons.Insert(Convert. } catch { MessageBox.Items.Text = listBox1.Text = listBox2. } } } p. } private void btn_chuyenqua_Click(object sender.ToString() + " phần tử".LTN 37 . } } private void btn_Clear_Click(object sender.Sorted = checkBox1.Clear().Items.ToString() + " phần tử".Text = listBox1.ToString() + " phần tử".Text = listBox1.SelectedItem). } private void btn_themvaotai_Click(object sender. } private void label1_Click(object sender.ToString() + " phần tử".Items.ToString() + " phần tử". EventArgs e) { try { listBox2. txt_ChuoiThemVao. } label1.Count.Add(i).SelectedItems. label2. } private void btn_themvaocuoi_Click(object sender.Count.Count.ToString()).Add(listBox1. EventArgs e) { listBox2.Error). } label1.ToString() + " phần tử". MessageBoxIcon. EventArgs e) { listBox2.

*". private void button1_Click(object sender.i<CacFile.Image = Image. } private void listBox1_SelectedIndexChanged(object sender.Items.Text).Items.SelectedItem.Interval = 500. for(int i=0.Multiselect = true.Length. listBox1.Text = "Chạy\r\ntự động".i++) { listBox1.WMF|Tất cả các tập tin|*. pictureBox1. string[] CacFile = of.*.*. label2. BMP. WMF|*. EventArgs e) { try { label2.ShowDialog().JPEG.LTN 38 . of.FromFile(label2. button3. JPEG. EventArgs e) { OpenFileDialog of =new OpenFileDialog(). Lớp I91C – Minh . EventArgs e) { timer1. of. } catch { } } private void button2_Click(object sender. of.Enabled = false.Filter = "Các tập tin JPG.InitialDirectory = @"C:\WINDOWS\Web\Wallpaper".JPG. timer1.ToString().namespace XemhinhSlideShow { public partial class Form1 : Form { public Form1() { InitializeComponent().*.Text = listBox1. } //string ThuMuc.Image = null.FileNames. of.Add(CacFile[i]).BMP.Clear(). pictureBox1.Text = "".

trackBar1.Value = 500; } private void timer1_Tick(object sender, EventArgs e) { if (listBox1.SelectedIndex < listBox1.Items.Count-1) listBox1.SelectedIndex += 1; else listBox1.SelectedIndex = 0; } private void button3_Click(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { if (timer1.Enabled == false) { timer1.Enabled = true; button3.Text = "Dừng"; } else { timer1.Enabled = false; button3.Text = "Chạy\r\ntự động"; } } } private void trackBar1_Scroll(object sender, EventArgs e) { timer1.Interval = trackBar1.Value; } private void button4_Click(object sender, EventArgs e) { if (button4.Text == "Full screen\r\n(Escape)") { this.FormBorderStyle = FormBorderStyle.None; this.TopMost = true; this.WindowState = FormWindowState.Maximized; pictureBox1.Dock = DockStyle.Fill; button4.Text = "Normal view\r\n(Escape)"; } else { this.FormBorderStyle = FormBorderStyle.Sizable; this.TopMost = false; this.WindowState = FormWindowState.Normal; pictureBox1.Dock = DockStyle.None; button4.Text = "Full screen\r\n(Escape)"; } } private void pictureBox1_DoubleClick(object sender, EventArgs e) { button4.PerformClick(); }

q. Đổ Xúc Xắc

Lớp I91C – Minh - LTN

39

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Globalization; namespace XucXac { public partial class Form1 : Form { int So, Doan,LanThang,LanThua, LanDoan; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Random rd = new Random(); So = rd.Next(1, 7); LanDoan += 1; label1.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die" + So + ".gif"); if (So == Doan) { LanThang += 1; listBox1.Items.Add(LanDoan.ToString()+ ". Thắng ( đoán " + Doan + ", ra " + So + " )"); } else { LanThua += 1; listBox1.Items.Add(LanDoan.ToString()+ ". Thua ( đoán " + Doan + ", ra " + So + " )"); } //using System.Globalization; NumberFormatInfo nfi = new CultureInfo("en-US", false).NumberFormat; nfi.PercentDecimalDigits = 4;

Lớp I91C – Minh - LTN

40

Double TiLeThang = (double)LanThang / LanDoan; Double TiLeThua = (double)LanThua / LanDoan; label5.Text = "Lần đoán: " + LanDoan.ToString(); label3.Text = "Lần thắng: " + LanThang.ToString() + " (" + TiLeThang.ToString("P", nfi) + ")"; label4.Text = "Lần thua: " + LanThua.ToString() + " (" + TiLeThua.ToString("P", nfi) + ")"; listBox1.SelectedIndex = listBox1.Items.Count - 1; } private void button2_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die1.gif"); Doan = 1; } private void button3_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die2.gif"); Doan = 2; } private void button5_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die3.gif"); Doan = 3; } private void button6_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die4.gif"); Doan = 4; } private void button7_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die5.gif"); Doan = 5; } private void button4_Click(object sender, EventArgs e) { label2.Image = Image.FromFile(Directory.GetCurrentDirectory() + "\\HinhXucXac\\die6.gif"); Doan = 6; } private void Form1_Load(object sender, EventArgs e) { button2.PerformClick(); } private void button8_Click(object sender, EventArgs e) { LanDoan = 0; LanThang = 0; LanThua = 0; listBox1.Items.Clear(); label3.Text = ""; label4.Text = ""; label5.Text = ""; } }

Lớp I91C – Minh - LTN

41

Month. case 3: dt = dt. switch (comboBox1. } label1. case 4: dt = dt. public Form1() { InitializeComponent(). break. EventArgs e) { dt = DateTime. label3. break.Monday: label4.Day.SelectedIndex) { case 0: break.Text = "Nam " + dt.Text = "Thu hai".Now.DayOfWeek) { case DayOfWeek.LTN 42 . break. case 2: dt = dt.AddHours(-6).Text = "Thang " + dt. break.ToString().} 1) LICH THE GIOI  namespace LichTheGioi { public partial class Form1 : Form { DateTime dt.Year.AddHours(2).ToString(). label2. switch (dt. } private void timer1_Tick(object sender.AddHours(-12).ToString().AddHours(1). break. case 1: dt = dt. Lớp I91C – Minh .Text = dt.

Text = "Chu Nhat".Clear(). break.Text = "Thu ba". EventArgs e) { string BS.Current = Cursors.Add("Nhat").Text = "Thu sau".Wednesday: label4. break. case DayOfWeek. comboBox1.Text = "Thu bay".ToString(). i++) { BS = i. break. break.Sunday: label4.Items. case DayOfWeek.Saturday: label4.Items. comboBox1. case DayOfWeek.Items.Add("Trung Quoc"). comboBox1.Friday: label4. comboBox1.LTN 43 .Thursday: label4.Tuesday: label4. listBox1. break.Items.case DayOfWeek. comboBox1.Text = "Thu tu". i <= 9999.WaitCursor.Text = "Thu nam".Add("My"). } } } 2) IN BẢNG SỐ XE namespace In_bang_so_xe { public partial class Form1 : Form { public Form1() { InitializeComponent().Add("Viet Nam").Items. for (int i = 1. Cursor. case DayOfWeek.Add("Phap"). } label5. break. EventArgs e) { comboBox1. } private void button1_Click(object sender. Lớp I91C – Minh . case DayOfWeek.Items. } private void Form1_Load(object sender.SelectedIndex = 0.Text = dt.ToString("hh:mm:ss").

break. listBox1.Add(BS). s2. s3. s4 = BS. } private void button4_Click(object sender. break. } label1. i++) { BS = i. EventArgs e) { Lớp I91C – Minh .Items. break.ToString(). listBox1. s2 = BS. s4. } listBox1. Cursor. case 3: BS = "0" + BS. s3 = BS. 1).Items. } label1. } s1 = BS. } private void button3_Click(object sender.Items. s4. for (int i = 1.ToByte(s2) + Convert.Count.Items.Substring(0. case 3: BS = "0" + BS.Substring(1.Clear().Current = Cursors.Text = listBox1.Clear(). 1). s3.LTN 44 .Substring(1.Items.ToString(). EventArgs e) { string BS.Substring(3. break. case 2: BS = "00" + BS. i++) { BS = i. i <= 9999. 1). s1. break. case 3: BS = "0" + BS. break.Items.Add(BS).Items. Int32 S = (Convert. switch (BS. 1).Length) { case 1: BS = "000" + BS.switch (BS. 1). for (int i = 1.Current = Cursors.Count.Substring(2.Substring(2.Items. if (S % 10 == 9) listBox1. s1.Count. i <= 9999.Length) { case 1: BS = "000" + BS. 1). } label1. 1). break.WaitCursor. EventArgs e) { string BS. } private void button2_Click(object sender. s4 = BS.ToByte(s1) + Convert. s2 = BS. break.Substring(3.ToString().Add(BS).ToString(). break. s2. case 2: BS = "00" + BS. switch (BS.ToByte(s3) + Convert.Text = listBox1.ToString(). if (s1 == s4 && s2 == s3) listBox1. } s1 = BS.WaitCursor.ToByte(s4)). 1).Length) { case 1: BS = "000" + BS.Text = listBox1. Cursor. s3 = BS.Substring(0. case 2: BS = "00" + BS.

if (((Convert. s1.Text = listBox1.LTN 45 . for (int i = 1. for (int i = 1.Substring(3. 1).ToInt32(s2) . i <= 9999. break. listBox1. s1.ToInt32(s3) == (Convert. s3.Items.Items.Items. case 3: BS = "0" + BS.WaitCursor. i <= 9999. s2 = BS. break.1)) || (Convert. 1).1)) && (Convert.Text = listBox1. case 3: BS = "0" + BS. break.WaitCursor. break. s2 = BS.Substring(0. i <= 9999.ToString().ToString().Current = Cursors. } private void button6_Click(object sender.Substring(1.Length) { case 1: BS = "000" + BS. } label1. Cursor. s4 = BS. break. s2.1)) && (Convert. s1. i++) { BS = i.Substring(2.Current = Cursors. 1).Substring(0. EventArgs e) { string BS. if ((s1 == s3 && s1 != s2) || (s2 == s4 && s2 != s3)) listBox1.Clear(). for (int i = 1. Cursor. Lớp I91C – Minh . 1). listBox1. s3 = BS. break. } private void button5_Click(object sender.Current = Cursors. 1). 1). switch (BS. s3 = BS.Clear().Clear(). } s1 = BS.ToInt32(s3) .ToInt32(s1) == (Convert. switch (BS. } s1 = BS.Substring(1. s3. break. s4.ToInt32(s2) == (Convert.ToInt32(s3) . 1).string BS. 1).1)))) listBox1. break. i++) { BS = i. break.Items. listBox1.ToInt32(s2) == (Convert.Substring(0.ToString(). s4.WaitCursor.ToString(). EventArgs e) { string BS.Add(BS).Add(BS). s3. s4.ToString().Substring(2. } s1 = BS.Items.Substring(1. s2 = BS. i++) { BS = i. } label1. s4 = BS.Substring(3.Length) { case 1: BS = "000" + BS. case 2: BS = "00" + BS.ToInt32(s4) .Count. s2.Length) { case 1: BS = "000" + BS. case 2: BS = "00" + BS.Items. 1). case 2: BS = "00" + BS. case 3: BS = "0" + BS. Cursor. switch (BS. 1).Items.Count. s2.

textBox2. 1). double b = 0.Items. textBox1.Text = "Phương trình có nghiệm là:" + kq.Text = "". } else kq = -b/a.Text = "Phương trình vô nghiệm".s3 = BS.Text = "Phương trình vô số nghiệm".Text).Substring(2. } } } 3) PHUONG TRÌNH BẬC 1 namespace phuongtrinhbac1 { public partial class Form1 : Form { public Form1() { InitializeComponent().Count.ToInt32(s2) < Convert.Parse(textBox1.ToString().ToInt32(s1) < Convert.ToInt32(s4))) listBox1. } label1.Text = listBox1. } private void button1_Click(object sender.Add(BS).Text). 1).Substring(3.ToString().LTN 46 . double kq=0. label5. if (a == 0) { if (b == 0) label5. else label5. s4 = BS.Items.Text = "". if ((Convert. EventArgs e) { double a = 0.ToInt32(s3) < Convert. } } } 4) IN MA ASCII Lớp I91C – Minh . a = double.ToInt32(s3) && Convert. b = double.ToInt32(s2) && Convert.Parse(textBox2.

Items. n++) { listBox1.LTN 47 . } listBox1.Clear().Add("Mã ASCII của " + Convert. } private void button2_Click(object sender. n++) { listBox1.Items. } private void button4_Click(object sender. n <= 122.ToString(). for (int n = 65. } listBox1.Clear().Items.Count. n <= 57. n <= 90.Items.Items. for (int n = 97. EventArgs e) { listBox1.ToString().ToChar(n) + " là " + n). EventArgs e) { for (int n = 65.Add("Mã ASCII của " + Convert.Count.Items. } listBox1.Add("Mã ASCII của " + Convert.Items.namespace InMaASCII { public partial class Form1 : Form { public Form1() { InitializeComponent().ToChar(n) + " là " + n).Items. } private void button1_Click(object sender. } private void button3_Click(object sender.ToString(). EventArgs e) { listBox1. n++) { listBox1. n <= 90.Count. n++) { Lớp I91C – Minh . EventArgs e) { listBox1.Items.Clear().ToChar(n) + " là " + n). for (int n = 48.

} Lớp I91C – Minh .Add("Mã ASCII của " + Convert.ToString(). } private void aboutF1ToolStripMenuItem_Click(object sender. EventArgs e) { Int16 n = Convert.listBox1. } private void button5_Click(object sender.LTN 48 .Add("Mã ASCII của " + Convert.ToChar(n) + " là " + n). n++) { listBox1. } listBox1. } listBox1.Count. for (int n = 48.ToString().Add("---------"). EventArgs e) { AboutBox ab = new AboutBox().Show().Text). ab. ab.Items.ToChar(n) + " là " + n).MdiParent = this.Exit().ToChar(n) + " là " + n).ToChar(n). } private void thoátCtrXToolStripMenuItem_Click(object sender. } listBox1.Add("Mã ASCII của " + Convert.ToInt16(textBox1.Items. n <= 57.Items.Items. n++) { listBox1. EventArgs e) { Application.Items. n <= 122.Items. for (int n = 97. } } 5) ĐỀ THI MẪU namespace Dethi { public partial class Dethi : Form { public Dethi() { InitializeComponent().Text = Convert. label1.Add("---------").

for (int i = 1900.WindowState = FormWindowState.Items.Normal.ToString(DateTime.LTN 49 . EventArgs e) { for (int i = 1. for (int i = 1. i <= 12.private void thuNhỏToolStripMenuItem_Click(object sender. f1. i++) { comboBox3. } } private void inBảngSốXeToolStripMenuItem_Click(object sender.Items.Text = Convert.Show().Day). i <= 2100.ToString(DateTime. i <= 31. EventArgs e) { In_bang_so_xe. } comboBox2. } comboBox3.Year). } else { this. } private void phaMàuToolStripMenuItem_Click(object sender.Checked) { this.Form1 f1 = new In_bang_so_xe. Lớp I91C – Minh .Now.Now.Add(i).Now. EventArgs e) { } } } 6) ĐỔI NGÀY THÁNG NĂM (VIỆT –ANH) namespace NgayThangNam { public partial class Form1 : Form { public Form1() { InitializeComponent().Add(i).Add(i).Maximized.Month). } private void Form1_Load(object sender. i++) { comboBox2.Text = Convert. } comboBox1. EventArgs e) { if (thuNhỏToolStripMenuItem.WindowState = FormWindowState. i++) { comboBox1.ToString(DateTime.Form1().Items. f1.Text = Convert.MdiParent = this.

ToString("yyyy").OK.Wednesday: thu = "Thứ tư".Show("Không có ngày này".ToString("dddd") + " " + dt. switch (dt.Text)).LTN 50 . this.ToString("dd") + kt+" " + dt. this. } catch { MessageBox. if ((dt.ToString("dd/MM/yyyy"). Convert. break. Convert.Text)).Monday: thu = "Thứ hai".ToString("yyyy").DateTime dt = new DateTime(Convert.ToString("dd") + " tháng " + dt.Day == 1) || (dt.Error).Sunday: thu = "Chủ Nhật".Text = ngaythuTiengViet(dt). break. MessageBoxIcon.ToInt32( comboBox1. label2.ToInt32(comboBox2. if ((dt.Text).Thursday: thu = "Thứ năm". case DayOfWeek. "có lỗi". case DayOfWeek.Text = dt. case DayOfWeek.Text = ngaythuTiengAnh(dt). Convert.Text). MessageBoxButtons. case DayOfWeek.ToString("dd/MM/yyyy").Saturday: thu = "Thứ bảy".Tuesday: thu = "Thứ ba". break.Text = ngaythuTiengViet(dt).ToInt32(comboBox1.Day == 22)) kt = "nd". } private string ngaythuTiengAnh(DateTime dt) { string kt. label2.Day == 23)) kt = "rd". else kt = "th".ngày " + dt.Day == 2) || (dt.DayOfWeek) { case DayOfWeek.Day == 21) || (dt. } } } } 7) XỬ LÝ CHUỔI: Lớp I91C – Minh .ToInt32(comboBox3. break. if ((dt.Text). break. break. } return thu + " . break.Friday: thu = "Thứ sáu". case DayOfWeek. label1. } private void button1_Click(object sender.Day == 3) || (dt.ToString("MM") + " năm " + dt.Text). case DayOfWeek. return dt. EventArgs e) { try { DateTime dt = new DateTime(Convert. } private string ngaythuTiengViet(DateTime dt) { string thu = "".ToInt32(comboBox2.ToInt32(comboBox3.Convert.ToString("MMMM") + " " + dt.Text = dt.Text = ngaythuTiengAnh(dt).Day == 31)) kt = "st". label1.

namespace xulychuoi { public partial class Form1 : Form { public Form1() { InitializeComponent().Text).Text = Convert. textBox1. label4.Focus(). EventArgs e) { label3. textBox1.1. } private void button2_Click(object sender.Text) . } private void textBox1_TextChanged(object sender. } } } 8) TRUY XUẤT CHUỖI namespace TruyXuatFile { public partial class Form1 : Form Lớp I91C – Minh .SelectionLength = Convert. textBox1.SelectionLength).ToInt16(textBox2.LTN 51 .ToString(textBox1.SelectionStart + 1).SelectionStart = Convert.Focus().Text = Convert.ToString(textBox1. EventArgs e) { textBox1. EventArgs e) { } private void button1_Click(object sender.ToInt16(textBox3.

Text = strAll.FileName. StreamReader sr = new StreamReader(aFile). public Form1() { InitializeComponent(). aFile.Close().Create). sw.FileName.Write(strAll).Text = filename. EventArgs e) { saveFileDialog1. filename = saveFileDialog1. textBox1. strAll = richTextBox1.FileName.Text = filename. sw.Write("File vừa tạo ra").Close().LTN 52 .Close(). FileStream aFile = new FileStream(filename.ShowDialog().Close(). } } } 10) ĐỆ QUY VÀ VÒNG LẶP Lớp I91C – Minh . FileStream aFile = new FileStream(filename. StreamWriter sw = new StreamWriter(aFile). } private void button1_Click(object sender. aFile. sr. } private void button3_Click(object sender. textBox1. string strAll.ReadToEnd().ShowDialog(). FileMode.ShowDialog(). filename = openFileDialog1. FileMode.{ string filename. aFile. string strLine. filename = saveFileDialog1. sw. strAll = sr. StreamWriter sw = new StreamWriter(aFile).Text.Create).ShowDialog(). FileStream aFile = new FileStream(filename. EventArgs e) { openFileDialog1. //openFileDialog1. sw.Text = filename. EventArgs e) { saveFileDialog1.Open). richTextBox1. FileMode. textBox1.Close(). } private void button2_Click(object sender.Close().

ToString() + "\n". i <= n. for (UInt64 i = 1. UInt64 n.WaitCursor.WaitCursor. Lớp I91C – Minh .Current = Cursors. string kq="". n=Convert.ToUInt64(textBox1. string kq = "".Current = Cursors.ToUInt64(textBox1. } richTextBox1.ToUInt64(textBox1. } richTextBox1.Text = kq. UInt64 x=1. EventArgs e) { Cursor. UInt64 n.Text). n = Convert. } private void button1_Click(object sender. i <= n.WaitCursor. i++) { kq += i + "! = " + GiaiThua(i).namespace GiaiThuaDeQui { public partial class Form1 : Form { public Form1() { InitializeComponent(). n = Convert.Current = Cursors.ToString() + "\n". } private void button3_Click(object sender.Text = kq. EventArgs e) { Cursor. UInt64 n. i++) { kq += "Phần tử thứ " + i + ": " + Fibo(i). string kq = "".Text). } private void button2_Click(object sender. for (UInt64 i = 1.Text). EventArgs e) { Cursor.LTN 53 .

UInt64 n. kq += "Phần tử thứ " + i + ": " + y + "\n".Text = "". i <= n.Text). } richTextBox1. } //Hàm Fibo viết đệ quy public UInt64 Fibo(UInt64 so) { if (so == 1) return 0. else return so * GiaiThua(so . NGÀY. else return (Fibo(so .WaitCursor. kq += i + "! = " + x + "\n".1)). x = tam.2) + Fibo(so .ToUInt64(textBox1.1). i++) { tam = y. UInt64 tam. } richTextBox1.Text = kq. } //Hàm giai thừa viết đệ quy public UInt64 GiaiThua(UInt64 so) { if (so == 1) return 1. THÁNG. for (UInt64 i = 3.for (UInt64 i = 1. string kq = "Phần tử thứ 1: 0\nPhần tử thứ 2: 1\n". i++) { x = x * i. i <= n. } private void button4_Click(object sender. y = x + y. n = Convert. UInt64 y=1. NĂM namespace NgayThangNam { public partial class Form1 : Form { Lớp I91C – Minh . EventArgs e) { Cursor. } } } 10) CỘNG TRỪ GIỜ. UInt64 x=0. else if (so == 2) return 1. richTextBox1.PHÚT.LTN 54 . GIÂY.Current = Cursors.Text = kq.

break. } private void button2_Click(object sender.Enabled = false. } private void Form1_Load(object sender. case 1: d = d. EventArgs e) { comboBox1.Value = DateTime.Enabled = true.AddHours(db).public Form1() { InitializeComponent().ToInt16(db)). } private void button1_Click(object sender. case 2: d = d. EventArgs e) { dateTimePicker1.LTN 55 .Now. case 3: d = d.AddMinutes(db).ToString("dd/MM/yyyy hh:mm:ss").Text = "Dừng đồng hồ".AddYears(Convert. case 4: d = d. } else { timer1.SelectedIndex = 2. break. case 5: d = d.Text). EventArgs e) { DateTime d = dateTimePicker1. break.SelectedIndex) { case 0: d = d.Enabled ) { timer1. switch (comboBox1. break. } } } } 11) NGUYÊN TỐ CHÍNH PHƯƠNG Lớp I91C – Minh .AddSeconds(db).ToInt16(db)). break. button2. EventArgs e) { if (timer1. break.AddMonths(Convert.Text = "Chạy đồng hồ". } label1. button2.AddDays(db).ToDouble(textBox1. double db = Convert.Value. } private void timer1_Tick(object sender.Text = d.

namespace NguyenToChinhPhuong { public partial class Form1 : Form { public Form1() { InitializeComponent(). } private void button1_Click(object sender. } } } return KQ.Text = "có lỗi". if (XetNguyenTo(SoNhap) == true) label1.Text = "là số nguyên tố". } catch { label1.LTN 56 . EventArgs e) { label1.Text). break. else label1. if (So > 1) { for (UInt64 i = 2.Current = Cursors.Text = "không là số nguyên tố". i++) { if (So % i == 0) { KQ = false.WaitCursor.Sqrt(So). i <= Convert.ToUInt64(textBox1.ToUInt64(So/2). } } private bool XetNguyenTo(UInt64 So) { bool KQ = true. UInt64 SoNhap = Convert. try { Cursor. } private bool XetChinhPhuong(UInt64 So) { double d = Math.Text = "". if (d % 1 == 0) Lớp I91C – Minh .

Text = "có lỗi".Current = Cursors. } label2. } } private void button4_Click(object sender.Items.ToString().ToString(). } catch Lớp I91C – Minh . i++) { if (XetChinhPhuong(i) == true) listBox1. else label1.return true. UInt64 n2 = Convert. } private void button3_Click(object sender. } label2.Clear(). if (XetChinhPhuong(SoNhap) == true) label1.ToUInt64(textBox2.Text). UInt64 SoNhap = Convert.Text = listBox1.Items.Add(i).Count. } } private void button2_Click(object sender. listBox1.ToUInt64(textBox3.Text = "".WaitCursor.Text = "".ToUInt64(textBox3. for (UInt64 i = n1. listBox1.Items.Items.WaitCursor.Text).ToUInt64(textBox2.Current = Cursors.Current = Cursors.Text = "".Text = "là số chính phương".Add(i).Text = "có lỗi".Clear().Items.LTN 57 .WaitCursor. i <= n2. try { Cursor.Items.Text = "không là số chính phương". EventArgs e) { try { Cursor.Text = listBox1. UInt64 n1 = Convert. for (UInt64 i = n1.Text). i++) { if (XetNguyenTo(i) == true) listBox1. i <= n2.ToUInt64(textBox1.Text). UInt64 n2 = Convert. EventArgs e) { label1. } catch { label1. } catch { label2.Count. label2. else return false. UInt64 n1 = Convert. label2.Text). EventArgs e) { try { Cursor.

Text).1). x = Convert.{ label2. for (ulong i = 1. i++) { kq += i + "!=" + Convert. EventArgs e) { ulong n. string kq = "". Lớp I91C – Minh .ToUInt64(textBox1. EventArgs e) { ulong x.ToString(GiaiThua(i)) + '\n'.Text). ulong x = 1.ToUInt64(textBox1. string kq="". } } private void button2_Click(object sender. } private ulong GiaiThua(ulong so) { if (so == 1) return 1. richTextBox2.LTN 58 . i <= x.Text = "có lỗi". else return so * GiaiThua(so . } private void button1_Click(object sender. n = Convert.Text = kq. } } } } 12) ĐỆ QUY VÒNG LẶP namespace DeQui { public partial class Form1 : Form { public Form1() { InitializeComponent().

for(ulong i=3. kq+="ptu thu "+i+":"+y+'\n'.LTN 59 . i <= n.Text = kq. // richTextBox3. i++) { kq += "ptu thu " + i + ":" + Convert. else if(so == 2) return 1. else return (Fibo(so .Text = kq. EventArgs e) { ulong x. i++) { x = x * i.Text="".Text). } } private ulong Fibo(ulong so) { if (so == 1) return 0. string kq = "ptu thu 1:0\nptu thu 2:1\n".i<=n. } } private void button3_Click(object sender. ulong n=Convert. ulong y = 1. richTextBox1. x=tam.ToUInt64(textBox2.1)). x = Convert.Text=kq. i <= x. kq += i + "!=" + x + '\n'.ToString(Fibo(i)) + '\n'. richTextBox4.2) + Fibo(so . string kq="ptu thu 1:0\nptu thu 2:1\n".ToUInt64(textBox2. for (ulong i = 3.for (ulong i = 1.i++) { tam=y. ulong tam. richTextBox3. } private void button4_Click(object sender.Text). EventArgs e) { ulong x = 0. } } } } 13) LẤY KÝ TỰ Lớp I91C – Minh . y=x+y.

.......................Substring(i....... } } } STT 1............................. EventArgs e) { textBox1.........Text..........................................................11 60 Lớp I91C – Minh ............................ToChar(textBox1................namespace laykytu { public partial class Form1 : Form { public Form1() { InitializeComponent()......... if (i < textBox1..........LTN .................. private void Form1_Load(object sender........................ } else e..................... } int i=-1.............KeyChar=Convert........... KeyPressEventArgs e) { i++.. 5.3 Đổi ương Lich sang Âm Lịch.........Length) { e.........7 Tọa độ trên form.............None)............KeyChar=Convert............. 6.......Text.............. 4...... 3....3 4 Phép tính cơ bản...6 Đọc số thành chữ..Text = "Cộng hòa xã hội chủ nghĩa Việt Nam"................ Trang Tính tổng N.1)).... 2......ToChar(Keys............................. } private void textBox2_KeyPress(object sender....5 Các phép toán số học và logic..

.................................................... Xử lý chuổi................................................34 22....... Pha màu......................................... Tự động chạy (chạy 4chiều)................. tháng........................................................................................................... In bảng số xe...................... Đổ xúc xắc................ Đồng hồ chạy ngược(nhập giờ hẹn)........... Vẽ nhiều đường..................... Lịch thế giới........57 36..................11 8....42 26.......45 27................................21 15.................................55 35............................................24 18.............. Tự động chạy(chạy 2chiều)...............27 20...................................................................................... Đồng hồ chạy ngược(nhập giây hẹn)..... Đề thi mẫu.................52 33............................16 12..........................................................phút........50 31............................... ngày........................................................................... giây.......21 14......... Vẽ đường thẳng......................48 30.......................................................41 25.......22 16......................................... MenuStrip............................................................................47 29................. Xem hình Slideshow.....................50 32......................58 Lớp I91C – Minh ............37 23.................................. Đổi ngày tháng năm(Việt-Anh).....................................................................................................LTN 61 .................................................................................. Lấy ký tự...... Cộng trừ giờ................................................................................................................ In mã ASCII...53 34............. năm........................................................................................... Notepad..................................................... Hộp chữ chạy.................. Đệ quy vòng lặp.........................................................................................................46 28............ Điều khiển Control bằng tay...26 19..........................7.... ListBoxMultiSelect............14 11................................................................. Truy xuất chuỗi.....................13 9..... Nguyên tố chính phương........................................................................... Phương trình bậc 1..........................13 10.............................18 13....... Vẽ hình chữ nhật..................... Đệ quy và vòng lặp... Vẽ hình Eclipse.................24 17....................32 21........38 24...................... Hộp thoại thông dụng(dialog)..............

Sign up to vote on this title
UsefulNot useful