GDI+ and Oversized forms.

  • Thread starter Thread starter mikey
  • Start date Start date
M

mikey

Hey,

I'm currently working on a project where I draw a rectangle on a form
and move it around. The form seems to be bigger than I make it
because when I move my image down or right it will go right off the
screen before the 'buffer' code I implemented kicks in.

The current code I have now is:

if object.bottom < form.height then
y += 1
end if

Obviously not the exact code, but that's what it is for moving the
form down.

Has anyone else had this problem or know how to fix it?
 
the problem is likely due to the broders on the form (ie, the title bar at
the top, any menu items, and the other three "grabable" borders on the
left, right, and bottom) You can try and do some magic with form.ClientSize
to do what you want, as it should exclude those border items.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
Back
Top