Results 1 to 7 of 7

Thread: What file

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344
    Does anyone know what file is the time stored in? Time and date, i thought it was the timedate.cpl file but its not, if you know please let me know. I want the cpu the program is running on to have the same time as another, so when it starts up it would just take that file. So if you can help just let me know.
    -RaY
    VB .Net 2010 (Ultimate)

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Just use the Time and Date keywords:
    Code:
    Debug.Print Date
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guest
    Or if you want both, you can use the Now keyword.
    Code:
    Print Now

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Dim ret As Long
    ret = Shell("rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,/f")

    if you just want to change it
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    Ok

    Lets say if i do that show now function and i get the information to a text file. I know how to read info from the text file but how would i get it to change the current time on a cpu to the one in the text file? Keep in mind i got vb3 so can't use any 32 bit dll's or files. Any suggestions?
    -RaY
    VB .Net 2010 (Ultimate)

  6. #6
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986

    Altering System Date, time

    Use this code to Alter the System Date & Time, I believe without any DLL's, API's or so

    http://www.vb-world.net/tips/tip495.html
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  7. #7
    Hyperactive Member WP's Avatar
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    278

    Format

    just use the Format function:

    Code:
    Temp = Format(Date, "dddd dd mmmm yyyy", vbMonday, vbFirstJan1)
    Temp = Temp & Format(Time, " hh:mm:ss")
    msgbox Temp
    WP

    Visual Basic 6.0 EE SP5 / .Net
    Windows XP

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