Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro sub and setfocus
Message
 
À
18/07/2000 11:03:16
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00390966
Message ID:
00394036
Vues:
18
I should correct it too that the last line should be instead:

CallByName oSavedForm, "ZOrder", VbMethod, 0

ZOrder is a method not a property.. And the oSavedForm should be "Set oSavedForm"
just to clarify.

Good Luck!
Ed


>Thanks... this looks like an answer I'll need to study for a bit so I can make sure I understand. But thanks a billion!
>
>>VB has Screen.ActiveForm, which will need to be stored in an Object or Variant type for
>>your purpose. Then:
>>
>>oSavedForm = Screen.ActiveForm
>>CallByName oSavedForm, "WindowState", VbLet, 1
>>
>>Or
>>CallByName oSavedForm, "ZOrder", vbLet, 0 ' Bring window to front (setfocus)
>>
>>
>>>I need to do something in VB. I believe I know how I would do it in Fox but can't find the right syntax in VB. What I want to do is keep the name of the active form. Then I'll put a "container" form around my application. The container form is only so I can make sure I have a task bar button (so I don't have to go back and change every form). Whenever someone clicks on the taskbar button I want the container form to fire code that pulls up the truly active form.
>>>
>>>So it's going to be something like:
>>>
>>> activeform = (name of active form)
>>> (user minimizes application)
>>> (user maximizes application)
>>> sub container_form.on_maximize
>>> &activeform.setfocus
>>> end sub
>>>
>>>
>>>Will something like this work in VB? Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform