Hi there,
This may be a really simple answer. I have got the following error.
'frmTest' is a type in 'PPL' and cannot be used as an expression.
when I click on the error it shows this code:
Code Snippet
Namespace
My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<
Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<
Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.PPL.frmTest
End Sub
End Class
End
Namespace
I use a subMainModule to start my project as so:
Code Snippet
Module
SubMainModule
Public db As New PPLDataContext()
Public Sub Main()
' Create an instance of the Form
Dim clLINQ As New clientsLINQ
Dim personalLedger As New frmTest(clLINQ)
personalLedger.Show()
Application.Run()
End Sub
End Module
The form I am using here is as follows:
Code Snippet
Public
Class frmTest
Private clientLINQ As clientsLINQ
Public Sub New(ByRef clLINQ As Object)
InitializeComponent()
clientLINQ = clLINQ
End Sub
Private Sub btnAccounts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAccounts.Click
Dim accountsDisplay As New frmAccountsDisplay()
'Open the form as a dialog.
accountsDisplay.ShowDialog(
Me)
End Sub
Private Sub btnCLients_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCLients.Click
Dim ClientDisplay As New frmClientsDisplay(clientLINQ)
'Open the form as a dialog.
ClientDisplay.ShowDialog(
Me)
End Sub
End Class
Whats causing this error??
Simon