Answer Questions
Mark Fasano BorderColor for a Standard Button
Hi, It is rather straight forward to change the border color for a flat style button control. The color properly is not listed for a standard style, and I dod not see a public property or method to alter the color by the program either. Not prefer to draw border lines for each control, is there a quicker way to just change the standard button bordercolor property Regards, Reza Bemanian Hi Reza, For standard style you will need to draw the border lines yourself. Thanks, Standard/system style buttons are painted according to the current Windows XP theme or system colors. Buttons do not implement custom drawing so you can't change their appearance. Unless you create your own butto ...Show All
Janetjyothi passing information betwen forms.
I have a program with 4 forms and each form has textboxes were the user writes settings like AppWizard. The program start with form1 and goes with steps form2 , form3 , form4. I want to implement a "previews" button in each form except form1. From form1 i go to form2 with this. form2 ^f=gcnew form2(); f->ShowDialog(); I dont want the forms to be shown modal over the parent form. I want the parent form to be dissapeared after calling the new form. How i cann keep the information of textboxes when i click "previews" buttons Store a reference to form2 in your dialog. Only allocate a n ...Show All
zensunni Strange DataGridView Exception
I have an application which retrieves information from a SQL database puts it in a DataTable object and then loads it into a DataGridView object. My code exceutes fine and does not raise any exceptions. However when I attempt to step out of the function which loads the DataTable into the DataGridView object a DataGridView Default Error Dialog pops up (In my app not VS 2005) and will continue to pop up repeatedly after hitting OK. The text of the dialog box is: System.ArgumentException: Paramater is not valid. at System.Drawing.Image.FromStream(...) at System.Drawing.ImageConverter.ConvertFrom(...) at System.Windows.Forms.Formatter.FormatObjectInternal(...) at System.Windows.Forms.Formatter.FormatObject(...) at System.Windows.Forms.D ...Show All
Jason Dam bind a datagrid to xml (Dataset)
Hi I have a winform application which contains a datagrid. In this grid I want to show the data from a xml-file: Here I put the xml-content in a dataset: private void fnDataReadingFromXMLFile() { string filename = "D:\\VisualStudio Projects\\SMS\\SLSMSTool\\xmlContacts.xml"; //check if the file exists if (File.Exists(filename)) { //clear the DataSet contents this.datasetCustomer.Clear(); MessageBox.Show("Data reading from " + filename + " -file"); this.datasetCustomer.ReadXml(filename); } //if else { MessageBox.Show(filename + " does NOT exist; Please click" + " first the button 'CopyToXML' ", ...Show All
tom48 Difference between DotNet2.0 and DotNet3.0
Hi Can anyone tell me the difference between DotNet2.0 ans DotNet3.0 framework, i dont know whether this is the right place to post this question. Thanks in Advance .NET 3.0 uses the exact same CLR and base class libraries as .NET 2.0. It just has a bunch of classes added to support WPF, WWF and WCF (Avalon, Workflow and Indigo). You'll find support for these additions in the Orcas forums. ...Show All
Navya Jeevan How to make a control not take keyboard input
Hi, I'm in the process of writing a small C# App, in which i have two groupboxes in a form. The form has the KeyPreview property set to true. The groupbox1 contains a set of labels. The second groupbox contains a few checkboxes and a button. I wrote a form1_keypress handler to handle keyboard inputs directed at the form. But once the groupbox2 receives focus (if i change one of the checkboxes or click on the button), even before i can handle keyboard events (an arrow key press) with the form1_keypress event, i see that the groupbox2 state changes (the checkbox value changes). Or in other words, the groupbox2 still is in focus and i reach the form1_keypress only after having the state of the controls in groupbox2 changed. I want all the ...Show All
Vagabond windows service setup error
Dear all, I'm very new to windows service programming and I keep getting the same error while trying to install. I followed the setup on the MSDN walk through of creating a windows service but still got an error. http://msdn2.microsoft.com/en-gb/library/aa984464(VS.71).aspx The error i get during the setup process is: 'An exception has occurred during the install phase. SystemComponentMode.Win32Exception:the account name is invalid or does not exist, or the password is invalid for the account specified' Can anyone help me is it a permission problem do I have to add some user name and password information to my program The service runs as a local service. thanks for the help!! You've probably got ...Show All
I am me Error Code: 0x80070643
I have tried to install Windows and Office updates utilizing the Automatic installation tool; but, the initialization takes place and none of the updates are intalled. I ran WinDoctor and I am told that I am missing file "ORUN32.exe" and it cannot access "learn32.dll" and "pctree32.dll". I have searched my computer and found the orun32 and pctree32 files but not the learn32 file. I don't know how it got deleted and not sure how to get it back in place to use the automatic update. What do I do to get my Automatic updates to run again Please help me! Thanks DCKline that worked for me i've been trying for days to get it to download and your advice did the trick thanks again. ...Show All
DmitryMS Adding TreeNode nodes to treeview1.Nodes[index] ?
I want to biuld a tree from a XML file, but I can't seem to get the following to work: treeView1.Nodes.Add( new TreeNode ( "year") ); treeView1.Nodes[0].Nodes.Add( new TreeNode ( "month" )); int noTreeNodes = treeView1.Nodes.Count; // Should return 2, but only returns 1 treeView1.Nodes[noTreeNodes].Nodes.Add( new TreeNode ( "day" )); The problem is that nodes are only indexed if added as in the first line, not the second line Therefor the last line fails, since it tries to get the Node with index 1, which does not exist. Any help appreciated! The nodes have a tree structure. So treeView1.Nodes.Count only returns the count of the top nodes which is 1. To add the day under t ...Show All
Jack Spade Modeless Dialog boxes that are Always in Focus
How do you make a modeless dialog box so that it is always in focus with the parent window Like the floating menus in Photoshop, for example. Whatever I do, I haven't found a way to keep more than one window in focus at a time. Thanks, so they only make it look like they are always in focus by having it so the border colour doesn't change when they are out of focus. Bump. I can't find an answer to this using a search either here or on the web. Lot's of people ask focus questions, most of which never get a satisfactory answer. Isn't their a Wondows Forms Focus FAQ somewhere I'm looking at a ...Show All
ukrutter Export table data in Access Database
Hi, I need to export a table data in Access Database into a text file using C# interface by a press of a button. I need advise on which method is required to use for this Tks. Sorry, it should be sw.WriteLine(datareader[" User_ID "].ToString()+" "+datareader[" Password "].ToString()); } No the first quotation mark before the "datareader" Hi, i am not using an SQLserver, so there is the namespace error again. So, meaning I have to install an SQL Server This is a windows application. The declaration and error as follow: using System.IO; ...Show All
Ezira Can I store a bitmap file in a globally accessable file, instead of a form's imagelist?
Hello, I am aware of the methods for storing images in an imagelist that resides on a form. But sometimes my tree node does not have the form's pointer. I would like to store some of my bitmaps in a globally accessable singleton object. Has anyone done this Thanks for the help! Bob Thanks Peter! I am not acually using the common control. I can mention which tree control I am using if that matters. But I am creating derived node objects, and I can assign the image from the singleton (This is already working). My question is more about how to store the images in a resX file and retrieving them in all the places my application needs bitmaps. This also allows me to centralize my bitm ...Show All
jgowrish navigation between forms
i have a project with 17 different forms all being housed in a mdi parent form. i have tried to impliment a previous button on most of the forms, which is complicated by the fact that there is more than one way to get to some of the forms at this stage, i have used a global variable which is changed each time a form is closed, then a case statement within the previousbutton_clicked event procedure that will use the variable to figure out which form to go back to. this seems to work, but i was wondering if anyone knows an easier or better structured way of achieving this functionality. any ideas will be greatly appreciated. thanks in advance, Mark I think the functionality like "Back& ...Show All
r3n Combo Box Selections
I am displaying data from an access Db into a combobox. My Db table has two fields, Cust# and Cust Name. What I am trying to do is display the Customer name in the Combo Box. That much I have done. When I select one of those records. I want another textbox on the form to be given the corresponding Customer # that relates to the Customer name that I just chose in the Combobox. Can anyone direct me on how to do this thanks tattoo sure. you have 2 options here when the customer has been chosen (the customer name), do a query on the datatable to filter it to bring just the record details of the selected customer, then get the ID and place it into this other control of yours. something ...Show All
mterui Populating Multiple TextBox Controls from ComboBox with Concatenated Items
I need to populate the text property of two textbox controls via a value selected from a comboBox. The comboBox is populated via dataReader and the items are created via concatenated fields (this is kind of a look-up comboBox). Usually I would assign the text property of the textbox control like this: string sItem = ComboBox.SelectedItem.ToString(); TextBox.Text = sItem; Because my comboBox selectedItem is a concatenated field, I do not know how to populate the two textboxes. I tried using the comboBox.ValueMember but that is always null (I'm assuming because the comboBox is not really databound ). What can I do to populate the textboxes This is how I populate the comboBox: private void populateCompanyName() { OleDbData ...Show All
