However, it appears that support for VB Sendkeys is still lacking. The
latest updates for Windows Vista and Windows 7 appear to support Sendkeys
ONLY if UAC is turned off.
For customers who use an older (VB6) version of our product who still insist
on installing Windows Vista and Windows 7, currently the only solutions we
can offer is to turn UAC off--which is unacceptable for some. This prevents
users from potentially updating thousands of workstations.
So, I hope to discover if and when Microsoft will update Vista and Windows 7
so that VB6 (and Windows Scripting Host) Sendkeys will work as it does with
UAC off.
SendKeys does still work.
Can you explain how it is not working?
Note that you can't "control" application running at a higher privilege
level for security reasons.
Either make your app run at the higher level or drop the process it is
trying to talk to.
--
Dee Earley (dee.e...@icode.co.uk)
i-Catcher Development Team
iCode Systems
See http://vb.mvps.org/samples/SendInput
> For customers who use an older (VB6) version of our product who still insist
> on installing Windows Vista and Windows 7, currently the only solutions we
> can offer is to turn UAC off--which is unacceptable for some. This prevents
> users from potentially updating thousands of workstations.
>
> So, I hope to discover if and when Microsoft will update Vista and Windows 7
> so that VB6 (and Windows Scripting Host) Sendkeys will work as it does with
> UAC off.
Not gonna happen.
--
[.NET: It's About Trust!]
Sendkeys seems to work fine once the EXE is compiled. Alternatively, it
don't work so well in the IDE. But as Karl replied, he has an excellent
alternative to Sendkeys which works fantastic.
ps - don't multi-post. Cross post instead, coz now you have two sets of
replies in two different NGs
On XP (or Vista/Win7 with UAC OFF) the following code in Form1 shows Form2
modally, copies "SAMPLETEXT" from the modal Form2 textbox and pastes it into
the Form1 TextBox. If UAC is ON, it fails (form shown and closed, but no
copying or pasting)...
Private Sub cmdShowForm_Click()
Form2.Show vbModal
End Sub
Private Sub cmdSendKeys_Click()
' Show Modal Form2 via Alt-M accelerator
' Shift-End to select text, Ctrl-C to copy text, Alt-O to click Ok button
SendKeys "%M+{END}^C%O", True
' Set focus back to Form1.Text1 textbox
Me.Text1.SetFocus
' Ctrl-V to paste copied text
SendKeys "***^V***", True
End Sub
"Dee Earley" wrote:
> .
>
"Karl E. Peterson" wrote:
> .
>
Officially, the IDE is no longer supported. The problem only occurs in
the IDE. A+B=?
Anyway, yeah, Paul Yuk told me a few years ago, before I wrote that
SendInput article. If you're wondering who he is:
http://channel9.msdn.com/posts/funkyonex/What-is-Microsofts-Visual-Basic-6-Support-Strategy/
(Note you don't have to load Silverfish to see that video. There are
other formats available, although they go to great lengths to hide
them. See the "Media Downloads" section, down by "Share", below "Tags"
and above "Rating".)
For existing VB6 apps the issue is NOT the IDE, but that an application
running on Vista or Windows 7 with UAC on (whether running "As Administrator"
or not) behaves differently (presumably because SendKeys calls different
underlying functions when UAC is active in order to get around new security
features).
I suppose we have our answer though. Either update the app or do not
install Windows 7 (or Vista) if one intends to activate UAC.
Thanks.
"Karl E. Peterson" wrote:
> .
>
Wow, definitely two fringe cases I hadn't remembered, yeah.
> For existing VB6 apps the issue is NOT the IDE, but that an application
> running on Vista or Windows 7 with UAC on (whether running "As Administrator"
> or not) behaves differently (presumably because SendKeys calls different
> underlying functions when UAC is active in order to get around new security
> features).
So you're seeing differences in an EXE? It's been a few years since I
looked at this, but I thought the main diffs were only within the IDE?
> I suppose we have our answer though. Either update the app or do not
> install Windows 7 (or Vista) if one intends to activate UAC.
I turned it off pretty quick, when I actually started using a system
day-to-day that offered it, yeah.
Wow, definitely two fringe cases I hadn't remembered, yeah.
> For existing VB6 apps the issue is NOT the IDE, but that an application
> running on Vista or Windows 7 with UAC on (whether running "As Administrator"
> or not) behaves differently (presumably because SendKeys calls different
> underlying functions when UAC is active in order to get around new security
> features).
So you're seeing differences in an EXE? It's been a few years since I
looked at this, but I thought the main diffs were only within the IDE?
> I suppose we have our answer though. Either update the app or do not
> install Windows 7 (or Vista) if one intends to activate UAC.
I turned it off pretty quick, when I actually started using a system
day-to-day that offered it, yeah.
--
I'm not sure how he's got his system configgered. Native Sendkeys still
seems to work (as well as expected) under Vista/Win7 in a compiled EXE.
IDE? No go.
For example, with a simple VB6 app containing two forms:
Form1--with a button captioned "&Ok" and a textbox with default Text of
"SAMPLETEXT"
Form2--with buttons cmdShowForm and cmdSendKeys with respective captions
"&Modal Form2" and "&SendKeys".
On XP (or Vista/Win7 with UAC OFF) the following code in Form1 shows Form2
modally, copies "SAMPLETEXT" from the modal Form2 textbox and pastes it into
the Form1 TextBox. If UAC is ON, it fails (form shown and closed, but no
copying or pasting)...
Private Sub cmdShowForm_Click()
Form2.Show vbModal
End Sub
Private Sub cmdSendKeys_Click()
' Show Modal Form2 via Alt-M accelerator
' Shift-End to select text, Ctrl-C to copy text, Alt-O to click Ok button
SendKeys "%M+{END}^C%O", True
' Set focus back to Form1.Text1 textbox
Me.Text1.SetFocus
' Ctrl-V to paste copied text
SendKeys "***^V***", True
End Sub
"C. Kevin Provance" wrote:
> .
>
I think I have those pretty well covered now, if you'd like to
re-download. Definitely appreciate you bringing them to my attention.
I also fixed an issue with chars in the 128-255 range that don't map
directly to the keyboard.
Thanks... Karl
--
.NET: It's About Trust!
"Rob Tuch" <Rob...@discussions.microsoft.com> escribió en el mensaje de
noticias:FFEDCCBB-2C4D-437D...@microsoft.com...
http://visualbasicnetcode.blogspot.com/p/visual-basic-60-gets-run-time-error-70.html
I hope it may help.
> On Monday, December 07, 2009 11:34 AM Rob Tuch wrote:
> Microsoft has committed to support VB6 applications in Vista and Windows 7.
>
> However, it appears that support for VB Sendkeys is still lacking. The
> latest updates for Windows Vista and Windows 7 appear to support Sendkeys
> ONLY if UAC is turned off.
>
> For customers who use an older (VB6) version of our product who still insist
> on installing Windows Vista and Windows 7, currently the only solutions we
> can offer is to turn UAC off--which is unacceptable for some. This prevents
> users from potentially updating thousands of workstations.
>
> So, I hope to discover if and when Microsoft will update Vista and Windows 7
> so that VB6 (and Windows Scripting Host) Sendkeys will work as it does with
> UAC off.
>> On Monday, December 07, 2009 11:45 AM Dee Earley wrote:
>> On 07/12/2009 16:34, Rob Tuch wrote:
>>
>> SendKeys does still work.
>> Can you explain how it is not working?
>>
>> Note that you cannot "control" application running at a higher privilege
>> level for security reasons.
>> Either make your app run at the higher level or drop the process it is
>> trying to talk to.
>>
>> --
>> Dee Earley (dee.e...@icode.co.uk)
>> i-Catcher Development Team
>>
>> iCode Systems
>>> On Monday, December 07, 2009 6:03 PM Karl E. Peterson wrote:
>>> Rob Tuch wrote :
>>>
>>> See http://vb.mvps.org/samples/SendInput
>>>
>>>
>>> Not gonna happen.
>>>
>>> --
>>> [.NET: it is About Trust!]
>>>> On Tuesday, December 08, 2009 4:07 PM C. Kevin Provance wrote:
>>>> |
>>>> | Microsoft has committed to support VB6 applications in Vista and Windows
>>>> 7.
>>>> |
>>>> | However, it appears that support for VB Sendkeys is still lacking. The
>>>> | latest updates for Windows Vista and Windows 7 appear to support Sendkeys
>>>> | ONLY if UAC is turned off.
>>>> |
>>>> | For customers who use an older (VB6) version of our product who still
>>>> insist
>>>> | on installing Windows Vista and Windows 7, currently the only solutions we
>>>> | can offer is to turn UAC off--which is unacceptable for some. This
>>>> prevents
>>>> | users from potentially updating thousands of workstations.
>>>> |
>>>> | So, I hope to discover if and when Microsoft will update Vista and Windows
>>>> 7
>>>> | so that VB6 (and Windows Scripting Host) Sendkeys will work as it does
>>>> with
>>>> | UAC off.
>>>>
>>>> Sendkeys seems to work fine once the EXE is compiled. Alternatively, it
>>>> do not work so well in the IDE. But as Karl replied, he has an excellent
>>>> alternative to Sendkeys which works fantastic.
>>>>
>>>> ps - do not multi-post. Cross post instead, coz now you have two sets of
>>>> replies in two different NGs
>>>>> On Tuesday, December 08, 2009 4:36 PM Rob Tuch wrote:
>>>>> For example, with a simple VB6 app containing two forms:
>>>>> Form1--with a button captioned "&Ok" and a textbox with default Text of
>>>>> "SAMPLETEXT"
>>>>> Form2--with buttons cmdShowForm and cmdSendKeys with respective captions
>>>>> "&Modal Form2" and "&SendKeys".
>>>>>
>>>>> On XP (or Vista/Win7 with UAC OFF) the following code in Form1 shows Form2
>>>>> modally, copies "SAMPLETEXT" from the modal Form2 textbox and pastes it into
>>>>> the Form1 TextBox. If UAC is ON, it fails (form shown and closed, but no
>>>>> copying or pasting)...
>>>>>
>>>>> Private Sub cmdShowForm_Click()
>>>>> Form2.Show vbModal
>>>>> End Sub
>>>>>
>>>>> Private Sub cmdSendKeys_Click()
>>>>> ' Show Modal Form2 via Alt-M accelerator
>>>>> ' Shift-End to select text, Ctrl-C to copy text, Alt-O to click Ok button
>>>>> SendKeys "%M+{END}^C%O", True
>>>>>
>>>>> ' Set focus back to Form1.Text1 textbox
>>>>> Me.Text1.SetFocus
>>>>>
>>>>> ' Ctrl-V to paste copied text
>>>>> SendKeys "***^V***", True
>>>>> End Sub
>>>>>
>>>>>
>>>>>
>>>>> "Dee Earley" wrote:
>>>>>> On Thursday, December 10, 2009 10:37 AM Rob Tuch wrote:
>>>>>> Thanks. Although I assumed that was the case, is that official or just
>>>>>> really unlikely--how do you know?
>>>>>>
>>>>>> "Karl E. Peterson" wrote:
>>>>>>> On Thursday, December 10, 2009 1:15 PM Karl E. Peterson wrote:
>>>>>>> Rob Tuch has brought this to us :
>>>>>>>
>>>>>>> Officially, the IDE is no longer supported. The problem only occurs in
>>>>>>> the IDE. A+B=?
>>>>>>>
>>>>>>> Anyway, yeah, Paul Yuk told me a few years ago, before I wrote that
>>>>>>> SendInput article. If you are wondering who he is:
>>>>>>>
>>>>>>> http://channel9.msdn.com/posts/funkyonex/What-is-Microsofts-Visual-Basic-6-Support-Strategy/
>>>>>>>
>>>>>>> (Note you do not have to load Silverfish to see that video. There are
>>>>>>> other formats available, although they go to great lengths to hide
>>>>>>> them. See the "Media Downloads" section, down by "Share", below "Tags"
>>>>>>> and above "Rating".)
>>>>>>>
>>>>>>> --
>>>>>>> [.NET: it is About Trust!]
>>>>>>>> On Monday, December 14, 2009 11:50 AM Rob Tuch wrote:
>>>>>>>> Your SendInput code seems to work well--with changes to make ~ work as
>>>>>>>> {ENTER} and support escaped } (as in "{}}"). WSH.SendKeys also appears to
>>>>>>>> work, but with either of these, timing differences require some code
>>>>>>>> adjustments.
>>>>>>>>
>>>>>>>> For existing VB6 apps the issue is NOT the IDE, but that an application
>>>>>>>> running on Vista or Windows 7 with UAC on (whether running "As Administrator"
>>>>>>>> or not) behaves differently (presumably because SendKeys calls different
>>>>>>>> underlying functions when UAC is active in order to get around new security
>>>>>>>> features).
>>>>>>>>
>>>>>>>> I suppose we have our answer though. Either update the app or do not
>>>>>>>> install Windows 7 (or Vista) if one intends to activate UAC.
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>> "Karl E. Peterson" wrote:
>>>>>>>>> On Monday, December 14, 2009 4:21 PM Karl E. Peterson wrote:
>>>>>>>>> It happens that Rob Tuch formulated :
>>>>>>>>>
>>>>>>>>> Wow, definitely two fringe cases I had not remembered, yeah.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> So you are seeing differences in an EXE? it is been a few years since I
>>>>>>>>> looked at this, but I thought the main diffs were only within the IDE?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I turned it off pretty quick, when I actually started using a system
>>>>>>>>> day-to-day that offered it, yeah.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> [.NET: it is About Trust!]
>>>>>>>>>> On Monday, December 14, 2009 4:50 PM Karl E. Peterson wrote:
>>>>>>>>>> It happens that Rob Tuch formulated :
>>>>>>>>>>
>>>>>>>>>> Wow, definitely two fringe cases I had not remembered, yeah.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> So you are seeing differences in an EXE? it is been a few years since I
>>>>>>>>>> looked at this, but I thought the main diffs were only within the IDE?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I turned it off pretty quick, when I actually started using a system
>>>>>>>>>> day-to-day that offered it, yeah.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> [.NET: it is About Trust!]
>>>>>>>>>>> On Monday, December 14, 2009 6:57 PM C. Kevin Provance wrote:
>>>>>>>>>>> | So you are seeing differences in an EXE? it is been a few years since I
>>>>>>>>>>> | looked at this, but I thought the main diffs were only within the IDE?
>>>>>>>>>>>
>>>>>>>>>>> I am not sure how he is got his system configgered. Native Sendkeys still
>>>>>>>>>>> seems to work (as well as expected) under Vista/Win7 in a compiled EXE.
>>>>>>>>>>> IDE? No go.
>>>>>>>>>>>>> On Wednesday, December 16, 2009 9:10 PM Karl E. Peterson wrote:
>>>>>>>>>>>>> Rob Tuch submitted this idea :
>>>>>>>>>>>>>
>>>>>>>>>>>>> I think I have those pretty well covered now, if you would like to
>>>>>>>>>>>>> re-download. Definitely appreciate you bringing them to my attention.
>>>>>>>>>>>>> I also fixed an issue with chars in the 128-255 range that do not map
>>>>>>>>>>>>> directly to the keyboard.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks... Karl
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> .NET: it is About Trust!
>>>>>>>>>>>>> http://vfred.mvps.org
>>>>>>>>>>>>>> On Saturday, December 19, 2009 12:51 PM Estefania wrote:
>>>>>>>>>>>>>> noticias:FFEDCCBB-2C4D-437D...@microsoft.com...
Ummm, are you aare you replied to an 18 month old post?
That said, asking a user to apply a band-aid to your app is really not
a very classy thing to do. :-/
--
.NET: It's About Trust!
>>>>>>>>>>>>>> noticias:FFEDCCBB-2C4D-437D...@microsoft.com...