Click here to Skip to main content
15,881,831 members
Home / Discussions / C#
   

C#

 
GeneralProgramatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 11:51
billoo2-Feb-04 11:51 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Heath Stewart2-Feb-04 12:05
protectorHeath Stewart2-Feb-04 12:05 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 12:33
billoo2-Feb-04 12:33 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Colin Angus Mackay2-Feb-04 12:06
Colin Angus Mackay2-Feb-04 12:06 
GeneralUpdating table from datatable Pin
zuhx2-Feb-04 11:38
zuhx2-Feb-04 11:38 
GeneralRe: Updating table from datatable Pin
Heath Stewart2-Feb-04 12:01
protectorHeath Stewart2-Feb-04 12:01 
GeneralListView Pin
Gary Kirkham2-Feb-04 11:23
Gary Kirkham2-Feb-04 11:23 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 11:57
protectorHeath Stewart2-Feb-04 11:57 
One way is to use ListView.GetItemAt to get the ListViewItem that was clicked, then enumerate the ListView.Columns collection and compare the x-coordinate with the incremental ColumnHeader.Width property (i.e., incrementally add the width of the ColumnHeaders as you enumerate and see if the x-coordinate falls within the start and end x-coordinates of the column.

Another way is to override WndProc in a derivative class, define the NMITEMACTIVATE structure, and use the iItem and iSubItem members of the struct. For more information, see the Platform SDK for the LVN_CLICK notification message and the NMITEMACTIVATE structure (includes the NMHDR structure, which you can simply merge the members of into the NMITEMACTIVATE struct if you don't plan on using the NMHDR struct elsewhere).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: ListView Pin
Gary Kirkham2-Feb-04 12:02
Gary Kirkham2-Feb-04 12:02 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 12:06
protectorHeath Stewart2-Feb-04 12:06 
QuestionGood PDF Viewer control? Pin
Alex Korchemniy2-Feb-04 11:04
Alex Korchemniy2-Feb-04 11:04 
GeneralCOM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:26
KingTermite2-Feb-04 10:26 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 10:29
protectorHeath Stewart2-Feb-04 10:29 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:59
KingTermite2-Feb-04 10:59 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:01
protectorHeath Stewart2-Feb-04 11:01 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:09
KingTermite2-Feb-04 11:09 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:14
protectorHeath Stewart2-Feb-04 11:14 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:40
KingTermite2-Feb-04 11:40 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:49
protectorHeath Stewart2-Feb-04 11:49 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 3:24
KingTermite3-Feb-04 3:24 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 3:44
protectorHeath Stewart3-Feb-04 3:44 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 4:04
KingTermite3-Feb-04 4:04 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 4:26
protectorHeath Stewart3-Feb-04 4:26 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 4:40
KingTermite3-Feb-04 4:40 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite4-Feb-04 7:28
KingTermite4-Feb-04 7:28 

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.