473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

Feb 24 '07 #1
7 1757
RF******@NationalSteel.com wrote:
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
Feb 24 '07 #2
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
<RF******@NationalSteel.comschreef in bericht
news:11**********************@j27g2000cwj.googlegr oups.com...
>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

Feb 24 '07 #3
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.
------------------------------
<RF******@NationalSteel.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
>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

Feb 26 '07 #4
On Feb 24, 9:53 am, RFlem...@NationalSteel.com wrote:
>
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

Feb 27 '07 #5
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.

Feb 27 '07 #6
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:
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.

Feb 27 '07 #7
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:
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

Feb 27 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Brian Henry | last post by:
Visual Basic 2005 Express: http://download.microsoft.com/download/f/c/7/fc7debaf-4513-4300-9e6a-8fe27be88cd1/vbsetup.exe Visual C# 2005 Express:...
16
by: Jesse Liberty | last post by:
I am writing a new book on Visual Basic 2005, targeted at VB6 programmers, and to some degree VB.NET 1.x programmers. I'd like to sign up a (limited) number of volunteers to read the book and...
2
by: elnahrawi | last post by:
Download ebook http://books-download.com/?Book=1487-Visual+Basic+2005+Jumpstart Okay, all you VB6 developers--time's up. As of March 2005, Microsoft no longer supports this version of Visual...
8
by: Zardax | last post by:
Hi !!! I need to know if there is compatibility between VB 6.0 and Visual Basic 2005 Express Everything I need is to compile the VB 6.0 code in Visual Basic 2005 Express without re-write the...
3
by: Pitaridis Aristotelis | last post by:
Is there any way to create setup for a project made in Microsoft Visual Basic 2005 Express Edition
0
by: Jerry Spivey | last post by:
Hi, I'm a SQL Server DBA and I'm trying to get a listing of the SQL Servers on the network. I installed Visual Basic 2005 Express edition and used the SQL Server 2005 ServerInfo sample which...
0
by: ananth | last post by:
Hi all, I am new to Visual Basic 2005,I have a project where in i have to get a List of installed softwares available on a pc and have to get hardware and network information available on a...
1
by: pauloetiago | last post by:
Hello!! We are Paulo and Tiago, two portugueses students. We need to create an application which connect the Visual Basic and the Active Directory. Can you help us in that work? We need the code...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.