Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal screen not modal
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00843938
Message ID:
00843947
Views:
20
Why don't you just use the Valid on Text1 to return focus to itself (Return 0)?

If you subclass the Textbox and add an .OldValue property, you can then compare this with the .Value property in the Valid event to see if the contents have changed - if not, don't do anything in the Valid. You'd need to set the .OldValue property to .Value in the subclassed GotFocus event (I think its the GotFocus - I built my set of classes a long time ago so could have the wrong event but close).

I'm heading for Killiney next weekend (I come over to see the missus every other weekend). Got any work for me to do? :)

>Hi.
>I am calling a modal screen but it is not staying on the screen and goes immediately back to the calling screen .
>
>On my calling screen, I have 3 controls , 2 Text Boxes and a Button to call the modal screen.
>
>Calling Form
>------------
>Text1 On the Lost Focus, I have a Thisform.Text1.SetFocus
> depending on circumstances.
>Text1
>cmd1 Do form ModalForm
>
>The problem is , when I load the calling form, it lands on Text1. If I innediately click on cmd1, it loads the modal form and then immedaitely goes back to the calling form, and then I cant get out without rebooting.
>
>If I hit return at Text1 and then select cmd1 button to load the form, there is no problem.
>
>I am assuming that the problem is the Set focus on the Text1 control, which is setting focus back to the calling form and even though the called from is modal, the setfocus over-rides this.
>
>
>Would anybody have any suggestions on a way around this ?
>Regards,
>
>Gerard
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform