Click to See Complete Forum and Search --> : How to get the .right and .bottom property of a picture box
zenn0
December 19th, 1999, 05:33 AM
Hi
I have noticed that a picture box control has only got a .left and .top property. It does not have .right and .bottom property.
How can I get it without using the following codes
picture1.right = picture1.left + picture1.width
picture1.bottom = picture1.top + picture1.height
I want to use a mouse_move event that will cause a form to pop out from the sides of my MDI form whenever I move the mouse
to the top, left, bottom and right side of my MDI form
PLease please help me!!! Experts!
Thanks!
Zenn0
Jean Spector
December 19th, 1999, 07:55 AM
First of all, you're right - there is no .right and .bottom properties. You're doing right.
On _MouseMove event you can change .Width and .Height properties of form or any other control
Jean Spector
Tech Support Team Leader, CET
mage@lycosmail.com
(in VB from 11/1999)
zenn0
December 19th, 1999, 08:33 PM
Hi
I am trying to write a program that will do the following functions
1. When I move my mouse to the bottom of my mdiform, frmbottom(which I created) will popout (just like the bottom taskbar in windows programs)
2. When I move my mouse to the right of my MDIform, frmRight(which I created) will popout (just like the office2000 taskbar in windows)
The only difference is I did not create taskbars but instead created forms(frmbottom and frmright). How can I get my programs right, just like the way I want it. Is there any API calls which I can use to achieve this task?
The reason why I did not use the formula
.right = .left + .width is that there are scrollbars(both vertical and horizontal) which would affect the formula. I would have to set some tolerance using < or > signs
Pls help and thanks a lot!
zenn0
Jean Spector
December 20th, 1999, 02:14 AM
Sorry, I'm too new to VB and Windows programming to use API calls heavily. I can suggest you only to get the height/width of scrollbars and to use it in your calculations - it mustn't be too hard.
Jean Spector
Tech Support Team Leader, CET
mage@lycosmail.com
(in VB from 11/1999)
Ravi Kiran
December 20th, 1999, 06:49 AM
If you are comfortable with API's then you can use GetWindowRect and getClientRect function to get the window postions ( w.r.t Screen) and Client Position (w.r.t Window)
This also take care of Scroll bars, if any.
You can pick up the definitions from API viewer, they are just fine
RK
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.