winforms

Resize Infragistics GanttChart task with the mouse

Hi, I loaded a custom DataTable into an UltraChart of type GanttChart. The data loads succesfully. Do you know if it possible to add support for mouse resize(drag) to the tasks that show up into the chart? I have not been able to figure out if this is supported by the Infragistics control. Thank you in advance for your answers. Dragos...

Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?

Hi, I'd love to know if there is such thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to "navigateto (fancy_url);", I'd love to use FireFox or WebKit. Anybody tried this? UPDATE: Please bear in mind that although it is possible to embed...

How can I make sure scrollbars don't overlap content?

When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations where, for example, a vertical scrollbar pops up, overlapping the control's content, causing a horizontal scrollbar to also be needed. Ideally the content would shrink just a bit to make room for the vertical scrollbar. My current sol...

UITypeEditor and IExtenderProvider

I have an extender (IExtenderProvider) which extends certain types of controls with additional properties. For one of these properties, I have written a UITypeEditor. So far, all works just fine. The extender also has a couple of properties itself, which I am trying to use as a sort of default for the UITypeEditor. What I want to do ...

Dynamic top down list of controls in WindowsForms and C#?

In our project, SharpWired, we're trying to create a download component similar to the download windows in Firefox or Safari. That is, one single top down list of downloads which are custom controls containing progress bars, buttons and what not. The requirements are that there should be one single list, with one element on each row. Ea...

How do I make a PictureBox use Nearest Neighbor resampling?

I am using StretchImage because the box is resizable with splitters. It looks like the default is some kind of smooth bilinear filtering, causing my image to be blurry and have moire patterns. ...

DoDragDrop and MouseUp

Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove events, manual "mouse leave" checking, etc. all of which I wou...

Stop the taskbar flashing

I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing? ...

Cannot access a disposed object - How to fix?

In a VB.NET WinForms project I get an exception "Cannot access a disposed object" when closing a form. It occurs very rarely and I cannot recreate it on demand. The stack trace looks like this: Cannot access a disposed object. Object name: 'dbiSchedule'. at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_...

WinForms databinding and foreign key relationships

I'm developing a WinForms application (.Net 3.5, no WPF) where I want to be able to display foreign key lookups in a databound DataGridView. An example of the sort of relationship is that I have a table of OrderLines. Orderlines have a foreign key relationship to Products and Products in turn have a foreign key relationship to Product...

How do you stop the Designer generating code for public properties on a User Control?

How do you stop the designer from auto generating code that sets the value for public properties on a user control? ...

Winforms - Click/drag anywhere in the form to move it as if clicked in the form caption

I am creating a small modal form that is used in Winforms application. It is basically a progress bar of sorts. But I would like the user to be able to click anywhere in the form and drag it to move it around on the desktop while it is still being displayed. How can I implement this behavior? ...

A WYSIWYG Markdown control for Windows Forms?

[We have a Windows Forms database front-end application that, among other things, can be used as a CMS; clients create the structure, fill it, and then use a ASP.NET WebForms-based site to present the results to publicly on the Web. For added flexibility, they are sometimes forced to input actual HTML markup right into a text field, whic...

What control is this? ("Open" Button with Drop Down)

The "Open" button on the open file dialog used in certain windows applications includes a dropdown arrow with a list of additional options -- namely "Open with..". I haven't seen this in every windows application, so you may have to try a few to get it, but SQL Server Management Studio and Visual Studio 2005 will both show the button ...

Accessing a Component on an inherited form from the base form

A number of forms in my project inherit from a base form. It is easy to get at the Controls collection of the derived forms, but I have not found a simple way to access the Components collection, since VS marks this as private. I assume this could be done with reflection, but I'm not really sure how best to go about it, not having work...

how do you programatically invoke a listview label edit

in C# I'd like to invoke the label edit of a newly added item to a ListView. basically, if I have a click here to add scenario, as soon as the new item is added, I want the text label to be in a user editable state. Thanks! ...

.NET : Double-click event in TabControl

I would like to intercept the event in a .NET Windows Forms TabControl when the user has changed tab by double-clicking the tab (instead of just single-clicking it). Do you have any idea of how I can do that? ...

How can you make a .net windows forms project look fresh?

I'm working on a visual studio 2005 vb.net windows forms project that's been around for several years. It's full of default textboxes, labels, dropdowns, datagrids, datetime pickers -- all the standard stuff. The end result is a very gray, old-looking project. What would be the best approach to making this project look fresh and snazz...

How to fix the following build error in Visual Studio 2005: '"LC.exe" exited with code -1'

I get the following error when building my Windows Forms solution: '"LC.exe" exited with code -1' I use 2 commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also use Visual Sourcesafe as our Source Control. When the licenses.li...

How to Format Numbers in WinForms 1.1 DataGrid?

Is there a simple way to format numbers in a Winforms 1.1 datagrid? The Format property of the DataGridTextBoxColumn seems to be completely ignored. I know there is a solution that involves subclassing a Column control, and it's fairly simple, but was hoping there might be some trick to making the Format property just work. Thanks Mik...