Statusbar control problem

Hi All

I am facing a strange problem in StatusBar control. I am developing a windows form based application using VB.NET. I am using a StatusBar to display the number of records displayed by the DataGrid, say The DataGrid is showing 100 records, then my statusbar is showing "100 Record(s)" this is working fine in my PC, but creating a problem when it is installed in a IBM Thinkpad laptop computer. the laptop is showing "(Records( 100". I am not sure why this is happining, I have also installed the application in PC with Win98 O/S there also the statusbar is working properly.

Any Idea

Why "100 Record(s)" is changing to "(Records( 100"

Thanks and regards,
Kajol


Answer this question

Statusbar control problem

  • app-o-rama.com

    Maybe you could post the code where you set the StatusBar text property
  • Nikhil Dabke

    Here is the code I am using

    '-------------------------------------------------------------------------------------------------------
        Private Sub dgKeyword_Invalidated(ByVal sender As Object, ByVal e As System.Windows.Forms.InvalidateEventArgs) Handles dgKeyword.Invalidated
            If Not IsNothing(ds) Then
                If Not IsNothing(ds.Tables("tblKeywordMaster")) Then
                    If ds.Tables("tblKeywordMaster").Rows.Count > 0 Then
                        StatusBarPanelKeywords.Text = ds.Tables("tblKeywordMaster").Rows.Count & " Keyword(s)"
                    Else
                        StatusBarPanelKeywords.Text = "0 Keyword(s)"
                    End If
                Else
                    StatusBarPanelKeywords.Text = "0 Keyword(s)"
                End If
            Else
                StatusBarPanelKeywords.Text = "0 Keyword(s)"
            End If
        End Sub
    '-------------------------------------------------------------------------------------------------------
    If there are 100 keywords in the dgkeyword datagrid then it is showing "(Records( 100"
    and for every else part is showing "(Records( 0"

    I have also used a code to test what is the text before assigning into the statusbar panel like

    Msgbox(ds.Tables("tblKeywordMaster").Rows.Count & " Keyword(s)")

    the messagebox is showing "100 Keyword(s)" but it is assigning "(Records( 100" to the statusbar panel.

    the laptop where it is behaving like that is having windows XP professional as the operating system. I have chosen the Invalidated event to display any changes in the number of rows in the datagrid into the statusbar. another panel in the status bar is kept to display the system date and the date display is working.

  • Statusbar control problem