Click here to Skip to main content
15,884,298 members

Display Username in differnt Form

Mother of 8 asked:

Open original thread
I have a login screen where the user will input their First and Last Name. I would like the first and last name to appear at the top of each screen. Can someone help?

[EDIT]

Here is my code...could you tell me how I can display the username from "loginForm" into this form?

VB
Imports System.ComponentModel


Public Class escalationForm


    Private Sub escalationForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        My.Computer.Audio.Play(My.Resources.Adan, AudioPlayMode.Background)
        'Automatically plays audio file

    End Sub

    Private timer1 As New Timer

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        timer1.Interval = 34000
        timer1.Enabled = True
        AddHandler timer1.Tick, AddressOf Timer1_Tick

    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim f2 As New introTask2
        PrintForm1.Print()
        f2.Show()
        timer1.Enabled = False
        Close()
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        'Displays the First Name, Last Name, Date and Time
        Label9.Text = "Time: " + TimeString
        Label10.Text = "Date: " + DateString
        Label12.Text = "First Name: " + loginForm.TextBox1.Text
        Label11.Text(-"Last Name: " + loginForm)

    End Sub

End Class
Tags: User Controls, Text

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900