Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page.Activate and uiEnable
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00847372
Message ID:
00848463
Views:
12
Hi Will,
I'm trying to prevent access to certain pages until the user has logged into a web-site. Page1 has the Log In controls. So if the user clicks on the Page3 tab, I want a messagebox to tell them that they can't get onto that page until they have Logged In, and then put the focus on Page1 where they can Log In.

I tried setting page3.enabled=.F., but then I can't put the messagebox up. Page3.Activate() seems like the most logical place to put it.



>Bill,
>
>What are you trying to do? The page activate event and uienable event fire far too often for placing code in.
>
>There are only certain times you should need to enable a control on a page:
>
>The user clicked on a page tab to TURN a page
>
>or
>
>The cursor is sitting on a page tab and the user hits the arrow left or right key or the page down or page up key.
>
>These are the only times when a user is actually TURNING a page.
>
>>I'm using VFP 7.0
>>
>>Is there any difference between these 2 code samples?
>>
>>......Page3.Activate()
>>  This.myControl.Enabled = Thisform.SomeProperty
>>
>>
>>......Page3.myControl.UIEnable
>>LPARAMETERS lEnable
>>if lEnable
>>  this.Enabled = Thisform.SomeProperty
>>endif
>>
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform