|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sharing Class Data With Multiple FormsI'm developing an application that has an initial login form. It uses a
user class that checks for a valid user. If the user is valid, it populates public variables in the class, hides the login form and shows the next form. Is there a way to use the variables from the user class in the new form that opens? Thanks, -- Jerry Jerry wrote:
> I'm developing an application that has an initial login form. It uses a If you structure your project so that Sub Main is the startup object,> user class that checks for a valid user. If the user is valid, it > populates public variables in the class, hides the login form and shows > the next form. Is there a way to use the variables from the user class > in the new form that opens? > in the Sub Main code you could fire off your login screen with an: Application.Run(LoginForm) and the LoginForm instance defined in Sub Main becomes a global variable, and all properties in it are also available globally. Of course, the login form would have to open the next form in the chain. "Jerry" <jerrya***@gmail.com> schrieb im Newsbeitrag Simply put the UserClass-ObjectVar Public into a *.bas-Module.news:1152280369.706748.173950@k73g2000cwa.googlegroups.com... > I'm developing an application that has an initial login form. It uses a > user class that checks for a valid user. If the user is valid, it > populates public variables in the class, hides the login form and shows > the next form. Is there a way to use the variables from the user class > in the new form that opens? This way it is visible to all other "Members" (Forms, Classes) in your project. Olaf "Jerry" <jerrya***@gmail.com> wrote in message You have posted this question to both .NET and non-.NET groups. Please news:1152280369.706748.173950@k73g2000cwa.googlegroups.com... > I'm developing an application that has an initial login form. It uses a > user class that checks for a valid user. If the user is valid, it > populates public variables in the class, hides the login form and shows > the next form. Is there a way to use the variables from the user class > in the new form that opens? determine which version of VB you're using and restrict your posts to the appropriate groups. The *.vb.* are for VB6 and earlier. The .NET groups have *.dotnet.* in their names. Jeff Johnson wrote:
> "Jerry" <jerrya***@gmail.com> wrote in message I'm using .NET.> news:1152280369.706748.173950@k73g2000cwa.googlegroups.com... > > > I'm developing an application that has an initial login form. It uses a > > user class that checks for a valid user. If the user is valid, it > > populates public variables in the class, hides the login form and shows > > the next form. Is there a way to use the variables from the user class > > in the new form that opens? > > You have posted this question to both .NET and non-.NET groups. Please > determine which version of VB you're using and restrict your posts to the > appropriate groups. The *.vb.* are for VB6 and earlier. The .NET groups have > *.dotnet.* in their names. I saw various versions of VB being discussed on the general group and thought that .NET was just another version. -- Jerry In article <1152295504.658863.115***@m73g2000cwd.googlegroups.com>,
jerrya***@gmail.com says... .... > I'm using .NET. It's enough different that it's practically a new language; that's why > > I saw various versions of VB being discussed on the general group and > thought that .NET was just another version. there are two sets of NG's. -- Remove the ns_ from if replying by e-mail (but keep posts in the newsgroups if possible).
Alternative to using Bitmap
Really stupid looping problem Regex Output to Textbox Startup speed Urgent! Get rowindex - datagrid navigation Need to capture all keystrokes to my application Difference between MyBase and Me Images in a Windows DataGrid Custom coordinates How open other app from within code? |
|||||||||||||||||||||||