winforms

How to determine a thread UI thread

what is the simple way to know which thread is UI thread or the thread which create a control in a WinForm app? When I opened window task manger, I found 8 threads for my winform application. So how many of them are UI threads. generally, how many UI threads created by the winForm engine? ...

which thread a BeginInvoke's callback of a asynchronous delegate is in?

Which thread a BeginInvoke's callback of a asynchronous delegate is supposed to be in? UI thread or a Thread Pool thread. for example private void button1_Click(object sender, EventArgs e) { Func<string> func1 = LoadingDada; func1.BeginInvoke(IsDone, func1); } string LoadingDada() { Thread.Sleep(10000); //simulated a lo...

Need To Force Windows Forms Appplication To Run At Startup

I have a WinForms application that I want to auto start on login - At the moment it is just a normal standalone 'exe' Does anyone know how to put this into the startup folder and whether that is reliable (to the extent it will get started)? ...

Iterating through controls on a Windows Form

I seem to have some weird issue going on that I am sure will turn out to be a simple thing. I have a Windows Form and on the form I have 1 panel called MainPanel and inside MainPanel, I got another panel with a button inside and a label that is inside MainPanel, but not in the second panel. 2 controls. What I am trying to do is copy all ...

is it possible to make an EXE out of an access form?

i would like the user to think he's using a regular winform, but in the backend i want to have access handle the DB stuff. is it possible to just use the access form and have everything else disappear in the background? can we make an exe out of the form? what is MDE? ...

Generating a second context menu dynamically in Winforms

Hi, I have a context menu with a few selections. If the user picks a particular choice, I want a list of choices in a second menu to come up. These choices would be coming from a data store and be unique to that user. I see how in designer you can add a set of choices statically that show upon the user making a selection. However, w...

How to add target of Nlog to a specific textbox control, so the log messages will be shown in that control.

I have used following config of NLog to add the log text to control of specified Name on specified form. <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; <targets> <target name="control" xsi:type="FormControl" append="true" controlName="textB...

How to add Items with value and display into comboboxes?

hi all i have a combo box that have a datatable dt as datasource Code: dt = new DataTable(); dt = DAL.ExecuteProc("SP_GetCashiers"); CashierDDL.DataSource = dt; CashierDDL.DisplayMember = "Cashier_Name"; CashierDDL.ValueMember = "Id"; just like that ,,note::CashierDDL is my combobox i want to ...

.NET DataGridViewLinkColumn flicker on hover on link

There's a flickering issue when using a DataGridViewLinkColumn. If you hover on a link, it gets redrawn with a flicker. Doublebuffering, or setting options like LinkBehavior: "NeverUnderline" doesn't seem to have any effect. What's causing it and can it be fixed ? ...

During multi select I want to show the current selection in different style

Hi, In my windows forms application. I'm using a DataGridView control to show my list. The properties it supports are multiselection and full row select. During multi select, I wanted to show the last selection in different style than previously selected rows. As of now, all selected rows are displayed in same style. To achieve this, sh...

What is the minimum needed to make a BindingList<myClass> available in VS 2008 Designer

I am setting the datasource of a control at runtime to BindingList which works fine. But I would prefer if I could see this in the designer which would mean that I could select the datamember properties at design time, rather than having to set them at runtime also. What is the minimum requirements to allow this? ...

ComponentResourceManager.GetObject( "$this.Icon" ) throwing Invocation Exception on WinXP

This is generated code on a winform app's InitializeComponent() implementation (from the code-behind *.Designer.cs file). This code works on Vista/7, but on XP it blows up at runtime. I have a custom Icon added to the form. It was initially a png file. Suspecting that XP couldn't handle that format (the inner exception is something a...

Unit Testing User Interface. What is an effective way ?

I have an accounting & payroll client/server application where there are several input form with complex data validation rules. I am finding an effective way to perform unit testing of user interface. For complex validation rules I mean: "Disable button X if I Insert a value in textfield Y" "Enable a combobox if I insert a value in a...

Windows mobile UI: Is a messagebox appropriate to display information?

I have a list of items in a listview and when the user double-clicks an item, I display a messagebox with the contact's name and address. My boss doesn;t like it because he thinks this violate some UI design principle for Windows Mobile devices. I can't find anything that prohibits this. He is thinking that it has something to do with ...

e.Data.GetDataPresent not working in WinForms drag-and-drop handler?

I'm trying to drag files into my application from a program called Locate32 (which is great by the way). Here is what happens: e.Data.GetFormats() {string[7]} [0]: "FileDrop" [1]: "FileNameW" [2]: "FileName" [3]: "FileNameMap" [4]: "FileNameMapW" [5]: "Shell IDList Array" [6]: "Shell Object Offsets" DataForm...

Infragistics DockManager - flickering when showing a floating view in the dockworkspace

I am using the infragistics UltraDockManager to show a floating - screen centered view in the Dockworspace, the problem that, when showing the view in the center it is flickering and user can see the view when moving from the default location to the center location How can I get rid of this behavior? Regards ...

How to Create Global.asax in Winform Application? - C#/.NET

I'm trying to create Global.asax in a Winform. I could do it in ASP.NET, but i couldn't find a way for Windows Application. Any help will be appreciated. I have a singleton class called DataAccessLayer, i need to instantiate it once only, so i can call its method/properties anywhere in the application easily. ...

winforms and want to learn how to develop project in winfoms using C#

Can anyone provide me with info about learning about Winforms projects. I am starting new job where I have to work on winforms. Prior to this job, I have mostly worked on Web applications in ASP.NET and C#. So I am familiar with certain features of C#. What are the kind of projects that use winforms? ...

Switching DataSources in ReportViewer in WinForms

I have created a winform for the users to view view the many reports I am creating for them. I have a drop down list with the report name which triggers the appropriate fields to display the parameters. Once those are filled, they press Submit and the report appears. This works the first time they hit the screen. They can change the para...

Is it really possible to access MS Access DB stored on an http server (windows or linux) from a winform app ?

As I can see here http://www.sqlstrings.com/MS-Access-connection-strings.htm one could Open connection to Access database located on a remote server: "Provider=MS Remote; Remote Server=http://Your-Remote-Server-IP; Remote Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\App1\Your_Database_Name.mdb" Did someone try this : access MS A...