Results 1 to 2 of 2

Thread: Several questions

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 1999
    Location
    Auburn Hills, Michigan, U.S.A.
    Posts
    1

    Post

    Hi, I have several questions.
    1. How to make label vertically on the form?
    2. How to get computer time on the form?
    3. How to get the name of which person log on the computer?

    Thanks for any help.


  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    1. You would probably need to copy the contents of a label to a picturebox and then flip it vertically.

    2. To get time you can use VB's Time function, i.e Lable1.Caption = Time

    3. To get UserName:

    Code:
    Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    
    Private Sub Command1_Click()
        Dim strBuffer As String
        
        strBuffer = Space(100)
        Call GetUserName(strBuffer, Len(strBuffer))
        MsgBox strBuffer
    End Sub

    ------------------

    Serge

    Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width