winforms

In a Winforms Chart, how to change the drawing parameters for a Point according to its underlying data?

I am using the .NET Windows Forms Microsoft Chart Component. My data objects would look like more evolved versions of the following class: class DataObject { public double ValueX {get;} public double ValueY {get;} public boolean IsRed {get;} } I have been able to bind my chart to my data by setting the Chart.dataSource p...

WPF and Winform

Is it possible to have a project containing both Winforms and WPF? Say a WinForm project that is transformed step by step(form by form) in a WPF one, will be possible to have a Winform opening on a button, and a WPF one opening on a other button? ...

Nedd we switching from Winforms to WPF?

Is there is any need to pass existing (or developing) projects from WinForms to WPF? or even Silverlight? If the project is OK, worth it to be switched in WPF? Can Silverlight replace WPF in the future? I am asking because there a rumors that Microsoft will abandon WinForm (maintenance and support) for WPF and Silverlight. I believe Wi...

How to prevent design mode enabled child control from being moved outside of its containing control?

I have a UserControl that contains other controls that I would like to be able to rearrange or resize at design time. So I have a custom designer for the UserControl that inherits from System.Windows.Forms.Design.ParentControlDesigner, and I call EnableDesignMode on the child controls from within the designer. That way, at design time,...

How to determine data type from DragEventArgs

I have implemented drag and drop in my application, but am having some difficulty determining the type of the object being dragged. I have a base class Indicator and several classes derived from it. A dragged object could be of any of these types. The code snippet below seems inelegant and is prone to maintenance issues. Every time we ad...

System.Deployment.Application ApplicationDeployment with a Proxy in C#

Hi All I am using ClickOnce for a C# Windows Forms application, and want to allow people to update the software by clicking an Update button, which will check the server online to see if there are any updates. I am using the following method (not exact, but same principle): ApplicationDeployment ad = ApplicationDeployment.CurrentDeploy...

How to bind combo box in data grid, in .net winforms?

i am developing billing software using .net win application. so i need to bind combo box in grid column1, column2. how can i do that? ...

Push A WinForm To The Back?

Hi, I have a form that I want to push behind all other windows when a certain operation runs. Is this possible? ...

WinForm Refreshing Issue

I have a program that can open multiple forms, and when there are a lot of them, they cascade when they are opened. When a button is pressed, some code runs and the form closes this.Visible = false; Kill.Zombies(); this.Close(); My Kill.Zombies(); method takes a few seconds to run, so I make the form invisible before running it. The ...

Checking-in Designer Generated code into TFS, issues...

I just had a conversation with my manager relating to checkin\out policies on a project I'm currently working on. Basically I tried to edit a file that was already checked out by another developer and I couldn't - I asked my manager why we couldn't edit the same class at the same time and he gave this reason for turning that functionali...

WCF web service - how can I view XML request and response inside my app?

I am writing a C# WinForms application that consumes a web service using WCF. I would like to be able to display the XML request and response in the application in real-time as the calls are happening. Is this possible? ...

Looking for suggestions on how to create an enhanced tooltip

currently I am using a tool tip to display information when it hovers over a region on a winform. This works well and I don't have any complaints, but the boss want's to display more complex data, that would best be displayed in a grid rather than text. Is there a way that perhaps I could embed a usercontrol or a datagridview in a tool...

Change the state of a checkbox on Form2 and keep the state

All I am trying to do is to change the state of checkbox on form2, and keep the state after pression OK. I have form1 which is my main form and it only has one Strip menu. The code for form1 is as follow: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System....

Rotating label text and buttons through 90 degrees

Hi, I am trying to rotate a label through 90 degrees. At the moment I can take the text from the label and rotate that, but what I want to do is actually rotate a label of my choice, or if I were to be really flashy, lets say a button control. So using the code below, how can I modify it so that I can feed it a control and get it to r...

Using a BindingSource, how do I tell if I have changes pending?

I am using a BindingSource in a WinForms project that edits a simple table on a SQL server. I want the "Save" icon to light up when the user tabs off a field if he has changed it. I have tried the HasChanges() method of the DataSet, but this returns false after I have made a change. How do I tell if the user has changed something? ...

Unable to select control in Designer of VS 2008

Hi all, I'm unable to select controls in window form in VS 2008, whenever i try to select any control, the window will be selected instead. It's as though they're read-only. Does anyone know how to solve the problem? *I'm using DiveElement sanddock in the form, will it be the cause of the abnormality? Thanks. ...

How to add a new row to DataGridView using a button

In a C# Windows application, I'm using a DataGridView to display all the data. I want to add a new row to the grid when the user clicks the Add New Row button. How can I accomplish this? ...

How to add Scroll news in a Video using C#

Hi, I am new in this area. I am trying to create a news scroll bar which will scroll over a video using C# . Where will I find necessary helps, or is it even possible? Please post your say . it's urgent... Thanks ...

Can I identify the sub class from a base class parameter?

Take a look at the following. The question near the end of the code - in the "whoAmI" function... using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace MY_TEST_PROJECT { // a form class pub...

how to set my datagridview index value as my dataset value?.Insted of auto generated index in .net wiform.

how to set my datagridview row index value to my dataset row value?.Instead of auto generated index in .net wiforms. Example: i am binding employee details in grid.if i select a row or a cell in the grid,It will display employee id in my text box. so i need to set row index value as my employee id. ...