Solution very easy;
Just add this on top of the Main method [STAThread]
So your main method should look like this
[STAThread]
static void Main(string[] args)
{
....
}
It works for me.
More Related Contents:
- Run multiple winform instance sequentially
- import csv file to sql database in c# window application without header row [duplicate]
- WinForm Application UI Hangs during Long-Running Operation
- How do I make a WinForms app go Full Screen
- How to Merge DataGridView Cell in Winforms
- How to return a value from a Form in C#?
- Is using a Mutex to prevent multiple instances of the same program from running safe?
- Get File Icon used by Shell
- How to detect when a windows form is being minimized?
- It is possible to copy all the properties of a certain control? (C# window forms)
- CRUD Operations using DataGridView, DataTable and DataAdapter – Cannot add new row to DataGridView
- Image is not drawn at the correct spot
- How to set/change/remove focus style on a Button in C#?
- Interaction between WebBrowser Control and Windows Forms
- How to change listview selected row backcolor even when focus on another control?
- Dynamic button creation & placing them in a predefined order using c#
- How can I dynamically change auto complete entries in a C# combobox or textbox?
- Close button for TabPages of Right To Left TabControl c#
- Find out the control with last focus
- Bind multiple ComboBox to a single List – Issue: When I select an item, all combo boxes change
- DataGridView Using SortableBindingList
- Any trick to use opacity on a panel in Visual Studio Window Form?
- Show controls added programmatically in WinForms app in Design view?
- How do I create 5 buttons and assign individual click events dynamically? [closed]
- display list of custom objects as a drop-down in the PropertiesGrid
- How to create a User Control with rounded corners?
- Passing Data Between Forms
- Int to string: cannot convert from ‘method group’ to ‘string’ [closed]
- How to determine the size of a string given a font
- How to pass string value from one form to another form’s load event in C #