Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
689 | Jul 30,2002 07:55 AM UTC | Jul 30,2002 10:40 AM UTC | WinForms | 1 |
![]() |
Tags: FAQ |
Private Structure SYSTEMTIME Public wYear As Short Public wMonth As Short Public wDayOfWeek As Short Public wDay As Short Public wHour As Short Public wMinute As Short Public wSecond As Short Public wMilliseconds As Short End Structure Private Declare Function SetSystemTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME) As BooleanThen in a method, use code such as this to set the date.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim lpSystemTime As SYSTEMTIME lpSystemTime.wDay = 12 lpSystemTime.wMonth = 7 lpSystemTime.wYear = 2002 ' Fill the structure and call SetSystemTime(lpSystemTime) End Sub
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.