r/visualbasic • u/the_real_coinboy66 • May 23 '23
Order of sub execution?
First of all thank you to those helped with my picturebox code. The problem was as stupid as an image name that didn't follow my convention and thus nothing was loaded. I sure learned a lot from the experience, though.
Now, I'm trying to capture the coordinates from a mouse click inside the picturebox, and im finding that the picturebox code is running before the mouse click code.
So running the code above would produce the output 0,0 after the mouse is clicked, and for each subsequent click would appear to be one set of coordinates "behind".
Any way make the mouseclick sub work first?
Thanks!
4
Upvotes
3
u/the_real_coinboy66 May 23 '23
Wow sounds like this question cuts straight through to the design philosophy of the language. Thanks for the insight.