|
I've never seen that error before, but it looks like it wants to open a C# project. I'm guessing it thinks that C# isn't installed. You can go to Add/Remove Programs and select Visual Studio 2005 and there is a Change/Remove option. Click that and you will get a "Maintenance Mode" installation wizard. It should be able to install or repair the components you need.
Unfortunatly, if that does not work, then I don't know what it could be.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I've actually seen this error when you've got a corrupted VS install. There is some fix as I recall, but it's probably best just to do a clean install of VS.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
hey guys!
how do u loadin gthe resource string in C# 2005?
thanks
|
|
|
|
|
If you are using Visual Studio then it makes it very easy. When you create a resource file, it puts a nice auto generated code file behind it containing one class, that class has the same name as your resource file, and it contains lots of static methods. Each method name corresponds to the identifier you've given each string. So, say you've named your resource file MyReources.resx and you have a string named "MyString" you can access it in you code like this:
MyResouces.MyString
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
|
by the way, does it do the samething in managed c++ 2005
|
|
|
|
|
Hi,
I'm trying to get all the paths of the open applications in a C# program.
What I need is only paths of open windows(the ones the "Task Manager" shows under his "Applications" Tab),i.e. the windows that are shown in the Taskbar.
For example if there is only 1 Word file open, named "1.doc", I need it's full path. (for example : "D:/Temp/1.doc").
Thanks, Gal.
|
|
|
|
|
So what you're asking is to get the full path of opened documents, not the paths of applications.
For starters, you can get the running processes (which includes applications) using the System.Diagnostics.Process.GetProcesses() method.
But from there you're on your own. There's nothing built into the framework (nor the Win32 API, AFAIK) that will let you see which document is opened by a program, simply because there is no way of letting Windows know when an application has a document opened. Windows does know when a file is opened, so you might be able to find some Win32 APIs that you could query to find the opened documents of the system.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
Hi,
I do need open documents but also open programs, which I opened (i.e. if the Visual .NET is open, I need the path to it's .exe file also)- all open windows(windows of documents and programs).
You said windows does know when a file is open.
I looked in the System and Environment objects but didn't find anything yet. From the process list I couldn't get anything usefull.
Do you know where windows keeps it? what Objects besides the 2 I mentioned might keep that kind of information?
Maybe the Task Manager keeps it since in his application tab it does shows exactly the open windows, though I couldn't find any API related to the Task Manager, nor files with that information that the Task Manager manages.
Thanks,
Gal.
|
|
|
|
|
Task Manager sees Processes, not open documents. The only reason TaskManager sees those is because the application treats each open document as a seperate process.
There is no API function anywhere that will tell you the open documents of any application. That has to be exposed by each individual app, and even that isn't done consistantly. This means you'll have to write code for every different app out there (Good Luck!) to enumerate their open documents.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I am using RSACryptoServiceProvider and RSAPKCS1SignatureFormatter to create private/public keys and signed data with the private key (later decrypt using public key).
i know how to get teh Module and Exponent inorder to send and use it later.
but i also want to get the private key so i can use it many times more.
now i use this code:
byte[] mod=RSA.ExportParameters(true).Modulus;
byte[] exp=RSA.ExportParameters(true).Exponent;
RSAParameters RSAKeyInfo= new RSAParameters(); //create new keyinfo
RSAKeyInfo.Modulus=mod; //set the modulus
RSAKeyInfo.Exponent=exp; //set the exponent
and later i creat new key and import the modulus and exponent.
it is working fine for the public key but if i want to Sign again using that key , i get an exception saying that the new key do not contain the Priavte key.
what can i do? how can i get hold of the Public key?
Thanks alot,
Ran.
R.Z
|
|
|
|
|
I intend to make a dictionary application. My problem is how to make my owner data file. My data file is too big. How can i can read it quickly at any position in file, what's the structure in file. Can you so some information involve my problem. Thank a lot
|
|
|
|
|
I guess you could make an index file that keeps track of where in the file each entry is.
The structure of the file?? That's entirely up to you. Start with what you're putting in this file, laying out the fields for what you're storing.
If you don't know this already, you're going to have a very hard time writing this app. I'd start writing sample applications that test writing, indexing, and reading your file. Do the research first to teach you what you need to know, then write the app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
is there an AutoSave example to automagically safe a file at certain interval in time?
I tried use the Timer event but the problem is to tackle when the save-destination-time is due/passed.
I would like to skip looking into windows services as that would make it just 'too much' )
Thanks.
|
|
|
|
|
Run a separate thread in the background
Thread thd = new Thread(new ThreadStart(autoSave));
thd.Start();
private void autoSave() {
Thread.Sleep(20000);
}
WM.
What about weapons of mass-construction?
|
|
|
|
|
Thanx Willem, that is short and just what it should do )
|
|
|
|
|
Something that you have to consider, though: Using a separate thread to save the data means that you have to make sure that the operations on the data is thread safe, e.g. that you don't save the data in the middle of an update, and don't update in the middle of a save.
---
b { font-weight: normal; }
|
|
|
|
|
Yes, got that covered. Making a copy in memory of what i want to save first.
Thanks.
|
|
|
|
|
Any tips on repeating the thread eg. every 10 minutes?
|
|
|
|
|
Yep, add a while(true) construction around the code in the autoSave method
WM.
What about weapons of mass-construction?
|
|
|
|
|
You can easily solve that problem by locking the data you are saving:
private boolean enableAutoSave = true;
private Thread autoSaveThread = new Thread(new ThreadStart(autoSave));
autoSaveThread.start();
void autoSave() {
while(enableAutoSave) {
Thread.Sleep(10 * 3600000);
lock(data) {
save(data);
}
}
}
WM.
What about weapons of mass-construction?
|
|
|
|
|
Thanks Willem !
Works perfect !
I assumed that a While there would 'hog' the system/application, but no problem there
|
|
|
|
|
pxp wrote: Making a copy in memory of what i want to save first.
That doesn't solve the problem, it just somewhat decreases the risk for data corruption. The only difference between saving the data and copying the data is the amount of time it takes. You still have to lock the data while copying it.
---
b { font-weight: normal; }
|
|
|
|
|
I get my data from a class collection and print them to a textfile.
I should lock the class-collection before i save the data,...ok,..not thought about that...is that correct?
|
|
|
|
|
Yes, that would work.
Note, though, that if the main thread is trying to access the data while it's locked, it will freeze up until the save is complete.
---
b { font-weight: normal; }
|
|
|
|