|
I have a listview-control in detail mode with two columns. The columnheaders are clickable, but how can I detect which columnheader was clicked.
And which event should I check?
thanks,
Ward
|
|
|
|
|
u can use
listView1_ColumnClick event of listview
rahul
|
|
|
|
|
Yes, I was that far. But how can I detect if it was column[0] or column[1] that has been clicked on?
Ward
|
|
|
|
|
Ok, I found it:
<br />
if(e.Column == 0)<br />
{<br />
}<br />
else if(e.Column == 1)<br />
{<br />
}<br />
Ward
|
|
|
|
|
Hi
I have a COM DLL(C++ Code), I am calling this dll from a C# application.
Is it possible to debug the c++ code from C# application?
Regards
Sarma
|
|
|
|
|
hi
i am working on wtsapi32.dll to get mad address of client that connect to trminal server.
i use wtsclienthardwareid = 13 . but evry time i get a diffrente number .any one can help me.
in generall what is wtsclienthardwareid and if it is mac address how can read it. i am writing my program in c#.thx
|
|
|
|
|
Hi all,
i have problem with combobox collection items. i need to check all entrys in combo box with foreach, i know the way but i dont know the exact class for combo box items(like ListItem).Thank u.
Best Regards,
ranandbe.
-- modified at 1:20 Wednesday 7th June, 2006
|
|
|
|
|
try out following
for(int i=0;i < comboBox1.Items.Count;i++)
{
MessageBox.Show(comboBox1.GetItemText(comboBox1.Items[i]));
}
rahul
-- modified at 1:39 Wednesday 7th June, 2006
|
|
|
|
|
thank u for replying, now i work with the same what you send but i want to know using foreach statement.
Thanks & Regards.,
ranandbe
|
|
|
|
|
i don't think that it is possible to iterate
through foreach becouse i didn't found any
class for combobox items.
rahul
|
|
|
|
|
In a combo box the items are just strings so you can do this:
foreach (string itm in comboBox1.Items)
{
MessageBox.Show(itm);
}
HTH
|
|
|
|
|
MCSD-Gandalf wrote: In a combo box the items are just strings...
Not always true.
The Items property is an ObjectCollection because you can stuff whatever you want in the collection, and render the Items yourself in a custom drawing routine. It's usually strings, but not always.
Share and enjoy.
Sean
|
|
|
|
|
Very true.
Of course HOPEFULLY if you have stuffed something else in there you know what it is and can write the appropriate foreach loop. And if not I guess you can always treat everything in there as an object and write the foreach loop that way.
Guess I need to be a bit clearer around here with all you guru's watching !
Thanks!
Gandalf
|
|
|
|
|
MCSD-Gandalf wrote: Guess I need to be a bit clearer around here with all you guru's watching
The comment wasn't so much for you; it was intended for people who are less well informed who may read the thread later. I don't usually presume to correct MCSDs.
Share and enjoy.
Sean
|
|
|
|
|
I want to ask that if I want to go to last child folder of any root folder..How can i do that...?
Following example will help to understand my prob.
like- c:\Data\Data1\Data2\Data3
c:\Data\Data1a\Data1b\Data1c
in this data is root folder in which if has 2 sub folders.
Now i want to reach folder Data3 and Data1c
foreach (string directory in Directory.GetDirectories(folderPath))
By using this code I can reach upto Data folder not inside of this folder.
This will help u most.
Thanks,
Hitesh
Hitesh Mangal
|
|
|
|
|
try this:
string temp= folderpath.Substring(folderpath.LastIndexOf("\\"));
this will get u the name of last folder...
then use it in what ever way u want..
abhinav
|
|
|
|
|
Friends,
I am creating a dialog box using Windows Forms. I want a *default button* on my dialog box i.e whenever user presses *enter* key, the button even gets processed. But i don't want my dialog box to get closed on the button press event, instead it should perform some custom task. How can i do so ?
Imtiaz
|
|
|
|
|
try to use
forms AcceptButton property to set default button
rahul
|
|
|
|
|
Hello all,
pls i wanna need know if i created 5 new instance of a class when .net make allocation for these objects does the memory location for each new object consists of its attributes only and in this case th methods for the five objects in memory exists all only once and each of the five objects can call them OR for the five instances each one has the same code of methods exist separetly (i.e the code for methods exist in memory five times each one within each instance's memory space)
??????????????????
|
|
|
|
|
Please use punctuation to separate the sentences from each other. It would make what you write much easier to understand. (Perhaps you should have someone look at your keyboard too, the question mark key seams to get stuck. )
The methods exist only once in memory.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: The methods exist only once in memory.
But mostly twice (unless inlined)
|
|
|
|
|
thanks alot for ur answers . it really helped me more
|
|
|
|
|
i want to use a function defined in a win32 dll.
which is defined as below:
void Func1(int a,int b,USHORT ** VarArray);
in C#, which data type should i use for the parameter " USHORT ** VarArray "?
|
|
|
|
|
I suppose ushort [][] VarArray
|
|
|
|
|
i have the dllimport as below:
[DllImport("DS40xxSDK.dll")]
private static extern int SetOsdDisplayModeEx(IntPtr hChannelHandle,int color,bool Translucent,int param,int nLineCount,ushort[][] FormatArray);
and call it as below:
private void myFunc()
{
int number=OSDStrings.Length;
ushort [] [] FormatArray=new ushort[number][];
for(int i=0;i
|
|
|
|