- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
22 Posted Topics
Re: The only way I can think of is to translate the points of the path into points on the coordinate plane. Then you could calculate the line of best fit. Using the slope of the line of best fit you could find the diagonality of the path if you know … | |
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 … | |
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 … | |
Re: Copy the code from Case 'M'. And add this below that case: [CODE] Case 'm': //Code From Case 'M' break; [/CODE] | |
Re: Can't you just set the forms to the same size and then set the Transparency Key of the top form to the background color? That should work... | |
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. | |
Re: If I was you, I would go back and start the project from scratch again with a different approach. However be sure to use arrays the size of the "numrolls" and then use a foreach. [CODE] int[] numrollsArray = new int[numrolls]; foreach (int i in numrollsArray) { } [/CODE] | |
Re: [CODE] switch (number) { case 1: Console.WriteLine("I"); break; case 2: Console.WriteLine("II"); break; } [/CODE] Much better than if/else for more than 3 statements. ![]() | |
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. | |
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. | |
Re: CTRL+C stores the selected item to the Clipboard, which has a class. [CODE]Clipboard.SetText("Text You Want in Clipboard");[/CODE] | |
I need to disable the 2nd item in a comboBox when something happens. How would I go about doing this? Any help is appreciated. | |
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. | |
Re: I believe the Simulator does not limit the specs it can use. Therefore if you have a 2 GHz processor it will use 2 GHz, when the iPhone only has 1 GHz. The processor is among other things you computer might have advantages in, like RAM and Graphics Power. However, … | |
Re: My idea, which is most likely the long and hard way, would be to convert the average to a fraction. .280 = 7/25. I would then try this: [CODE] Random r = new Random(); hitChance = r.Next(1,26); if (hitChance < 8) { // Hit Code } else if (hitChance > … | |
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. | |
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", … | |
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 … | |
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) … | |
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 … | |
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)" … | |
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 … |
The End.