473,382 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Menubar access from Borderless Form using Alt+letter?

446 Expert 256MB
Hi
I have been writing Access applications for some years now and have moved away from from the 'Switchboard' type of opening form to using a menubar accross the top of the screen and borderless form used as a 'background', which shows a graphic, revision status & contact details etc

The menu-bar works fine when clicked by a mouse, but beeps when using an Alt+ letter 'acceleration' key, unless another user-form is already open over the top of the background.

I have tracked this down to the fact that the 'background' form does not have a control box (borderless) even though this Property is checked Yes. This begs two questions;-
1. Is this the best way to create a background?
2. Is there a programmatic solution to the issue?

I have tried writing code for the KeyDown event and can detect when the Alt key is pressed (keycode=18), then make the Background form invisible, to pass focus to a dummy form which does have a Control Box, then usually the menu action takes effect, although sometime it need two goes. Not very elegant and negates the purpose of the background form.

I'm trying to write macros initiated by the Ctrl key instead of Alt but this has it's own problems (works ok if the menu action opens a single form but beeps if the menu action is to expand a sub-group), as well as deviating from normal convention.

There must be a simple solution. Anyone know it?
Sep 11 '07 #1
5 3255
NeoPa
32,556 Expert Mod 16PB
This is a very interesting question.
I'm afraid that there is not as much interest in keyboard shortcuts as you may imaging generally. Personally I like the idea and try to use them for preference, but I find I'm in the minority.
Don't expect this to be made easy for you as you're some way off the beaten track here (unfortunately).
I find typically that Alt+letter combinations depend very much on context (in as much as they depend on where the current window is (especially within an application)). If you can find the context where these shortcuts do work then you may get somewhere setting the context where it needs to be on hitting of the Alt key within your code.
I'm afraid I can be little help with this as it's not something I ever felt strongly enough about to swim through the treacle on it.
Good luck though anyway, and if you do get a decent solution then I, for one, would be interested in reading about it.
Sep 19 '07 #2
Denburt
1,356 Expert 1GB
If I found your solution you just might be surprised. First I am a keyboard fanatic I like my shortcut keys and I have never noticed this before especially since I have the control box set to no and a dialog for a border on my form so I played with it some and saw your complaint.

It has been quite a while since I have used custom menus so I had to put this one through the ringer when in code I counted a hit every time so I am not sure your issue there UNLESS.

O.K. drum roll :) Seriously though I found that when I had no control box and I press and hold the alt key while I press the shortcut key it did not work. Although if I pressed the alt key then released it before I hit my shortcut key it worked every time... Try this and let me know, especially since I feel pretty stupid at just realizing this, I noticed it would do this at times but never was able to check it out now I know why I was having my issue does it help yours?

I also noticed that when I press the alt key then release, it bypasses the key down event on my main form altogether. Let me know if this helps in any way and good luck sounds like you will need to add some hot key tips in there somewhere so others will know as well.
Sep 19 '07 #3
ADezii
8,834 Expert 8TB
Hi
I have been writing Access applications for some years now and have moved away from from the 'Switchboard' type of opening form to using a menubar accross the top of the screen and borderless form used as a 'background', which shows a graphic, revision status & contact details etc

The menu-bar works fine when clicked by a mouse, but beeps when using an Alt+ letter 'acceleration' key, unless another user-form is already open over the top of the background.

I have tracked this down to the fact that the 'background' form does not have a control box (borderless) even though this Property is checked Yes. This begs two questions;-
1. Is this the best way to create a background?
2. Is there a programmatic solution to the issue?

I have tried writing code for the KeyDown event and can detect when the Alt key is pressed (keycode=18), then make the Background form invisible, to pass focus to a dummy form which does have a Control Box, then usually the menu action takes effect, although sometime it need two goes. Not very elegant and negates the purpose of the background form.

I'm trying to write macros initiated by the Ctrl key instead of Alt but this has it's own problems (works ok if the menu action opens a single form but beeps if the menu action is to expand a sub-group), as well as deviating from normal convention.

There must be a simple solution. Anyone know it?
Why not incorporate the graphic, revision status, contact details, etc. into a Graphic File and set the Picture Property of the Form to it?
Oct 3 '07 #4
sierra7
446 Expert 256MB
Guys, thanks for responding. Sorry I have not been back sooner.

ADezii, I thought you were implying that there was a 'Picture' attribute that you could set to the application to avoid needing a background form but if so I still can't find it, so I am stuck with my borderless form.

Denburt, you solution really works!!! Hitting the Alt key but NOT HOLDING IT DOWN allows the next key to go to the menu; job done!
'Why' is for another day.

My trial solution of using Ctrl+ a key to initiate a DoCmd.OpenForm from a macro worked but was obviously a non-starter to sell to users. (Incidentally, DoMenuItem overcame the problem I hit, where I needed to open a sub-menu rather than a form)

However, I found that I could use the F-keys (that row at the top of the keyboard that never get used, apart from F1) to fire-off a macro. It looks a bit Retro to put F1, F2 etc in front of your menu options but is very... 'Functional'

This paid off on another project though.

As a final point on keyboard short-cuts (using the Alt key) you will know that you do not see any text on a command button (in Access) if you use a picture. As I use an arrow picture on the buttons to move between records (unbound forms) I found that by setting the Caption to &> allowed the Alt+> combination to move to the next record.

Thanks again for your help.

Thanks for your help again.
Oct 20 '07 #5
NeoPa
32,556 Expert Mod 16PB
Thanks for posting back Sierra. It's always good to have the resolution posted :)
Oct 21 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: W. Enserink | last post by:
hi all, i have this table filled with names. Does anybody know how I can write a select statement which selects all names starting with a certain letter in the alphabet or a strane sign like ...
1
by: paul haine | last post by:
Hi, Let's say I have a paragraph that's using inline styles, like this: <p style="float: left; width: 50%;"> blah blah blah </p> Does anybody know how (or even if it's possible) to use...
6
by: Paul Gorodyansky | last post by:
Hi, Question about event.altKey event.ctrlKey event.shiftKey If I need to catch when a user does say Ctrl+Alt+G - somehow event.altKey is not working, i.e.:
10
by: soup_or_power | last post by:
The pop up window has several checkboxes. I'm unable to access the checkboxes using the handle from window.open. Any way to do this? var display; function showSugg(but_id, sugg1, sugg2, sugg3,...
13
by: HABJAN ®iga | last post by:
I'am using form's keypreview property & keydown (on form) to look for hotkeys (alt+?) Everything works fine, except when i have focus on combobox. Then the event on form isn't raised. Can...
8
by: Luke Matuszewski | last post by:
Hi ! I have faced the problem of checking that the user has entered the unicode letter (not only ASCII set of letters...). It seems that ECMAScript 3rd regular expressions do not include posix...
2
by: rsenal | last post by:
I have buit a website using a template and want to use a contact form for people to submit details which the sends it to my email. My server is set for ASP. Below is the code can with my 2 email...
1
by: Talal Itani | last post by:
I am writing code that accesses an MP3 player plugged to a USB port. The MP3 player is not showing up as a drive letter. With explorer, I see the drive, with it's name, but no drive letter is...
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2 for a Windows application. I have a lable next to a textbox on a form. I would like under-score certain letter in the label text and user can use Alt+letter and the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.