Click here to Skip to main content
15,922,007 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How can I distribute a VB6 application with NSIS? Pin
Dave Kreskowiak28-Sep-12 1:16
mveDave Kreskowiak28-Sep-12 1:16 
GeneralRe: How can I distribute a VB6 application with NSIS? Pin
fancyRocko28-Sep-12 1:25
fancyRocko28-Sep-12 1:25 
AnswerRe: How can I distribute a VB6 application with NSIS? Pin
jrumage5-Oct-12 2:00
jrumage5-Oct-12 2:00 
QuestionPrinting Datagridview content plus header and footer in vb.net 2010 Pin
sali2226-Sep-12 20:40
sali2226-Sep-12 20:40 
AnswerRe: Printing Datagridview content plus header and footer in vb.net 2010 Pin
Abhinav S26-Sep-12 21:00
Abhinav S26-Sep-12 21:00 
AnswerRe: Printing Datagridview content plus header and footer in vb.net 2010 Pin
sali2226-Sep-12 21:13
sali2226-Sep-12 21:13 
QuestionBefore a Control loses focus can I detect the next focus target? Pin
Richard Fairhurst26-Sep-12 9:05
Richard Fairhurst26-Sep-12 9:05 
AnswerRe: Before a Control loses focus can I detect the next focus target? Pin
Richard Fairhurst26-Sep-12 10:32
Richard Fairhurst26-Sep-12 10:32 
I found an answer to my question. The Delegate delayed processing until after the OnDropDown event of the DateTimePicker fired. I already had an override of the OnDropDown event to set flags to track the calendar state, so I was able to use one of the flags in the Delegate to suspend it from firing when the Calendar was already being dropped dowm. For anyone's information here is how the events ended up looking:

    Private m_bCalAbort As Boolean = False
    Private m_bInCal As Boolean = False
    
Protected Overrides Sub OnDropDown(ByVal eventargs As System.EventArgs)
        m_bInCal = True
        m_bCalAbort = False
        MyBase.OnDropDown(eventargs)
    End Sub

    Protected Overrides Sub OnCloseUp(ByVal eventargs As System.EventArgs)
        'If m_dCalDate <> MyBase.Value Then
        If Not m_bCalAbort Then
          'Do Stuff
        End If
        m_bInCal = False
        MyBase.OnCloseUp(eventargs)
    End Sub

         Delegate Sub MyDelegate(ByVal myControl As Label, ByVal myArg2 As String)

        Friend Sub DelegateMethod(ByVal myControl As Label, ByVal myCaption As String)
            If Not m_DTP.m_bInCal Then
                m_DTP.Select()
                SendKeys.Send("%{DOWN}")
            End If
        End Sub 'DelegateMethod

        Protected Overrides Sub OnValidating(ByVal e As System.ComponentModel.CancelEventArgs)
            m_LastEvent = LastEvents.Validating
            If Not DateEmpty() And ue.GetDate(Text) Is Nothing Then ' check for an invalid date
                Ping()
                Dim myArray(1) As Object

                myArray(0) = New Label()
                myArray(1) = "Enter a Value"
                m_DTP.BeginInvoke(New MyDelegate(AddressOf DelegateMethod), myArray)
            ElseIf Not DateEmpty() And ue.GetDate(Text) IsNot Nothing Then
                Dim tempdate As DateTime = ue.GetDate(Text)
                If tempdate < m_DTP.MinDate Or tempdate > m_DTP.MaxDate Then
                    Ping()
                    Dim myArray(1) As Object

                    myArray(0) = New Label()
                    myArray(1) = "Enter a Value"
                    m_DTP.BeginInvoke(New MyDelegate(AddressOf DelegateMethod), myArray)
                End If
             End If

            MyBase.OnValidating(e)
        End Sub


modified 26-Sep-12 17:57pm.

QuestionTelephone Tracking system through GPS Pin
waner michaud26-Sep-12 8:12
waner michaud26-Sep-12 8:12 
AnswerRe: Telephone Tracking system through GPS Pin
Eddy Vluggen27-Sep-12 0:16
professionalEddy Vluggen27-Sep-12 0:16 
QuestionDatagrid row count equals zero Pin
Cesar00226-Sep-12 6:49
Cesar00226-Sep-12 6:49 
AnswerRe: Datagrid row count equals zero Pin
Cesar00226-Sep-12 10:05
Cesar00226-Sep-12 10:05 
QuestionRe: Datagrid row count equals zero Pin
Eddy Vluggen26-Sep-12 10:32
professionalEddy Vluggen26-Sep-12 10:32 
AnswerRe: Datagrid row count equals zero Pin
Cesar00226-Sep-12 16:28
Cesar00226-Sep-12 16:28 
QuestionTricky SQL Question Pin
ttocsmi25-Sep-12 10:42
ttocsmi25-Sep-12 10:42 
AnswerRe: Tricky SQL Question Pin
Martijn Kok25-Sep-12 11:40
Martijn Kok25-Sep-12 11:40 
GeneralRe: Tricky SQL Question Pin
ttocsmi25-Sep-12 14:13
ttocsmi25-Sep-12 14:13 
GeneralRe: Tricky SQL Question Pin
Bernhard Hiller25-Sep-12 23:13
Bernhard Hiller25-Sep-12 23:13 
GeneralRe: Tricky SQL Question Pin
Martijn Kok25-Sep-12 23:27
Martijn Kok25-Sep-12 23:27 
GeneralRe: Tricky SQL Question Pin
ttocsmi1-Oct-12 1:56
ttocsmi1-Oct-12 1:56 
GeneralRe: Tricky SQL Question Pin
ttocsmi1-Oct-12 1:51
ttocsmi1-Oct-12 1:51 
AnswerRe: Tricky SQL Question Pin
Bernhard Hiller25-Sep-12 23:15
Bernhard Hiller25-Sep-12 23:15 
GeneralRe: Tricky SQL Question Pin
ttocsmi1-Oct-12 2:12
ttocsmi1-Oct-12 2:12 
AnswerRe: Tricky SQL Question Pin
ttocsmi1-Oct-12 4:34
ttocsmi1-Oct-12 4:34 
GeneralRe: Tricky SQL Question Pin
Martijn Kok1-Oct-12 5:13
Martijn Kok1-Oct-12 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.