VB s question about the time display is difficult to !!!!!!!!!!!!! Urgent!!!!!!!!!!!!!!!!!!

Updated on technology 2024-02-09
9 answers
  1. Anonymous users2024-02-05

    Use format().

    In the e-text windows is to display English.。

  2. Anonymous users2024-02-04

    now contains all the information you need, and if you want to extract it separately, you can:

    format(now,"yyyy-mm-dd") date.

    format(now,"hh:mm:ss"Time.

  3. Anonymous users2024-02-03

    text1=time 'The time is displayed in the text box.

  4. Anonymous users2024-02-02

    Didn't get an error message?

    1 mounth(date) is wrong should be month(date)2 you are not clicking on the form, the label or textbox on the form, of course, the possibility is relatively small.

    If it doesn't work, you can give me the source**, and I'll help you take a look.

  5. Anonymous users2024-02-01

    = format(date, "YYYYY, mm, dd, day") &format(time, "hh hour mm, minutes ss, seconds")

    You can switch to other controls.

  6. Anonymous users2024-01-31

    Spaces are included, as long as they are within the delimiter.

  7. Anonymous users2024-01-30

    No, spaces are included in the value.

  8. Anonymous users2024-01-29

    In the form home, there is a txt control and a time control.

    **As follows: option explicit

    private sub form_load()= 1000

    trueend sub

    private sub timer1_timer()= date & " " & timeend sub

    Changing to a tag does not have a txt attribute.

  9. Anonymous users2024-01-28

    getforegroundwindow lib "user32" ()as long

    private declare function sendmessage lib "user32" alias "sendmessagea" (byval hwnd as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long

    const wm_syscommand = &h112&

    dim a_time as string

    private sub command1_click()

    a_time = cdate(time)

    trueend sub

    private sub form_load()

    falseend sub

    private sub timer1_timer()

    if time = dateadd("s", val(, a_time) then sendmessage getforegroundwindow, wm_syscommand, sc_monitorpower, 2

    end sub

    Note: You can enter seconds directly into the textbox, for example, if you want to close after 20 seconds, enter 20 and click the button. If you want to click after 30 minutes, enter 30*60=1800.

Related questions
9 answers2024-02-09

The decimal part of the date variable with a value of less than 1 corresponds to the time of day from 0:00:00 to 24:00:00 >>>More

3 answers2024-02-09

Your first one is not a loop statement.

private sub form_click()if i = 0 then >>>More

7 answers2024-02-09

Like a Flowing Year : Describes the passage of time.

Race against time: Don't let go of a minute. Describe making the most of your time. >>>More

11 answers2024-02-09

It's possible that your question was duplicated and deleted! >>>More

6 answers2024-02-09

The second line declares that the textbox control array ** is wrong and does not conform to the syntax specification! >>>More