I have a mdi form named Mdi parent.
I have a separate registration form that shows a countdown of the date since installation.
What I want is for the toolstrip on the mdiparent form to disable at the expiration date so the user cannot use the program until it's registered.
I have the code on the registration screen. It is supposed to call the mdiparent form.
I know it's a collection but I don't want to call each button and Not sure that it would work either.
Public Class frmRegister
Private Sub frmregister_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lblCustRef.Text = SL.Reference
Dim Days_Used As Short
If Is_Registered() Then
ExpireLab.Text = "This software is registered"
' Insert code to display the program here
Days_Used = Is_Expired()
If Days_Used = -1 Then
ExpireLab.Text = "Your 30 Day Trial has Expired.You must register to continue."
ExpireLab.ForeColor = System.Drawing.Color.Crimson
' HERE is where I want the mdiparent toolstrip to be disabled. I can't seem to get it to work. The mdiparent gets a null reference when I run the code.
ExpireLab.Text = Str$(Days_Used) & " days of a 30 day trial."
On Error GoTo 0
'MdiParent.Enabled = True
' MdiParent.Visible = True