set tooltip
Me.ToolTip1.SetToolTip(
Me.cmdDefineAsTemplate,
"Define As Template")

"FillChkToolTip_Master "#Region "FillChkToolTip_Master "
' Fill checkbox's ToolTip
' Data source = DataSet

Public Sub FillChkToolTip_Master() Sub FillChkToolTip_Master(ByVal pform As System.Windows.Forms.Form, ByVal pdsSQLResult As DataSet, ByVal pToolTip As ToolTip)
'reviewed
Try
Dim liRowCount As Integer = pdsSQLResult.Tables(0).Rows.Count
For liRow As Integer = 0 To liRowCount - 1
FillChkToolTip_SearchChk(pform.Controls, pdsSQLResult, pToolTip, liRow)
Next
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Sub

Private Sub FillChkToolTip_SearchChk() Sub FillChkToolTip_SearchChk(ByVal pControls As System.windows.Forms.Control.ControlCollection, ByVal pdsSQLResult As DataSet, ByVal pToolTip As ToolTip, ByVal piRow As Integer)
Try
For Each lcControl As Control In pControls
If lcControl.Controls.Count > 0 Then
FillChkToolTip_SearchChk(lcControl.Controls, pdsSQLResult, pToolTip, piRow)
Else
If lcControl.GetType.Name = "CheckBox" Then
If lcControl.Tag <> BLANK Then
If lcControl.Tag = vntFixNull(pdsSQLResult.Tables(0).Rows(piRow).Item("Fee_Code")) Then
Dim lsTemp As String
lsTemp = "Fee_Code : " & pdsSQLResult.Tables(0).Rows(piRow).Item("Fee_Code")
lsTemp += vbCrLf & "HK$ " & pdsSQLResult.Tables(0).Rows(piRow).Item("Price")
lsTemp += vbCrLf & "TAT : " & pdsSQLResult.Tables(0).Rows(piRow).Item("Turn_Time") & " day(s)"
pToolTip.SetToolTip(lcControl, lsTemp)
End If
End If
End If
End If
Next
Catch Err As Exception
Call ErrHandler(Err.Message, APP_NAME)
End Try
End Sub
#End Region
------------------
熱愛生命 喜愛新奇 有趣的事物
過去 是無法改變
將來 卻能夠創造
希望使大家生活更便利
世界更美好
a guy who loves IT and life