add a reference in ur class file. using System.Configuration;
User 4467139
Posts
-
How i use the connection string for making a connection object.. -
How i use the connection string for making a connection object..if your connection string is like this add name="conn1" connectionString="string1" ur access will be like this. string conn = ConfigurationManager.ConnectionStrings[conn1].ConnectionString;
-
get set property1 word: Encapsulation
-
PropertyGrid and Custom propertiesI think you looking for TypeConverterAttribute and ExpandableObjectConverter. The following link shows how to do it. <a href="http://msdn.microsoft.com/en-us/library/aa302326.aspx"> <a href="http://msdn.microsoft.com/en-us/library/ayybcxe5.aspx">
-
PropertyGrid and Custom propertiesTry [BrowsableAttribute(true)] above your property description
-
Fire enter keyUse something like this.... private void Textbox__KeyDown( object sender_, KeyEventArgs args_ ) { if ( args_.KeyCode == Keys.Return ) { // Do whatever } }
-
Exposing class properties for design time use[Message Deleted]
-
How to detect .net Framework 3.5 is installed or availableThe following code will give you the list of available versions. const string regLocation = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP"; RegistryKey masterKey = Registry.LocalMachine.OpenSubKey(regLocation); RegistryKey tempKey; string[] SubKeyNames = masterKey.GetSubKeyNames(); for( int i = 0 ; i < SubKeyNames.Length ; i++ ) {tempKey = Registry.LocalMachine.OpenSubKey(regLocation + "\\" + SubKeyNames[ i ]); MessageBox.Show(SubKeyNames[ i ]); MessageBox.Show("\tVersion = {0}", tempKey.GetValue("Version").ToString()); } Or you can check the currently user version using the following. MessageBox.Show(Environment.Version.ToString());
-
Exposing class properties for design time useuse browsable attribute. [BrowsableAttribute(true)]
-
Add a Property for a UserControlsI just tried using the same code that u gave and it seems to work fine for me. Can you give me the code for the control and also the code for ur form. It might help.
-
I have Macros in Excel and I want it to run through my application in .NETDo you have the Microsoft office interop assemblies installed and referenced?
-
USER CONTROLThe simplest thing is create a form and put all the controls(grids, labels, textboxes, etc) that you will be needing into that form. Now go to the class declaration(.cs file) where it says "public partial class Class1 : Form" and change it to "public partial class RSIntexPA : UserControl" Compile the project and generate it a dll. Now you can use your usercontrol via this dll anywhere.
-
Add a Property for a UserControlsYou can override the Text property of the usercontrol so as to set the entered text into the label. Something like what is given below. [Browsable(true)] public override string Text { set { label1.Text = value; } } This will let you set the text in design time.
-
DataGridView with ComboBox. Need helpYou can create objects of the items and then add the list of objects to the combo box.This way you can access the selected object from the datagridview cell.
-
text parsing or automatic segmentation of text in c#Can you give us more detail on what you are looking at?