TAILIEUCHUNG - Bài giảng Lập trình C# 2010: Chương 2.3 - ĐH Công nghệ Đồng Nai

Bài giảng Lập trình C# 2010: Chương trình bày cách thức thực hiện, câu lệnh, nút lệnh và tính năng của các nút lệnh cùng một số nội dung khác về Windows Forms and Windows Forms Controls. | 1 ColorDialog How to use ColorDialog? pnColor btnColor 2 private void btnColor_Click (object sender, EventArgs e) { ColorDialog cldlg= new ColorDialog(); = ; if(()==) = ; } 3 If you want to set color by the RED, GREEN, BLUE. Please see figure below: pnColor trackBarRed txtRed trackBarBlue txtBlue trackBarGreen txtGreen 4 For each trackbar, please set properties as the same figure 5 private void setColor(){ int nRed = ; int nGreen = ; int nBlue = ; = nRed+""; = nBlue + ""; = nGreen+""; = (nRed, nGreen,nBlue); } 6 Create Event or trackbar control private void processTrackBar (object sender, EventArgs e) { setColor(); } 7 private void frmColorDialog_Load (object sender, EventArgs e) { += processTrackBar; += processTrackBar; += processTrackBar; setColor(); } 8 Name Description Maximum The Maximum property sets the value of the track bar when the slider is all the way to the right Minimum Gets or sets the lower limit of the range this TrackBar is working with. Value Gets or sets a numeric value that represents the current position of the scroll box on the track bar 9 Name Description LargeChange Sets how many positions to move if the bar is clicked on either side of the slider SmallChange sets how many positions to move if the keyboard arrows are used to move the slider TickFrequency Establishes how many positions are between each tick-mark 10 FontDialog lblFont How to use FontDialog? btnFont 11 private void btnFont_Click (object sender, EventArgs e) { FontDialog ftDialog = new FontDialog(); = ; if (() == ) { = ; } } 12 RichTextBox & StreamFile 13 OpenFileDialog openDlg = new OpenFileDialog(); = "(*.txt)

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.