Click here to Skip to main content
16,012,082 members

Comments by tranthuongthien (Top 2 by date)

tranthuongthien 3-May-13 22:30pm View    
Bạn cần thêm dòng lệnh (command) thdSyncRead.SetApartmentState(ApartmentState.STA);
ở bên dưới Thread như thế là được . Tôi đã thử và thành công.
tranthuongthien 3-May-13 22:29pm View    
Thread thdSyncRead = new Thread(new ThreadStart(syncRead));
thdSyncRead.SetApartmentState(ApartmentState.STA);
thdSyncRead.Start();