Click here to Skip to main content
15,891,513 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionProblem while executing client-server program Pin
Gagan.2021-Mar-09 18:35
Gagan.2021-Mar-09 18:35 
AnswerRe: Problem while executing client-server program Pin
DaveAuld21-Mar-09 21:28
professionalDaveAuld21-Mar-09 21:28 
QuestionProblem with catching exceptions Pin
Badmafia21-Mar-09 14:57
Badmafia21-Mar-09 14:57 
AnswerRe: Problem with catching exceptions Pin
nlarson1121-Mar-09 15:45
nlarson1121-Mar-09 15:45 
AnswerRe: Problem with catching exceptions Pin
George B Gilbert21-Mar-09 16:45
George B Gilbert21-Mar-09 16:45 
QuestionHow could you select an item in listview from a different tabpage? Pin
JUNEYT21-Mar-09 13:48
JUNEYT21-Mar-09 13:48 
AnswerRe: How could you select an item in listview from a different tabpage? Pin
George B Gilbert21-Mar-09 17:41
George B Gilbert21-Mar-09 17:41 
GeneralRe: How could you select an item in listview from a different tabpage? Pin
JUNEYT22-Mar-09 0:51
JUNEYT22-Mar-09 0:51 
Thanks for responding to my post.

It is still not working even I set the focus for the listview in tabcontrols tabpage. The following statement is not setting the selected item somehow. When I set the item and then when I go back to first tab where the listview is, the listview still doesn't receive the focuse even I set the (listview1.focus()) in tabpage Got_Focuse event procedure. IF listview had received teh focuse, the selected item should be highlighted automatically.


Private Sub ToolStripComboBox2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripComboBox2.SelectedIndexChanged
    Dim ICount As Int32 = 0

    '**
    ListView1.SelectedItems.Clear()

    Me.Cursor = Cursors.WaitCursor

    For Each LItem As ListViewItem In ListView1.Items

        If LItem.SubItems(7).Text = ToolStripComboBox2.SelectedItem.ToString _
           Or InStr(LItem.SubItems(7).Text, ToolStripComboBox2.SelectedItem.ToString) > 0 Then


            'HERE IS HOW I SET THE X ITEM AS SELECTED IN LISTVIEW

            ListView1.Items(ICount).Selected = True

            'Here if user selects a song in the list it will be played while Media tab is focused
            '
            If TabControl2.SelectedTab Is TabPage7 Then '**
                Call PlayMusic()
            End If

            Me.Cursor = Cursors.Default
            Exit Sub
        End If
        ICount += 1
    Next

    Me.Cursor = Cursors.Default
End Sub



Private Sub TabPage5_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabPage5.GotFocus
    Call PopulateSearchBox(ListView1, 7)
    ListView1.Focus()  'HERE I SET THE FOCUSE FOR THE LISTVIEW
End Sub


What a curious mind needs to discover knowledge is noting else than a pin-hole.


GeneralRe: How could you select an item in listview from a different tabpage? Pin
George B Gilbert22-Mar-09 5:22
George B Gilbert22-Mar-09 5:22 
QuestionWriting an Excel table to a DataTable / The values from Excel-cells with "date"-format are not assumed Pin
TheSolid21-Mar-09 3:19
TheSolid21-Mar-09 3:19 
AnswerSolved: Writing an Excel table to a DataTable / The values from Excel-cells with "date"-format are not assumed [modified] Pin
TheSolid21-Mar-09 21:56
TheSolid21-Mar-09 21:56 
Questionabout MDI child form. Pin
p_m_kanthi21-Mar-09 3:03
p_m_kanthi21-Mar-09 3:03 
AnswerRe: about MDI child form. Pin
DaveAuld21-Mar-09 3:20
professionalDaveAuld21-Mar-09 3:20 
AnswerRe: about MDI child form. Pin
nazimghori21-Mar-09 7:56
nazimghori21-Mar-09 7:56 
QuestionProblem with check box Pin
nazimghori21-Mar-09 2:57
nazimghori21-Mar-09 2:57 
AnswerRe: Problem with check box Pin
DaveAuld21-Mar-09 3:38
professionalDaveAuld21-Mar-09 3:38 
GeneralRe: Problem with check box Pin
nazimghori21-Mar-09 4:05
nazimghori21-Mar-09 4:05 
AnswerRe: Problem with check box Pin
tech60321-Mar-09 5:52
tech60321-Mar-09 5:52 
GeneralRe: Problem with check box Pin
DaveAuld21-Mar-09 6:25
professionalDaveAuld21-Mar-09 6:25 
GeneralRe: Problem with check box Pin
nazimghori21-Mar-09 7:50
nazimghori21-Mar-09 7:50 
QuestionRe: Problem with check box Pin
nazimghori21-Mar-09 7:59
nazimghori21-Mar-09 7:59 
AnswerRe: Problem with check box Pin
DaveAuld21-Mar-09 11:05
professionalDaveAuld21-Mar-09 11:05 
QuestionRe: Problem with check box Pin
nazimghori21-Mar-09 18:23
nazimghori21-Mar-09 18:23 
AnswerRe: Problem with check box [modified] Pin
DaveAuld21-Mar-09 21:54
professionalDaveAuld21-Mar-09 21:54 
QuestionRe: Problem with check box Pin
nazimghori21-Mar-09 22:58
nazimghori21-Mar-09 22:58 

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.