winforms

Can checkboxes be removed from a .NET WinForms ListView at runtime?

Is it possible to remove the checkboxes from a .NET WinForms ListView control at runtime? The following code appears to have no effect when '.Checkboxes' has initially been set to 'true' and the control has rendered onto a form with checkboxes available for each list view item: // C#: testListView.BeginUpdate(); testListView.Checkbox...

Why does my winsock control not function correctly in vb6 within the context of a Form_QueryUnload?

My goal is to have this program send a logout command when the user is logging off or shutting down their pc. The program is connected to a server application via a tcp socket using a Winsock object. Calling singleSock.SendData "quit" & vbCrLf is simply a way of logging out. I am going to start capturing data with Wireshark, but I'd l...

[C#] Thread-safe Form.Show

I'm writing a Toast that needs to be thread-safe as it's being used to report the status of asynchronous socket input. I've tried to make it thread-safe but the toasts are still locking up. public static void Show( string message ) { Toast toast = new Toast( message ); toast.ShowAction(); } private delegate ...

Getting handle of control with minimum TabIndex

I need to get a handle to whichever control has the minimum TabIndex. I've tried using GetNextDlgTabItem() and passing a 0 pointer for the second argument, but the returned handle isn't always the first one in the screen's tab order. Thoughts? ...

IE 7 embedded in winform app is freezing the entire winform app

Hi guys, We stumbled on the usual friday afternoon bug... We have a .net 2.0 winform app that uses the WebBrowser control (deployed on xp tablet edition, with latest IE 7). At some point in a page, we are hidding a div and setting a textbox value using some javascript. At that point, the operation is working (text appears in the tex...

Is this a good way to factor DragDrop logic out of a control?

I was recently adding some drag/drop functionality to a usercontrol that I'm creating, and I decided that it made sense to factor the specifics of drag/drop out for subsequent testing, etc. The core logic is in DragOnMouseMove<TInput>(). (Formatting trimmed for brevity) internal class DragState { private static readonly Size deadZ...

How can I measure the response and loading time of a webpage?

I need to build a windows forms application to measure the time it takes to fully load a web page, what's the best approach to do that? The purpose of this small app is to monitor some pages in a website, in a predetermined interval, in order to be able to know beforehand if something is going wrong with the webserver or the database se...

How to use ASP.NET Role and Membership in Winform and C#

I tried to convert this VB.NET sample here http://www.theproblemsolver.nl/usingthemembershipproviderinwinforms.htm without any success, can anyone know an example ? Thanks ...

Word wrap in Windows Forms (vb.net)

hai how to do word wrap in drawstring in vb.net 2005. please tell me ...

Invoke from different thread

I can't believe it,this works in my other application,but in this one,which has similiar structure - it doesn't! public string ListAdd { set { if (listView1.InvokeRequired) { this.Invoke((MethodInvoker)delegate { listView1.Items.Add(value...

Reporting (free || open source) Alternatives to Crystal Reports in Winforms

Hi, In my winforms project I'm looking for a Crystal Report's like solution free or open source that allows me printing and PDF'ing the Content of a DataSet. ¿Any suggestion or Ideas? I need something simple but fast, Crystal seems very slow for me. Thanks in advance. I'm aware of this question but it seems to me there are just answers...

How to Invoke if the form is not active?

Till this moment I used this method to invoke: public string AddText { set { if (listView1.InvokeRequired) { this.Invoke((MethodInvoker)delegate { Textbox.text += value + "\n"; }); } else ...

Why won't my WinForms app compiled for "x86" exit on an "x64" machine when running outside "C:\Program Files (x86)"?

We have a WinForms app that runs fine on x86, but has many third-party components that make win32 calls. To get the apps to run on x64, I now compile for the x86 platform. Our habit has been to install our thick-client outside the system partition on servers, so we installed in "F:\Program Files (x86)" yesterday on a Win2003 x64 server. ...

C#: How to get the index of the selected item(and the text) in ListBox

I have a listbox(detailed view).My question is how do I get the index of the selected item? Eventually,how to get the text at the index,but that should be easy. ...

What winforms control should I use to display a table of search results returned from LINQ?

What control should I use when wanting to display a list of record information (Name, ID #, date)? It is about 5 small columns, and I'll have many rows returned. I'm using LINQ to grab the records I need from the database and have it currently in an IQueryable. Can anyone suggest what WinForms control I should be using in this case ...

Question about ComboBox and Linq to Sql for Winforms...

Edit: More than a day. Still no answer! Is question not clear? I have ComboBox bound to BindingSource which in turn is bound to Linq Table. Also, ComboBox is filled from datasource which is a Linq Table. I want to assign new value to one of properties of BindingSource.Current whenever user selects item in ComboBox. I understood from M...

What's a good, affordable "knob" library?

I'm currently thinking of a new pet project, an "editor" for MIDI-enabled synths. I've got the MIDI side covered, I suppose, but what I'm looking for right now is something that can pass for nice "dials" and "knobs" like you see in Ableton Live, Reason, Reaktor, and so forth. Putting my form full of trackbars, is sort of wasteful, y'kno...

how do i make Textbox to only accept alphabets appear error if is not an alphabets

I have a windows forms app with a maskedtextbox control that I want to only accept alphabets values. Ideally this would behave such that pressing a other keys other than alphabets would either produce no result or immediately provide the user with feedback about the invalid character. ...

C#: How to add images in listview?

Such a decent question,how do I add images(I googled,but they say I have to add approximately 50 lines of code to do that,why?)? ...

Customize or skin .net DataGridView controls

Hello, does anyone know how easy it is or how possible it is to skin a .net Windows Forms DataGridView control? I'd like to render the control vastly different then what it currently looks like. For example, think of the open source application Boxee. It has a completely custom interface which is how far I'd like to push the control...