Resize Event

Phil
09-24-2001, 05:07 AM
Hi,

I have some code called in the resize event of a picturebox, sometimes this picturebox is resized by the user, hence the code must be called in the resize event, at other times by code such as:

with pic1
.top = y1
.left = x1
.height = y2 - y1
.width = x2 - x1
end with

This calls the resize event twice, not a problem normally but the code in this event is complex and long winded. Is there a way to have the above code call the picturebox resize only once.

Cheers for the help

Phil

Banjo
09-24-2001, 05:11 AM
Yeah, it gets called by the .width assignment AND the .height assignment. Try using:
<pre>pic1.Move x1, y1, x2 - x1, y2 - y1</pre>

Phil
09-24-2001, 06:52 AM
Cheers,

Never thought of that, simple solution! - always the best

Thanks

Phil

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum