-
26-09-2009, 08:38 AM #1Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Mã:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { for (int i = 0; i < listBox1.Items.Count; i++) { if (listBox1.GetSelected(i) == true) { if (listBox1.SelectedIndex >= 0) textBox1.Text = listBox1.Items[listBox1.SelectedIndex].ToString(); } } } } } }
View more random threads:
- cắt ảnh thành nhiều mảnh trong C#
- cách nối 2 chuỗi path thành một path
- Xin code addNewTab
- lỗi Incorrect syntax near khi ấn vào button "Thêm"
- ?" href="threads/16209-Descriptiondung-de-lam-gi-CategoryDung-de-lam-gi.html?s=f6e9441399ecb1194f40d1b351c1f81e">
? - Cách lấy dữ liệu từ máy quét mã vạch trong lập trình C#?
- Hướng dẫn sử dụng XML làm CSDL
- Cần thảo luận bài tập Cấu trúc dữ liệu và giải thuật
- Thêm cột vào file Excel ( sử dụng windows form lệnh alter table )
- Nhập liệu chữ in trong Datagridview
-
26-09-2009, 07:04 PM #2Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Hiển thị nội dung listbox lên textbox
Đây là code mình làm nhưng không hiển thị được
Mã:private void frmFont_Load(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { for (int i = 0; i < listBox1.Items.Count; i++) { if (listBox1.GetSelected(i) == true) { if (listBox1.SelectedIndex >= 0) txtFont.Text = listBox1.Items[listBox1.SelectedIndex].ToString(); } } } }
-
27-09-2009, 05:31 PM #3Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
cám ơn bạn nhé .
Vừa qua, Chính phủ đã ban hành Quyết định số 2383/QĐ-TTg ngày 09/12/2013 về việc xếp hạng di tích quốc gia đặc biệt. Theo đó, khu di tích Đường Trường Sơn - Đường Hồ Chí Minh là 1 trong 14 kỷ vật...
Các relic, danh thắng được xếp...