Win API Call not working in vb.net app distributed to WIn 98 
Author Message
 Win API Call not working in vb.net app distributed to WIn 98

I wrote a simple app that depends on a GetKeyState
declaration. It seems to work fine on my XP box. However,
after deployment the app installs fine (ie. forms, menus
etc all work fine), but, it doesn't seem to respond to
the keyboard on Windows 98 or Windows NT 4.0 with SP.6a.
I distributed the Dotnetfx.exe package also. Any ideas
are appreciated.....

Jon K.



Sun, 14 Nov 2004 07:00:50 GMT  
 Win API Call not working in vb.net app distributed to WIn 98


Quote:
> I wrote a simple app that depends on a GetKeyState
> declaration. It seems to work fine on my XP box. However,
> after deployment the app installs fine (ie. forms, menus
> etc all work fine), but, it doesn't seem to respond to
> the keyboard on Windows 98 or Windows NT 4.0 with SP.6a.
> I distributed the Dotnetfx.exe package also. Any ideas
> are appreciated.....

How do you have the API call defined?  Here's what I have on file:

<DllImport("user32.dll")> _
Public Shared Function GetKeyState(VirtKey As Integer) As Integer
End Sub

--
Patrick Steele
Microsoft .NET MVP



Wed, 17 Nov 2004 05:04:18 GMT  
 Win API Call not working in vb.net app distributed to WIn 98

Quote:


> > I wrote a simple app that depends on a GetKeyState
> > declaration. It seems to work fine on my XP box. However,
> > after deployment the app installs fine (ie. forms, menus
> > etc all work fine), but, it doesn't seem to respond to
> > the keyboard on Windows 98 or Windows NT 4.0 with SP.6a.
> > I distributed the Dotnetfx.exe package also. Any ideas
> > are appreciated.....

> How do you have the API call defined?  Here's what I have on file:

> <DllImport("user32.dll")> _
> Public Shared Function GetKeyState(VirtKey As Integer) As Integer
> End Sub

Isn't it
Public Shared Function GetKeyState(VirtKey As Integer) As Short
?

Armin



Wed, 17 Nov 2004 05:09:59 GMT  
 Win API Call not working in vb.net app distributed to WIn 98


Quote:
> > How do you have the API call defined?  Here's what I have on file:

> > <DllImport("user32.dll")> _
> > Public Shared Function GetKeyState(VirtKey As Integer) As Integer
> > End Sub

> Isn't it
> Public Shared Function GetKeyState(VirtKey As Integer) As Short

Yeah, it looks like it should be Short.  That's odd -- I've collected
both a C# and a VB.NET sample and they both have the return type as
"Integer".

Thanks!

--
Patrick Steele
Microsoft .NET MVP



Wed, 17 Nov 2004 05:37:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. WIN 2k API vs WIN 98/WIN NT API - Help needed

2. Win 98,Win XP and API

3. Problem printing in Win 95 but not Win 98

4. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

5. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

6. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT

7. QuickBasic not working under WIN-98

8. Default printer fonts for Win '95/98 not working

9. VB 5 on win 98 vs win nt

10. VB.NET app won't work after update to WinXP SP1

11. WIN 98 and VB 6 Database apps.

12. Reports called from VB 6 app in Win 2k do not print

 

 
Powered by phpBB® Forum Software