WPF versus Winforms
What are the advantages and disadvantages between using WPF (Windows Presentation Foundation) over Winforms? What are the considerations that need to be made when choosing between the two? Thanks. ...
What are the advantages and disadvantages between using WPF (Windows Presentation Foundation) over Winforms? What are the considerations that need to be made when choosing between the two? Thanks. ...
Does anyone have or know best practices for implementing a custom layout engine in WinForms? I've seen the windowsclient.net link, but it's a bit dated (Sept 2001). ...
I am learning WPF and was wondering if there is a way to show a WPF Window from an existing C# WinForm without 'hosting' WinForm in WPF? I tried using myWPFWindow.show() on button click event for displaying the Window. The window is getting displayed but the textboxes displayed in the window are preventing me from typing. Can someone ...
I created an Interop user control in VS2005. When the user control is shown inside VB6, it does not pickup/use the XP styles (The buttons and the tabs look like VB6 buttons/tabs). How do I get the XP styles to work with my control while it is in VB6? ...
I have what must be a typical catch-22 problem. I have a .NET WinForm control that contains a textbox and a checkbox. Both controls are data bound to properties on a data class instance. The textbox is for price, the check box to indicate that the price is a price override. Also on the data class is a property that holds the item's o...
i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find the average width of a character starts from getting the width of all alphabetic characte...
I am looking for a way to create or implement a collapsible side panel inside of a form. Similar in the way a ToolStripContainer works I would like the same general concept except using panels that I can fill with controls. Does anyone know of a simple way to do this with the provided .Net controls or is this a total custom job. Either w...
This is a common problem for all the developer, i am looking for best solution to make windows forms UI responsive. I have an Animated GIF file to show progress of my calcuation on windows form. I took a picture box control and placed animated gif into that. now when my calcuation starts - the animaged gif freeze. i want the reverse, t...
I'm stuck in .NET 2.0 Windows Forms. It doesn't look like the ability to select multiple nodes doesn't exist in the standard TreeView control. I'm trying to do this for context menu selection. So check boxes aren't an acceptable UI paradigm here. What's the best way to provide that very necessary functionality? ...
I've successfully used the Windows SendMessage method to help me do various things in my text editor, but each time I am just copying and pasting code suggested by others, and I don't really know what it means. There is always a cryptic message number that is a parameter. How do I know what these code numbers mean so that I can actuall...
Three buttons, Save, Cancel, Close looks messy, yet after the user has saved the data should they really click a Cancel button? I need the 'Save' button to leave the form open. What is best practice? Thanks ...
My company has an existing established WinForm application which in running on WinXP. The application does alot of sound processing using DirectSound. My company would like to evaluate Mono, as an alternative on a per workstation cost to Vista/Win Server 2008. I've heard that different estimates, ranging from 'it will work easily on M...
I'm using the MonthCalendar control and want to programmatically select a date range. When I do so the control doesn't paint properly if Application.EnableVisualStyles() has been called. This is a known issue according to MSDN. Using the MonthCalendar with visual styles enabled will cause a selection range for the MonthCalendar ...
I have a UserControl with some predefined controls (groupbox,button,datagridview) on it, these controls are marked as protected and the components variable is also marked as protected. I then want to inherit from this base UserControl to another UserControl, however the DataGridView is always locked in the designer. I suspect it may ha...
I have a databound DataGridView. When a new row is added and the user presses 'Esc' I want to delete the entire row. How can I do this? ...
Hi Guys, I'm having problems with cross theme compatibility in windows forms. If you don't set the font for a control on a windows form, it will use the system font with correct typeface and size. If you want to make the font bold, it hard codes in the rest of the system font values for the current theme you're programming with. For ...
is there a difference in the dispose() functions being called ? ...
I have a VB 6 application and we are starting to port it over to C#. We have finished one of the screens and wanted to see if there was an incremental way of hosting the winform within VB to start to have the existing users get used to new screens. This is a migration strategy.. Any thoughts. ...
I need to present a wizard once, the first time my windows forms application is run after install. I could use a user setting like firstrun = false I suppose. But I also need handle the case where the program is uninstalled, then reinstalled. How will that user setting be reset? It's already present in the config file in ...\Users--user-...
I have a WinForms TreeView (node, subnodes). Each node contains in it's Tag some additional info. Also, each nodes maps a file on the disk. What's the easiest way copy/cut/paste nodes/files in C#? Would be nice to have some sample code. Thanks ...