page up command?

BadScript

Registered User.
Local time
Today, 04: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...
 
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.
 
Thanks, you mean an invisible or empty control with a tabstop in the top of the header?
 
I'm not sure invisible would work, but an empty control should.
 
true, i meant transparant, I'll try the empty conrol..
 
Have you tried the sendkeys statement?

SendKeys "{PGUP}"
 
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.
 
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

Back
Top Bottom