I have an image with a white background and I want the white area of the image to be transparent, but if I set the form's Transparency Key I can see through the form where the white area of the picture was. Is there any way to only make the picture transparent, not the form? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 1

I am creating a simple program where a character (Picture Box) is moved using the arrow keys through adjusting the x and y. I have figured out how to detect key presses and adjust the x and y, but I cannot figure out how to redraw the picture box so that it moves. I have used Google but none of the answers are working. Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 2

I need to simulate a mouse click, but I need it to simulate a click that will effect the open window (In this case the browser). Is there an easy way to do this or is it not possible? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 2

I need to draw a thick line between two Picture Boxes using code. Is there an easy way to do this, possibly similar to drawing a rectangle or circle? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 1

In C# if you want the thread to pause you would use: [CODE]System.Threading.Thread.Sleep(300);[/CODE] However, I cannot seem to find a C++ equivalent to this? How would I do this, or is it just not possible? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 3

I need to disable the 2nd item in a comboBox when something happens. How would I go about doing this? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 3

I am currently working on a game that takes place in the console. I need to know how to combine [CODE]Console.WriteLine()[/CODE] and [CODE]Console.ReadLine()[/CODE] into 1 line so that the blinking underscore appears on the same line. Is there any way to do this? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 9

I am making a game that requires a rectangle to stay with the cursor position on the X-axis, but only move at a certain speed. How would I do this? Any help is appreciated.

Member Avatar
Member Avatar
+0 forum 1

I created a .txt file with 20 lines of text. I need to read a random line. This code works for the most part: [CODE] Random r = new Random(); rand = r.Next(0,20); //rand is a predefined variable StreamReader reader = new StreamReader("Answers.txt"); answer = reader.ReadLine(); string strAllFile = reader.ReadToEnd().Replace("\r\n", "\n").Replace("\n\r", "\n"); string[] arrLines = strAllFile.Split(new char[] { '\n' }); answer = arrLines[rand]; reader.Close(); [/CODE] Everything works except for occasionally I will get an error that "The index is outsides the bound of the array." Every other part of the code works. Can anyone find the issue? I believe it …

Member Avatar
Member Avatar
+0 forum 4

I use a Form to gather Input from the user, and my program needs to format the info and show it in a Text Box. Everything works except 2 of my variables need to look like this in the output: "variable". The problem is that I can't find a way to make the variable write with quotations around it. Is there a simple solution to my issue, or am I going to have to find a way around using quotations?

Member Avatar
Member Avatar
+0 forum 4

I am building a simple program with 3 Forms. The first Form has 2 Buttons and the other 2 are blank. I used this code: [CODE] public partial class Form1 : Form { public Form1() { InitializeComponent(); button2.Click +=new EventHandler(button2_Click); button1.Click +=new EventHandler(button1_Click); } private void button2_Click(object sender, EventArgs e) { Form3 a = new Form3(); a.Show(); } private void button1_Click(object sender, EventArgs e) { Form2 b = new Form2(); b.Show(); } } [/CODE] When Button 1 is clicked, Form 2 should open. And when Button 3 is clicked Form 3 should Open. Although the forms open when the button …

Member Avatar
Member Avatar
+0 forum 2

I am creating a game that requires me to change the background color of a panel, wait 1 second, then change it back. The code I tried was: [CODE] button1.BackColor = Color.Blue; System.Threading.Thread.Sleep(1000); button1.BackColor = Color.DimGray; //Dim Gray is the original color [/CODE] When I use this code it never switches to blue, it just stays the Dim Gray. I also tried overlaying another Panel colored blue over every panel and setting visibility to false. I then used: [CODE] button18.Visible = true; System.Threading.Thread.Sleep(1000); button18.Visible = false; [/CODE] Again I got the same result, the panel just stayed Dim Gray. Any …

Member Avatar
Member Avatar
+0 forum 4

I am using a licensed version of VS 2010 Express and I created a simple program. The program has 1 Class, 4 methods(So Far), 10 Buttons, and 1 Pop Up Box. When I try to run/debug the program, the locks appear next to my opened files and it says "(Running)" in the top left. It stays like this for a long time, and doesn't open a new window with my Form in it. Without any code and just the form with 10 buttons it ran fine. Any ideas on what might have caused this, or does debugging usually take this …

Member Avatar
Member Avatar
+0 forum 1

I am using Visual Studio 2010 Express Edition, and I am developing a basic game application. It involves a New Game button that is clearly named "NewGame" in 'Form1.cs'. But when I use this code: [CODE]NewGame.Click += new EventHandler(newGame);[/CODE] in 'Program.cs' I get the error message "Error 1 - The name 'NewGame' does not exist in the current context". Any help is appreciated, thanks in advance.

Member Avatar
Member Avatar
+0 forum 5

The End.