Hello.. I want to make application that can count how many file was selected by me. For example i drag / select 2 files (.jpg) and then i right clicking them to raises menu, one of menu was registered by me in regedit with command execute app in my ClassLibrary (visual studio 2008 C#) so that will be messagebox raised to show 2 files are selected. Thanks for your help :)

Recommended Answers

All 4 Replies

what control are you using? listbox? listview? or what? all of .NET controls that have collection or capable of holding one have a property similar to selecteValues.Count / selectedItems.Cout.

Let intelisense be your friend my friend.

hope this helps.
happy coding :)

You forgot to specify where these files are gonna be selected.
Is this a listBox, listView, or something else?
If this is a listBox you can do:

int filesSelected = listBox1.SelectedIndices.Count;

like my example, i am selecting 2 image file , jpg format, then right clicking them, just like i had say before, i was insert in regedit, on .jpg file right click(command = execute my app) so after i right clicking them there was menu count how much file was selected by me by message box, :)

Sorry, but i really dont understand a think what you are saying. What regedit? Can you please show the picture or something, or do a better explanation. I really cant get the point out of this statement you just posted.
best regards,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.