Hello Krool,
You could avoid using the "On Error Resume Next" and solve the error that appears on the line
Code:If CLng (Button.Parent.ActiveControl.Default)> 0 Then Else Default = FalseCode:Private Sub DrawButton(ByVal hWnd As Long, ByVal hDC As Long, ByVal Button As Object) ... Select Case ButtonPart Case BP_PUSHBUTTON Default = Button.Default If GetFocus() <> hWnd Then On Error Resume Next If CLng(Button.Parent.ActiveControl.Default) > 0 Then Else Default = False On Error GoTo 0 End If ... End Sub




Reply With Quote