C
Chad
Hey everyone,
Ok, I am very security consious with my application(s). I am currently
working on an application in which I want to create several "global"
variables available ONLY to my application, some will contain string values,
some will contain data sets. How can I do this (code or a link to working
code would be great!)
Here's the basic outline:
Parent Form:
Public Class frmMain
Inherits System.Windows.Forms.Form
Friend UserBaseRegPath As String
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UserBaseRegPath = "SOFTWARE\\Chad\\MyApplicationTitle"
End Sub
End Class
Child Form:
Module MruListModule
Private m_Form1 As New Form1
Public Property Form1Ref() As Form1
Get
Return m_Form1
End Get
Set(ByVal Value As Form1)
m_Form1 = Value
End Set
End Property
Public Class ChildForm1
Inherits System.Windows.Forms.Form
Private Sub frmChildForm1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
MessageBox.Show("User Path: " & Form1Ref.UserBaseRegPath)
End Sub
End Module
Thanks!
Chad
Ok, I am very security consious with my application(s). I am currently
working on an application in which I want to create several "global"
variables available ONLY to my application, some will contain string values,
some will contain data sets. How can I do this (code or a link to working
code would be great!)
Here's the basic outline:
Parent Form:
Public Class frmMain
Inherits System.Windows.Forms.Form
Friend UserBaseRegPath As String
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
UserBaseRegPath = "SOFTWARE\\Chad\\MyApplicationTitle"
End Sub
End Class
Child Form:
Module MruListModule
Private m_Form1 As New Form1
Public Property Form1Ref() As Form1
Get
Return m_Form1
End Get
Set(ByVal Value As Form1)
m_Form1 = Value
End Set
End Property
Public Class ChildForm1
Inherits System.Windows.Forms.Form
Private Sub frmChildForm1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
MessageBox.Show("User Path: " & Form1Ref.UserBaseRegPath)
End Sub
End Module
Thanks!
Chad