PDA

Click to See Complete Forum and Search --> : position on form


spandex44
Jan 22nd, 2000, 10:49 PM
Hi,
I am having troubles placing a picture (picAboveMain)in a certain position during run-time. I want it to be exatcly above another picture (picMain). However, I can't say picAboveMain.top = picMain.top because picMain's TOP property changes, and picAboveMain is always changing. I hope you understand what I mean. Any help appreciated.

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com

MartinLiss
Jan 23rd, 2000, 11:31 AM
Since you say "picAboveMain is always changing", what I think you want to do is to place different pictures on your form and you want them to have the same Top as picMain had when the program started. To do that, create a form level (or global) variable called m_intTop (or g_intTop) and in your form's Load event code m_intTop = picMain.Top. Then anytime you want to place the other picture just code picAboveMain.Top = m_intTop. If I've missed the point of your question, please try to explain it in more detail.

------------------
Marty
Can you buy an entire chess set in a pawn shop?

spandex44
Jan 23rd, 2000, 11:37 AM
Hi!
Thank, but I've already tried that, but it doesn't work. The reason is that picAboveMain is in another picture, which means that the top property refers to where it is in relationship to the picture that it's in. PicMain however, is a stand alone object. It is not embedded into any other controls, so therefore, it's top property never changes. I hope you understand now. :)

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com