当前位置:编程学习 > VB >>

求助

Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) 
On Error GoTo ErrHandler 
    If Trim("" & mrsYFT("answer1")) = "" Then 
        Label1(1).Visible = False 
    Else 
        Label1(1).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer2")) = "" Then 
        Label1(2).Visible = False 
    Else 
        Label1(2).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer3")) = "" Then 
        Label1(3).Visible = False 
    Else 
        Label1(3).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer4")) = "" Then 
        Label1(4).Visible = False 
    Else 
        Label1(4).Visible = True 
    End If 
    

                                                      
    '显示图片 
    If Trim("" & mrsYFT("tp")) <> "" Then 
        Picture6.Picture = LoadPicture(GetAppPath() & "" & mrsYFT("tp")) 
        Picture6.AutoSize = True 
        PaintImage PictureScaleRatio(Picture8, Picture6) * Picture8.ScaleWidth, PictureScaleRatio(Picture8, Picture6) * Picture8.ScaleHeight, Picture8, Picture6, GL_DISPLAY_CENTER 
    Else 
        Picture8.Picture = LoadPicture() 
        Picture6.Picture = LoadPicture() 
    End If 
    Exit Sub 
ErrHandler: 
    ErrMessageBox "Adodc1_MoveComplete()", Me.Caption 
End Sub 
Private Sub Adodc2_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) 
    On Error GoTo ErrHandler 
    
    
  If Trim("" & mrsYFT("answer1")) = "" Then 
        Label1(12).Visible = False 
    Else 
        Label1(12).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer2")) = "" Then 
        Label1(11).Visible = False 
    Else 
        Label1(11).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer3")) = "" Then 
        Label1(9).Visible = False 
    Else 
        Label1(9).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer4")) = "" Then 
        Label1(10).Visible = False 
    Else 
        Label1(10).Visible = True 
    End If 
                                                      
    '显示图片 
    If Trim("" & mrsTKT("tp")) <> "" Then 
        Picture9.Picture = LoadPicture(GetAppPath() & "" & mrsTKT("tp")) 
        Picture9.AutoSize = True 
        PaintImage PictureScaleRatio(Picture9, Picture5) * Picture9.ScaleWidth, PictureScaleRatio(Picture9, Picture5) * Picture5.ScaleHeight, Picture9, Picture5, GL_DISPLAY_CENTER 
    Else 
        Picture9.Picture = LoadPicture() 
        Picture5.Picture = LoadPicture() 
    End If 
    Exit Sub 
ErrHandler: 
    ErrMessageBox "Adodc2_MoveComplete()", Me.Caption 
End Sub 
Private Sub Adodc3_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) 
    On Error GoTo ErrHandler 
    
    If Trim("" & mrsYFT("answer1")) = "" Then 
        Label1(19).Visible = False 
    Else 
        Label1(19).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer2")) = "" Then 
        Label1(18).Visible = False 
    Else 
        Label1(18).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer3")) = "" Then 
        Label1(17).Visible = False 
    Else 
        Label1(17).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer4")) = "" Then 
        Label1(16).Visible = False 
    Else 
        Label1(16).Visible = True 
    End If 
                                                  
    '显示图片 
    If Trim("" & mrsYDT("tp")) <> "" Then 
        Picture11.Picture = LoadPicture(GetAppPath() & "" & mrsYDT("tp")) 
        Picture10.AutoSize = True 
        PaintImage PictureScaleRatio(Picture11, Picture10) * Picture10.ScaleWidth, PictureScaleRatio(Picture11, Picture10) * Picture10.ScaleHeight, Picture11, Picture10, GL_DISPLAY_CENTER 
    Else 
        Picture11.Picture = LoadPicture() 
        Picture10.Picture = LoadPicture() 
    End If 
    Exit Sub 
ErrHandler: 
    ErrMessageBox "Adodc3_MoveComplete()", Me.Caption 
End Sub 
Private Sub Adodc4MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) 
    On Error GoTo ErrHandler 
    
    
    If Trim("" & mrsYFT("answer1")) = "" Then 
        Label1(22).Visible = False 
    Else 
        Label1(22).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer2")) = "" Then 
        Label1(23).Visible = False 
    Else 
        Label1(23).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer3")) = "" Then 
        Label1(24).Visible = False 
    Else 
        Label1(24).Visible = True 
    End If 
    If Trim("" & mrsYFT("answer4")) = "" Then 
        Label1(25).Visible = False 
    Else 
        Label1(25).Visible = True 
    End If 
                                                    
    '显示图片 
    If Trim("" & mrsTLT("tp")) <> "" Then 
        Picture12.Picture = LoadPicture(GetAppPath() & "" & mrsTLT("tp")) 
        Picture4.AutoSize = True 
        PaintImage PictureScaleRatio(Picture12, Picture4) * Picture4.ScaleWidth, PictureScaleRatio(Picture12, Picture4) * Picture4.ScaleHeight, Picture12, Picture4, GL_DISPLAY_CENTER 
    Else 
        Picture12.Picture = LoadPicture() 
        Picture4.Picture = LoadPicture() 
    End If 
    Exit Sub 
ErrHandler: 
    ErrMessageBox "Adodc4_MoveComplete()", Me.Caption 
End Sub 
提示:过程声明与同名事件不匹配!谢谢了啊 !急!希望能改改!写出来!
补充:VB ,  网络编程
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,