Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

delay a function on winform

//Your window Constructor
public MyWindow()
{
    InitializeComponent();

    this.Cursor = Cursors.WaitCursor; 
    this.Enabled = false;
    WaitSomeTime();

    //load stuff
    .....
}

public async void WaitSomeTime()
{
    await Task.Delay(5000);
    this.Enabled = true;
    this.Cursor = Cursors.Default; 
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to fill dictionary in c# 
Csharp :: prevent C# app from lingering after closing in background processes 
Csharp :: asp:button onclick not respond 
Csharp :: c# max in 2d array row 
Csharp :: how to detach the camera from the player after death unity 
Csharp :: add dynamic value in startup file in .net core api 
Csharp :: Custom Encrypted String Type 
Csharp :: redsymbol.net exit traps 
Csharp :: C# How to implement IEnumerable<T interface 
Csharp :: convert string csv line to list c# 
Csharp :: linqkit predicatebuilder or and nested combined predicates 
Csharp :: IEqualityComparer gethashcode strings c# 
Csharp :: c# print expression tree 
Csharp :: c# ienumerable unassigned 
Csharp :: c# expandoobject indexer 
Csharp :: f sharp make parameter mutable 
Csharp :: wpf clock conrt 
Csharp :: when should i use struct rather than class in c# 
Csharp :: ado .net nullable int datareader 
Csharp :: asp.net core web api Microsoft.Data.SqlClient.SqlException (0x80131904): 
Csharp :: large blank file C# 
Csharp :: telerik mvc grid scroll 
Csharp :: Store Images In SQL Server Using EF Core And ASP.NET Core 
Csharp :: syncfusion worksheet get last row with value 
Csharp :: c# fileinfo filename without extension 
Csharp :: reference variable from another script "winforms" c# 
Csharp :: enum in method as argument c# 
Csharp :: c# .net set exception data 
Csharp :: move position smoth unity 
Csharp :: how to reset disk permission 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =