-
Use format().
In the e-text windows is to display English.。
-
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.
-
text1=time 'The time is displayed in the text box.
-
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.
-
= format(date, "YYYYY, mm, dd, day") &format(time, "hh hour mm, minutes ss, seconds")
You can switch to other controls.
-
Spaces are included, as long as they are within the delimiter.
-
No, spaces are included in the value.
-
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.
-
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.
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
Your first one is not a loop statement.
private sub form_click()if i = 0 then >>>More
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
It's possible that your question was duplicated and deleted! >>>More
The second line declares that the textbox control array ** is wrong and does not conform to the syntax specification! >>>More