|
-
December 19th, 1999, 06:33 AM
#1
How to get the .right and .bottom property of a picture box
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
-
December 19th, 1999, 08:55 AM
#2
Re: How to get the .right and .bottom property of a picture box
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
[email protected]
(in VB from 11/1999)
-
December 19th, 1999, 09:33 PM
#3
Re: How to get the .right and .bottom property of a picture box
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
-
December 20th, 1999, 03:14 AM
#4
Re: How to get the .right and .bottom property of a picture box
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
[email protected]
(in VB from 11/1999)
-
December 20th, 1999, 07:49 AM
#5
Re: How to get the .right and .bottom property of a picture box
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|