Need to know which form is active

  • Thread starter Thread starter SamSpade
  • Start date Start date
S

SamSpade

Two instances of a usercontrol on a form ( same usercontrol class on two
forms).
I need to know which control is active.

I've tried using the controls Enter event. Also tried using the controls
WindProc WM_ACTIVATE and WM_ACTIVATEAPP
But still sometimes gctlText ( described next) points to the wrong one.

Any suggestions??


I have
Public gctlText As TextControl

in a module and need to do

gctlText =Me

when a control becomes active so that gctlText always references the active
control.
 
To check the currently active form for an application
Form.ActiveForm (shared property)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top