473,807 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SendKey Problems with Vista

JV
I am running a large Access 2000 application (installed using Access Runtime) that uses many VB SendKeys, primarily to expand combo boxes On Enter.

When trying to run it on Vista I get a "Permission denied" (error 70) error whenever entering a combo box. I have already changed the shortcut that starts access and opens the database to "Run as Administrator". I also changes msaccess.exe itself to "Run as Administrator".

I also tried using a macro to execute the SendKey action. It doesn't blow up, but neither does it expand the list.

Anyone else runn across this behavior? Any ideas how to correct it?

TIA,
John
--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Mar 8 '07 #1
7 7685

SendKeys is a problem in any version/OS.
If you can make design changes I would highly recommend replacing them
with something else.
For instance, a combobox has a Dropdown method that does the same
thing.

Mar 8 '07 #2
SendKeys should always, always, always be the tool of last resort! As
storrboy said, for the combo boxes dropdown use the combo box dropdown!

Private Sub YourComboBox_Go tFocus()
YourComboBox.Dr opdown
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

Mar 8 '07 #3
storrboy wrote:
SendKeys is a problem in any version/OS.
If you can make design changes I would highly recommend replacing them
with something else.
For instance, a combobox has a Dropdown method that does the same
thing.
I've used Sendkeys, not in many places, just where MS inhibits a person
from doing something except create a stupid kludge.

For example, there is no way to trap pressing the X button. MS stupidly
processes the BeforeUpdate event which I might want to cancel if the
validation doesn't pass. So MS presents a stupid error message if its
an error 2169 (can't remember what it is). You can use the Unload event
to cancel the close but only for an existing record. If you cancel at
the unload event on a new record, it leaves you with a blank record. I
would think that if I canceled the BeforeUpdate event, the X close event
(not trappable) would abort.

In a couple of places I wanted to remove what the op entered in a text
box in the BeforeUpdate event if it fails validation. I might have
something like
Cancel = True
Me.TextBox1.Und o
SendKeys "{Del}"
and it clears it out. I would think the Undo would clear the data
entered by the op but it doesn't.

I see NO REASON why the OS should stop someone from using Sendkeys.
Sure, there's security reasons. MS has gotten to the point one is
warned about using their own apps to open another of their apps...like
Outlook. For bypassing their security problems I use ClickYes written
by Sue Mosher. http://www.contextmagic.com/express-clickyes/. I wonder
if that too has been disabled.

If I write a program for XYZ Company I think the USER, not MS, should
determine the security. They should be able to tag the apps that are
trusted. So if I give someone a program, since it's not in the trusted
table, it will produce the MS sec warnings. The person tags it as
trusted. Then it doesn't produce the sec warnings. I see no reason for
creating certificates for someone I'm doing custom work for. That puts
the burden on the developer. Put it on the user.
Mar 9 '07 #4
>
If I write a program for XYZ Company I think the USER, not MS, should
determine the security. They should be able to tag the apps that are
trusted. So if I give someone a program, since it's not in the trusted
table, it will produce the MS sec warnings. The person tags it as
trusted. Then it doesn't produce the sec warnings. I see no reason for
creating certificates for someone I'm doing custom work for. That puts
the burden on the developer. Put it on the user.
Spot on.

I did just notice the same kind of behavior while testing my original
response. The KeyPress event seems to be ignored for (at least one of)
the arrow keys.
If KeyCode = vbKeyDown Then Me!Text0.Dropdo wn
works in the KeyDown event but,
If KeyAscii= vbKeyDown Then Me!Text0.Dropdo wn
does not work in the KeyPress event. It just moves to the next control
on the form.

I imagine there will be (are) cases where SendKeys is required, but
luckily I haven't had one, and I would still find away to avoid it
before relenting.

Mar 9 '07 #5
On 8 Mar 2007 14:22:02 -0800, "storrboy" <st******@sympa tico.ca>
wrote:

That method is good, but better yet is to not change the behavior of
basic UI elements. Dropdowns don't dropdown on enter. Trying to make
it so, and YMMV.

-Tom.

>
SendKeys is a problem in any version/OS.
If you can make design changes I would highly recommend replacing them
with something else.
For instance, a combobox has a Dropdown method that does the same
thing.
Mar 9 '07 #6
salad <oi*@vinegar.co mwrote in news:ni1Ih.1054 3$Jl.4566
@newsread3.news .pas.earthlink. net:
storrboy wrote:
>SendKeys is a problem in any version/OS.
If you can make design changes I would highly recommend replacing them
with something else.
For instance, a combobox has a Dropdown method that does the same
thing.
I've used Sendkeys, not in many places, just where MS inhibits a person
from doing something except create a stupid kludge.

For example, there is no way to trap pressing the X button.
Many of us have developed many Access applications since Access 2.0 without
ever using SendKeys. I am one.

Regardless of my long experience I try never to say, "There is no way
.....". I find that, "I have not found a way ...." is likely to be more
accurate.

Almost all of the complaints about not being able to do things with
Access/VBA/JET, and requests for special and unusual procedures that I see,
begin with, "I am in the swamp, having stumbled here without much thought
ot preparation, and I now need the genie of the Access bottle to deal with
the alligators." Sometimes there are genies; more often it's a better plan
to get out of the swamp.
Mar 9 '07 #7
On Thu, 08 Mar 2007 22:01:27 -0700, Tom van Stiphout <no************ *@cox.netwrote:
>That method is good, but better yet is to not change the behavior of
basic UI elements. Dropdowns don't dropdown on enter. Trying to make
it so, and YMMV.

-Tom.
Yet one feels that Microsoft could easily decide to change this behaviour, as
they have with many aspects of the OS UI. Dropdown on hover is the way things
seem to be going.

Mar 10 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
24696
by: baileystuff | last post by:
I have an issue where I have three Cases that SHOULD act the same but don't. If you look at the code below you will see that the general premise is to open a MSWord template and then use SendKey commands to get it to save the file using a new name (NewFName is assigned earlier in the code). A couple of issues to keep in mind. These are MailMerge templates that are attached to a Text Deliminted File (a separate one for each Case, i.e....
0
1853
by: Gunawan | last post by:
Can someone help me how to write console application to sendkey c:>sendkey {ALT}+{TAB} simulate key ALT+TAB TIA Gun
13
3038
by: Mark Rae | last post by:
Hi, On Friday I attended the Microsoft EVO conference in London where they talked about Vista, Office 2007 and Exchange 2007 and how they all work together beautifully, how they were all "people-ready" etc... I asked a couple of questions about Visual Studio.NET on Vista, especially on 64-bit Vista, and they became *very* nervous... To cut a long story short, Microsoft will not support ANY version of Visual
40
3669
by: Spiros Bousbouras | last post by:
Do you have an example of an implementation where sizeof(short int) does not divide sizeof(int) or sizeof(int) does not divide sizeof(long int) or sizeof(long int) does not divide sizeof(long long int) ? Same question for the corresponding unsigned types.
19
2258
by: =?Utf-8?B?TWlrZTk5MDA=?= | last post by:
When there is a shortcut of our app on the desctop, the app is not run until all the security in control panel of win vista is cleared. What to do to not have this problem. We do not want to tell the customers to do this. -- Mike
7
3436
by: =?Utf-8?B?RGF2aWRBdmlzb2Z0?= | last post by:
I support some legacy applications and use both VB6 and VB7 (.net) development environments on a Windows XP computer. The machine is due for replacement. The question is - can I install vb6 and vb.net on a Vista pc? Is it compatible or does the replacement computer need to have XP on it? Does the .net framework 1.1 work OK on Vista?
1
2755
by: wolvenlied | last post by:
I have recently come across a problem in Vista when trying to add it to a network. This is the first time I have had this problem and I haven't found anything relevant on google. I'll try my best to explain the problem: I work for the IT department for all the local schools in my area. 9 schools are connected via one network. We use linux Samba servers and as an extra precaution we don't allow it's name to be visible. On XP it automaticly...
2
1728
by: 13Rockes | last post by:
I am in the process of writing programs using VB6 in XP Pro. However, I am thinking about starting over using VB2005 as my company is migrating to Vista. Two questions... What kinds of problems will I have installing and running my VB6 app under Vista? If I develop VB2005 apps under XP, what kinds of problems will I have
8
1374
by: Ross Culver | last post by:
I'm about to get a new computer for VS2K5 development. Is it ok to get Vista yet or should I stick with XP? Thanks, Ross
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10624
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.