I'm a fairly new C# programmer. I have a serialPort component I am using to 'talk' to a controller board.
I found the code example below and I am using it...it seems to be working fine. When I send a cmd to my device, what it returns is displayed in my richTextBoxReceiveWindow1 component.
What...
I have some c# code below where I am creating a treeview.
I want to add an image to each node but am not sure of the syntax to do that?
I have an imageList assigned already to my treeview.
Thanks for any help...
treeView1.Nodes[0].Nodes.Add("Woods")...
My menu code fires the menu click event but the menuItem.Name is always ""
Obviously my code isn't setup right.
Thanks for any help.
ContextMenuStrip menuStrip = new ContextMenuStrip();
ToolStripMenuItem menuItem = new ToolStripMenuItem()...
This is pretty simple c# code below.
Why does .SelectedIndex result in -1? I was expecting the value to be 2.
comboBoxLSK.Items.Add("test1");
comboBoxLSK.Items.Add("test2");
comboBoxLSK.Items.Add("test3");
comboBoxLSK.SelectedIndex = comboBoxLSK.FindStringExact("test3");
Here is my code to print a richtextbox file.
But I have two problems:
1. It doesn't print any text. Just blank paper comes out of my printer.
2. I'd like to be able to optionally select text to print as an option. I've enabled that in my printDialog component.
Thanks for any help...
I've added a splitContainer to my form but I can't figure out how to set the splitContainer.panel2 width and height? I have two panels: splitContainer.Panel1 and splitContainer.panel2.
I have the splitContainer.Dock set to Left.
When I try to set the splitContainer.panel2 width I get an...
I'm trying to programmatic ally change one of the row SizeType properties on my tableLayoutPanel component.
I'm getting the following error:
System.Windows.Forms.TableLayoutRowStyleCollection' does not contain a definition for 'SizeType'
on the .SizeType in line 2 below.
I have this declared...
I'm new to C# programming and am looking for a simple way to use Httpclient to fetch a text file from my website.
I've found some examples but they produce errors because I don't know how to declare them in the Usings section. Experienced C# coders know how to do this but new coders don't, thus...
I want to write a VS 2010 C# app that can set my admin password. My user account is Ralph and I am an Admin but I don't have a password set so I can boot up and get right to the desktop. However, that being said, I'd like to be able set a password for my account using C#.
Thanks for any help...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.