Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 8th, 2012, 02:55 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Location: Granby,QC,Canada
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inactive Listview in child form

This is my first contribution to this forum, and I look forward to an experience that is mutually beneficial. My issue is with a Listview which I originally created in a parent form and which worked as designed per expectations. I moved the Listview to a child form along with its VB2010 code. All other controls on the child form (buttons, labels, etc) work as they are expected. The Listview control though does not, and I am lost for reasons why a once functional Listview is no longer working.

Here's my code I use to select, then activate the selectino in Listview:

Code:
    Private Sub ListView1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListView1.SelectedIndexChanged
        With Me.ListView1
            Dim i As Integer
            For Each item As ListViewItem In ListView1.SelectedItems
                i = item.Index
            Next
        End With
    End Sub

    Private Sub ListView1_ItemActivate(sender As Object, e As EventArgs) Handles ListView1.ItemActivate
        SerialPort1.PortName = ListView1.FocusedItem.SubItems(1).Text
        SerialPort1.Open()
        Timer3.Start()
    End Sub
When a breakpoint is placed at Private Sub ListView1_SelectedIndexChanged, code editor does not open. The same occurs when a breakpoint is placed at Private Sub ListView1_ItemActivate (ie code editor does not open).

Thank-you for you help with this issue.

Regards,
DRC
  #2 (permalink)  
Old November 9th, 2012, 11:47 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Location: Granby,QC,Canada
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Come to find out that the code indicated in my initial message did not copy to the child form as shown. After correcting this difference and running the debugger, I can confirm that the code indicated works in the child form as expected. This issue is resolved.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView on MDI child form click event bob spencer BOOK: Visual Basic 2010 Programmer's Reference 3 July 23rd, 2011 02:36 PM
Reload Parent form from Child form maulik33 ASP.NET 2.0 Basics 2 February 6th, 2007 12:53 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM
ListView record in a form osemollie Pro VB Databases 7 May 19th, 2006 04:05 AM



All times are GMT -4. The time now is 12:20 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.