C#µ¥ÊµÀýÔËÐеÄʵÏÖ
Ö÷Ҫͨ¹ýÐÞ¸Äprogram.csÎļþµÄÄÚÈÝÀ´ÊµÏÖ¡£
Ê×ÏÈÔÚÌí¼Ó¼¸¸öÃû¿Õ¼äµÄÒýÓãº
using System.Diagnostics; //ʹÓÃProcess
using System.Runtime.InteropServices; //ʹÓÃDllImport
using System.Reflection; //ʹÓÃAssembly
È»ºóÔÚÒýÈëϵͳAPI £º
[DllImport("User32.dll")]
private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);
[DllImport("User32.dll")]
private static extern bool SetForegroundWindow(IntPtr hWnd);
private const int WS_SHOWNORMAL = 1;
ÔÙÌí¼Ó¼¸¸ö³ÉÔ±º¯Êý£º
public static Process GetPreIns()
{//»ñÈ¡µ±Ç°½ø³Ì¾ä±ú
Process cur= Process.GetCurrentProcess();
Process[] procs = Process.GetProcessesByName(current.ProcessName);
foreach (Process proc in procs )
{ //±éÀú£¬ÒÔ»ñȡǰһʵÀýµÄ¾ä±ú
if (proc .Id != cur.Id) //ºöÂÔÏÖÓеÄÀý³Ì
{
//È·±£Àý³Ì´ÓEXEÎļþÔËÐÐ
Ïà¹ØÎĵµ£º
µÚÒ»ÖÖ·½·¨:
string str="server=.;uid=sa;pwd=111111;database=text_db";//Á¬½Ó×Ö·û´®
SqlConnection SCON = null;//Á¬½Ó¶ÔÏó
&n ......
1.Response.Redirect("http://www.jb51.net",false);
Ä¿±êÒ³ÃæºÍÔÒ³Ãæ¿ÉÒÔÔÚ2¸ö·þÎñÆ÷ÉÏ£¬¿ÉÊäÈëÍøÖ·»òÏà¶Ô·¾¶¡£ºóÃæµÄboolֵΪÊÇ·ñÍ£Ö¹Ö´Ðе±Ç°Ò³¡£
Ìø×ªÏòеÄÒ³Ãæ£¬Ô´°¿Ú±»´úÌæ¡£"
ä¯ÀÀÆ÷ÖеÄURLΪз¾¶¡£
:Response.Redirect·½·¨µ¼ÖÂä¯ÀÀÆ÷Á´½Óµ½Ò»¸öÖ¸¶¨µÄURL¡£µ±Response.Redirect()·½·¨± ......
дcookie
¡¡¡¡1 HttpCookie cookie = new HttpCookie("Info");//¶¨Òåcookie¶ÔÏóÒÔ¼°ÃûΪInfoµÄÏî
¡¡¡¡2 DateTime dt = DateTime.Now;//¶¨Òåʱ¼ä¶ÔÏó
¡¡¡¡3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookieÓÐЧ×÷ÓÃʱ¼ä£¬¾ßÌå²émsdn
¡¡¡¡4 cookie.Expires = dt.Add(ts);//Ìí¼Ó×÷ÓÃʱ¼ä
¡¡¡¡5 cookie.Values.Add("user","cx ......
Paging long articles in ASP.NET using C#
Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that ......
¡¡¡¡SQLite ÊÇÒ»¸öǶÈëʽµÄÁªÏµÊý¾Ý¿âϵͳ£¬ÔËÓÃÊ®·Ö¹ã·º¡£ÔÚһЩÊý¾ÝÁ¿²»´óµÄÔËÓà ³ÌÐòÖУ¬¼ÙÈçÔËÓà SQLite¿ÉÒÔ¼«´óµÄ½µµÍ²¿ÊðʱµÄ¹¤×÷Á¿¡£ ÒªÔÚC#ÖÐÔËÓà SQLiteÒ²ºÜ»ù±¾£¬Ö»ÒªÕÒÒ»¸öC#µÄwrapper¾Í¿ÉÒÔÁË£¬ÀýÈ磬ÎÒÔËÓõľÍÊÇÀ´×Ô
¡¡¡¡http://sqlite.phxsoftware.com/¡¡ µÄÒ»¸ödll£¬System.Data.SQLite. ÏÂÔØÏÂÀ´µÄÎļþÊÇ ......