Answer Questions
smithsf22 Image not shown in Treeview Control Node
Hi, I have a windows application developed in C#.NET , Framework 2.0, and it's output type is Windows Application . This windows application contain only one form and in that form there is only a treeview control and a imagelist with two images. Now I have changed that project's output type to Class Library And added the class library reference to another windows application. From this new windows application I call the form (with Treeview control) which is now inside the class library. Well, the form is getting invoked with the treeview contol but without any image in its node. I tried to assign that form_Load event, still then it is not showing any image in the tree node. But in Windows Application type it is shown. Is it because I ...Show All
Viren Kapadia bad bug
Dear All I have very bad bug in my program as when i press f5 then i trayed error An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll Additional information: Class not registered in line : CType ( Me .MSHFlexGrid1, System.ComponentModel.ISupportInitialize).EndInit() i convert the visual basic project to vb.net through wizards. in windows application any one could help me please. thanks in advance Try installing the VB6 runtime components Yeah. Installing vb6 runtimes should work, but a better route would be to totally redesign your application, using only .NET framework controls. Less hassles in the future. You don't ...Show All
Isaac Shloss Designer changes DataGridView styles
Hi, I have a DataGridView in a GroupBox and whenever I change some of the cell styles on the grid (ex. ColumnHeadersDefaultCellStyle) the designer later on reverts them to other values ( uses some of the styles from the GroupBox). Is there anything to prevent this kind of behaviour Thanks a lot edit: I forgot to mention that I use VS2005 Professional Edition I'm getting the same thing... So very annoying. ...Show All
AaronJ Manually invoke a timer time-up event???
I have a timer that I'm using in my winforms application. I was wondering is there a way to manually invoke the timer time-up event by not actually waiting for the timer to expire I need to have the timer up event code executed in my application at one point. private : System::Void timeup(System::Object^ sender, System::EventArgs^ e) { } Is there a way Thanks!! Interesting. Didnt know that. Thanks for the information. What about its arguments hi Firstly, I want to simply use SendMessage for a WM_TIMER message when you want to fire a timer event. After dry up all possible ways, I can't get the timer id and callb ...Show All
Hamed JI Adding Components to Windows Forms
anyone have any links on how i would add a component control to my windows form I created a component and now i want it to be inside my panel on my windows form but I cant find much info on the net to help me out though.... to add a control, you need to add it to the control container. Example if I create a control at runtime and want it on the form, I add it to the Controls collection: this.Controls.Add( myControl ); then I need to set the location of where I want to show that control on the form using the control's location property. So in your panel, try this: this.thePanel.Controls.Add( myControl ); does this work to make it "show up" - you need to set the location property to give it the pl ...Show All
Rivan56 I have a Question on the Limits on numericUpDown (Help Please)
Is it posssible to get a numericrUpDown to write Text to TextBox Example: 1,2,3,4,5 in the numericUpDown would write this to a TextBox: "border:1px; border:2px; border:3px; border:4px; etc " and follow the format .. if so can some give me an example of it would be done,cause i'm not sure how to get it to do what i need...lol Thxs for the Help in Advance!! I put in the code you typed in...Thing is even when i change the numeric value of that box..Its not writing to the cssTextBox... yeah but how this is what i have so far:: cssTextBox.Text = (numericUpDown1.Value = Convert .ChangeType( object numericUpDown1, Type Text); I think ...Show All
Deejjaayy How to get more info about port using System.IO.Ports.SerialPort
I need to programatically find the particular port that is associated with my device (which is connected though a USB adapter). After inserting the USB connection for the device, a new port is displayed in the Device Manager under the "Ports (COM & LPT)" heading. The new port displays in the following manner: " Prolific USB-to-Serial Comm Port (COM5) ". When I use SerialPort.GetPortNames() all I get is "COM5". I can't figure out how to get the "Prolific USB-toSerial" part that is displayed in the Device Manager. Anyone know how to grab that thanks much, Ryan Well, using the tool you supplied I was able to find a class I could use to query t ...Show All
SonicWave consuming .net 2.0 dll from .net 1.1 using VS2003
Is it possible to consume .net 2.0 dll from .net 1.1 using VS2003 .net 2.0 dll might or might not be using 2.0 specific features, please let me know if its possible in either case. Thanks, Hello. Unfortunately you cannot reference a .net 2.0 assembly from your 1.1 application. The essense of the problem is that you can't run two versions of the framework in the same process. I would recommend upgrading the 1.1 application to 2.0. Another suggestion is covered here which involves reflection but is in my opinion much more of a headache than just updating the 1.1 project to 2.0. if the dlls are compiled in native C++ compiler using VS2005, even then they cant be referenced in apps built in ...Show All
soul creator pictureBox1_Paint() doesn't draw
Hi, I am making a scrolling text with transparent background. However, the pictureBox1_Paint() seem to draw nothing! Any idea public partial class Form1 : Form { private String drawString = "Sample Text"; private Font drawFont = new Font("Arial", 31); private SolidBrush drawBrush = new SolidBrush(Color.White); private int textX = 0; public Form1() { & ...Show All
hsm13 problem in axwebbrowser.navigate()
Hi , I am using VS .NET 2003 on XP SP2 when I am using the axwebbrowser.navigate() in my code, its actually locking the file which I supply to it as URL. I am pasting the code below: ################################################################################### public string Xml { set { StreamWriter writer; object missing = System.Reflection.Missing.Value; missing = null; _fileName="C:\\XMLFiles\\"+Guid.NewGuid() + ".xml"; using (writer = new StreamWriter(_fileName, false)) { writer.Write(value); } _ctrlWeb.Navigate( _fileName, ref missing, ref missing, ref missing, ref missing ); if (_previousFileName.Length > 0) { File.Delete(_ ...Show All
markm75c A Problem About DataGridViewNumericUpDown.Can U Handle it?
DataGridViewNumericUpDown is a useful! A problem is occured when i used it : When I got then DataGridViewNumbericUpDown Cell , It's foreColor still is Black .I can not see it ! Help me pls ! The Paint method seems like it’s not working well. Just remove it and the cell will use the method in the base class. Of course, when not editing, the cell looks like a textbox cell, but the text can now be readed. Hi, I have found a solution for this. Please look at the code below. You will notice the use of foreColor in addition to backColor. This needed to be set according to the cellStyle. The code is at or around line 588 in DataGridViewNumericUpDownCell.cs. Color backColor; ...Show All
Mystagogue Need to see code samples of using an ActiveX control from a Windows Form.
Are there any examples in MSDN (or anywhere else) that show using an ActiveX/C++ control from a Windows Form I'd like to see some non-trivial examples if possible. Tnx Mark Just add the active x control to your toolbox, drag it on the form...set properties (and events, if any)...good to go. ...Show All
shizuka.a Changing the application icon
Hello, I have an application where I have an options dialog, which lets the user change the application icon. I ask the user to browse for a file and then he/she can pick up an icon. My question is how do I change the application icon dynamically, or is it possible at all Thanks for you time !! DMan1 's code is OK. But I prefer C#. :-) Here's my code. [code] private void button1_Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Choose Icon"; dlg.Filter = "icon files (*.ico)|*.ico |All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { try { this.Icon = ne ...Show All
airwalker2000 ListBox question
If I have a Listbox with data coming from a database, and say the Listbox is showing 'Cowboys, Raven, Eagles' as choices. How do I caputure the information on the Listbox if the user selected 'Raven' Thanks. Use ListBox.Text to get the text of the item selected by the user. Would I use the following code to get the information out of a Combobox (I have switch to combo box) label.Text = MyComboBox.selecteditem ; Or I need more than that. I can see the data on the combobox, but I still don't know what to get to save to a variable. Thanks. Create an event handler of SelectedIndexChanged event of ListBox and use this code in the Event Handler: Mess ...Show All
AG Hunzian Combobox databind
Hi I'm new to using C# databing. So i'm not sure of it's limitations. First i would like to show the piece of code i use and please let me know if it is the most efficient way String Sql = "select GLAccountName from DHACT where AccountOrder=1 order by AccountType,AccountOrder" ; SqlDataAdapter da = new SqlDataAdapter (Sql, conn.ConnectionString); DataTable dt = new DataTable (); da.Fill(dt); cmbAddActType.DataSource = dt; cmbAddActType.DisplayMember = "GLAccountName" ; so is the above the best way Then what i would like to know. Is it possible to bind a combobox dependent on another combo box selection Example, if combo X selection changes then combo Y selection changes, data will ...Show All
