Post by Izy Coder on Oct 17, 2014 22:44:26 GMT 10
hello guys, I have a problem when converting value to point. I make 2 form, 1 picturebox, 2 button and 2 numericupdown. the picturebox1 location is (0,0) then, when the first button click, form2 show up. in form 2, there have 2 numericupdown, I want the value of numericupdown change to point or location. This is my code Public Class New_Location
Private Sub New_Location_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load NumericUpDown1.Value = Form1.PictureBox1.Location.X NumericUpDown2.Value = Form1.PictureBox1.Location.Y End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Form1.PictureBox1.Location.X = New Point(NumericUpDown1.Value) Form1.PictureBox1.Location.Y = New Point(NumericUpDown2.Value) End Sub End Class but it's not work. I hope someone can solve it... (google not help me !)
Check Out My Project At VSlang InternetTM. More Project : - Poroxnoss Text Editor 2 - Added soon...
- TAP 2D Game Maker - Coming really soon...
- Easy Desktop - Discontinue..
|
|
Post by Imformas on Oct 17, 2014 23:47:56 GMT 10
Public Class New_Location
Private Sub New_Location_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load NumericUpDown1.Value = Form1.PictureBox1.Location.X NumericUpDown2.Value = Form1.PictureBox1.Location.Y End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Form1.PictureBox1.Location = New Point(NumericUpDown1.Value,NumericUpDown1.Value) End Sub End Class
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|
Post by Izy Coder on Oct 18, 2014 3:28:55 GMT 10
Thank you. It's work !
Check Out My Project At VSlang InternetTM. More Project : - Poroxnoss Text Editor 2 - Added soon...
- TAP 2D Game Maker - Coming really soon...
- Easy Desktop - Discontinue..
|
|
Post by Imformas on Oct 18, 2014 3:43:04 GMT 10
welcome
Programming language'sCSharpC++CObjective-CVBProject'sSharpMediaSharpEditYoutifygithub.com/Stephen-Fox-0
|
|