winforms

Can windows installer default a program to use XP compatibility mode?

Hello, A client is having problems with an application we wrote but only when he runs it in Vista. It works fine however if he runs it in XP compatibility mode. While we get to the bottom of the Vista issue, is it possible to update our installer (Visual Studio 2008 windows forms installer for an app using .net 2.0) so that the installe...

What is WinForms' Control.Invoke in WPF?

What do i use instead of Me.Invoke when i use wpf? ...

datagrid colorchange + c#

how to change the color of the selected cell in datagrid.im using .net 1.1,and i need it windows applns. if i click the a cell in row no 2 then particular cell color should be changed ...

Correct way to have a DataGridView visually reflect changes in its DataSource

Say a DataGridView has its DataSource property set to a DataView instance. DataGridView dgv; DataTable dt; // ... dt gets populated. DataView dv = dt.DefaultView; dgv.DataSource = dv; // ... dt gets modified // The DataGridView needs to update to show these changes visually // What goes here? I know you could set dgv.DataSource t...

Prevent form from stealing focus

When I run my VB.NET Winforms app I do not want it to steal the focus from the other open apps. FYI, my app is started from the command line but that shouldn't make a difference. I've seen question 577076 but that doesn't seem to work. What is the best way to do this? ...

Dynamically loading user controls from database entries in C#

In a C#, Windows forms app, we have a series of user controls that are associated with menu entry records in a database... ID Menu Title 1 User Management 4 Group Management 6 System Utilities 12 Configuration Management A few user controls... UserManagement.cs GroupManager.cs SysUtil.cs ConfigurationMan....

How do I smoothly update a GridView by updating the bound DataTable in C#?

Hi, I have a GridView who's DataSource is set to a DataTable. The DataTable is updated by some backend logic every few seconds, at which point a delegate is called to refresh GridView. Currently I am simply resetting the DataSource, but that causes a problem - it interrupts any ongoing edits in the grid view and makes the selection 'ju...

How to bound a DataGridViewComboBoxColumn to a object?

I'm trying to bound a DataGridViewComboBoxColumn to an instance of Foo, but when i set a value on the grid i got a ArgumentException telling me that i can not convert from String to Foo. var data = (from item in someTable select new { Foo = item.foo, Bar = item.Bar }).ToList(); grid.DataSource = data; column.DataPropertyName...

.NET WinForm writing within panel causes scrolling to jump

Hi, I have a FlowPanelControl and a custom user control (contains a label and button). I am adding instances of the custom user control to the controls collection of the panel, which flow beneath each other as expected; showing the vertical scroll bar fine too. When a user clicks a button within one of the added user controls, it start...

Scrollbar still is painted after it should be removed

I have the following custom control and can place on a form (with AutoScroll set to true and the control anchored left, top and right). If the form is too short for the control, the form correctly resizes the control (to make room for the scroll) and displays the scroll bar. When the control is closed using the close glyph, the control...

Affordable mapping or geocoding integration with winform application?

Hi we're a Micro ISV and I've been looking off and on for months to find a way to integrate street mapping functionality into our windows forms application. Our app is distributed online and I don't want to have to include map data so I thought integrating with an online solution would be best, however I've contacted Google, Microsoft, ...

Implement prototype-similar functionality for WinForms controls hosted in IE

Hi, I'm using WinForms controls in IE. Something similar to this: var MyControl = new ActiveXObject("MyComponent.MyControl") and I want to be able to use prototype feature for MyControl.: MyControl.prototype.newFunc = function(){alert('hi there');} Is it possible at all? I thought about System.Runtime.InteropServices.Expando, but ...

How do I display custom strings when multiple items are selected?

I have a property grid that helps me manage all of the controls on a form. These controls are for designer-type folks, so I'm not really worried that much about the user interface... until someone selects multiple objects. I have a UITypeEditor for the "EffectiveDiameter" property on these common objects. It keeps track of units (meters...

DataGridView Binding

I have a gridview that I am binding to via a generic list. I have set all the columns myself. I am just trying to: Catch the event PRE format error when a row is edited- get the row information via a hidden field - and persist I am sure this must be pretty easy but I haven't done much with forms work and I am unfamiliar with its DataG...

Synching databinding controls on complex winform

I have a quite complex windows form with a tabbed representation of a grandParent>Parent>Child dataset using a Strongly typed Dataset and bindingsource components. Going down the hirearchy works a treat using bindngsource; my problem is that i have multiple 'parallel' views of some of the data (eg the 1st tab is a summary view of open j...

Crystal Reports - TestConnectivity returns true on dev machine but false on test machine

Hello, I have a SQLServer 2005 database on a client server. I have a VPN connection to their server. I am using the connection code from here When I run the winforms app from my local dev machine it works fine, reports display things are great. When I run the app from testing machine it fails. I have followed the trail and found out th...

Is there an easy way to print out my dot net Windows form?

I just created a Database Application for Requesting Parts. It has several forms, one for the requester, one for the Supervisor Approval, one for the Purchase approval and one for the Clerk to use to know what to order. Now I am a big fan of paperless, but my employer Really like their paper. Is there an easy way to WYSIWYG duplicate...

How can I make an endless progressbar in WinForms?

I don't know how long an action could take and I want to display a progress bar to the user in a dialog box. I've tried using System.Windows.Forms.ProgressBar but it doesn't seem to support it. An example of what I'd want is the progress bar that windows shows you when it's looking for new drivers on the internet. It's just got three or...

Advantage of WPF app vs Winform for business apps?

I know asp.net and winform development. I am not the type of developer who jumps into a new technology just because it's new. It needs to give me extra benefits like higher productivity. What are the advantages of WPF over Winforms for pure business apps? I am not interested in the extra eye candy, animation, gradients, image display ef...

ListView Checkbox toggles with Item Activation

I'm using a ListView in Compact Framework v3.5 that has the Checkboxes property set to true. The behavior I would like is that when an item is activated that the corresponding checkbox is toggled on/off. Searches through the Compact Framework newsgroups have found multiple postings bemoaning the exact behavior I want; the posters were a...