Wha'ts wrong with this code 
Author Message
 Wha'ts wrong with this code

In vb 5.0-

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String)

I get a "Bad DLL calling convention error" at the following line:

hwndMT = FindWindow(vbNullString, MsgTitle)

I'm trying to activate a 16-bit application and have tried:

Private Declare Function FindWindow Lib "user" (ByVal lpClassName As Any,
ByVal lpWindowName As Any)

but this gives this same error.  Any ideas?
TIA



Sat, 09 Jun 2001 03:00:00 GMT  
 Wha'ts wrong with this code
The declares need to be set to return a long as it stands the compiler
likley codes it as a variant.

Quote:
>In vb 5.0-

>Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
>lpClassName As String, ByVal lpWindowName As String)

>I get a "Bad DLL calling convention error" at the following line:

>hwndMT = FindWindow(vbNullString, MsgTitle)

>I'm trying to activate a 16-bit application and have tried:

>Private Declare Function FindWindow Lib "user" (ByVal lpClassName As Any,
>ByVal lpWindowName As Any)

>but this gives this same error.  Any ideas?
>TIA



Sat, 09 Jun 2001 03:00:00 GMT  
 Wha'ts wrong with this code

Quote:

> In vb 5.0-

> Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
> lpClassName As String, ByVal lpWindowName As String)

> I get a "Bad DLL calling convention error" at the following line:

> hwndMT = FindWindow(vbNullString, MsgTitle)

> I'm trying to activate a 16-bit application and have tried:

> Private Declare Function FindWindow Lib "user" (ByVal lpClassName As Any,
> ByVal lpWindowName As Any)

> but this gives this same error.  Any ideas?
> TIA

i pute this is module and its working then i dont know whats the prob!

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName
As String, ByVal lpWindowName As String) As Long



Sat, 09 Jun 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Do's and Don'ts of UpdateBatch and Disconnected Recordsets

2. good i'ts working!

3. What's wrong with this code?

4. What's wrong with this code??

5. What's wrong with this OpenDatabase code?

6. What's wrong with this code?

7. What's wrong with this code

8. What's wrong with this code?

9. What's wrong with my code?

10. What's wrong with this code?

11. What's wrong with this Code?

12. What's wrong for my code?

 

 
Powered by phpBB® Forum Software