Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

vb³£ÓÃÄÚ²¿º¯Êý£¨ËÄ£©£ºËæ»úÊýº¯Êý


rndº¯Êý·µ»Ø»òÕß˵²úÉúÒ»¸öСÓÚ1µ«´óÓÚ»òµÈÓÚ0µÄsingleÀàÐ͵ÄËæ»úÊý¡£
²úÉúËæ»úÊý֮ǰÐèÒªÒ»¸öÖÖ×Ó¡£
·²»Í¬µÄÖÖ×Ó£¬¿ÉʹËæ»úÊýÉú³ÉÆ÷Éú³É²»Í¬µÄËæ»úÊý£»
·ÔÚÒ»¸öÖÖ×ÓÏ£¬Éú³ÉµÄËæ»úÊýÏàͬ¡£
Ëæ»úÊýÉú³ÉÆ÷µÄÓï¾äΪrandomize¡£¸ñʽΪ£ºrandomize[x]¡£
·µ±x>0ʱ£¬Ê¹ÓÃÇ°Ò»´Îµ÷ÓÃrndº¯Êý²úÉúµÄËæ»úÊý×÷Ϊ±¾´Î²úÉúËæ»úÊýµÄÖÖ×Ó¡£Ò»°ãͨ¹ýʹÓøòÎÊý»ñµÃ²»Í¬µÄËæ»úÊýÐòÁС£
·µ±x<0ʱ£¬Ê¹ÓÃx×÷ΪËæ»úÊýÖÖ×Ó£¬ÓÃÓÚ²úÉúÏàͬµÄËæ»úÊýÐòÁС£
·µ±x=0ʱ£¬·µ»Ø×î½üÒ»´Îµ÷ÓÃrndº¯ÊýÉú³ÉµÄËæ»úÊý¡£
·µ±xÊ¡ÂÔʱ£¬µ÷ÓÃrndº¯Êý֮ǰ£¬Èç¹ûûÓÐÖ´ÐÐrandomizeÓï¾ä£¬ÔòÓëx>0µÄÇé¿öÏàͬ¡£·´Ö®£¬Èç¹ûÖ´ÐÐÁËrandomizeÓï¾ä£¬Ôòrndº¯ÊýʹÓÃrandomizeÓï¾äÌṩµÄÐÂÖÖ×ÓÖµ£¬·µ»ØËæ»úÊý¡£
rndº¯Êý²úÉúµÄÊÇ[0£¬1£©Çø¼äÄÚµÄsingleÀàÐÍÊý¾Ý¡£
*&&*Èç¹ûÒªÉú³ÉÆäËûÇø¼äµÄËæ»úÊý»òÕßÓ¢ÎÄ×Öĸ£¬ÔòҪͨ¹ý±í´ïʽÀ´ÊµÏÖ£º
·Éú³É[0£¬x£©Çø¼äµÄËæ»úÊýsingleÀàÐÍÊý¾Ý£¬Ê¹Óñí´ïʽrnd*x
·Éú³É[m£¬n£©Çø¼äµÄËæ»úÊýsingleÀàÐÍÊý¾Ý£¬Ê¹Óñí´ïʽm+rnd*£¨n-m£©
·Éú³É[m£¬n]Çø¼äµÄËæ»úÕûÊý£¬Ê¹Óñí´ïʽint£¨m+rnd*£¨n-m+1£©£©»òÕßʹÓñí´ïʽm+int£¨rnd*£¨n-m+1£©£©
·Éú³ÉÒ»¸öËæ»úµÄ´óдӢÎÄ×Öĸ£¬Ê¹Óñí´ïʽchr£¨int£¨rnd*27£©+65£©
·Éú³ÉÒ»¸öËæ»úµÄСдӢÎÄ×Öĸ£¬Ê¹Óñí´ïʽchr£¨int£¨rnd*27£©+97£©


Ïà¹ØÎĵµ£º

asp.net,c#,vb,vbs,js¸÷¸öÓïÑÔµÄÓÊÏä·¢ËÍÔ´´úÂë

·¢ËͶËÒÔ163ΪÀý
Ò»¡¢asp.net°æ   using System.Web.Mail; //ÃüÃû¿Õ¼äÒýÓà
c#
        MailMessage mail = new MailMessage();
        mail.To = "shadow103@qq.com";  //½ÓÊÜÈ˵ÄÓÊÏä
     & ......

VBÏÂEXECLµÄ²Ù×÷·½·¨

È«Ãæ¿ØÖÆ Excel
Ê×ÏÈ´´½¨ Excel ¶ÔÏó£¬Ê¹ÓÃComObj:
Dim ExcelID as Excel.Application
Set ExcelID as new Excel.Application
1) ÏÔʾµ±Ç°´°¿Ú£º
ExcelID.Visible := True;
2) ¸ü¸Ä Excel ±êÌâÀ¸£º
ExcelID.Caption := 'Ó¦ÓóÌÐòµ÷Óà Microsoft Excel';
3) Ìí¼Óй¤×÷²¾£º
ExcelID.WorkBooks.Add;
4) ´ò¿ªÒÑ´æÔÚµ ......

VBʵÀý —ÍòÄêÀú (3)

Ô­À´µÄ´íÎóÊÇ£ºTimer1µÄEnabledÊôÐÔÉèΪTrue¡£
´úÂë´íÎóÊÇ£º
Private Sub Timer1_Timer()
Dim c As Date
    c = Time
    lbl3.Caption = CStr(c)
End Sub
————————————————&mdas ......

VB Formatº¯Êý

Format[$] ( expr [ , fmt ] )
format ·µ»Ø±äÌåÐÍ
format$ Ç¿ÖÆ·µ»ØΪÎı¾
--------------------------------
Êý×ÖÀàÐ͵ĸñʽ»¯
--------------------------------
    ¹Ì¶¨¸ñʽ²ÎÊý£º
    General Number ÆÕͨÊý×Ö£¬Èç¿ÉÒÔÓÃÀ´È¥µôǧλ·Ö¸ôºÅ
    format$("100 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ