Moved from VB6 to VS2005 and stumped on simple task

K

Kardon Coupé

Dear All,

I'm bemused, I'm moving an application I've written from VB6 into VS2005,
and I'm getting all the fundamentals over before I delve into the hard part,
like getting the forms layout etc....and the simple things, like the 'About'
option, opens another form....

Well here is the problem (which has me stumped)....

My VB6 Application, I click 'About' and it opens a form, from that form,
there is an 'ok' to close that form or 'information' which opens another
form with 'information' on it...

So I tried this in VS2005.....both forms get opened? but the code isn't
telling it too?

Form1 is the main form, Form3 is the About Box and Form2 is the Information
Box, I choose About and Form2 and 3 open....even though the code is

Form3.Show(), there is no reference to opening Form2, so why is form2
deciding to open?

I'm confused....

Also, whilst I'm here, it is getting apparent, VS2005 is much more advanced
that VB6, but on the flip side, so is the MSDN for it...Does anybody know of
any sites that are for beginners for VS2005?

Regards
Paul.
 
A

Armin Zingler

Kardon Coupé said:
Form3.Show(), there is no reference to opening Form2, so why is
form2 deciding to open?

Set a breakpoint in Form2's load event. When the breakpoint is hit,
have a look at the callstack in order to see why it has been opened.
I'm confused....

Also, whilst I'm here, it is getting apparent, VS2005 is much more
advanced that VB6, but on the flip side, so is the MSDN for
it...Does anybody know of any sites that are for beginners for
VS2005?

Can't make a suggestion because [F1]/MSDN libs is always where I look
for information in the first place.


Armin
 
D

David Glienna

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Form2.ShowDialog()
End Sub
End Class
and then this

Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class
 
M

Michel Posseth [MCP]

Kardon Coupé said:
Dear All,

I'm bemused, I'm moving an application I've written from VB6 into VS2005,
and I'm getting all the fundamentals over before I delve into the hard
part, like getting the forms layout etc....and the simple things, like the
'About' option, opens another form....

Well here is the problem (which has me stumped)....

My VB6 Application, I click 'About' and it opens a form, from that form,
there is an 'ok' to close that form or 'information' which opens another
form with 'information' on it...

So I tried this in VS2005.....both forms get opened? but the code isn't
telling it too?

Form1 is the main form, Form3 is the About Box and Form2 is the
Information Box, I choose About and Form2 and 3 open....even though the
code is

Form3.Show(), there is no reference to opening Form2, so why is form2
deciding to open?

I'm confused....

Also, whilst I'm here, it is getting apparent, VS2005 is much more
advanced that VB6, but on the flip side, so is the MSDN for it...Does
anybody know of any sites that are for beginners for VS2005?

Regards
Paul.


If you are looking for good info as a VB6 developer Moving to VB.Net

http://www.amazon.com/Programming-M...bs_sr_1?ie=UTF8&s=books&qid=1209893967&sr=8-1

As a VB6 developer you might remember Francesco as the writer of
"Programming Microsoft Visual basic 6" wich is considered "the" VB6
reference
with the .Net series Francesco is bringing these Core reference guides to
..Net and gives special attention to pre .Net VB coders


HTH

Michel Posseth [MCP]
 
K

kimiraikkonen

"Kardon Coupé" <[email protected]> schreef in bericht

Dear All,
I'm bemused, I'm moving an application I've written from VB6 into VS2005,
and I'm getting all the fundamentals over before I delve into the hard
part, like getting the forms layout etc....and the simple things, like the
'About' option, opens another form....
Well here is the problem (which has me stumped)....
My VB6 Application, I click 'About' and it opens a form, from that form,
there is an 'ok' to close that form or 'information' which opens another
form with 'information' on it...
So I tried this in VS2005.....both forms get opened? but the code isn't
telling it too?
Form1 is the main form, Form3 is the About Box and Form2 is the
Information Box, I choose About and Form2 and 3 open....even though the
code is
Form3.Show(), there is no reference to opening Form2, so why is form2
deciding to open?
I'm confused....
Also, whilst I'm here, it is getting apparent, VS2005 is much more
advanced that VB6, but on the flip side, so is the MSDN for it...Does
anybody know of any sites that are for beginners for VS2005?
Regards
Paul.

If you are looking for good info as a VB6 developer Moving to VB.Net

http://www.amazon.com/Programming-Microsoft-Visual-Basic-2005/dp/0735...

As a VB6 developer you might remember Francesco as the writer of
"Programming Microsoft Visual basic 6" wich is considered "the" VB6
reference
with the .Net series Francesco is bringing these Core reference guides to
.Net and gives special attention to pre .Net VB coders

HTH

Michel Posseth [MCP]

Hi Michel,
BTW, i have Balena's "Programming Visual Basic 2005: The Language"
book but buyers should be aware of that book doesn't cover many high-
level topics such as Windows Forms, ADO.NET, and ASP.NET, GD+,
Remoting, Isolated Storage, Custom Controls, XML, Web Services, Socket
Programming etc. which are all covered in 2003("Programming Microsoft
Visual Basic .NET 2003") version. It's great and valuable book for
experienced programmers from the master Balena, and a revised version
of 2003 without covering the topics described before. I wish there
were all the topics that are included in 2003 version, it's a bit
disappoinment when you think of learning these .NET-related
technologies which are in interaction with VB.NET language.

Thanks,

Onur
 
T

Tom Dacon

Kardon, I'd recommend a book by Dan Appleman called Moving to VB.NET:
Strategies, Concepts, and Code, published by APress in 2001.

Sure this is an old book, published when the very first release of VB.Net
was coming out, but it was designed specifically for the VB6 programmer
who's looking to start into the .Net framework. The framework library has
been through a couple of updates since then - 1.0 to 1.1 to 2 to 3 to 3.5,
but no fundamental changes in the philosophy of the framework or the
language have occurred since it was published, and with the exception of
changes to the Visual Studio IDE's user interface, most of the practices you
go through in development remain the same.

I was coming from VB6 myself, back in the day, and I found it to be a very
useful resource. You'll most likely have good luck finding a used copy in
something like Barnes and Noble's web site's (www.bn.com) used and
out-of-print section. Once you've been through it, you'll be ready for more
advanced texts.

Tom Dacon
Dacon Software Consulting
 
J

Joergen Bech

Also, whilst I'm here, it is getting apparent, VS2005 is much more advanced
that VB6, but on the flip side, so is the MSDN for it...Does anybody know of
any sites that are for beginners for VS2005?

Study these examples:
http://msdn.microsoft.com/en-us/vbasic/ms789075.aspx
Read the code. Anything you do not understand, look it up.
....
Also, find a general reference on object-oriented programming,
if this subject is new to you. You might have been able to avoid
it in VB6, but there is no getting around it in .Net.
....
Have a look at the requirements to become an MCSD in .Net,
e.g. 70-306:
http://www.microsoft.com/learning/mcp/mcsd/requirementsdotnet.mspx
....
I am sure you can find something of interest using this page as
a starting point:
http://msdn.microsoft.com/en-us/vbasic/default.aspx
....
Finally, in addition to all the books that have been written
on the subject over the years, you might find this site of use:
http://www.learnvisualstudio.net/
More than 500 (short) videos covering a huge range of
topics. At little more than $50 (the price of a single book) for
one year's access to all the videos, this is a great resource
if you are just getting started.

/Joergen Bech
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top