One of two functions doesn't function on Windows 95 (i does on Windows NT) 
Author Message
 One of two functions doesn't function on Windows 95 (i does on Windows NT)

Hi,

I have problem with folowing code on Windows 95, although it works on
Windows NT !?!

This code is give you an idea of what I'm plnning to do:

  'Execute MSDE Uninstall app
  Cmd = GetWinDir & "\IsUninst.exe -m" & GetWinDir &
"\sql70.mif -f""C:\MSSQL7\uninst.isu"" -C""C:\MSSQL7\sqlsun.dll"""

  Shell Cmd, vbMinimizedNoFocus

 'Here I'm waiting for the uninstall program to show
  While FindWindow(vbNullString, "Confirm File Deletion") = 0
    Sleep 100
    DoEvents
  Wend

 'Ok I found the messagebox , the messagebox contains a Yes-button which is
default and has a hotkey Alt-Y, now I want to send both Alt-Y and the
Enter-key
 just to be sure I hit the Yes-button!

  lHandle = FindWindow(vbNullString, "Confirm File Deletion")   'I fetch the
handle of the window
  SendMessage lHandle, WM_SETFOCUS, 0&, 0&   ' I let the form have the focus
  SendKeys "%Y" , True       'Send Alt-Y to press the Yes-button
  SendKeys "{ENTER}" , True    'Just to be sure, I slam the enter key at the
form

  I pass here but the form is still there, like I said it works on Windows
NT , I don't know what doesn't work, the SendMessage with the setfocus
clause, or the   SendKeys

  While FindWindow(vbNullString, "Remove Programs From Your Computer") = 0
'This loop 'hangs' because the first form is still visible
     Sleep 1000
     DoEvents
  Wend

Anyone can help me out ?

Thanks in advance,

Pete



Sat, 05 Oct 2002 03:00:00 GMT  
 One of two functions doesn't function on Windows 95 (i does on Windows NT)
InstallShield's Knowledge Base might provide a better choice than SendKeys:

HOWTO: Suppressing the Confirmation Message Displayed When unInstallShield
Initializes
Document ID: Q104222
http://support.installshield.com/kb/default.asp?DocumentNumber=Q104222

--
Paul Little, Senior Programmer/Analyst
SVi Retail Systems
San Diego, CA


Quote:
> Hi,

> I have problem with folowing code on Windows 95, although it works on
> Windows NT !?!

> This code is give you an idea of what I'm plnning to do:

>   'Execute MSDE Uninstall app
>   Cmd = GetWinDir & "\IsUninst.exe -m" & GetWinDir &
> "\sql70.mif -f""C:\MSSQL7\uninst.isu"" -C""C:\MSSQL7\sqlsun.dll"""

>   Shell Cmd, vbMinimizedNoFocus

>  'Here I'm waiting for the uninstall program to show
>   While FindWindow(vbNullString, "Confirm File Deletion") = 0
>     Sleep 100
>     DoEvents
>   Wend

>  'Ok I found the messagebox , the messagebox contains a Yes-button which
is
> default and has a hotkey Alt-Y, now I want to send both Alt-Y and the
> Enter-key
>  just to be sure I hit the Yes-button!

>   lHandle = FindWindow(vbNullString, "Confirm File Deletion")   'I fetch
the
> handle of the window
>   SendMessage lHandle, WM_SETFOCUS, 0&, 0&   ' I let the form have the
focus
>   SendKeys "%Y" , True       'Send Alt-Y to press the Yes-button
>   SendKeys "{ENTER}" , True    'Just to be sure, I slam the enter key at
the
> form

>   I pass here but the form is still there, like I said it works on Windows
> NT , I don't know what doesn't work, the SendMessage with the setfocus
> clause, or the   SendKeys

>   While FindWindow(vbNullString, "Remove Programs From Your Computer") = 0
> 'This loop 'hangs' because the first form is still visible
>      Sleep 1000
>      DoEvents
>   Wend

> Anyone can help me out ?

> Thanks in advance,

> Pete



Sat, 05 Oct 2002 03:00:00 GMT  
 One of two functions doesn't function on Windows 95 (i does on Windows NT)

Got it to work

I was sending Alt-Y to a &J button ;-)

Pete



Sun, 06 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. One of two functions doesn't function on Windows 95 (it does work on Windows NT)

2. Application runs with Windows 95/NT, but doesn't work with Windows 98

3. it's work with windows NT not with Windows 95

4. How to simulate the FIND function of Windows '95

5. VB4 and Wang's Imaging OCX for Windows '95/NT

6. If you are using Windows 95 or Windows NT

7. Intersolv MultiLink/VB doesn't run under Windows 95

8. Windows NT Password Change From Windows 95 Client

9. Windows 95 vs. Windows NT Registry updates

10. Intersolv MultiLink/VB doesn't run under Windows 95

11. Ottawa/Hull Hiring Windows 95 / Windows NT PROGRAMMERS!!!

12. Application Crashes on Windows 95 - Works Fine on Windows NT Workstation

 

 
Powered by phpBB® Forum Software