顯示錯誤無法轉換類型「system.windows.forms.combobox」的對象鍵入「system.windows.form.DateTimePicker」在我的代碼...對象鑄造錯誤
Private Sub UncheckMyControlsdtp()
Dim dtp As DateTimePicker
Try
For Each dtp In EMPGBDATA.Controls
If dtp.CalendarMonthBackground = Color.Red Then
dtp.CalendarMonthBackground = Color.White
End If
Next
Catch e As Exception
MsgBox(e.Message)
End Try
End Sub
朋友檢查我代碼並給予解決方案...
ctrl是什麼類型? – Thanzeem