winforms

Display filter C#

Hello all. It's a little hard to explain what I need but i'll try: I need to write application (winform) which will be some kind of filter to image/other forms behind it. With one exception - all behind form should looks as is except of red (for example) color, which have to be replaced to any other specified color, white for example. ...

To restrict mouseclick

Hi, I want to restrict the mouseclick within a region and if any control are there within the region, it should allow mouseclick. How to do that ...

How do I disable some dates on a DateTimePicker control?

I was wondering is it possible to disable selected dates in a DateTimePicker, so that user cannot select them. i know its possible in web forms but in windows forms im unable to do this.how can i achieve this. ...

Show presence of attachment

Hi! I am developing a mailing system. Messages can have attachments. I'm asking you for an advice how can I show in a winform the presence of the attachment (its name and extention)? First thing that comes in mind is a list, which, although I could make it expanding or give it a fixed width and scroll it, takes too much space from t...

Property in a Windows Forms form class only accessable after Load event

I'm instantiating and calling Form B from Form A. FormB has some custom properties, to allow me to pass it things like sqlAdaptors and dataset instances. When i instantiate and show Form B from Form A as a dialog form with a Using statement, it all works fine, but i find the properties i pass are not available in Form B until after the ...

C# Clearing the columns in a datagridview also removes al the rows?

Does it makes sense that when columns of a datagridview are cleared, all rows are removed? ...

Setting Focus to a .NET UserControl...?

I'm creating a custom control derived from UserControl that I would like to set focus to. The custom control contains a ComboBox control and I draw some strings beside it. The ComboBox can receive focus, but I would like to be able to set focus to the UserControl itself. My OnPaint handler is set up to draw the control slightly differ...

Property grid item and DoubleClick.

Hi, I'm using PropertyGrid control for editing some objects in my application. I'm using custom TypeConverters and TypeEditors for better user interface. I have problem with custom TypeConverter for boolean properties. If I have this class: public class MyClass { public string Name { get; set; } [System.ComponentModel.TypeCon...

Test application lay-out for low resolution (winform)

Our firm is investigating in acquiring 22" monitors for our development team. The only current issue is that our users will be using smaller screens. We tried using a screen-grid tool (gridmove and nvidia's utils), but they are not entirely realistic. How do you test winform application layouts on a resolution lower then your screen's ...

Why does hiding an owned window switches app in WinForms (.NET)?

I have an application window which covers the screen and there are several minor tool windows which are hidden by default and their 'Owner' properties are set to this main window. When I show a tool window and click one of its buttons it hides itself to show another window. When I hide that another tool window Windows switches app just...

How to prevent Mono from stretching the windows in a WinForms application vertically (on linux)?

The title is quite descriptive I think. My Winforms applications are running on Mono but there is an annoying problem: all my windows in the application are stretched vertically about 1.5 times. So my square shaped buttons and windows become rectangles. Only the sizes are scretched font sizes are not. So there are big gaps in the layout....

Exhaustive DashBoard Control in Windows Forms Application

I am developing a Windows Forms Application in which UltraWinGrid plays a vital role. Now the requirement is that I need to provide a dashboard feel which should contain Charts, Indicators, Grids, Reports,etc of the same data in a single view. We can create a user control which consists of navigation bar, explorer bar, charts,etc and use...

.Net WinForm application not persisting a property of type List<MyClass>

I've created a user control in a Windows Application C# 3.5 and it has a number of properties (string, int, color etc). These can be modified in the properties window and the values are persisted without problem. However I've created a property like public class MyItem { public string Text { get; set; } public string ...

SagePay integration from Windows Forms

I’ve been asked to integrate a windows form application with SagePay to take payments directly from the application. The SagePay documentation talks about ASP.NET so I’m not sure whether this is possible. Has anyone integrated a WinForm application with SagePay before? Is it possible? ...

is there any good method to encrypt the C# desktop application

Possible Duplicate: Protect .NET code from reverse engineering? we just develop a application with C# winforms, is there any good encryption method to help us prevent from piracy ? I saw some software may need hardware support to protect their software, how to implement that ? Thanks in advance ! ...

TreeView Winforms if a node can bee seen ?

Hello all I have a treeView , and i want to know if some node can be seen by a user. I mean that no node abave it not needed to be expanded that that node will be seen . Any idea how i can check this with out rotating to upper lever for that ? Checked msdn but couldn't see property responsible for that .... Some Example will really h...

Measure String inside RichTextBox Control

Hi All Can somebody please explain how I would go about measuring the string inside a richtextbox control so that the I can automatically resize the richtextbox control according to its content? Thank you Edit: I've thought about it, and since the below answer won't work if there are different fonts in the RichTextBox Control, what i...

TreeView custom nodes

Hello all I want to make in a TreeView (winforms) that each node will have in it a checkbox and two icons and text. How I can implement this thing ? I am really a newbie c# programmer. I have found this two that helped me to understand. treeNode treeView but how I can show my icons and check box one near another shifter little bit in ...

Make program unminimizeable

Possible Duplicate: How to disable the minimize button in C#? Is there a way to make a c sharp program impossible to minimize ? Is there a way to stop a program from being affected by the Show Desktop button? ...

Windows Form: showing child object value in the DataGridView

I have a productVariant object which has child product object. I want to show the value in the DataGridView, can anyone let me know how to do this? Here is the structure of the object. I tried to bind "ProductVariant.Product.Name" to the DataProptertyName in the DataGridView, however, it did not not showing any value. Can anyone h...