i know that UserControl has the Resize event, but i need to be sure about something:
- if i change the size of control, by code or mouse or changing the image(picture property), the resize event is always activated?
Printable View
i know that UserControl has the Resize event, but i need to be sure about something:
- if i change the size of control, by code or mouse or changing the image(picture property), the resize event is always activated?
It may not always be activated if the changed size is the same size, in other words, if the end result is the same size.
Changing an image property will not resize the control. You will have to resize the control through code after the image has been accepted/processed. A VB usercontrol does not have an "AutoSize" property.
"Changing an image property will not resize the control. You will have to resize the control through code after the image has been accepted/processed. A VB usercontrol does not have an "AutoSize" property."
But when i change the usercontrol resize(to diferent size and in code), the resize event is activated, right?
i had a small problem, but i belive that you resolve it 50% of the problem.
but i will tell you the problem: in my sprite i have, in a timer(interval=10), the colision event. but these event isn't 100% ok, because, when the UC size is changed, these event isn't 100% working:(
is why that i need put it in move event and in resize event too;)
(the big problem is showed in games section: colision with wall)
thanks
I don't know how you are sizing your uc via code. But you should be using the UserControl.Size command.
By doing it that way your Resize event may fire twice, once when width is changed and once again when height is changed
Code:UserControl.Size PicAnimation(lngActualSubImage).Width * Screen.TwipsPerPixelX, _
PicAnimation(lngActualSubImage).Height * Screen.TwipsPerPixelY