• 大小: 2.56MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-14
  • 语言: C#
  • 标签:

资源简介

经典C#爱情程序实例 小实例,C#实例编程

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Media;

namespace WindowsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        int j = 0;
        WMPLib.WindowsMediaPlayerClass player1;
        WMPLib.WindowsMediaPlayerClass player2;
        private void button1_Click(object sender EventArgs e)
        {
            if (j == 0)
            {
                pictureBox1.ImageLocation = “2222.gif“;
                player1 = new WMPLib.WindowsMediaPlayerClass();
                player1.URL = “1.wav“;
                player1.play();
                button1.Text = “愿意“;
                button1.Left = 82;
                button2.Visible = true;
                button2.Text = “不愿意“;

            }
            if (j == 1)
            {
                player1.stop();
                player2 = new WMPLib.WindowsMediaPlayerClass();
                player2.URL = “2.wav“;
                player2.play();
                pictureBox1.ImageLocation = “3333.gif“;
                button1.Visible = false;
                button2.Visible = false;
            }
            j++;
        }

        private void button2_MouseEnter(object sender EventArgs e)
        {

            button2.Visible = false;
            button1.Left = 125;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-12-24 02:14  爱情表白\
     目录           0  2011-12-24 02:14  爱情表白\WindowsApplication2\
     文件         932  2011-11-01 10:01  爱情表白\WindowsApplication2.sln
     文件       15872  2011-11-17 14:29  爱情表白\WindowsApplication2.suo
     目录           0  2011-12-24 02:14  爱情表白\WindowsApplication2\bin\
     目录           0  2011-12-24 02:14  爱情表白\WindowsApplication2\bin\Debug\
     文件      542301  2011-11-01 10:21  爱情表白\WindowsApplication2\bin\Debug\1.wav
     文件      225524  2011-11-01 09:13  爱情表白\WindowsApplication2\bin\Debug\1111.gif
     文件      473337  2011-11-01 10:25  爱情表白\WindowsApplication2\bin\Debug\2.wav
     文件      325409  2011-11-01 10:06  爱情表白\WindowsApplication2\bin\Debug\2222.gif
     文件      226705  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\3333.gif
     文件       53248  2011-11-01 08:45  爱情表白\WindowsApplication2\bin\Debug\AxInterop.WMPLib.dll
     文件      290816  2011-11-01 10:01  爱情表白\WindowsApplication2\bin\Debug\Interop.WMPLib.dll
     目录           0  2011-12-24 02:14  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\
     文件      423936  2011-11-01 09:59  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\setup.exe
     文件        5333  2011-11-01 09:59  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2.application
     目录           0  2011-12-24 02:14  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\
     文件       53248  2011-11-01 08:45  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\AxInterop.WMPLib.dll.deploy
     文件        9662  2011-11-01 09:59  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\ico文件.ico.deploy
     文件      290816  2011-11-01 08:45  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\Interop.WMPLib.dll.deploy
     文件       90112  2011-11-01 09:59  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\WindowsApplication2.exe.deploy
     文件        7661  2011-11-01 09:59  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.publish\WindowsApplication2_1_0_0_0\WindowsApplication2.exe.manifest
     文件        1518  2011-11-01 10:01  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.vshost.application
     文件        3910  2011-11-01 10:01  爱情表白\WindowsApplication2\bin\Debug\WindowsApplication2.vshost.exe.manifest
     文件        1490  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.application
     文件       90112  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.exe
     文件        3875  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.exe.manifest
     文件       26112  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.pdb
     文件        1490  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.vshost.application
     文件        5632  2005-12-08 14:51  爱情表白\WindowsApplication2\bin\Debug\爱情表白.vshost.exe
     文件        3875  2011-11-01 10:14  爱情表白\WindowsApplication2\bin\Debug\爱情表白.vshost.exe.manifest
............此处省略34个文件信息

评论

共有 条评论

相关资源