Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the proces


đã thêm [STAThread] vào trước khai báo hàm Main:

Code:
[STAThread]
		static void Main() 
		{
			Application.Run(new frmtrangchinh());
		}

        private void frmtrangchinh_Load(object sender, EventArgs e)
        {
            SetStyle(ControlStyles.ResizeRedraw, true);
            OfficeMenus ofm = new OfficeMenus();
            ofm.ImageList = imageList1;
            ofm.AddPicture(mndangnhap, 0);
            ofm.AddPicture(mndmdocgia, 7);
            ofm.AddPicture(mndmsach, 8);
            ofm.AddPicture(mndmnxb, 9);
        }
vẫn hiện lỗi sau khi thêm [STAThread]
nhờ các pro xem giúp
thanks