how does picturebox.move works?
-
Thursday, July 19, 2012 6:18 PM
hey guys,
i just started scripting with visual C#, and i understand it quite alot cause i already scripted for almost 2 years with another program called Pawno, its for a sort of minigame in gta san andreas multiplayer, anyways as i said i understand quite alot and it wasnt too hard to make something, i already made some funny small things(see www.filebin.tk then games page to see them) but now i want to use picturebox.move.... but it keeps giving me errors and i dont know what to do, now my question is: could someone show me a example of how to use it? cause if i do like: picturebox1.move = new Point(120, 9); thne it give errors... if i do picturebox1.move(120, 9); still gives errors, i dont know how to use it... i already searched on google for this but couldnt really find something so i thought lets try it here :D
i would be glad if someone can help me with this :D
ow btw i am making an windows forms application, dont know if it makes any different but i hope someone can help me :D
greets niels
i will go try make more EPIC things xD
(ow btw i dont know if it is allowed to post websites here, but if it isnt, please tell me and i wont do it again xD, else check it out xD)
All Replies
-
Thursday, July 19, 2012 10:09 PM
Can you post a link to the PictureBox.Move() method you are using? I can't find it in the documentation.
The location of .NET controls is typically changed by assigning a new Point to the Location property.
-
Friday, July 20, 2012 3:16 PM
well i use them for a windows forms application, like this: picturebox1.move = new Point(120, 90);
but thats giving me errors, so i thought, lets try this: picturebox1.move(120,90); but that aint working neither... i hope you understand wut i mean
-
Friday, July 20, 2012 3:23 PM
well i use them for a windows forms application, like this: picturebox1.move = new Point(120, 90);
but thats giving me errors, so i thought, lets try this: picturebox1.move(120,90); but that aint working neither... i hope you understand wut i mean
No! I don't understand what you mean. Where can I find the documentation for picturebox1.move? What are the errors? What are you trying to do? -
Friday, July 20, 2012 6:10 PM
ah that way xD, well hmm wait:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { pictureBox1.Move = new Point(73, 30); } } }but it gives me this error when i want to use it this way:
Error 1 The event 'System.Windows.Forms.Control.Move' can only appear on the left hand side of += or -= C:\Users\Niels\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.cs 21 25 WindowsFormsApplication1
i hope you can help me :D
-
Friday, July 20, 2012 7:46 PM
You code has to conform to the languge specification. What don't you understand about the explanation of the error. Did you understand my original post in this thread? If you aren't trying to change the location of the picturebox, what are you trying to do?
-
Friday, July 20, 2012 8:29 PMwell i want to that when the user presses the button then he actually SEES the picture moving to the other side of the form, is this possible?
-
Friday, July 20, 2012 8:33 PM
well i want to that when the user presses the button then he actually SEES the picture moving to the other side of the form, is this possible?
You'll have to learn how to use the help documentation to do that. Look up Windows.Forms.Timer and PictureBox.Location in the help files. You'll want to change the location in the Timer.Tick event.- Proposed As Answer by Jason Dot WangMicrosoft Contingent Staff, Moderator Tuesday, July 24, 2012 4:50 AM
- Marked As Answer by Jason Dot WangMicrosoft Contingent Staff, Moderator Friday, July 27, 2012 6:39 AM

