|
Are you handling the SelectedIndexChanged event? And, since SelectedItems is a collection, did you access it like this: myListView.SelectedItems[0]
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Yes. I added a handler for SelectedIndexChanged event and checked SelectedItems[...]. However, for some reason item 0 is always selected even if I click on item 2002. Weird!
Kuphryn
|
|
|
|
|
Actually, I just played around with it a bit, and you should handle the click event instead. Then do myListView.SelectedItems[0] . Oh, and you have to use 0 because that's the only item in the collection of selected items.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Nice! Your solution works perfect!
Thanks again,
Kuphryn
|
|
|
|
|
kuphryn wrote:
Your solution works perfect!
Cool! Glad I could help. Mind if I ask what your app does?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
It is not an application. It is something I have to do for a school project. Thus, I do not consider it an application. Lets just say it is a "Hello World" instruction using C#.
Thanks again,
Kuphryn
|
|
|
|
|
Cool. Where do you go to school?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I go to school in, lets just say, a school to a pretty bad Computer Science program.
Oh, I guess you already see that via the fact that we even consider C#.
Kuphryn
|
|
|
|
|
kuphryn wrote:
Oh, I guess you already see that via the fact that we even consider C#.
What!?!?! That's a good school, IMO. Most schools won't even consider using these "bleeding edge" technologies. Are you in high school or college?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I'd LOVE it if my college had C# instead of Java!
|
|
|
|
|
hahahah
C# is a joke compared to C/C++.
Kuphryn
|
|
|
|
|
I am converting an old VC++ app to C#. I had two builds for this program: 1) an Eval version; and 2) a registered version. The way I had this setup it required 2 separate programs to be built. The eval version expired after 30 days had passed by storing an encoded timestamp in the registry of when it was installed so it could tell when the expiration date had elapsed and disable the software. So now in the .NET world, where folks seem to be shying away from using the registry (not necessarily a bad thing!), where is the best place to do something like this? In the metadata, or in assembly attributes, etc. ?? I'd rather not use the registry if there is a more appropriate, politically correct place to put this. Basically I don't want the user to be able to go in and fiddle with it. Thanks in advance.
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|
|
I don't think there is anything wrong with using the registry. Personally I put this stuff in the registry, and again in a file I hide somewhere outside my app dir. That way, the user needs to change both locations, or I can tell there has been tampering.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Great. Thanks again for the info.
-roy
|
|
|
|
|
I have an old VC++ app that I am converting to C# as an exercise. It, like many other VC++ apps I have written over the years, uses INI files to store configuration information. I have found some classes written by some generous folks on this site that manage INI files, but am wondering if it isn't time to move this concept to something more approproiate for the .NET platform. I've been researching *.config files and was wondering if this is/should be the equivalent of INI files?
Thanks in advance.
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|
|
Microsoft have moved back to supporting .ini files, but to make it seem all futuristic and new, they recommend they be in XML. The idea of the entire app being in one directory is pretty heavily pushed and any text file to store config info in the same directory as the app will fulfil that.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
Microsoft have moved back to supporting .ini files, but to make it seem all futuristic and new, they recommend they be in XML. The idea of the entire app being in one directory is pretty heavily pushed and any text file to store config info in the same directory as the app will fulfil that.
Thanks for your reply. Everything you say makes sense and goes along with my thinking. XML is the way to go, especially with all of the XML support in .NET, C#, etc. And quite frankly, I've long been ready for the one app/one directory approach. It makes moving applications really easy, just like back in the old DOS days...
Roy
Regards,
Roy
_____________
Roy H. Berger
roybrew@att.net
|
|
|
|
|
roybrew wrote:
I've been researching *.config files and was wondering if this is/should be the equivalent of INI files?
Yes thats the case, and you can use values from these files to add "dynamic" properties to the app.
Took me 6 months to figure that out!
CHeers
"I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.
|
|
|
|
|
|
I need to implement an applicaion "Monitor" for a transaction processing system (written in 100% c#).
I'm hoping to be able to generate an interface along the lines of Quest's SPOTLIGHT (on Oracle). http://www.quest.com/solutions/Spot_on_Oracle_screenshot.html[^]
I'm going to want to display some memory usage, some logging, as well as the lengthof some queues in memory.
I really like the "scrolling" graphs in Spotlight, as well as the TaskManager's Performaqnce tab.
Anyone have any suggestions for architecture, and/or some cool charting controls?
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
I'm trying to re-implement a project that I have previously written in C++ using ATL.
Basically, I want to implement a COM object using C# which is hosted inside a Windows Service. I have the COM object and the Window Service both implemented in the same C# project. I cant figure out how in .NET to specify that all instances of the object should be created remotely in the single Window service. I've seen how this can be done using Remoting however I'm wondering if they is any other alternative that will work from non .NET clients? Using ATL there was a way to register the COM class objects so that a single server process was used as the host. Is this effect possible with .NET?
|
|
|
|
|
Hi,
I want to extend the standard TreeView so it will have custom expand/collapse images (the plus and minus).
I have already looked into the Carlos Perez UtilityLibrary where he added support for custom checkbox images. What he doeas is simply sending the appropriate messages WinApi tree control. But I haven't found in reference any way to change the the collapse images the same way.
Any one knows how I can do this or any one did this already and could spare few lines of code?
Best Regards,
Szymon Kobalczyk.
|
|
|
|
|
Hi (and hi to the C# message board!)
When dragging a control onto a form, how can I change the name it gets? e.g. using "tvProject" instead of "treeView1" ?
Currently I do a search&replace - but that seems counterproductive to me...
skulls don't kiss for an explanation - wait for the vacation photos! [sighist]
|
|
|
|
|
properties window look for (ID)
Stupidity dies.
The end of future offspring.
Evolution wins.
- A Darwin Awards Haiku
|
|
|
|
|
thanks your sig seems soooo apropriate.
skulls don't kiss for an explanation - wait for the vacation photos! [sighist]
|
|
|
|