One of two functions doesn't function on Windows 95 (it does work on Windows NT) 
Author Message
 One of two functions doesn't function on Windows 95 (it does work 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



Wed, 18 Jun 1902 08:00:00 GMT  
 One of two functions doesn't function on Windows 95 (it does work on Windows NT)

Got it to work

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

Pete



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. One of two functions doesn't function on Windows 95 (i does 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. Two Virtually Identical Modules, One Works, One doesn't

6. Two similar templates--one works one doesn't

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

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

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

10. Windows Service Calling VB6 dll doesn't work but works with VB6

11. build a search function similar to Microsoft Help in Windows 95

12. Build a search function similar to Microsoft Help in Windows 95

 

 
Powered by phpBB® Forum Software