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

vbÑ­»·

Option Explicit
Dim N As Integer
Private Sub Command1_Click()
    Dim A As Integer, B As Integer
    A = 2: B = 3
    For N = 1 To 6
      If N Mod 2 = 0 Then
          B = Fun(N, A) + A
      Else
          A = Fun(B, N) + B
      End If
    Next N
    Print N, A, B
End Sub
Private Function Fun(X As Integer, Y As Integer) As Integer
    X = Y - 1 + N
    Y = X + Y - N
    Fun = X + Y
End Function

ΪʲôÊÇ10  27    9
N²»ÊÇ×î´ó¾ÍÊÇ6ÁËÂð£¿10ÊÇÔõôµÃ³öÀ´µÄ°¡
A,BÓÖÊÇÔõôËã³öÀ´µÄ°¡ 


ÒòΪÄãµÄfunÊÇÒÔbyrefÐÎʽ£¬ËùÒÔµ±Äã°ÑN´«½øÈ¥µÄʱºòÔÚfunÀïÃæ¶ÔÓÚ¶ÔÓÚº¯ÊýÖµµÃ¸Ä±äNÒ²ËæÖ®±ä»¯ÁË

ÆäʵÄã¿ÉÒԶϵãdebugϾÍÖªµÀÁË

Private Function Fun(ByVal X As Integer, ByVal Y As Integer) As Integer
    X = Y - 1 + N
    Y = X + Y - N
    Fun = X + Y
End Function

ÒýÓÃ
ÒòΪÄãµÄfunÊÇÒÔbyrefÐÎʽ£¬ËùÒÔµ±Äã°ÑN´«½øÈ¥µÄʱºòÔÚfunÀïÃæ¶ÔÓÚ¶ÔÓÚº¯ÊýÖµµÃ¸Ä±äNÒ²ËæÖ®±ä»¯ÁË

ÆäʵÄã¿ÉÒԶϵãdebugϾÍÖªµÀÁË

¾ÍÊÇÕâ¸öÔ­Òò¡£
VBÖУ¬±äÁ¿µÄ´«µÝĬÈÏÊÇ ByRef µÄ¡£




Ïà¹ØÎÊ´ð£º

ΪʲôCдDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷ÓÃ

ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿

1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖÐµÄ ......

¿´µ½VB°æÄÇЩܽÈؽã·òʽµÄ¼Ò»ïÎҾͶñÐÄ

Ò»¸ö¸öΪÁ˳öÃû¾ÓȻʹÓÃ×Ô¼ºµÄÕÕƬ³öÀ´ÕÐÒ¡,Çî·èÁË°É
©°©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤My ѸÀ׵ȼ¶©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©¤©´




so what? disturbed you?

´ó¸ÅºÃ¶àÖ»ÓгõÖбÏÒµ

ÊDz ......

VB Êó±êÒƶ¯Ê¼þ

ÎÒÏëÔÚÊó±êÒÆÖÁÃüÁî°´Å¥ÉÏ£¬µ¯³öÒ»¸öÌáʾ¿ò£¬µ«²»ÖªÈçºÎŪ£¬Çë×ö¸öʾÀý

tooltip

лл£¡ÎÒÊÇÐÂÊÖ£¬ÄÜ˵µÃÏêϸЩÂð£¿×îºÃÓиöÀý×Ó

Command1.ToolTipText="xxx"

ÎÒÔÚcommandÖп´µ½ÕâÑù²»ÄÜʵÏÖ ......

vb ÄÑÌâ

form2,form3¶¼·Ö±ðÓÐÒ»¸ölabel1ÊôÐÔÊÇÒ»Ñù

Private Sub Command1_Click()
Dim lbl As Label
if combo1.text="1" then
lbl = Form2.Label1
else
lbl = Form3.Label1
end if
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ