Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Focus changing event causing a crash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Focus changing event causing a crash

 Post Reply Post Reply
Author
Message
mhe240 View Drop Down
Newbie
Newbie


Joined: 15 June 2010
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhe240 Quote  Post ReplyReply Direct Link To This Post Topic: Focus changing event causing a crash
    Posted: 16 March 2012 at 3:13pm
Private Sub vsg_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)

Dim Row As XtremeReportControl.IReportRow
Static InHere As Boolean
If InHere Or NewRow Is Nothing Or NewColumn Is Nothing Or NewItem Is Nothing Then Exit Sub
InHere = True
If NewRow.Index < vsg.FocusedRow.Index And KeyUpPressed Then
    KeyUpPressed = False
    Set Row = MoveUp(NewRow, NewColumn, NewItem)
Else
    Set Row = MoveDown(NewRow, NewColumn, NewItem)
End If
If Row Is Nothing Then
ElseIf Row.Index = NewRow.Index Then
    If NewColumn.Index = COL_OTHER Or Not m_hasOther Then
        vsg.FocusedColumn = vsg.Columns(COL_ANSWER)
    End If
Else
    Set vsg.FocusedColumn = vsg.Columns(COL_ANSWER)
    Set vsg.FocusedRow = Row
    Cancel = True
End If
Set Row = Nothing
InHere = False
End Sub

when End Sub is invoked, this crashes, move up and move down tries to find the next valid line that can be focused on.    I am working on a different way to do this.  It seem some sort of issue occurs and cause the IDE to crash.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.