Results 1 to 3 of 3

Thread: help pls. im a newbie

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2006
    Posts
    95

    help pls. im a newbie

    how can i add a date and time in a labelbox and how can i know the location of my program

    thanks!!!!

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: help pls. im a newbie

    Here you go

    VB Code:
    1. Label1.Caption = Now() 'Shows date and time
    2. Label2.Caption = App.Path 'Shows the location of your app

  3. #3
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: help pls. im a newbie

    to add a date, use the date function, it returns the current date of your system

    VB Code:
    1. label1.Caption = Date

    to add the time, use the following code

    VB Code:
    1. label2.Caption = format(now,"hh:nn:ss AMPM")

    to view the location of your application, use the App.Path

    VB Code:
    1. msgbox App.Path
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

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