Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

How to control Num Lock

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to control Num Lock

    Hi

    I have a problem with a form that as I tab through the "num lock" turns off and on. More often OFF. I want it on till I manually turn in off.

    There was another discussion of this topic which I was unable to turn up with a search. I did find a note from Sylwyn that referenced a call to windows API -way over my head!

    Anyone found a simple solution, or onarrive or ondepart code that seems to cause num lock to turn off. I use code in both these areas, but have not found a predictable pattern I can solve.

    As always, thank you very much for your help.

    Tom

    #2
    RE: How to control Num Lock

    Upon further research I found the "common link".

    It seems that whenever a field gets activated that has a field rule to use a lookup table, then I add the following script to the onarrive event the numlock key turns off.

    sys_send_keys("{ALT-DOWN}")

    I like the pick list to automatically open on this form only. I tried making the field rules popup conditional with the .T. expression, but it would not automatically open back at the form. So it seems my choices are to either click on the down arrow, or turn off the numlock. No saved key strokes.

    Tom

    Comment


      #3
      RE: How to control Num Lock

      I have this happening, also, but ONLY ONE SOME machines - some operators report it, some don't. And I don't get it on my machine.

      I'm glad you found something that causes it - though; I couldn't find a cause, since it doesn't occur on my development machine.
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


        #4
        RE: How to control Num Lock

        Here's an intermediate solution I use. I haven't seen any effect on my Num Lock key but maybe it's just because my machine isn't susceptible.

        In the form's OnKey event I put:

        IF a_user.key.value = "{F8}"
        a_user.key.handled = .T.
        IF a_user.key.event = "down"
        sys_send_keys( "{ALT-DOWN}" )
        END IF
        END IF

        This allows the user to press the F8 key to activate pop-ups. It seems much easier than using a key combination like Alt-DownArrow.

        I also generally include the F12 key to push my "Done" button and F11 to push my "Find" button. This is done to save touch typists the hassle of going back and forth between mouse and keyboard.

        Comment


          #5
          RE: How to control Num Lock

          Cal - I put the code in field rules for the file, especially if it is a child file - like "Payments" where the operator is filling in payment return fields in an embedded browse - so that as they "arrive" at the field, it does a sys_send_key.
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            RE: How to control Num Lock

            Understood. My suggestion was simply presented as an alternative that was easier than pressing "Alt-DownArrow" but, obviously, not as easy as an automatic pop-up.

            Comment


              #7
              RE: How to control Num Lock

              On further testing, I find that if I compact the databases, update reindexes and reboot the computer, the NUM LOCK key does not turn off after sys_send_keys.

              But after I work with the application awhile, it will start acting up again!@#$

              Thought I had it figured out.

              Tom

              Comment


                #8
                RE: How to control Num Lock

                Tom and Cal - I was fixin' to post another message saying I don't think it is the sys_end_keys altdown as I can't get it to reproduce "on demand" on a client's machine. I think it is slightly more complicated.
                Cole Custom Programming - Terrell, Texas
                972 524 8714
                [email protected]

                ____________________
                "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                Comment


                  #9
                  RE: How to control Num Lock

                  has anyone else had this issue and/or found a remedy?
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment


                    #10
                    RE: How to control Num Lock

                    Martin:

                    Yes, I have had a similar condition, only with the caps lock. The client for whom I designed the application is either un-aware that it exists, or does not experience it.

                    I have not had time to investigate what is causing it, so it sits on a back burner in the back of my mind.

                    The characteristics are similar to yours. The elements involved are embedded browses on forms, and sys_send_keys.

                    I, until your thread a few days ago, assumed my situation to be a unique side effect for "pushing the envelope" for A5 v4.5 build 266.

                    A brief overview:

                    Program used by manufacturer for disassembly/rebuild of a part in need of overhaul. A larger part consists of other smaller parts which need to be disassembled, and single components which make up the parts.

                    Parent record (of set with 3 children) with each child embedded browse on a separate tab. Embedded browse (with no children)On Arrive triggers a script that, based on parent, loads the correct primary disassembly matrix (from a source table) for that part. Double click on lines in the browse to open outside forms with embedded browse with similar On Arrive event script that, in turn, loads sub-disassembly matrix, or component inspection instructions. Double click on any embedded browse line for a single component not needing disassembly opens a dialog box to complete the blank fields in the browse. User has no direct access to alter records in any browse. On closing each subsequent form, the ON Depart writes back to the previous forms matrix an "X" in either the "accept" or "reject" column of the browse.

                    In a sense, all part disassemblies and component inspections are daisy chained together...

                    If my wordy paragraph makes any sense at all(!), then you'll realize that refreshing the forms/screens after each script is crutial, as the data must be refreshed with every double click, and with every form close.

                    The only way I could trigger a guaranteed refresh was to use sys_send_keys("{F5}"). It works, well, but when the scripts are running, I can watch the keyboard and see the caps lock light flashing on and off!

                    Even if I could isolate the problem, trying to send it to Alpha, and describe what had to be done to simulate it would be nearly impossible!

                    I'm just telling you all this to let you know that you are not alone with this one, but I can be of little help at this time.

                    The key criteria for the problem does sound like it involves embedded browses and sys_send_keys(), but I cannot confirm if it is machine specific. I'll keep my eyes open in the future and get back to you. Because it is the num lock for you, and the caps lock for me, I suspect the machine may be a factor.

                    Yea, I know, I'm not a lot of help...

                    Craig

                    Comment


                      #11
                      RE: How to control Num Lock

                      thanks - what's a problem is that for me when the numlock goes off, and they use the key pad, it sends the wrong thing and can cause erratic behavior.
                      Cole Custom Programming - Terrell, Texas
                      972 524 8714
                      [email protected]

                      ____________________
                      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                      Comment


                        #12
                        RE: How to control Num Lock

                        Martin:

                        Yes, I see your problem. My caps lock is no biggee, as all the fields force uppercase anyway. I'm just not crazy about the Christmas tree effect while the script runs...

                        OK, have you considered calling a windows API to set the "virtual" state of the keyboard? I have never tried it, but it could be possible. I don't think it will light the Num Lock LED, but WIndows would respond like the key was pressed, by my understanding...

                        Before you get too excited, though, I haven't had very much luck getting API's to work very well in Alpha, and it might take some time on your part with no success. It is possible you can do it in A5, I just can't guarantee it. There are a couple article's at www.learn alpha.com that show the use of API in Alpha, one for calling graph components, and one for calling zip DLL's.

                        However, if you know someone fluent in Visual Basic (perhaps even for hire), you could package a VBasic solution for it, calling the VBasic compiled .EXE from A5 when needed. If you use an installer, you could install the Vbasic EXE and corresponding DLL files (and the user32.DLL that contains the SetKeyboardState-VK_NUMLOCK api) to flip the toggle for the num lock). I would expect the VBasic deal would take about an hour to create and test thoroughly, maybe less. Based on my use of VBasic, it might add a couple seconds to you script time, and I'm pretty sure it could run invisibly, but again, not positive.

                        I think Ira indicated that he had better luck calling an API in V5 than in V4, but I have no time to confirm this personally, sorry...

                        Just throwing out an idea here, since it sounds like you have no other alternatives... Sorry the solution is such a bandaid...

                        Craig

                        Comment


                          #13
                          RE: How to control Num Lock

                          thanks for your ideas
                          Cole Custom Programming - Terrell, Texas
                          972 524 8714
                          [email protected]

                          ____________________
                          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                          Comment

                          Working...
                          X