找传奇、传世资源到传世资源站!

网红表白程序

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

网红表白程序-你要愿意爱我一辈子吗?
网红表白程序 C#语言基础-第1张using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace 你愿意陪我一辈子吗_
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int x=500, y=300;
        Random random = new Random();//产生随机数
        Point po = new Point();        private void button1_Click(object sender, EventArgs e)
        {
            x = random.Next(Size.Width-button1.Size.Width);
            y = random.Next(Size.Height-button1.Size.Height);
            po = new Point(x, y);            button1.Location = po;
        }        private void button2_Click(object sender, EventArgs e)
        {
            label1.Text = "谢谢你能够陪我一辈子!";
            label1.ForeColor = Color.Red ;
        }        private void Form1_Load(object sender, EventArgs e)
        {
            po = new Point(x,y);
           
            button1.Location = po;
            button1.Text = "不愿意";
            button2.Text = "愿意";
            label1.BackColor = Color.Transparent;
            label1.ForeColor = Color.Yellow;            label1.Text = "你愿意陪伴我一辈子吗?";
        }
    }
}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复