Back in the old days (i.e. last month) I'd bind my winforms grid to a dataset and be off and running. By default the grid contents could be updated. (similar to an Excel spreadsheet)
But, if I bind a grid to a Linq datasource (either Linq to SQL or Linq to Entities) my winforms grid is locked into a read-only mode. How can I enable an...
To attach a winforms dialog on Microsoft Wordpad toolbar/menubar?
...
I have a function that binds LINQ results to the controls on my form. The below code works but I just can't get over the feeling I should be slapped for the copy/paste aspect. Can someone help me with what i need to do to deodorize this?
Thank You!
private void BindDataToForm()
{
// Bind data to form
CaseNotesData...
Note: this is NOT like this question
I've been tasked to construct a survey that our customer service people can use to get info from our customers about our service etc.
My question is how to store the questions/answers in the db where the questions are stored like so:
boolean question1
if (false): string question2 (typically the ...
Exact duplicate:
Split string containing command-line parameters into string[] in C#
C#: How do you configure for a string[] to accept input of a whole string the way the console's main entry point accepts it broken up?
When you execute a console application made in c#, it's main method accepts any other arguments typed into it ...
I'm trying to get an UserControl (which has a grid on it) on a Windows Form to resize.
The below code is what I have in the Form. The behavior I'm getting is that the control is resized when I make it big. But it does not shrink. What am I doing wrong (or) What am I missing?
private void AdjustGrid()
{
ZoomControl.L...
I'm developing a winforms app with lots of different forms and user controls. Is there a recommended pattern that I could implement that notifies the user that there are unsaved changes on the current form/control when the form/control is exiting and also when the app is closing?
...
I have an interesting task: to write a program which captures input from the program called Redmon. It is basically a virtual printer which redirects the output to a program.
I installed Redmon and created a winforms application to catch the output. But I'm stuck here. I checked what does my program receives and it is nothing on the par...
I would like to update status on Twitter without using external libraries nor dll-s. I've found for example this solution:
http://www.dreamincode.net/code/snippet2556.htm
But it does not work and does not give any error.
Could you please tell me how to update status programmatically from c#?
When I catch error I get:
500 Internal Se...
When developing with Mono for an app to be run on Windows and Mac OSX (and maybe Linux) which would you suggest, WinForms or GtkSharp for the GUI and why?
Specific examples and success/horror stories would be much appreciated.
...
Hi,
I am trying to customise a DataGridView cell to include a combobox and
a text field. So far myCell class derives from DataGridViewTextBoxCell
class.
My class has a Combobox as a private member but I am not sure how I
can render it. I am overriding the Pain method but I have no idea how
to draw the combobox. I set its location ...
I have a project that uses a series of auto-generated user control instances. The user-control itself exists, but I populate a panel with a series of these user controls, one for each item in my collection.
Each user control displays a ton of information, but only ONE text field is editable. All of the other fields have TabStop set to f...
I have the need to convert from the WPF Media.Matrix to the Windows Forms Drawing2D.Matrix and so I did the following:
public static System.Drawing.Drawing2D.Matrix ConvertToDrawing2DMatrix( Matrix matrix)
{
return new System.Drawing.Drawing2D.Matrix((float)matrix.M11,
(float)mat...
Can you recommend a good book for Windows Mobile development?
I am using:
Compact Framework 3.5
Windows Mobile 6 Professional SDK
Windows Forms (WinForms)
Thanks.
...
C#: Is there a way to return a reference to the selected Item in listview?
Like in the selectedindexchanged, is there a way to return the item of the index that was selected?
...
I'm converting a VB6 application to Winforms and in VB6 we frequently use a technique where certain textboxes are only made visible when specific values are entered in prior a textbox.
The problem is that the decision to make the textbox visible is only made in the Validating event at which point the next control to gain focus has alrea...
I'm writing a simple custom owner-drawn ListBox control and banging my head against the wall trying to figure out how to implement what seems like a straight-foward feature. My custom ListBox is supposed to work similarly to the "Add/Remove Programs" list in Windows XP. That is, it displays a list of items as usual, but when the user sel...
I have some controls on a WinForm namely: CheckedListBox, ListBox,ListView, TreeView, TextBox.
On
ControlName.Enabled = false;
I have found following results:
ListView and TextBox's BackColor get greyed.
CheckedListBox, ListBox and,TreeView's BackColor does not get greyed.
Why is this behavor? Is it a intented or Bug? and how to...
Hi
In a textbox.TextChanged event I want to prevent some specific (processor intensive) functionality from executing if a key is still held down. E.g. while the user is deleting large regions of text by holding down the delete key I want to prevent the code from firing if the delete key is still held down.
I looked into Control.Modifie...
What's the easiest way to modify a Winforms track bar so that when a user clicks on it the track bar jumps to the location of the mouse?
By default the track bar moves to half way between it's current location and where the mouse was clicked.
Update: I'm trying to do this so that I can use the track bar on a touch-screen. With a touch-...