資源簡介
使用開源的Gmap.NET控件,采用C#語言,開發(fā)了C/S模式的地圖瀏覽程序。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Runtime.InteropServices;
using?System.Windows.Forms;?
namespace?SPS
{
????class?KillMessageBox
????{
????????????private?string?_caption;
????????????public?void?Show(string?text?string?caption?int?timeout)
????????????{
????????????????this._caption?=?caption;
????????????????StartTimer(timeout);
????????????????MessageBox.Show(text?caption);
????????????}
????????????private?void?StartTimer(int?interval)
????????????{
????????????????Timer?timer?=?new?Timer();
????????????????timer.Interval?=?interval;
????????????????timer.Tick?+=?new?EventHandler(Timer_Tick);
????????????????timer.Enabled?=?true;
????????????}
????????????private?void?Timer_Tick(object?sender?EventArgs?e)
????????????{
????????????????CloseMessageBox();
????????????????//停止計時器???
????????????????((Timer)sender).Enabled?=?false;
????????????}
????????????//此處要用User32.dll而不是coredll.dll!!!?????????
????????????[DllImport(“User32.dll“?EntryPoint?=?“FindWindow“?CharSet?=?CharSet.Auto)]
????????????private?extern?static?IntPtr?FindWindow(string?lpClassName?string?lpWindowName);
????????????[DllImport(“User32.dll“?CharSet?=?CharSet.Auto)]
????????????public?static?extern?int?PostMessage(IntPtr?hWnd?int?msg?IntPtr?wParam?IntPtr?lParam);
????????????public?const?int?WM_CLOSE?=?0x10;
????????????private?void?CloseMessageBox()
????????????{
????????????????//查找MessageBox的彈出窗口注意對應(yīng)標(biāo)題???
????????????????IntPtr?ptr?=?FindWindow(null?this._caption);
????????????????if?(ptr?!=?IntPtr.Zero)
????????????????{
????????????????????//查找到窗口則關(guān)閉???
????????????????????PostMessage(ptr?WM_CLOSE?IntPtr.Zero?IntPtr.Zero);
????????????????}
????????????}
????????}?
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-04-20?16:20??SPS\
?????目錄???????????0??2012-04-20?16:20??SPS\GMap\
?????文件??????139776??2012-04-10?10:58??SPS\GMap\BSE.Windows.Forms.dll
?????文件?????2218496??2012-04-10?10:58??SPS\GMap\GMap.NET.Core.dll
?????文件???????79360??2012-04-10?10:58??SPS\GMap\GMap.NET.WindowsForms.dll
?????文件???????57344??2012-04-10?10:58??SPS\GMap\GMap.NET.WindowsPresentation.dll
?????文件????????4643??2012-04-10?10:58??SPS\GMap\code.txt
?????目錄???????????0??2012-04-20?16:20??SPS\SPS\
?????文件????????1885??2012-04-11?21:44??SPS\SPS\KillMessageBox.cs
?????文件???????22470??2012-04-12?16:20??SPS\SPS\MainForm.Designer.cs
?????文件????????9724??2012-04-13?16:02??SPS\SPS\MainForm.cs
?????文件????????5817??2012-04-12?16:20??SPS\SPS\MainForm.resx
?????文件?????????487??2012-04-10?12:49??SPS\SPS\Program.cs
?????目錄???????????0??2012-04-20?16:20??SPS\SPS\Properties\
?????文件????????1338??2012-04-10?12:44??SPS\SPS\Properties\AssemblyInfo.cs
?????文件????????2856??2012-04-10?12:44??SPS\SPS\Properties\Resources.Designer.cs
?????文件????????5612??2012-04-10?12:44??SPS\SPS\Properties\Resources.resx
?????文件????????1088??2012-04-10?12:44??SPS\SPS\Properties\Settings.Designer.cs
?????文件?????????249??2012-04-10?12:44??SPS\SPS\Properties\Settings.settings
?????文件????????4178??2012-04-13?16:02??SPS\SPS\SPS.csproj
?????文件?????????227??2012-04-11?13:52??SPS\SPS\SPS.csproj.user
?????文件?????????148??2012-04-10?15:02??SPS\SPS\WiFiAP.cs
?????目錄???????????0??2012-04-20?16:20??SPS\SPS\bin\
?????目錄???????????0??2012-04-20?16:20??SPS\SPS\bin\Debug\
?????文件??????139776??2012-04-10?10:58??SPS\SPS\bin\Debug\BSE.Windows.Forms.dll
?????文件?????2218496??2012-04-10?10:58??SPS\SPS\bin\Debug\GMap.NET.Core.dll
?????文件???????79360??2012-04-10?10:58??SPS\SPS\bin\Debug\GMap.NET.WindowsForms.dll
?????文件???????57344??2012-04-10?10:58??SPS\SPS\bin\Debug\GMap.NET.WindowsPresentation.dll
?????文件???????21504??2012-04-13?16:02??SPS\SPS\bin\Debug\SPS.exe
?????文件???????32256??2012-04-13?16:02??SPS\SPS\bin\Debug\SPS.pdb
?????文件???????11608??2012-04-13?16:01??SPS\SPS\bin\Debug\SPS.vshost.exe
............此處省略18個文件信息
評論
共有 條評論