By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,097 Members | 1,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,097 IT Pros & Developers. It's quick & easy.

Help converting VB 6.0 to VB 2005

P: 12
Hi guys

I converted a VB6 project to a VB 2005 project. All went well, but there is an error in this code:

Expand|Select|Wrap|Line Numbers
  1. Private Declare Function SendMessage Lib "user32.dll"  Alias "SendMessageA"(ByVal hwnd As Integer, ByVal Msg As Integer, ByRef wParam As Any, ByRef lParam As Any) As Integer
VS2005 tells me:

Error 1 'As Any' is not supported in 'Declare' statements.

Can someone help me fix this? Thanks
Mar 27 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 149
Hi guys

I converted a VB6 project to a VB 2005 project. All went well, but there is an error in this code:

Expand|Select|Wrap|Line Numbers
  1. Private Declare Function SendMessage Lib "user32.dll"  Alias "SendMessageA"(ByVal hwnd As Integer, ByVal Msg As Integer, ByRef wParam As Any, ByRef lParam As Any) As Integer
VS2005 tells me:

Error 1 'As Any' is not supported in 'Declare' statements.

Can someone help me fix this? Thanks

Hi ,

This type of declaration is not supported in Visual Basic 2005. In VB 6.0 variables of type As Any were often used to pass a variable that was either a string or Null; you will have to replace this Visual Basic 6.0 usage by declaring two forms of the API, one with longs, one with strings.

thanks
ansuman sahu
Mar 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.