RE: Little Thing
Bill,
The computer with Win95 did not have a focus problem and was working fine. When I changed an app for Win98 I tested it on the Win95 machine that was using the same app to check for any problems the change would create, but there were none.
Jerry
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 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:
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:
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.
- 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
Little Thing
Collapse
X
-
RE: Little Thing
OK, it's not pertinent to the original issue but here's a hint about naming menus:
Never use "Main Menu". Instead, use "Menu_main".
Two reasons: (1) Using the underscore rather than a space makes it clearer in code and may (slight possibility) save you some trouble later, (2) start all menus with "Menu" so they all appear together and you don't 'lose' them.
EX:
Menu_main
Menu_maintenance
Menu_parts
Menu_somethingorother
Menu_whatever
(Sounds like an item for the new Tips sight!)
Leave a comment:
-
RE: Little Thing
a fix for this was posted a few months ago.
put sys_send_keys("{esc}") at the onintialize event for the beginning form
Leave a comment:
-
RE: Little Thing
Charles,
"Hope this makes sense"
One thing it clarifies is why the problem is present on one of my machines and not on the other. This was quite a piece of detective work.
Thanks for your efforts,
Bill
Leave a comment:
-
RE: Little Thing
I've done some more digging and here's what I've found:
Microsoft introduced this new behavior to prevent an application (like ICQ, or a fax program or a virus) that is not explicitly launched by the user from becoming the active window. If you are typing in Word and ICQ pops up, you end up typing in ICQ, not in Word.
The application that launches then flashes its taskbar icon (3 times by default) indicating this window was denied the privilege to be displayed as foreground window.
This new security feature cannot be disabled from the Windows interface. That is why TweakUI (or editing the registry) is necessary.
There is only one registry setting that turns this on or off. It was originally thought that this worked on Windows 2000 or ME, but it obviously works for Win98se.
All you have to do is modify the ForegroundLockTimeout to enable/disable this new feature. Notice that this key already exists in Win98se/ME/2k. It defaults to PREVENT focus capture.
To ALLOW applications to steal the focus:
HKEY_CURRENT_USER/Control Panel/Desktop
ForegroundLockTimeout: 00 00 00 00
To PREVENT applications from stealing the focus (use appropriate value based on your Windows version):
For Win98se:
HKEY_CURRENT_USER/Control Panel/Desktop
ForegroundLockTimeout: 98 3A 00 00
For Win2k:
HKEY_CURRENT_USER/Control Panel/Desktop
ForegroundLockTimeout: 20 FE 00 00
I don't know the value for WinME.
98 3A 00 00 is 15000 decimal
20 FE 00 00 is 20000 decimal
There is a second key that sets how many times the icon flashes when the app has been prevented from stealing the focus:
ForegroundFlashCount: 0x 00 00 00
In this key, x is the number of times the icon flashes. If x=0, it flashes until the icon is clicked.
My recommendation: Run Regedit and locate the ForegroundLockTimeout key. Export this key and name the reg file Prevent.reg. Now, change this key to 00 00 00 00. Export this key and name it Allow.reg. Now, just double-click Allow.reg to allow focus capture, or double-click Prevent.reg to prevent focus capture.
Hope this makes sense!
Charles
Leave a comment:
-
RE: Little Thing
Like this?
I see. The message compose window is like Notepad. The HTML doesn't show up until the message is posted.
Thank you!!!
Leave a comment:
-
RE: Little Thing
I can understand that! Here's what John Woram, who has written a fantastic book on the Windows Registry, has sto say about this setting:
"If you clear the "Prevent Applications..." box, the window for a background application (say, an incoming fax, etc.) might pop up while you're working on something else. If the box is checked, then the background application window's title bar and/or taskbar icon will simply blink instead, and you might not see if if the app you're working on occupies the full screen. The two radio buttons determine
the behavior of the blink.
John"
I've asked him what does this setting change in the registry. No answer yet.
His explaination explains exactly the behavior I see. From what I can tell, Alpha5 launches, then it launches A5Halt.
Now, if Windows blocks one application from stealing the focus, then when Alpha5 tries to get the focus back from A5Halt, Windows blocks this attempt but flashes the taskbar icon instead.
But, if Windows allows an application to steal the focus, then Alpha5 can get the focus back from A5Halt.
I was wondering what happens if A5Halt.exe is renamed to, say, A5Halt.bxe, so I tried it. Guess what? It works! Alpha5 always has focus when it starts regardless of the Prevent Stealing setting. I do NOT know what side effects this causes, though. (A5Halt.exe is located in the folder where Alpha5 was installed.)
I am anxiously waiting John's response.
Charles
Leave a comment:
-
RE: Little Thing
Jerry,
I don't know. Have to look. It is part of a logon and setup routine so there is lots of stuff happening there.
However, my W95 machine does not have the focus problem so I do not need the code. If I add the code and open the application on this machine I get this problem.
So this prompts me to wonder whether your W95 machine presents the focus issue. If so, we're back to the setup question. Why do some machines have it and others not and can we devise a solution which works cleanly for both classes of machine.
Bill
Leave a comment:
-
RE: Little Thing
Bill,
I use the ESC key idea on Win 95 without a problem. But my first opening form has enter and change restricted since it is only a menu screen. Do you have any OnKey events for the opening form?
Jerry
Leave a comment:
-
RE: Little Thing
Hi Jay,
I discovered a problem with this solution which you should know about.
It works in W98 on the two machines in my office which have the focus problem.
My W95 machine does not have the focus problem. However, the code throws the opening form into change mode.
So I removed the code because of the variability of its consequences.
I haven't tried it on my ME machine.
Bill
Leave a comment:
-
RE: Little Thing
Hi again, Charles,
Thanks very much for your efforts.
My reason for wondering whether we can cut Tweak_ui out of the process is that I am at an educational institution with between 3 and 4k machines. Our tech support people favor standard setups so when a machine fails or is replaced the setup can be ghosted on to it from the network. For example, students always find ways to screw up lab machines. The techs don't debug; they just rebuild--simultaneously--as many machines as they need to. So it would be nice to know the settings.
Of course, we might use tweak_ui on the template machines but I wonder whether settings created with it would transfer cleanly to destination machines which did not have it....
I love windows.
Bill
Leave a comment:
-
RE: Little Thing
HI,
All I have done is to put this on the first form that loads in the on_init:
sys_send_keys("{ESC}")
I know how some people feel about using sys_send_keys, but as my college friend used to say, "It's crude but effective". I don't think he was referring to me, but now that I think about it, I heard him say it alot when I was around. Hmmm.?
Jay Talbott
Leave a comment:
-
RE: Little Thing
To All:
Thanks Again - I've used TweakUI ever since I found it on the first machine I built. I still [quickly] haven't found the 'Focus' thing, but will certainly look into it. I probably should have posted that a sys_send_keys - ESC has worked in the meantime. Like Tom Cone I also have an init that places focus on one of my menu selections.
Jean Bedard - Yes I have a startup form. Real Original name too, 'Main Menu' [pretty creative eh?]
POS with barcode. No it doesn't have it. I did an app in A4 for a guy in St.Louis but it only processed the reading of codes, didn't generate them.
Thanks again to all
Ken the Newbie.
Leave a comment:
Leave a comment: