However in the case of an index, upper() is not applied to each record. Even in that case functions like upper(), lower() are very fast that you don't care they consume time in (maybe 1 sec load for millions of records). For a moment, think that upper() would be applied to each and every record. Are you implying that in order to take advantage of rushmore I should index everything on upper() Even so, I think doing search by specifying upper() means VFP needs to run an upper() function for every entry in the search scope." I think performance would suffer doing so. "I may be wrong, but I think searching on upper is a big mistake. I agree partially with Don's reply to that ( if you really need to store them uppercased then set format to "!" in your base textbox class and that'd be all - however storing everything uppercased is ugly).
If you have custom textbox class change it, then recompile and you are finished. Change the format to "!" and forget about the other stuff. One property in your textbox is all you need. All the data will be stored as upper() and the index will find everything just fine. No need for Upper in the command as long as the field Format Property is set to "!" for upper. You can store the data as upper if you need to by just changing one property on your textbox class. I may be mistaken, but I think forcing the user to go upper will save me alot of headaches in design, search, query and indexes. Run an upper() function for every entry in the search scope. To take advantage of rushmore I should index everything on upper()Įven so, I think doing search by specifying upper() means VFP needs to I may be wrong, but I think searching on upper is a big mistake. You have wasted much more time waiting for an answer about the wrong way.
Set your code up properly by coding for this, it takes much less time to Code properly. Your searches should be on UPPER() anyway, trying to force caps lock is simply poor design and coding. That is an amazing amount of work for nothing. His Email, turn caps lock off, and then come back to the application, Much easier to just let the user go into caps lock.Īgain: My problem is that the user can minimize the VFP app, go check Know I can make sure everything entered is converted to caps, but its Searching data when the data couldīe entered in Caps, nocaps or any cOmBinaTion is difficult. The original application (And also the VFP converted one) Assumes thatĪll DATA is entered in upper case. PS: If an application wouldn't work because of caps lock is not on then I assume that application woudl never work. He says loop is unnecessary when the next command is enddo. Maybe you didn't understand what Aleniko was saying. LOOP IS FORCE THE USER TO TURN CAPSLOCK ON, IF HE DOES'T DO THEN APPLICATION WILL NOT WORK. DISPLAY A MESSAGE UR APPLICATION WILL NOT WORK WITHOUT CAPSLOCK ON. Don't you thinkĬheck the status of capslock whenever some events occur and if capslock() =. MANY USERS DON'T LIKE CAPS IN THEIR EDIT BOXES BECAUSE IT IS HARD TO READ. Why in the world would you make everything in CapsĪny form field that needs caps should have it set in the format property. You never put a loop where the next command is enddo anyway. I need my entire APPLICATION to turn on caps lock automatically.Īlso, the loop command is entirely meaningless. IN THE FORM LOAD EVENT PUT THE FOLLOWING CODE
Check out "Binding to Windows Message Events" in If your app is using a top-level form, you can probably use that form'sĪctivate and Deactivate method (though I'd have to test to be sure).Īn alternative is to bind the Windows activate and deactivate eventsįor the application. Maybe there is a better way to access the activate of my entire app. Puting this in the activate event of my base form class, but I thought But I am not sure where do Iįind the activate event of my entire application. The start of the app because the user may minimize the app and then get Time the user selects the VFP application. Posted: Visual FoxPro General, Caps lock ON when application activateĬan I trap the 'activate' of my app I want to turn on caps lock every Index ‹ Visual FoxPro ‹ Visual FoxPro General