winforms

Is there any framework for Windows Forms, DB driven application development/prototyping?

I'm writing simple database driven application, 80% of functionality is CRUD operations on about 15 tables. Coming from web development background I figured I can cover almost all of these CRUD cases with Rails scaffolding or say Django admins. So I started to look around for Rails/Django-like framework but for Windows Forms applications...

TabControl Context Menu

In a Windows Forms app I set the ContextMenuStrip property on a TabControl. How can I tell the user clicked a tab other then the one that is currently selected? How can I restrict the context menu from showing only when the top Tab portion with the label is clicked, and not elsewhere in the tab? ...

C#, Winforms & LINQ to SQL.. Datacontext lifecycle?

We use an enterprise framework that we wrote to facilitate all sorts of company specific stuff that we do. Within the framework, we provide a LINQ to SQL ORM to use when appropriate. All of this is based on the Microsoft MVC framework. On the MVC side, we new up a datacontext in our base controller. This allows us a full datacontext lif...

How do I publish a folder along with my VB.NET program that contains.html?

I have a VB.NET program that I wish to to publish. In the code it references a HTML page that I created. Instead of having the URL hard coded (example: www.test2.com/folder/index.html) I would like to have it relative to wherever the encoder is installed to (example: /folder/index.html) How can I do this? Thanks! ...

What are my options for filtering custom .net controls from the WinForms toolbox of Visual Studio 2008?

Visual Studio 2008 does a much better job of detecting and adding controls from projects to the toolbox for use in the forms designer. If you have an assembly with a UserControl- or DataSet-derived type, then it will automatically detect and add that control to the toolbox for designing forms. This is slightly better than the old system ...

Unit-testing data binding in System.Windows.Forms

I'm facing a problem while unit testing my forms. The problem is that data bindings are simply not working when the form is not visible. Here's some example code: Data = new Data(); EdtText.DataBindings.Add( new Binding("Text", Data, "Text", false, DataSourceUpdateMode.OnPropertyChanged)); and later on: Form2 f = new Form2(); ...

Drawing a toolbar on a window's titlebar

How do I draw a toolbar on the titlebar of a C# winforms window in windows vista? I have a window where it works, except when the window is unminimized/unmaximized it increases in size by about 16x32px. If possible, please provide code examples. ...

toast style popup for my application

I have created an application that runs in the taskbar. When a user clicks the application it pops up etc. What I would like is similar functionality to that in MSN when one of my friends logs in. Apparently this is know as a toast popup? I basically want something to popup from every 20 minutes toast style fom the application in the tas...

.net application size in memory

What are the ways to reduce the amount of memory my applications take in RAM?..Because even 30kb application loads ~20Mb of "unneeded" dlls.Am i mistaking when i think that any .NET app takes at least 10Mb in working set of memory when we need a form with text in it? Couldn't find any explanation of this :( PS question is closed. But i...

How do you do drill down reporting in a Win Form [.Net] without 3rd party controls?

Looks like my only option is to create a mutatant child of the tree view and data grid view,but Im mostly an asp.net developer,and thus my lack of knowledge of all things windows. but Im sure there is an alternate easier solution, so before I go down that ugly path, does anyone know a way to create a drill down report in a winform applic...

How do I display and store a list of complex items using Winforms?

I would like to store and display a list of complex items. Each (graphic) item has to display an image, a list of color chips, a label and an index (a letter). User would also be able to zoom within each item, to show details of the image (on mousewheel), Items would be presented in a vertical list, scrollable and resizable. Language ...

How do you implement UI for the non computer savvy ??

I have been support a web app that is used by a user base who's age range if from 40-65. The app is very good and has the latest ajaxy stuff etc. What we would now call very user friendly and responsive. I am amazed as to how this app is not so userfriendly for that user base. I was told that some autocomplete features make them disorien...

OpenID in WinForm?

Does anybody know of the best (or any) tutorial for OpenID either with or without RPX in a WinForm (.net 2.0 and C#)? ...

How to create a specific type of user control

I am trying to create a winForms user control. But I want would like a User control that - when placed on the form -- doesn't take any form space. Instead, it lodges itself nicely below like OpenFileDialog does. First, what kind of user-created thing is this? Is it still called a "user control"? If not, that may explain why all of my se...

Design-Time validation of library

I have a library that I would like to license and distribute. I know how to license a class/library for runtime. I've done that several times, actually. I know how to license a user control. I've also done that several times. What's got me stumped is how to license a library (that has no drag/drop user control or component) for develo...

Prompt user to save when closing app

I'm writing what boils down to a document editor. When the application is closing, I need to prompt the user to save changes. This is easy enough. My question is when is it appropriate to not prompt the user, and instead simply discard unsaved data and close. In the FormClosing event, the CloseReason enum includes: None WindowsShutDow...

Run Windows Forms application as service?

I have a Windows Forms application that I wrote that does some monitoring of an inbox and database. The customer has informed me that it needs to run every time the server reboots. Shame on me for letting the customer change the requirements. I was thinking ... is there any way to make a Windows Forms application run as a service so t...

How do I make a textbox that only accepts numbers?

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with pe...

Complex databinding to DataGridView header text

Is there a way to complex databind to a column's header text? Or is the only way to manually set the values and listen for change events from the source? For the record, I've tried both MyDataGrid.DataBindings.Add("Columns[<columnIndex>].HeaderText",MySource,"MyProperty"); and MyDataGrid.DataBindings.Add("Columns[\"ColumnName\"].Hea...

Can't alter DisplayMember in WinForms ComboBox

I'm trying to alter how a combobox is displayed using the following code: private void UpdateMapRoadPointList(List<GeographicAddress> plstMapRoadPointList) { cboFind.DataSource = plstMapRoadPointList; cboFind.DisplayMember = "ShortCode"; cboFind.ValueMember = ""; } GeographicAddress is a class which...