اینبار یک پروژه به زبان سی شارپ با نام dis mk32 ایجاد کنید
همان کارکتر ها را به برنامه تون اضافه کنید
یک عدد Progress Bar
یک عدد Button
و یک عدد Timer
به قسمت کدها رفته و تمام کدهای موجود در آن قسمت را پاک کنید و کدهای زیر را به برنامه اضافه کنید.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace dis_mk32
{
public partial class Form1 : Form
{
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern void BlockInput([In, MarshalAs(UnmanagedType.Bool)]bool fBlockIt);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
BlockInput(true);
progressBar1.Increment(+5);
if (progressBar1.Value == 100)
{
timer1.Enabled = false;
BlockInput(false);
progressBar1.Value = 0;
}
}
}
}
توضیحات ریز و درشت از حوصله ام خارجه ولی اگه مشکلی داشتین حتما سوال کنید تا جایی که بتونم کمک میکنم
درباره این سایت