This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://teratail.com/questions/74554 | |
using System; | |
using System.Windows.Forms; | |
namespace _55216465214655421 | |
{ | |
public partial class Form1 : Form | |
{ | |
private static System.Timers.Timer timer; | |
public Form1() | |
{ | |
InitializeComponent(); | |
var timer = new System.Timers.Timer(); | |
timer.Elapsed += Timer_Elapsed; | |
timer.Interval = 1000; | |
timer.Start(); | |
} | |
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) | |
{ | |
this.Invoke((MethodInvoker)delegate () | |
{ | |
textBox1.Text = Guid.NewGuid().ToString(); | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment