Initiating editing on a PropertyGrid.
I'm looking for a good way to programmatically initiate editing on a System.Windows.Forms.PropertyGrid. I can select the GridItem that I want, but that doesn't move the cursor into the edit field. ...
I'm looking for a good way to programmatically initiate editing on a System.Windows.Forms.PropertyGrid. I can select the GridItem that I want, but that doesn't move the cursor into the edit field. ...
What would cause a TreeView to collapse, other than a call to the .Collapse() method on a TreeNode or the .CollapseAll() method of the TreeView? In an application that I am developing, the TreeView will simply not behave properly. The TreeView maintains only two levels. When selecting a child of a parent node, all other nodes immediatel...
Here's a deceptively simple question: What is the proper way to asynchronously play an embedded .wav resource file in Windows Forms? Attempt #1: var player = new SoundPlayer(); player.Stream = Resources.ResourceManager.GetStream("mySound"); player.Play(); // Note that Play is asynchronous Good: doesn't block the UI thread Bad: Soun...
I have a C# .NET 2.0 WinForms app. My app has a control that is a container for two child controls: a label, and some kind of edit control. You can think of it like this, where the outer box is the parent control: +---------------------------------+ | [Label Control] [Edit Control] | +---------------------------------+ I am trying...
I've been creating a custom TabFolder extension that adds a key listener to allow quick tab switching using an ALT + # hotkey. By adding the KeyAdapter to my TabFolder, the event handler works properly only when you have a tab header selected (in which case the ALT + ARROW_LEFT/ARROW_RIGHT also work.). I need this hot key to be active w...
Can anyone help me with a coded example or any code to communicate between two separate application for multiple purposes like i) Find server application on the intranet from a client application running as client ii) Checking client or server is active from other side application iii) Communication data or objects to the client or se...
I have a DataGridView and a handler for the EditingControlShowing event which is used to add or remove handlers for the keyUp event for some columns. The problem is sometimes a column which does not have an associated KeyUp handler actually fires the handler. It seems like the grid does not know which column is supposed to fire which ha...
I have a datagridview which is initially bound to an empty datatable. Then the first row is populated by setting values to the columns of the grid's CurrentRow.DataBoundItem row. I enter a new row manually by typing values in the last blank row. I hit a save button which does: DataTable dt = (DataTable)MyGrid.DataSource....... I noticed...
Using VC# 2008, in WinXP 32 bit, the following function private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { textBoxURL.Text = webBrowser1.Url.ToString(); if (bStart) { string strData= webBrowser1.DocumentText; int iIndex = listBox1.Items...
I have a data grid, a new row is added when i click on button. the new row consists of dropdowns in each cell. the value of the next cell dropdown must be based on the first cell drop down and so on for the third cell. I am using a .net 2.0 windows application in c# ...
Hi folks, I am struggling with the WinForms DataGridView. I have a class, that I use as element to be displayed: public class BorderFlowHistoryElement { public string nodeTitles { get; set; } public double borderFlowRatio { get; set; } ... } I created a list of these elements: List<BorderFlowHistoryElement> clusterHistor...
I'm currently adding a tooltip to a label like so: ToolTip LabelToolTip = new System.Windows.Forms.ToolTip(); LabelToolTip.SetToolTip(this.LocationLabel, text); When I need to change this tooltip as the label's text changes, I try doing the same to add a new tooltip. Unfortunately, the old tooltip remains under the new one, which is r...
I have defined classes: public class Parent : IParent { public string ParentText { get { return "ParentText"; } } } public interface IParent { string ParentText { get;} } public class Child : Parent, IChild { public string ChildText { get { return "ChildText"; } } } public interface IChild ...
Following-on from this question, is it possible to detect whether one is in design or runtime mode from within an object's constructor? I realise that this may not be possible, and that I'll have to change what I want, but for now I'm interested in this specific question. ...
I have a datagridview where the first cell is used to retrieve data for the grid. If I use the cellleave event to rebind the grid to a datatable, I get a "Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.", which makes sense. Where can I bind the grid to a datasource after all the e...
Hi all, New to .NET/C# stuff so please forgive me if it's something obvious ;-) I'm trying to get cell editing going on a DataGridView control (WinForms). I've set all "ReadOnly"-type options to false, I've set EditMode to "EditOnEnter", I've added a row and selected a current cell programmatically, I've tried calling BeginEdit() but a...
I'm using VS2008 and I'm creating a Windows Forms project. The form has a menu of MenuStrip class, and the items are (surprise, surprise) ToolStripMenuItem objects. I want to add pretty icons from the FamFamFam Silk icon set. All is nice and fine, until I got to the "copy" icon. You can see it here (warning! 1MB image!) under the name "...
Is there a way I could use custom membership provider without need to create an asp service for it? I prefer validating the users right from within the application exe itself against the DB. OTOH I still want to have a login form that implements System.Web.ClientServices.Providers.ClientFormsAuthenticationCredentials and interact with Sy...
I am looking for any kind of documentation, an open source nhibernate winform application that i can study, or even better a winform / nhibernate framework. I saw a little bit of it in Nhibernate contrib and NhAddins but that s all. There is plenty about web but very few about winform. Why is that ? ...
I am developing a winforms application and I would like to know what are the best practices for exception handling. Whenever there is an exception occurring I open an exception dialog displaying the necessary information i.e. the message and stacktrace. Major confusion that I have is in cases where I want the user to see only a friendly ...