New To Visual Basic 2005 | | |
I am not trying to come across as trying to get all my questions
answered without doing any work, I am just hoping for someone(s) to
suggest the best places and terminology to use when trying to get my
answers.
I am a fairly advanced Visual Basic 6 programmer. I decided to give
VB 2005 a try (I gave up on .net but decided to try again). I picked
a fairly simple program code wise (about 100 lines of code) but one
that uses an activeX control I wrote, several APIs, declares and
types, and a Hook (call back function) for a window.
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
I looked on MSDN and the LpSource is defined as LCPVOID????? That is
where I got stuck. I did searches on VB 2005 API Viewer, and many
others but came up with zero.
I really would like to learn, but I don't have the 5 years it took me
to get where I have been for 4 years now with VB 6. Anyone willing to
through some good books, suggest things I am overlooking like maybe
APIs are not called APIs in VB 2005?? Anyhow I appreciate anyone
willing to point me in a good direction!
Thanks
Ryan | | | | re: New To Visual Basic 2005 RFleming@NationalSteel.com wrote: Quote:
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
Declare Function FormatMessage
Have you tried here: http://www.google.com/search?hl=en&q...e+%22vb.net%22
...? There are lots of pages with a VB.NET-compatible declaration for that
procedure.
--
(O)enone | | | | re: New To Visual Basic 2005
RFleming,
If you want to go on VB6 programming wit VBNet then better is to use VB6.
With VB.Net you will than get worse programs than you would have had with
VB6.
However if you use right VB.Net programming than your program can maybe 10
times as fast and 10 times as small. To start here. http://msdn2.microsoft.com/en-us/library/aa302340.aspx
(it are not real API's but that is for guys like you)
Maybe this as well http://msdn.microsoft.com/library/de...m/dbnetlib.asp
I hope this helps,
Cor
<RFleming@NationalSteel.comschreef in bericht
news:1172332425.649097.325030@j27g2000cwj.googlegr oups.com... Quote:
>I am not trying to come across as trying to get all my questions
answered without doing any work, I am just hoping for someone(s) to
suggest the best places and terminology to use when trying to get my
answers.
>
I am a fairly advanced Visual Basic 6 programmer. I decided to give
VB 2005 a try (I gave up on .net but decided to try again). I picked
a fairly simple program code wise (about 100 lines of code) but one
that uses an activeX control I wrote, several APIs, declares and
types, and a Hook (call back function) for a window.
>
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
>
I looked on MSDN and the LpSource is defined as LCPVOID????? That is
where I got stuck. I did searches on VB 2005 API Viewer, and many
others but came up with zero.
>
I really would like to learn, but I don't have the 5 years it took me
to get where I have been for 4 years now with VB 6. Anyone willing to
through some good books, suggest things I am overlooking like maybe
APIs are not called APIs in VB 2005?? Anyhow I appreciate anyone
willing to point me in a good direction!
>
Thanks
>
Ryan
>
| | | | re: New To Visual Basic 2005
I think what Cor is trying to say, is you should try to figure out how this
is done in VB2005 rather than just trying to convert the VB6 commands.
The converter for converting from VB6 to VB2005 is strictly a syntax thing,
it doesn't tell you anything about methodology.
If you want to read an entertaining and informative book about VB2005,
check out Tim Patrick's Start-to-Finish VB2005. It covers a lot of info, is
humorous, and you build an entire application while you work through the
book.
If you want to learn how to build a 3-layer app, with different layers for
your business layer, data access layer, and UI, check out Deborah Kurata's
new book "Doing Objects in VB2005". This one actually really, really helped
me understand classes and inheritance, and make the jump from VB6 to
VB2005.
Good luck.
Robin S.
------------------------------
<RFleming@NationalSteel.comwrote in message
news:1172332425.649097.325030@j27g2000cwj.googlegr oups.com... Quote:
>I am not trying to come across as trying to get all my questions
answered without doing any work, I am just hoping for someone(s) to
suggest the best places and terminology to use when trying to get my
answers.
>
I am a fairly advanced Visual Basic 6 programmer. I decided to give
VB 2005 a try (I gave up on .net but decided to try again). I picked
a fairly simple program code wise (about 100 lines of code) but one
that uses an activeX control I wrote, several APIs, declares and
types, and a Hook (call back function) for a window.
>
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
>
I looked on MSDN and the LpSource is defined as LCPVOID????? That is
where I got stuck. I did searches on VB 2005 API Viewer, and many
others but came up with zero.
>
I really would like to learn, but I don't have the 5 years it took me
to get where I have been for 4 years now with VB 6. Anyone willing to
through some good books, suggest things I am overlooking like maybe
APIs are not called APIs in VB 2005?? Anyhow I appreciate anyone
willing to point me in a good direction!
>
Thanks
>
Ryan
>
| | | | re: New To Visual Basic 2005
On Feb 24, 9:53 am, RFlem...@NationalSteel.com wrote: Quote:
>
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
As far as API declares go, try pinvoke.net | | | | re: New To Visual Basic 2005 Quote:
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
>
hehe my VB6 is probably about as good as your VB .NET. I'll try anyway
with the "Any" problem:
Is it possible to re-write parts of the API? As I recall, Any was used
for any type in VB6. In VB .NET, the closest you would have is to
declare lpSource as an Object. Object is kind of ugly though, so I try
to use generics when I can.
I have to say, I agree with the others, though, when they say it might
be better to learn the new ways of doing things, rather than convert
old VB6 code. I've been in a couple conversion projects now. I don't
even bother anymore testing the converted code to see if it will
compile, I just start working on ".NET"-ing it right away (as long as
I have a working VB6 version beside me so I can see how it *should*
work).
VB6 and VB .NET are quite different. There is a bit of a learning
curve, but having gone through it, I definitely think it's worthwhile. | | | | re: New To Visual Basic 2005
hey lord zol
if you don't know Vb6 then why don't you STFU instead of flame me when
I speak the truth?
On Feb 27, 10:14 am, lord.zol...@gmail.com wrote: Quote: Quote:
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
> Quote:
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
>
hehe my VB6 is probably about as good as your VB .NET. I'll try anyway
with the "Any" problem:
Is it possible to re-write parts of the API? As I recall, Any was used
for any type in VB6. In VB .NET, the closest you would have is to
declare lpSource as an Object. Object is kind of ugly though, so I try
to use generics when I can.
>
I have to say, I agree with the others, though, when they say it might
be better to learn the new ways of doing things, rather than convert
old VB6 code. I've been in a couple conversion projects now. I don't
even bother anymore testing the converted code to see if it will
compile, I just start working on ".NET"-ing it right away (as long as
I have a working VB6 version beside me so I can see how it *should*
work).
VB6 and VB .NET are quite different. There is a bit of a learning
curve, but having gone through it, I definitely think it's worthwhile.
| | | | re: New To Visual Basic 2005
I would honestly hold off until Visual Fred version 3.0 comes out this
summer.
Seriously here; ADO.net is going to change EVERYTHING
OOP is going to change EVERYTHING
now is not the time to jump on the VB.net train
I've been using VB6 forever; and basic since 1982.
and I won't use .NET until it is a complete replacement for VB
On Feb 24, 7:53 am, RFlem...@NationalSteel.com wrote: Quote:
I am not trying to come across as trying to get all my questions
answered without doing any work, I am just hoping for someone(s) to
suggest the best places and terminology to use when trying to get my
answers.
>
I am a fairly advanced Visual Basic 6 programmer. I decided to give
VB 2005 a try (I gave up on .net but decided to try again). I picked
a fairly simple program code wise (about 100 lines of code) but one
that uses an activeX control I wrote, several APIs, declares and
types, and a Hook (call back function) for a window.
>
I was able to load the project into VB 2005 Express and it converted
it, but has several issues. The first one I came across and cannot
solve is several of my API declares uses Any, for example
>
Declare Function FormatMessage Lib "kernel32" Alias
"FormatMessageA" (ByVal dwFlags As Integer, ByRef lpSource As Any,
ByVal dwMessageId As Integer, ByVal dwLanguageId As Integer, ByVal
lpBuffer As String, ByVal nSize As Integer, ByRef Arguments As
Integer) As Integer
>
I looked on MSDN and the LpSource is defined as LCPVOID????? That is
where I got stuck. I did searches on VB 2005 API Viewer, and many
others but came up with zero.
>
I really would like to learn, but I don't have the 5 years it took me
to get where I have been for 4 years now with VB 6. Anyone willing to
through some good books, suggest things I am overlooking like maybe
APIs are not called APIs in VB 2005?? Anyhow I appreciate anyone
willing to point me in a good direction!
>
Thanks
>
Ryan
|  | Similar Visual Basic .NET bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,501 network members.
|