winforms - How to make a picture appear after 5 seconds in Microsoft Visual C#? -
I want to show this image timer after 5 seconds, but how to do it, it does not know. So far, I have made an image bounce around this form but I want to show the image after 5 seconds after ranting.
using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Namespace bounce {public partial class form 1: form {int horizon, verte, step; Public Form 1 () {Initialization (); } Private zero timer 1_Tick_1 (object sender, eventArgse E) {// Image timer is taken at every interval of Gublin. Lift = Gabbin. Left + (horizontal * step); Goblin Top = goblin Top + (vert * step); // If the ghost has captured the RHS edge, then if the direction is changed ((ghost + gobin wide)> = (form 1. activiform width-step) horiz = -1; // If the ghost has invaded the LHS edge, then if the direction changes, then correct (if ghost; left; lt; = step) horizon = 1; // If the ghost has moved downward, then if the direction changes ((ghost + goblin hi)> gt; = (form 1. activiform. Hi-step)) vert = -1; // If the ghost has occupied the top edge, then if the direction is changed below (goblin.Top & lt; phase) vert = 1; } Private Zero Form 1_load (Object Sender, EventAgds E) // // To start the form as soon as the form to activate the Ghost // // // // // // Orientation direction; // right vert = 1 going to start; // start going down the steps = 5; Timer1.Enabled = true; }}}}
It should do this.
using System.Timers; // This is where the Timer class keeps the timer five seconds timer = new timer (5000); Five seconds timer. Epiped + = () = & gt; {ShowImageHere}; // It has a low hand five seconds timer. Start ();
Comments
Post a Comment