winforms

Custom ListView binding it to a object list [winforms]

EDIT: Question Reworded I have a listbox that should display data that contains 2 fields: time and a message. Instead of displaying 1 line of text, I want each item to be displayed as 2 lines - 1st line is the time and the 2nd line is the message, where each line has a different style. How can I do this? I can bind the object array to ...

LINQ: Stop lazy loading or force properties to be loaded

Consider a report in Windows forms which uses Linq to Objects as a datasource. I have an entity named Loan with an association named Customer. The problem is that when I try to access the .Customer property in a report, it returns null or empty string. I suppose this is because of lazy loading but I'm not sure to be honest. Is there a ...

Winforms - a strange problem a with simple binding

Hi Guys, It's hard for me to clearly describe my problem but I'll try. I have a UserControl1 which contains UserControl2 which contains several WinForms controls (most of them DevExpress). I do simple binding to these controls to my datatable fields. So far everything works fine. When I move the focus to a record in the table (by naviga...

Windows Forms Control - Huge list of filenames

Which control would be best for showing a huge (300.000+) list of filenames? I've tried DataGridView, but it seems to be overkill and also slow. Are there better alternatives? ...

Step Wizard Form in C# application

as you have seen before we have asp.net wizard componant for web application Is there any simple componant that implements this method for windows application using c# language ? ...

Global Variable not incrementing on callback functions

i am using Webclient to upload data using Async call to a server, WebClient webClient = new WebClient(); webClient.UploadDataAsync(uri , "PUT", buffer, userToken); i've attached DatauploadProgress and DatauploadCompleted Events to appropriate callback functions // Upload Date Completed webClient.UploadDataComp...

A little bug in my Login system

Hi, I have a little problem with my simple login system. this is the code static class Program { [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool loginSuccessful; bool loginRetry; ...

Using Ninject to inject dependencies into externally constructed objects (user control)

I would like to use Ninject in my WinForms application. I cannot figure out how to use it for my user controls. Sometimes they rely on the services I want to configure through the DI framework. These controls need to be manageable through the designer (thus need default constructors). So, is there a way to inject dependencies into pr...

Winform customize listbox item

Possible Duplicate: Custom ListView binding it to a object list I have a listbox that should display data that contains 2 fields: time and a message. Instead of displaying 1 line of text, I want each item to be displayed as 2 lines - 1st line is the time and the 2nd line is the message, where each line has a different style. Ho...

Windows Forms ListView in Details Mode - How to Change Row Height in Owner Draw?

I've got a Windows Forms ListView control in details mode. There are multiple columns at play. I'm trying to use owner draw to place a particularly wide column "below" the others. So, instead of this: COLUMN1 COLUMN2 COLUMN3 COLUMNNNNNNNNNNNNNNNNNNN4 I'm trying to do this: COLUMN1 COLUMN2 COLUMN3 COLUMNNNNNNNNNNNNNNNNNNN4 I c...

Enabling jitDebugging for WinForms

Hi, I am trying to enable JIT debugging for my winform application, I want to use Dr Watson to dump the stack trace, but when the exception is happening on my App I get a .NET dialog box (Continue or Quit), the details in this box say that I have to change some values in the machine.config or in the app.config of this application will i...

How change the color of SelectedItem in CheckedListBox in WindowsForms ?

I want to change the color of the items that are chedked in the CheckedListBox in C# WindowsForms. Can any one help me to solve this problem! ...

change ForeColor of Form

How do i change the ForColor of the form, have set the ForeColor to RED but the form still displays in Whte Text. How do i change this. Am refering to Title Bar Text Color ...

What can cause a form not to close itself? (3.update) solved

I wonder just what can cause a form not to close. I have a big form, with several TabControls, DataGridViews and many DataBound-Controls, at least 10 BindingSources are involved. (Thats the point why I can't post my code here, sorry). Now, I have the problem, that somewhere in development (just refaktoring) the form stopped closing co...

Creating graphics control in WPF and integrate to other winform application

Hello All, We have a existing applicaiton in winform .net. It has a form which displays a kind of flow chart diagram. Now we want to create a control which has enhanced graphics to display this flow chart. With my limited knowledge on wpf, is it possible - Create a graphics control in wpf which is display the flow chart Integrate this...

Windows Form - Tab key does not work in a child panel

Hi, I have a child panel in a form which contains some text boxes and buttons. I tried setting tabstop and tabindex properties for these controls so that the user can tab from one control to the next. But for some reason the tabbing does not work, the curor stays on the same field which has the focus when I press the tab key. I am using...

VB.Net how to wait for a different form to close before continuing on.

I have a little log in screen that pops up if a user selects a certain item on my main form. How do I get my code to stop executing til my log in form closes? This is what I am doing so far. Basically i want o execute the code after MyLogin closes. BMSSplash.MyLogin.Show() If isLoggedIn Then BMSSplash.MyBuddy.Show() ...

Creating an INotifyPropertyChanged proxy to dispatch calls to UI thread

I would like to create a dynamic proxy for binding WinForms controls to objects changed by a different (non-GUI) thread. Such a proxy would intercept the PropertyChanged event and dispatch it using the proper SynchronizationContext. That way I could use a helper class to do the job, without having to implement the synchronization manual...

Is it possible to add a reference to some source code to include in a source file in vb.net, winforms?

I don't know what this is called so I've struggled to find an answer from google but I have a vague memory of it from t'old days. I've sub-classed (* see below) about 8 framework controls, overriden some properties and added some functionality into each one. The changes I have made are identical in every case. If I make a change, I have...

How do I communicate between multiple threads?

I'm writing a plug-in for another program which uses the native program to open a series of files to extract some data from. One problem I am having is the process takes a long time and I want to keep the user interface from hanging. Plus I also want to give the user the ability to cancel the process before it completes. In the past I've...