473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ListView FocusedItem


When converting VB6 ListView code to DotNet, what do you do to replace the
ListView.FocusedItem object, specifically I want to reference
ListView.FocusedItem.Top

Thanks
Dave
Apr 11 '06 #1
2 2141
Dave,

The listview does have a focuseditem property .

http://msdn2.microsoft.com/en-us/lib...em(VS.80).aspx

You can get its top this way.
Me.lv1.FocusedItem.Bounds.Top

Ken
---------------
"Dave" <Ki************@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...

When converting VB6 ListView code to DotNet, what do you do to replace the
ListView.FocusedItem object, specifically I want to reference
ListView.FocusedItem.Top

Thanks
Dave

Apr 12 '06 #2
Hi Dave,
Thank you for posting here!
I notice that you have posted the same question in our
microsoft.public.dotnet.languages.vb newsgroup, which I have already
responded. So please check my answer there and if you need any further
assistance on this particular issue, please reply to me in that thread so I
can follow up with you in time.
For your convience, I have included my reply as follows:

ListView still has FocusedItem property in DotNet. You can use the
ListView¡¯s FocusedItem property just as you do in VB6. In DotNet,
ListView¡¯s FocusedItem is a ListViewItem type. To get the ListView
FocusedItem's Top property, you'd use the sentences as following:
dim top as integer
top = Me.ListView1.FocusedItem.Bounds.Top

Thank you and have a nice day!

Sincerely,
Linda Liu
Microsoft Online Community Support

================================================== ==
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ==

Apr 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alberto | last post by:
I need a listview where the user can select the items with the arrow keys but I also want that it works in a circular way: if you are in the first item and press key up, the last item is selected...
2
by: Alberto | last post by:
I select an item in a listView by code and it works fine (thanks to Morten Wennevik who tell me how to do it) but if the item is out of screen (there are a lot of items) I'd like to see it...
3
by: ¿ Mahesh Kumar | last post by:
Hi groups,I've placed a listview control and four buttons two navigate inside the list view. Let say . I have written code for <<, >> :)..even for <,> also..but i'm getting error in...
4
by: Jan | last post by:
How do i get the index of a selected item from a listview, I know how it works for a listbox. But I can't figure it out for a listview? Another newbee question By the way, thx for the answers...
10
by: A_PK | last post by:
I am writing mobile application using Vb.net when i click the last row of list view, and try to delete it.... will promtpy the following message "Additional information:...
6
by: Josef Brunner | last post by:
Hi, I have a problem using two ListView controls on one and the same form: Problem: The second ListView is never focused. No matter where I "click" non of the items within the ListView is...
0
by: George | last post by:
This is driving me crazy. I have a listview that has LabelEdit set to true. In the AfterLabelEdit event, I do my validation on the label text. If the label isn't valid, it sets e.canceledit = true...
2
by: Dave | last post by:
When converting VB6 ListView code to DotNet, what do you do to replace the ListView.FocusedItem object, specifically I want to reference ListView.FocusedItem.Top Thanks Dave
5
by: Bart Steur | last post by:
Hi, What's the best way to programmaticly select (click) another listview Item after removing the selected/focused one. using VB2005 Express. Thanks Bart
1
by: Joza | last post by:
Hi! I'm getting error when selecting items in ListView control, it says ArguementOutOfRangeExceptions. That happens in SelectIndexChange event. I have tryed with try...catch but there's no...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.