資源簡介
程序員表白程序,帶音樂,好看動畫
程序員表白程序,帶音樂,好看動畫

代碼片段和文件信息
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.Threading;
using?System.Runtime.InteropServices;
using?System.Reflection;
using?System.IO;
namespace?Love
{
????public?partial?class?love?:?Form
????{
????????int?flag?=?1;
????????int?a?=?0;
????????public?love()
????????{
????????????InitializeComponent();
????????}
????????//文件路徑
????????//public?static?string?path?=?AppDomain.CurrentDomain.baseDirectory?+?@“..\..\wzz.mp3“;
????????///?
????????///?播放MP3格式的音頻文件方法
????????///?
????????///?
????????///?
????????///?
????????///?
????????///?
????????[DllImport(“winmm.dll“?EntryPoint?=?“mciSendString“?CharSet?=?CharSet.Auto)]
????????public?static?extern?int?mciSendString(
????????string?lpstrCommand//Pointer?to?a?null-terminated?string?that?specifies?an?MCI?command?string.?For?a?list?see?Multimedia?Command?Strings.?
????????string?lpstrReturnString//Pointer?to?a?buffer?that?receives?return?information.?If?no?return?information?is?needed?this?parameter?can?be?NULL.
????????int?uReturnLength//Size?in?characters?of?the?return?buffer?specified?by?the?lpszReturnString?parameter.
????????int?hwndCallback);//Handle?to?a?callback?window?if?the?“notify“?flag?was?specified?in?the?command?string.?
????????public?void?PlayMP3(string?path)
????????{
????????????mciSendString(“Open?“?+?path?+?“?alias?wavType“?null?0?0);
????????????mciSendString(“Play?wavType“?null?0?0);
????????}
????????private?void?love_Load(object?sender?EventArgs?e)
????????{
????????????Form.CheckForIllegalCrossThreadCalls?=?false;
????????????Application.DoEvents();
????????????Assembly?assembly?=?GetType().Assembly;
????????????Stream?streamSmall?=?assembly.GetManifestResourceStream(“Love.wzz.MP3“);
????????????int?length?=?(int)streamSmall.Length;
????????????byte[]?bs?=?new?byte[length];
????????????streamSmall.Read(bs?0?length);
????????????File.WriteAllBytes(“C:\\wzz.mp3“?bs);
????????????streamSmall.Close();
????????????PlayMP3(“C:\\wzz.mp3“);
????????}
????????private?void?timer1_Tick(object?sender?EventArgs?e)
????????{
????????????????switch(flag)
????????????????{
????????????????????case?1:
????????????????????????p1.Visible?=?true;
????????????????????????break;
????????????????????case?2:
????????????????????????p2.Visible?=?true;
????????????????????????break;
????????????????????case?3:
????????????????????????p3.Visible?=?true;
????????????????????????break;
????????????????????case?4:
????????????????????????p4.Visible?=?true;
????????????????????????break;
????????????????????case?5:
????????????????????????p5.Visible?=?true;
????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5694??2009-12-06?20:37??Love\Backup\Love\1.ico
?????文件???????5396??2009-12-21?14:55??Love\Backup\Love\Form1.cs
?????文件??????18116??2009-12-09?23:46??Love\Backup\Love\Form1.Designer.cs
?????文件?????410167??2009-12-09?23:46??Love\Backup\Love\Form1.resx
?????文件???????1019??2009-12-10?00:00??Love\Backup\Love\Form2.cs
?????文件???????9161??2009-12-10?00:00??Love\Backup\Love\Form2.Designer.cs
?????文件?????839053??2009-12-10?00:00??Love\Backup\Love\Form2.resx
?????文件???????4534??2009-12-09?22:21??Love\Backup\Love\Love.csproj
?????文件????????484??2009-12-06?01:21??Love\Backup\Love\Program.cs
?????文件???????1346??2009-12-07?11:46??Love\Backup\Love\Properties\AssemblyInfo.cs
?????文件???????2858??2009-12-05?23:10??Love\Backup\Love\Properties\Resources.Designer.cs
?????文件???????5612??2009-12-05?23:10??Love\Backup\Love\Properties\Resources.resx
?????文件???????1089??2009-12-05?23:10??Love\Backup\Love\Properties\Settings.Designer.cs
?????文件????????249??2009-12-05?23:10??Love\Backup\Love\Properties\Settings.settings
?????文件????????902??2009-12-05?23:10??Love\Backup\Love.sln
????..A..H.?????16384??2009-12-21?14:57??Love\Backup\Love.suo
?????文件??????61440??2013-11-05?16:01??Love\Love\bin\Debug\AxInterop.WMPLib.dll
?????文件?????339968??2014-03-18?16:11??Love\Love\bin\Debug\Interop.WMPLib.dll
?????文件????1525760??2014-03-18?16:12??Love\Love\bin\Debug\Love.exe
?????文件????2058627??2013-11-05?15:39??Love\Love\bin\Debug\love.mp3
?????文件??????38400??2014-03-18?16:12??Love\Love\bin\Debug\Love.pdb
?????文件??????11608??2014-03-18?16:55??Love\Love\bin\Debug\Love.vshost.exe
?????文件????????490??2010-03-17?22:39??Love\Love\bin\Debug\Love.vshost.exe.manifest
?????文件???????6741??2013-11-05?16:01??Love\Love\Love.csproj
?????文件????????452??2013-11-05?14:35??Love\Love\Love.csproj.user
?????文件??????67646??2013-11-05?16:00??Love\Love\lover.ico
?????文件???????4254??2013-11-05?15:49??Love\Love\lover1.cs
?????文件??????20180??2013-11-05?15:49??Love\Love\lover1.Designer.cs
?????文件?????415678??2013-11-05?15:49??Love\Love\lover1.resx
?????文件???????1114??2014-03-18?16:12??Love\Love\lover2.cs
............此處省略43個文件信息
- 上一篇:基于單片機89S52的多功能時鐘
- 下一篇:C標準庫源碼及手冊.zip
評論
共有 條評論