查看單個文章
舊 2009-05-26, 09:58 PM   #2 (permalink)
劍痞憶秋年
長老會員
 
劍痞憶秋年 的頭像
榮譽勳章
UID - 15
在線等級: 級別:31 | 在線時長:1096小時 | 升級還需:56小時級別:31 | 在線時長:1096小時 | 升級還需:56小時級別:31 | 在線時長:1096小時 | 升級還需:56小時級別:31 | 在線時長:1096小時 | 升級還需:56小時級別:31 | 在線時長:1096小時 | 升級還需:56小時級別:31 | 在線時長:1096小時 | 升級還需:56小時
註冊日期: 2002-12-06
住址: 步雲崖
文章: 280
精華: 0
現金: 15847 金幣
資產: 20867 金幣
預設

MSGBOX 可能無法達到你要的,因為要按一下才會再換下一個新的訊息(無法直接 控制/改變 訊息內容)
所以咧,我就用表單 + TIMER 來試做你要的,不過看不到最後的 連線成功
試看看如何
PHP 語法:
VERSION 5.00
Begin VB
.Form Form1 
   Caption         
=   "Form1"
   
ClientHeight    =   3195
   ClientLeft      
=   60
   ClientTop       
=   345
   ClientWidth     
=   4680
   LinkTopic       
=   "Form1"
   
LockControls    =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '
系統預設值
   Begin VB
.CommandButton Command1 
      Caption         
=   "Command1"
      
Height          =   495
      Left            
=   1440
      TabIndex        
=   0
      Top             
=   1200
      Width           
=   1215
   End
End
Attribute VB_Name 
"Form1"
Attribute VB_GlobalNameSpace False
Attribute VB_Creatable 
False
Attribute VB_PredeclaredId 
True
Attribute VB_Exposed 
False


Option Explicit

Private Sub Command1_Click()
  
With Form2
    
'清空計數器
    .Times = 0
    .Show
  End With
End Sub 
PHP 語法:
VERSION 5.00
Begin VB
.Form Form2 
   Caption         
=   "Form2"
   
ClientHeight    =   3195
   ClientLeft      
=   60
   ClientTop       
=   345
   ClientWidth     
=   4680
   LinkTopic       
=   "Form2"
   
LockControls    =   -1  'True
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '
系統預設值
   Begin VB
.Timer Timer1 
      Interval        
=   500
      Left            
=   3360
      Top             
=   2160
   End
   Begin VB
.Label Label1 
      Caption         
=   "Label1"
      
Height          =   495
      Left            
=   600
      TabIndex        
=   0
      Tag             
=   "連線中。"
      
Top             =   960
      Width           
=   1215
   End
End
Attribute VB_Name 
"Form2"
Attribute VB_GlobalNameSpace False
Attribute VB_Creatable 
False
Attribute VB_PredeclaredId 
True
Attribute VB_Exposed 
False
Option Explicit

Private intTimes As Integer

Private Sub Form_Initialize()
  
intTimes 0
  Label1
.Caption Label1.Tag
End Sub

Public Property Get Times() As Integer
    Times 
intTimes
End Property

Public Property Let Times(ByVal vNewValue As Integer)
     
intTimes vNewValue
End Property

Private Sub Form_Load()
    
Label1.Caption Label1.Tag
End Sub

Private Sub Timer1_Timer()
    
'
    If intTimes = 2 Then
       Label1.Caption = "連線成功"
       Unload Me
    End If
    Label1.Caption = Label1.Caption & "。"
    intTimes = intTimes + 1
End Sub 
__________________
一切有為法 如夢幻泡影
如露亦如電 應作如是觀
劍痞憶秋年 目前離線  
送花文章: 150, 收花文章: 33 篇, 收花: 130 次
回覆時引用此帖
有 3 位會員向 劍痞憶秋年 送花:
kppne0931 (2009-05-26),Living (2009-05-27),magicwoo (2009-05-30)
感謝您發表一篇好文章