从VB6.0设置系统时间和日期 [英] Setting System Time and Date from VB6.0

查看:1273
本文介绍了从VB6.0设置系统时间和日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个问题。是否可以通过在vb6.0中编码来设置(更改/编辑)系统时间和日期?我认为这是不可能的(80%),但也许专家可能有答案 - 我想。

解决方案


嗨专家,我有一个问题。是否可以通过在vb6.0中编码来设置(更改/编辑)系统时间和日期?我认为这是不可能的(80%),但也许专家可能会有答案 - 我想。



我无法找到vb 6的方法但是有一种方法可以使用vb 2005.
Visual Basic 2005

Visual Basic 2005使用Today和TimeOfDay属性替换日期和时间,这些属性使用八字节公共语言运行时(CLR)DateTime结构。这与Visual Basic 2005中的Date数据类型相对应。您可以使用Today和TimeOfDay来设置和获取系统日期和时间。


Visual Basic 2005替换Date


和Time


具有DateString和TimeString属性的函数。您可以使用DateString和TimeString来设置和获取系统日期和时间。

Now和Timer函数由相同名称的只读属性替换。他们的通话顺序保持不变。


圣诞快乐


Hi experts, I have a question. Is it possible to set (change/edit) the system time and date by coding in vb6.0? I think it''s not possible (80%) but maybe experts might have an answer - I suppose.

解决方案

Hi experts, I have a question. Is it possible to set (change/edit) the system time and date by coding in vb6.0? I think it''s not possible (80%) but maybe experts might have an answer - I suppose.

I could not find a way from vb 6 however there is a way using vb 2005.
Visual Basic 2005
Visual Basic 2005 replaces Date and Time with the Today and TimeOfDay properties, which use the eight-byte common language runtime (CLR) DateTime structure. This corresponds with the Date data type in Visual Basic 2005. You can use Today and TimeOfDay to both set and fetch the system date and time.

Visual Basic 2005 replaces the Date


and Time


functions with the DateString and TimeString properties. You can use DateString and TimeString to both set and fetch the system date and time.

The Now and Timer functions are replaced by read-only properties of the same names. Their calling sequences remain unchanged.

Merry Christmas


这篇关于从VB6.0设置系统时间和日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆