|
I have searched all over the place to figure out how to run an .exe file from a C# app. Surely there is at least a Windows API out there somewhere that I can call. Can someone help me out?
Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
|
|
|
|
|
System.Diagnostics.Process.Start(string fileName);
Flight to Redmond - £200
Bulldozer Rental - £100
Destroying the MS campus single handedly for not doing an Academic upgrade, PRICELESS!
-Jonny Newman
|
|
|
|
|
What about automating the answer to this weekly question ?
|
|
|
|
|
And deprive us of the fun of trying to type the same function name while laughing hysterically?
Flight to Redmond - £200
Bulldozer Rental - £100
Destroying the MS campus single handedly for not doing an Academic upgrade, PRICELESS!
-Jonny Newman
|
|
|
|
|
David Stone wrote:
while laughing hysterically
Seem ready to take a job as a manager. Nice.
|
|
|
|
|
No, I'm not that evil...yet. I just get tired of seeing the exact...same...thing every...single...week.
Flight to Redmond - £200
Bulldozer Rental - £100
Destroying the MS campus single handedly for not doing an Academic upgrade, PRICELESS!
-Jonny Newman
|
|
|
|
|
David Stone wrote:
No, I'm not that evil...yet.
Oh, I see you as a HR manager, saying "I am sorry but, you gave us dedication and life but now take your pink slip" twice a day.
David Stone wrote:
I just get tired of seeing the exact...same...thing every...single...week.
Count me in to add nagged posts just to make you stuck on the C# forum answering the same questions over and over again...
|
|
|
|
|
Stephane Rodriguez. wrote:
Count me in to add nagged posts just to make you stuck on the C# forum answering the same questions over and over again...
Now who's the evil one, eh?
Flight to Redmond - £200
Bulldozer Rental - £100
Destroying the MS campus single handedly for not doing an Academic upgrade, PRICELESS!
-Jonny Newman
|
|
|
|
|
The application which was working fine before, suddenly throwing exceptions.
When I debugged I found this error and it happens in the Main()
An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Additional information: Process performance counter is disabled, so the requested operation cannot be performed.
What's the heck is this error?
"If a jug falls upon a stone, woe to the jug. If a stone falls upon a jug, woe to the jug. Always woe to the jug"." - KaЯl This signature was created by "Code Project Quoter".
|
|
|
|
|
|
Have you tried something like (just a shot in the dark):
string proc=Process.GetCurrentProcess().ProcessName.ToString();
-Nick Parker
|
|
|
|
|
As per MSDN, I set the Disable Performance Counters in registry to 0 and it worked.
My question, why all of sudden this error came up?
I will try your tip.
Thx
"If a jug falls upon a stone, woe to the jug. If a stone falls upon a jug, woe to the jug. Always woe to the jug"." - KaЯl This signature was created by "Code Project Quoter".
|
|
|
|
|
Nick Parker wrote:
string proc=Process.GetCurrentProcess().ProcessName.ToString();
Didn't work.
Right now, changing the value in Registry makes it work.
"If a jug falls upon a stone, woe to the jug. If a stone falls upon a jug, woe to the jug. Always woe to the jug"." - KaЯl This signature was created by "Code Project Quoter".
|
|
|
|
|
Kant wrote:
Didn't work.
Hmmm, works for me.
-Nick Parker
|
|
|
|
|
How can I select a part of an image and copy/paste it? Something like Paint and other image editors do.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
How can I select a part of an image and copy/paste it? Something like Paint and other image editors do.
Mazy, take a look at Nish's article: Clipboard handling with .NET[^]. He discusses how to do this with the Clipboard.SetDataObject() and Clipboard.GetDataObject() methods.
-Nick Parker
|
|
|
|
|
My message didn't show up on this board because of a bug or something so I'm posting again:
If you put a WebBrowser control in a Form, and then put that Form inside another Form (set it's Parent to the other form and set TopLevel to false, which is perfectly legal according to the docs), then when you quit your application (close the outer Form), it will stay resident in memory and eat up 100% of CPU time. (You can see it doing this in the Task Manager). This is probably caused by that OLEinPlace stuff somehow but I don't know OLE so that's totally a guess.
This is a HUGE problem for me!!
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
nevermind.
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Sounds like something that should be simple enough, but I can't find anything on the topic. I have noticed a few references, but they're not encouraging... Words to the effect that it can't be done.
Thanks.
|
|
|
|
|
If you want to set them at design time, use the properties of the data grid...
Click on the data Grid; in the Properties panel, you should find a row for "TableStyles" with value "(Collection)" and a "..." button. Click on that, and you access the dialog through which you can set up the table style...
you can add a new table style (or modify one that you already have), and in the right-hand side of this dialog you should find the Misc > GridColumnStyles property (with value "(Collection)" and the "..." button). Click on the "..." button to access the dialog to set up the column styles for the given table style.
You can add a new column style or modify a pre-existing one.
Each such column style has a HeaderText property you can set as needed.
If you wish to do all this at run-time, I suggest doing it once at design time and taking a look at the code generated by the Studio for you...
HTH,
FOR
|
|
|
|
|
I don't have a problem with column headers, and I am creating them at run-time.
I can't figure out how to label the rows!
|
|
|
|
|
[quote]
I don't have a problem with column headers, and I am creating them at run-time.
[/quote]
Ooops ! My bad... sorry.
I don't know if/how you could set the row headers...
ALl I can think of is the RowHeaderWidth property of the data grid to set the width,
and the RowHeaderVisible property of the TableStyles to determine whether they are visible or not,
but I've never seen a place where you can set a row header label (or such...)...
I wouldn't be surprised if this is not allowed, since the DataGrid uses the row header (if they are
visible) to place the + symbol for a record leading to child records in another table...
Wish I could be more helpfull,
FOR
|
|
|
|
|
Thanks... I'm new to C#, and the datagrid control. I may have selected the wrong control for the task. I was looking for the following functionality...
Row and column labels (datagrid has column labels, but not row labels)
User editable fields within the table (datagrid supports this)
bi-directional linkage to a datasource (datagrid supports this)
cut and paste cells between tables (don't think so)
The datagrid looked like a good choice, but I keep running into hurdles as if it was really meant for another application.
|
|
|
|
|
From what you describe, I would use the DataGrid.
As far as the row headers...
..depending on why/how you need them, it may be that you could use
the first column as "row header"... it's a work-around, and
it might not suite your application, but that's all I can suggest right now...
..after all the dataGrid seems to fit all of your other requirements, except for the
"cut-n-paste" across tables (hmmm... sounds like fun!).
Is the data grid's data source going to link you to a DB?
Are you looking for row headers because you know that you will always
display a given number of rows, and that each row represents something
specific? (in this case you might use simple labels, and separate
text controls to display the data instead of the data grid..)
FOR
|
|
|
|
|
I was considering using the first row as the label, and I might end up doing that if all else fails. Right now I'm taking another look at the ListView control, but I'm starting the learning curve all over again! I want to learn C#, but it's becoming difficult to resist the temptation to jump back to C++.
Thanks again for your time.
|
|
|
|