Marvin Adams
New member
- Joined
- May 12, 2008
- Messages
- 1
- Programming Experience
- 3-5
Hey everyone,
I'm currently rewriting an application from VB6 to VB.NET. I am facing a huge problem with the new Structure concept.
This is my code:
Public Class frmMain
Structure AppInfoStruct
Dim Mode As Integer
Dim Edition As Integer
End Structure
Dim AppInfo As New AppInfoStruct
AppInfo.Mode = 1
End Class
The problem: The IDE underlines the line "AppInfo.Mode = 1" and says: "Declaration expected". What am I doing wrong? I want to use AppInfo as a global variable.
Thanks for your help
Marvin
I'm currently rewriting an application from VB6 to VB.NET. I am facing a huge problem with the new Structure concept.
This is my code:
Public Class frmMain
Structure AppInfoStruct
Dim Mode As Integer
Dim Edition As Integer
End Structure
Dim AppInfo As New AppInfoStruct
AppInfo.Mode = 1
End Class
The problem: The IDE underlines the line "AppInfo.Mode = 1" and says: "Declaration expected". What am I doing wrong? I want to use AppInfo as a global variable.
Thanks for your help
Marvin