page up command? (1 Viewer)

BadScript

Registered User.
Local time
Today, 00:00
Joined
Oct 30, 2007
Messages
73
I have a form that's a bit too large for my monitor (I know, bad practise).. Whenever I tab through my controls it doesn't show the header anymore. Because of this a warning message in the header is not visible anymore.
Is it possible to give a page up command with VB in the onfocus property?

I searched this forum a couple of times but could not find an answer to my question...
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:00
Joined
Aug 30, 2003
Messages
36,133
I'm not sure about a page up command, but setting focus to a control at the top should accomplish the same goal. If the form is that big, you might consider a tab control to keep the whole form on screen.
 

BadScript

Registered User.
Local time
Today, 00:00
Joined
Oct 30, 2007
Messages
73
Thanks, you mean an invisible or empty control with a tabstop in the top of the header?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:00
Joined
Aug 30, 2003
Messages
36,133
I'm not sure invisible would work, but an empty control should.
 

BadScript

Registered User.
Local time
Today, 00:00
Joined
Oct 30, 2007
Messages
73
true, i meant transparant, I'll try the empty conrol..
 

KeithG

AWF VIP
Local time
Today, 00:00
Joined
Mar 23, 2006
Messages
2,592
Have you tried the sendkeys statement?

SendKeys "{PGUP}"
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:00
Joined
Aug 30, 2003
Messages
36,133
I would add a cautionary note. SendKeys can cause problems if the active Window object isn't what you think it will be at the point the code runs. It sends keystrokes to the active object. I'm not saying not to use it, but personally it would be my last option.
 

KeithG

AWF VIP
Local time
Today, 00:00
Joined
Mar 23, 2006
Messages
2,592
I definetly agree. You could try and add an AppActivate before the sendkeys call to make sure your form has focus.
 

Users who are viewing this thread

Top Bottom