(Type your message here)
--------------------------------
From: josh quisling
user control problem
New to VB.NET
I have an application with 2 usercontrols on a Form called Main
Login and PhoneLog
When the app runs the phonelog is not visable and the login is.
I am able to login and hide the login control but the phonelog control will not change to visable.
I think this is a lack of the proper reference somewhere but I'm not sure.
I get an error on the Debug for this line of code inside the Login control.
****The Following code is from the Usercontrol Login:*******
Public Function AuthOK()
Me.Hide()
Dim frmMain As Main
frmMain.PhoneLog1.Visible = True '**** This code breaks
End Function
*****************************************
This is the Error:
An unhandled exception of type 'System.NullReferenceException' occurred in ManagementSystem.exe
Additional information: Object reference not set to an instance of an object.
*****************************************
Please Help
Josh
Here are my Imports and Inherits
Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Security.Cryptography
Imports System.Text
Imports System.Text.RegularExpressions
Inherits System.Windows.Forms.UserControl
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>2uiyJSudAkawRqvcPr3XIA==</Id>