|
Hello,
I use System.Diagnostics.Process class to launch execuatbles. These executables are console applications and do not have user interface. I need to know if the processes I launched are busy doing some work or dead/stuck. I am not sure how to check that.
Any input on this would be appreciated.
Thanks,
Vidhya
V
|
|
|
|
|
How to test/monitor an application should be part of your design. When writing an application, consider using one of the following approaches:
1) Make your process write some status to a Console window
2) Make your process log some data to a logging DB
3) Add a little IPC interface to your program. Write a test harness to communicate with it.
4) Etc.
End-user tools like Task Manager/System Monitor are not accurate enough at this.
Best,
Jun
|
|
|
|
|
|
Hi chaps -
I have been experiencing all kinds of problems formatting a date to a string for storage or sending over a url etc. Now when using SOAP it generates this funky looking date time string:
'2006-09-01T16:15:43.359375+01:00'
What i want to know is - how do i generate this in my code, rather than relying on Date.Tostring("format") which invariably dies when it hits different cultures.
Cheers
T
|
|
|
|
|
The format you are seeing is the ISO 8601 standard format for date/time values. You should be able to generate this format by using the following format string for the DateTime.ToString() method:
DateTime.ToString("s", DateTimeFormatInfo.InvariantInfo)
This will give a string that looks like:
2000-08-17T16:32:32
It doesn't have the time zone information, but you can add that by using the System.TimeZone[^] class.
This shouldn't cause any problems when dealing with different cultures.
|
|
|
|
|
A bad habit of mine is to always re-invent the wheel, I just like figuring stuff out for myself and I'm sure that's the case with many programmers.
Right now, I don't have time to waste though....
Can anyone help me out with a quick algorithm (or article) for populating a TreeView in .Net?
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Depends what info you are populating it with. It could be as simple as binding it to a XML file.
only two letters away from being an asset
|
|
|
|
|
Populating it from a database using a SQLDataReader
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Hi Folks! I am using a class that puts data into excel worksheet and do formatting etc. Every thing is fine but i am not able to close the excel app when i exit the program. I'm saving the workbooks, using .quit() and ReleaseComObject(obj) functions but to no help.
Please help me.
Aman Tur
modified 9-Jul-22 21:01pm.
|
|
|
|
|
Do you have a referance to the application? The following is How I do it in C#. VB should be simular.
Excel.ApplicationClass EApp = new Excel.ApplicationClass();<br />
Excel.Workbook EWrk;<br />
EApp.Workbooks._Open(FilePath, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);<br />
...<br />
EApp.Quit();<br />
EApp = null;<br />
EWrk = null;
Hope this helps.
ARon
|
|
|
|
|
Thanks ARon i am putting EApp = null already let me try EWrk also.
modified 9-Jul-22 21:01pm.
|
|
|
|
|
While debuging set the APP to visible, making easier find the problems like a "Would you like to save changes" dialog. You will get no indication in your app if it is excel tripping up.
AH
|
|
|
|
|
I want to make a .NET application in C# that can act as an active document server. To my disappointment I can't find any support for it.
Has anyone implemented the interfaces that are necessary to support it in .NET?
What would be the typical alternative to active document in .NET?
|
|
|
|
|
Excuse me for a quick noob question:
Let's say a component of my C# application throws and exception. I want to catch it and handle it, but!
I have try...catch in program.cs around the whole Application.Run(new FormMain()); and yet the system itself somehow pops the "application error" dialog with the whole backtrace and all. I'm guessing it's catching the exception sooner somewhere handling my FormMain execution. Where would I then place the whole form wide exception handling to intercept it before the .NET code?
3.1415
|
|
|
|
|
I might be missing something, but it sounds like .NET can catch the exception raised in your code before you can. If you don't know where exactly the exception could be raised, you needn't do anything. If you do know the exact code segment, try to catch and handle the exception before .NET does.
Best,
Jun
|
|
|
|
|
Try handling the AppDomain.UnhandledException event. However, you should find the cause of the exception and handle it at the point closest to where it is being thrown
only two letters away from being an asset
|
|
|
|
|
If you click and hold on a regular Button control and then press alt+tab (without releasing alt), the button will go into it's normal unpressed state. I wish to do the same with my custom control but have been unable figure out how to detect when the user presses alt+tab as the LostFocus event doesn't fire until alt is released.
Any ideas on how MS did this?
|
|
|
|
|
Hey Everybody!
I'm not sure if I'm in the right forum, so if not, just tell me and I'll rewrite it again in the right place Thanks!
I started to read and understand "Extending Explorer with Band Objects using .NET and Windows Forms" article and I'm trying to understand what is GAC and strong name.
I've been looking for an article that will explain GAC, but I couldn't find a good one that explains the basic idea.
from what I understand (which might be wrong!), GAC is a global assembly that "contains" DLLs that can be accessed by any running program on the computer.
each dll has a "strong name" which is destincs to each DLL and using that strong name programs can "talk" with this dll.
if (all of the above is right (or at least partial right))
{
how do I assign a dll to the gac (without the registerLib in the article)?
do I have to reassign it everytime, or I need to do it once?
how do I remove a DLL from the GAC?
and last one, how do I read from the GAC? (I saw an article about it, but it would be nice if someone would explain it anyway ).
}
Thanks ALOT!!!
|
|
|
|
|
|
Hi all, here is my problem:
(system is VS 2005, C#, ADO .NET 2)
I have a bindingsource, a datagrid, and set of details like fields on the same
form. Next, there are following bindings set:
void Init()
{
BindingSource.DataSource = someLocalTable
datagrid.DataSource = BindingSource
for every control
{
Control.DataBinding.Add("...", BindingSource, "...")
}
}
Moving through a datagrid changes the data in bound detail controls, hence
BindingSource too, changes position. Changing data in controls changes
the data in selected dataGrid row.
The problem is:
I have a button "Insert New", that does exactly this:
1. adds a new row in the local someLocalTable and
fills it with the default values:
DataRow dr = someLocalTable.NewRow();
... fill default values
someLocalTable.Rows.Add(dr);
2. TRIES TO CHANGE THE BINDINGSOURCE-s POSITION TO LAST(newly created table row)
3. This is the step where after changing position on the bindingSource
to the newly created row (.MoveLast()), you expect detail fields change
to null (or empty), and dataGrid changes the ActiveRow and position
However, after adding new row to someLocalTable, I can not change the position
of the bindingSource to that new row. BindingSource.Count returns good nr. of
rows, including the newly created. I tried a lots of things, like rebind all
controls like on the Init method, still no luck. Am I missing something here?
I forgot to mention that the grid is actually Infragistics ultraGrid, but that
doesn't change the basic concept...
Mike
|
|
|
|
|
I am not a CS programmer, but it sounds like you may need to call the ResetBindings method on your BindingSource control(s) prior to calling MoveLast.
Hope this helps.
|
|
|
|
|
No, I have tried that allready.
Like I said, I tried to even mannualy reset bindings, still doesn't
work.
Thank You for trying...
Mike
|
|
|
|
|
I have 4 ComboBoxes on a win form frm1 I have 2 comboboxes on another form frm2 all of these combobxes are databound.
On private void Combobox1frm2_SelectedIndexChanged(object sender, EventArgs e) I have some data selection events bu when frm2 is loading it automatically rins this procedure, I dont unserstand how.
On the from load Im bindign them by assignin these comboboxes to a DataSet.
Whats the problem?
Oh by the way Im using compact framework
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
Can someone guide mehow to develop HL7 compatible programs using VB/ASP .net ?
What kind of client and server based programs have to be developed, anyone has any experience ? any websites/tutorials ?
thanks
anuj
anuj
|
|
|
|
|
Hi,
HL7 is a format for data representation. It can be in encrypted form or un-encrypted. There are many ready made components which provide functionality for parsing these HL7 messages. Otherwise, you can develop your own component for the same. If you go for the second option, developing on ur own, then you will have to understand the complete format. According to that you can easily create HL7 parser.
If the message is encrypted then you will have to know the encryption algorithm and the key for decryption.
The following link is useful-
http://www.hl7.org.au/
You will get lot of ready made components online to start with. try google !
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|