Hi @SOUBHIK BISWAS ,
Right click your project -> 'Properties' -> 'Resources' -> then save the set time as string.
For Example:
Finally, you can refer to the following code to set Button colour.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")) > Convert.ToDateTime(My.Resources.MyDateTime) Then
BackgroundWorker1.RunWorkerAsync()
End If
End Sub
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Button1.BackColor = Color.Red
End Sub
Hope it could be helpful.
Best Regards,
Xingyu Zhao
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.