Click here to Skip to main content
15,895,370 members
Home / Discussions / C#
   

C#

 
GeneralRe: Project Ideas Pin
WillemM8-May-05 7:24
WillemM8-May-05 7:24 
QuestionIs their some api in windows for the detection of when a new window or form opens? Pin
FocusedWolf29-Apr-05 4:31
FocusedWolf29-Apr-05 4:31 
GeneralCustom events in VB,NET 2005 and c# Pin
rathishps29-Apr-05 3:55
rathishps29-Apr-05 3:55 
GeneralRe: Custom events in VB,NET 2005 and c# Pin
DavidNohejl29-Apr-05 4:11
DavidNohejl29-Apr-05 4:11 
QuestionHow get The index of last visible ListViewItem of a ListView Pin
djalmao29-Apr-05 3:25
djalmao29-Apr-05 3:25 
AnswerRe: How get The index of last visible ListViewItem of a ListView Pin
mav.northwind29-Apr-05 4:13
mav.northwind29-Apr-05 4:13 
GeneralRe: How get The index of last visible ListViewItem of a ListView Pin
djalmao29-Apr-05 5:16
djalmao29-Apr-05 5:16 
GeneralRe: How get The index of last visible ListViewItem of a ListView Pin
mav.northwind29-Apr-05 21:07
mav.northwind29-Apr-05 21:07 
The solution _is_ correct, how else would the ListView draw its items?
I just didn't give you ready-to-use code but thought you could work it out from there, but obviously I was wrong.Sigh | :sigh:

So here's the full code - I explicitely tried it and it does work.
int first = listView1.TopItem.Index;
int h_tot = listView1.ClientRectangle.Height - 1;
int h_hdr = listView1.GetItemRect(first).Y; // Height of ColumnHeader, if any
int h_item = listView1.GetItemRect(0).Height; // Height of a single item
int cntVis = (h_tot-h_hdr) / h_item; // Number of visible items
int last = Math.Min(listView1.Items.Count-1, first+cntVis); // Index of last (partially) visible item

mav
GeneralRe: How get The index of last visible ListViewItem of a ListView Pin
djalmao3-May-05 20:59
djalmao3-May-05 20:59 
GeneralConvert graphic files to a JPEG format Pin
Anonymous29-Apr-05 2:55
Anonymous29-Apr-05 2:55 
GeneralRe: Convert graphic files to a JPEG format Pin
benjymous29-Apr-05 3:12
benjymous29-Apr-05 3:12 
QuestionDataGrid Control - right choice? Pin
LiamD29-Apr-05 0:50
LiamD29-Apr-05 0:50 
AnswerRe: DataGrid Control - right choice? Pin
Polis Pilavas29-Apr-05 1:05
Polis Pilavas29-Apr-05 1:05 
GeneralRe: DataGrid Control - right choice? Pin
LiamD29-Apr-05 1:18
LiamD29-Apr-05 1:18 
AnswerRe: DataGrid Control - right choice? Pin
Marc Clifton29-Apr-05 1:15
mvaMarc Clifton29-Apr-05 1:15 
AnswerRe: DataGrid Control - right choice? Pin
Robert Rohde29-Apr-05 6:55
Robert Rohde29-Apr-05 6:55 
GeneralRemoting : can't disconnect client Pin
sokettepower28-Apr-05 22:08
sokettepower28-Apr-05 22:08 
GeneralRe: Remoting : can't disconnect client Pin
Kodanda Pani29-Apr-05 3:27
Kodanda Pani29-Apr-05 3:27 
GeneralRe: Remoting : can't disconnect client Pin
sokettepower29-Apr-05 4:17
sokettepower29-Apr-05 4:17 
GeneralRe: Remoting : can't disconnect client Pin
Kodanda Pani29-Apr-05 20:28
Kodanda Pani29-Apr-05 20:28 
GeneralRe: Remoting : can't disconnect client Pin
Anonymous29-Apr-05 22:38
Anonymous29-Apr-05 22:38 
QuestionHow to resise controls when maximising the C# Application? Pin
pubududilena28-Apr-05 22:06
pubududilena28-Apr-05 22:06 
AnswerRe: How to resise controls when maximising the C# Application? Pin
gaby2r28-Apr-05 22:44
gaby2r28-Apr-05 22:44 
GeneralRe: How to resise controls when maximising the C# Application? Pin
pubududilena29-Apr-05 0:07
pubududilena29-Apr-05 0:07 
GeneralRe: How to resise controls when maximising the C# Application? Pin
Claudio Grazioli29-Apr-05 3:21
Claudio Grazioli29-Apr-05 3:21 

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.