visualstudio2017 C# でwin10のシステム時刻の変更プログラム
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic;
namespace timechangetes
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) { Microsoft.VisualBasic.DateAndTime.TimeString ="8:25:45"; } }
}
https://dobon.net/vb/dotnet/system/setlocaltime.htmlにあるコードをそのまま
上記コードで試しましたが、Microsoft.VisualBasic.DateAndTime部分に赤線がでます。
Microsoft.VisualBasic.dllを参照する記述が必要なのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/03 07:18