Position an image on a form based on screen size in VBA? (1 Viewer)

odin1701

Registered User.
Local time
Today, 13:27
Joined
Dec 6, 2006
Messages
526
Is there a way to calculate where to put an image based on the screen size the person using a database has?

I'd like to position a logo in the top right of a form when it's maximized, based on the size of someone's screen. Is this possible?
 

vbaInet

AWF VIP
Local time
Today, 20:27
Joined
Jan 22, 2010
Messages
26,374
You mean you want to resize the image accordingly based on the height and width of the maximised application?
 

odin1701

Registered User.
Local time
Today, 13:27
Joined
Dec 6, 2006
Messages
526
No, not resize. It's the size I want, I just want to reposition where it's at.
 

vbaInet

AWF VIP
Local time
Today, 20:27
Joined
Jan 22, 2010
Messages
26,374
If it's placed at the top right hand corner of the form (like you mentioned), what kind of repositioning is required?

Can you show us some screenshots?
 

odin1701

Registered User.
Local time
Today, 13:27
Joined
Dec 6, 2006
Messages
526
Because the top right of a maximized form is not the same position on all screen resolutions.

Or is there a way to do relative positioning that I don't know about?
 

vbaInet

AWF VIP
Local time
Today, 20:27
Joined
Jan 22, 2010
Messages
26,374
Alright, I see what you mean.

Move image Left based on the InsideWidth of the form.

Me.InnerWidth - Me.ImageControl.Width
 

Users who are viewing this thread

Top Bottom