how do I change the way a DateTime object is displayed in a DataGridView
I would like to change the way a DateTime object is displayed in a DataGridView. Specifically, I would like to have seconds displayed with the time. c# .net 2.0 ...
I would like to change the way a DateTime object is displayed in a DataGridView. Specifically, I would like to have seconds displayed with the time. c# .net 2.0 ...
I'd like to use a specific ICO file as my icon with a WinForms application. Since I want to be able to specify a small icon (16x16) for the title bar and a normal icon (32x32) when Alt-Tabbing, I cannot use the Form.Icon property which accepts a single System.Drawing.Icon object, which forces me to use either the low res icon, or the nor...
It appears that the topmost property sometimes puts my application above all others, but throughout my testing it has been very weird in that sometimes it works and the window remains above all other (external application) windows, but sometimes it does nothing at all. I have even tried using the WS_EX_TOPMOST flag by setting it with the...
Hello, I have this program which gets all the constructors from the mscorlib using a search function. The only problem is when I search for the constructors it will only filter ctor. This is a problem because the search is no use if it's constantly going search all files relating to ctor (which is all files). I'm displaying both the de...
I am following the "Presentation Model" design pattern suggested by Martin Fowler for my GUI architecture in a Windows Forms project. "The essence of a Presentation Model is of a fully self-contained class that represents all the data and behavior of the UI window, but without any of the controls used to render that UI on the screen. A...
I tried: private void textBox1_KeyDown(object sender, KeyEventArgs e) { streamWriter.Write(e.Key.ToString()); } But I don't know how to convert a Key to string correctly. I also tried: private void textBox1_TextInput(object sender, TextCompositionEventArgs e) { streamWriter.Write(e.Text); } But this event is not called. The...
Is there a way to color parts of ListBox Items (not only whole line)? For example listbox item consists of 5 words and only one is colored or 3 of 5. Is there a way to do the same with ListView? (I know that ListView can be colored per column but i would like to have multiple colors in one column). I am interested in only free solu...
Hello, The DBA displays a lot of info in his stored proc as it executes. From a Visual Studio 2003 CSharp Windows Form, when you launch a SQL Server 2000 stored procedure that returns records as well as an OUTPUT param, is it possible to display the same verbose output as you would see in the Query Analyzer tool? This is on top of sh...
I had a strange problem editing a class in the property grid whereby the property grid would refresh incorrectly. I managed to reduce the problem down to a class with just two properties. I've included the code at the end to ease explanation. It basically boils down to a class with two properties. The first of which is expandable (a fo...
So I have this datagridview that is linked to a Binding source that is binding to an underlying data table. The problem is I need to manual add rows to the datagridview. This cannot be done while it is bound, so I have to work with the databinding. If I add the rows to the underlying datatable, when the datatable is saved, the rows are...
Curious if there are any disadvantages to using an ElementHost to host a WPF UserControl in a Winform application? I ask because in general I feel that it takes to much time for me create a new WPF application with a basic interface that looks decent. Decent in the sense that if I create a new Winforms application and throw some control...
Hi All Just wondering if there's a way to make Visual Studio 2008 Express Edition generate normal exe files that are created by the installer for my app? I am sick of the ClickOnce application files. I had all these file associations setup and now that I need to actually have an installer for my apps, the file associations setup in the...
Just to take on a challenge, I decided to write an application to magnify only a particular section of the screen (under the mouse, following the mouse). The best way I can think to do this is to take a screenshot of the space under the form, enlarge, and paint on the form. I'm using this section of code to snap the picture inside a time...
So ... for example I've got some template - panel with edits and data from an object And now I've got dynamic count of objects and I need dynamic count of panels somewhere :-/ I'm interested in any ideas if there any way to make this frame on WinForms. ...
this creates streaks instead of dots. why ? I am trying to paint individual pixels. another method was also tried (using fillrectangle) , which also didn't give the desired result, got bars instead of dots. protected override void OnPaint(PaintEventArgs pea ) { Graphics g = pea.Graphics ; for ( int y = 1 ; y <= W...
This method is used to handle KeyDown event of the listview: private void listView_KeyDown(object sender, KeyEventArgs e) { if (e.Control) switch (e.KeyCode) { case Keys.A: { foreach (ListViewItem item in listView.Items) ...
I have a .net windows application that needs to run in full screen. When the application starts however the taskbar is shown on top of the main form and it only disappears when activating the form by clicking on it or using ALT-TAB. The form's current properties are as follow: WindowsState=Normal TopMost=Normal Size=1024,768 (thi...
EDIT : Please answer only those options that you have used or heard good words about it. EDIT : I have also found this SO thread helpful. Any experiences about options listed here will be great help. We are small software firm launching our winforms based product very soon. We want to use any good third party tool fo...
I want to define a time attendance system for government, and right now I am preparing a system requirement document, can someone give me some advices about what features/functions should I include in the system ? ...
Hi, I currently have a Form with a TabControl containing some TabPages. Each TabPage has several controls with validation logic and appropriate ErrorProviders. On my OK_Button_Clicked event, I call Form.ValidateChildren() in order to determine whether to save and close the form . Now, suppose I have a control in tab 1 that fails validat...