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

vb³£ÓÃ×Ö·û´®´¦Àíº¯Êý

1. ASC(X)£¬Chr(X)£º×ª»»×Ö·û×Ö·ûÂë   
[¸ñʽ]£º   
P=Asc(X) ·µ»Ø×Ö·û´®XµÄµÚÒ»¸ö×Ö·ûµÄ×Ö·ûÂë   
P=Chr(X) ·µ»Ø×Ö·ûÂëµÈÓÚXµÄ×Ö·û   
[·¶Àý]£º   
(1)P=Chr(65)   
‘ Êä³ö×Ö·ûA,ÒòΪAµÄASCIIÂëµÈÓÚ65   
(2)P=Asc(“A”)   
‘ Êä³ö65   
2. Len(X)£º ¼ÆËã×Ö·û´®XµÄ³¤¶È   
[¸ñʽ]£º   
P=Len(X)   
[˵Ã÷]£º   
¿Õ×Ö·û´®³¤¶ÈΪ0£¬¿Õ¸ñ·ûÒ²ËãÒ»¸ö×Ö·û£¬Ò»¸öÖÐÎÄ×ÖËäȻռÓÃ2 Bytes£¬µ«Ò²ËãÒ»¸ö×Ö·û¡£   
[·¶Àý]£º   
(1) ÁîX=”” (¿Õ×Ö·û´®)   
Len(X) Êä³ö½á¹ûΪ0   
(2) ÁîX=”abcd”    
Len(X) Êä³ö½á¹ûΪ4   
(3) ÁîX=”VB½Ì³Ì”   
Len(X) Êä³ö½á¹ûΪ4   
3. Mid(X)º¯Êý£º¶ÁÈ¡×Ö·û´®XÖмäµÄ×Ö·û   
[¸ñʽ]£º   
P=Mid(X,n)   
ÓÉXµÄµÚn¸ö×Ö·û¶ÁÆ𣬶ÁÈ¡ºóÃæµÄËùÓÐ×Ö·û¡£   
P=Mid(X,n,m)   
ÓÉXµÄµÚn¸ö×Ö·û¶ÁÆ𣬶ÁÈ¡ºóÃæµÄm¸ö×Ö·û¡£   
[·¶Àý]£º   
(1) X=”abcdefg”   
P=Mid(X,5)   
½á¹ûΪ£ºP=”efg”   
(2) X=”abcdefg”   
P=Mid(X,2,4)   
½á¹ûΪP=”bcde”   
4. Replace: ½«×Ö·û´®ÖеÄijЩÌض¨×Ö·û´®Ì滻ΪÆäËû×Ö·û´®   
[¸ñʽ]£º   
P=Replace(X,S,R)   
[˵Ã÷]£º½«×Ö·û´®XÖеÄ×Ö·û´®SÌ滻Ϊ×Ö·û´®R£¬È»ºó·µ»Ø¡£   
[·¶Àý]£º   
X=”VB is very good”   
P=Replace(X,good,nice)   
Êä³ö½á¹ûΪ£ºP=”VB is very nice”   
5. StrReverse£º·´×ª×Ö·û´®   
[¸ñʽ]£º   
P=StrReverse(X)   
[˵Ã÷]£º   
·µ»ØX²ÎÊý·´


Ïà¹ØÎĵµ£º

VB ÖÐÑÕÉ«»¥Ïàת»»µÄÁ½¸öСº¯Êý(REGºÍ VBÑÕ)

VBÑÕÉ«ºÍRGBÉ«»¥Ïàת»»Í·ÌÛÁËÎÒºÃÒ»¶Îʱ¼ä,Èç½ñÕÒµ½½â¾ö°ì·¨ÁË
ÌرðÌù³öÀ´Óë´ó¼Ò¹²Ïí 
Type RGB
    Red As String
    Green As String
    Blue As String
End Type
Public Function ColorToRGB(ByVal dwColor As Long) As RGB
    Dim clrHex ......

VBÖд°ÌåÄ£¿é¡¢±ê׼ģ¿é¡¢ÀàÄ£¿éµÄÇø±ð

VBµÄ´úÂë´æ´¢ÔÚÄ£¿éÖС£ÔÚVBÖÐÌṩÁËÈýÖÖÀàÐ͵ÄÄ£¿é£º´°ÌåÄ£¿é¡¢±ê׼ģ¿éºÍÀàÄ£¿é¡£
¡¡¡¡¼òµ¥µÄÓ¦ÓóÌÐò¿ÉÒÔÖ»ÓÐÒ»¸ö´°Ì壬ËùÓõijÌÐò¶¼×¤ÁôÔÚ´°ÌåÄ£¿éÖУ¬¶øµ±Ó¦ÓóÌÐòÅÓ´ó¸´ÔÓʱ£¬¾ÍÒªÁíÍ⸽¼Ó´°Ìå¡£×îÖÕ¿ÉÄÜÓм¸¸ö´°ÌåÖÐÓÐһЩ¹²Í¬¶¼ÒªÖ´ÐеĴúÂ룬ΪÁËÔÚÁ½¸ö´°ÌåÖв»²úÉúÖظ´´úÂ룬¿É´´½¨Ò»¸ö¶ÀÁ¢µÄÄ£¿é£¬ÓÃËüʵÏÖ´ú ......

MYSQL´æ´¢¹ý³ÌVBµ÷Ó÷½·¨¡£

Private Sub Command1_Click()
   
    Dim MyComm As New ADODB.Command      '¶¨ÒåÒ»¸öÃüÁî¶ÔÏó
    Dim Rs_GetList As New ADODB.Recordset '¶¨ÒåÒ»¸ö¼Ç¼¼¯¶ÔÏó
    Dim param As ADODB.Parameter     ......

vbʹÓÃpicturebox»­ÇúÏßͼ

'Ìí¼Ó¸öpicture1ºÍcommand1
Option Explicit
Dim lngCenter As Long
Dim lngMax As Long
Dim lngPad&
Dim PCurrent As POINT, PLast As POINT
Private Type POINT
x As Long
y As Long
End Type
Private Sub Form_Load()
lngCenter = (Picture1.Top + Picture1.Height) / 2
lngMax = Pictu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ