Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I had a working program in 6, then converted it to .Net and its riddled with problems. the following occured:

 

<vb>

public String strstandard

Public strstandard As String

Dim strstandard As String

</vb>

 

3 different ways of setting it, all returned an error."Statament is not valid in a namespace" how do i sort that out?

 

<vb>

Public Filesystemobject fso

</vb>

 

says an end of statement is expected, it wasnt expected in VB6.

 

<vb>

Public Sub SetFilePaths()

</vb>

 

every sub in the program says "Statament is not valid in a namespace". what the hell does that even mean?

 

:confused: :confused: :confused:

Posted (edited)
In .Net everything must be in classes/modules, use the upgrade wizard but expect nasty results, if you don't understand how to declare a class you should read a guide on VB.Net, VB.Net leans more towards C++ giving much more power with the same ease of use, once you get used to it Edited by AndreRyan
.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
Posted

You need to have all of your declarations and procedures within your class.

 

At the very top of your code view window, it should say "Public Class Form1" or whatever the form is called.

 

all procedures and declarations MUST be typed between that statement and "End Class".

 

If something happened and its not there, copy all your code and start a new project.

 

I start my code just below the grey text "Windows Form Designer generated code"

  • *Experts*
Posted
Don't use the import wizard. It generates very bad code. If you really want to port to .NET properly, rewriting your project is largely required.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...