|
I have used the eventlogger to log the events in system's application log. what is the path for that file, is it possible to specify the path for application log. how could i do auto/manual archieve on the application log
please help..
Regards,
Srini
|
|
|
|
|
I thing ... the path is specified in the registry
File=%SystemRoot%\system32\config\AppEvent.Evt
but i want to store log file in a specified path without touching registry (ie without registry class in c#)
but still iam struggling with how to archieve the application log (i.e copying the file to normal text file)??
Regards,
Srini
|
|
|
|
|
For example.. lets say you wanted to back up the System event log..
C:\WINDOWS\system32\config\SysEvent.Evt
Good luck trying to read it though, the evt files are encoded
Then there is
C:\WINDOWS\system32\config\System.Log
But you probably wont be able to open because Windows will have a tight grip on it.
My suggestion is this...
Open up your server explorer in Visual Studio and find the log you want to use. Click and drag that log over to your form or component.
It will have an event that gets fired whenever something writes to it, and will send that message to that event. So you could start achiving that way, or you could just periodically read the logs.
-Jason
|
|
|
|
|
Thanks jasonpb,
Yah ur correct it is provide some events like
eventLog1.EntryWritten
But unfortunately it doesn't help me to programatically archive the event log data . ie it doesn't have method like to store the event log data into some other file. i thing we have to look for some win32 API to that is it correct??
i.e i have a menu Log -> Archive Event log
if the user press the above menu i have to store the event log file content to some other text file..
|
|
|
|
|
I have a chat app that use a webcam. I am taking a screenshot of the preview window in order to get the image. Only problem is, if the window is hidden or say minimized, my images come back as big Black square..ughh
Anyone know how to get the window to keep painting itself when its hidden or minimized?
Any help would be appreciated.
Thanks
-Jason
|
|
|
|
|
Hi,
This might have something with the IIS/permissions to do - but I'm not sure.
My web application worked just fine (developed with VS2003) but then I installed VS2005. I have this code that loads an assembly
Assembly asm = Assembly.Load("CustomLibrary");
which succeeds. The assembly is loaded just fine. Then I try to retrieve a class from the assembly:
Type customization = asm.GetType("CustomLibrary.Customization");
but this returns null.
If I run the exact same code on my laptop (on which I haven't gotten around to install VS2005 yet - thank god... ) it still works. So all that has changed is that I've installed VS2005. I still open the project in VS2003, run it from VS2003 and the IIS is set to use framework 1.1.
What can have happened ? Is it somehow being executed from the 2.0 framework ? Has the default security settings suddenly changed on my local IIS during the install ?
Any help will be much appreciated. Thanks in advance !
/Jan
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
Hi
I am using VS2005 Beta2. Can I set the grid header colour in the form designer and/or programmatically?
E.g. : dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = ...
Thanks
|
|
|
|
|
Hey howzit?
I would like to beable to move a textbox that is on my form with my cursor to anywhere on the form in run-time?
Is this possible, could you perhaps give me a code snippet? I am very new to C#!
Thanks!
|
|
|
|
|
Yes it is possible and easy too.
Try to play around with "Location" property of your control
e.g
in MouseMove event try to do following
Textbox1.Location = new point(Textbox1.Location.X+/*mouse X cordinate*/,Textbox1.Location.Y+/*mouse Y cordinate*/);
I hope it helps!
|
|
|
|
|
Hello friends
I have a layered window (WS_EX_LAYERED) and I want to put some controls on it without faking and redrawing the entire Bitmap of the form.Please help me if there is a way to implement this.
[ _ Always there is another way _ ]
|
|
|
|
|
Hi all,
I am very new to DirectoryServices. I created an ActiveDirectory user by using DirectoryServices. I can find that added entry later-on aswell. But I still couldnt figure out that how can I delete an added user later.
I tried
DirectoryEntries.remove("username", DirectoryEntry.SchemalClassName);
as mentioned on MSDN, but its keep on givng me an error like:
Invalid DN name assigned. I think I have to get the GUID for user I want to delete but I have no idea how can I get the GUID for any user e.g. "testuser" in Active Directory
Can anybody help me?
btw, if this is not the right place to ask this question where should I ask this question?
Thanks in Advance!!!!
|
|
|
|
|
Hello! i'm rather new to C# and i'd like to ask you if you know how i can send any parameters to the "cmd".For example, if you press start->run and you tipe: cmd /k "ping ip_adress -t -l x_bytes" ... then it starts comand prompt and pinging an adress. The question is how do i send the parameters to the function? I've succeded in opening the cmd process with System.Debug.Process.Start("cmd"); but i don't know how to send parameters.
Awaiting your answer...
Thank u!
|
|
|
|
|
Simply appending the parameters to cmd should work. Or you can use this[^] overload of the Process class to send the arguments.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi. The suggested method will work just fine but it has one drawback. You'll need to start a Process for each command, so you'll lose the context if you want to string different commands together.
I see two alternatives. For both methods, start a Process for cmd and keep it alive. Then:
Alternative 1) Use the Process' input and output streams for sending and receiving data. (simplest would be process.StandardInput.Write and process.StandardOutput.ReadLine).
Alternative 2) Use "dirty" win32 techniques such as SetForegroundWindow followed by a SendKeys.Send.
PS: If you know a better way for 2) please tell me.
It all depends what you are trying to achieve.
Cheers
Michel
|
|
|
|
|
Hi friends,
I am a newbie to C# windows based application.. I am developing a simple project.. in that i am facing a problem of how to insert the RadioButtons inside a ListView control and DataGrid Control. I know its a stupid question.. Any way please any body send the links that related to this problem or samples.
Any help is appreciated.
Thanks in advance
Regards,
Saravana
|
|
|
|
|
Following is the address where you can look at a code snip which is in VB but I hope you will have an idea since there is not really a big difference in syntax between VB and C#
http://groups.google.ca/group/microsoft.public.in.csharp/browse_thread/thread/41e8df1a6198c78b/8522c43b78c7393b?lnk=st&q=How+to+place+radio+button+in+Listview&rnum=1&hl=en#8522c43b78c7393b
|
|
|
|
|
Hi all,
i have already posted a message related to this topic but i did not get
any satisfactory reply,
Please if anyone could tell me how to post some data from a C# windows application to a blog without using the I.E
waiting for a positive reply eagerly
Thanks
Pramod
|
|
|
|
|
You can try using some blogging API like MetaBlog[^].
If that's not possible, you can resort to plain HTTP POSTs using HttpWebRequest[^] and related .NET framework classes, essentially simulating the browser request and response.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
HI,
How to get the values of each cell of the DataGridView, if each cell is of DataGridViewComboBoxCell Type.
Thanks in Advance
Srinivas
-- modified at 23:48 Wednesday 1st February, 2006
|
|
|
|
|
hi
You can use the 'FindControl' option to get the selected values of combo box
lucky
|
|
|
|
|
hi,
Thanks Lucky,
Can you give sample code for that?
Srinivas
|
|
|
|
|
hi,
foreach(DataGridItem item in DataGrid1.Items)
{
DropDownlist ddl = (DropDownList) e.Item.Cells[1].FindControl("ddl1");
string value = ddl.Selectedvalue;
}
Above 'ddl1' is id of the combo that you want to get the value of.
all the best
lucky
-- modified at 6:50 Friday 3rd February, 2006
|
|
|
|
|
My application has a system tray icon. I havent used the NotifyIcon class in .Net, but a different system tray class. I want to display a context menu when the user right clicks on the icon. How can I do this? I havent used the NotifyIcon class because my aplication requires me to show balloon popups too which I haven't been able to achive using the NotifyIcon class. The system tray class that im using has a MouseUp and MouseDown event throught i can get the button that was clicked.
|
|
|
|
|
|
i guess that wouldnt be possible cause the code im using is from planet-source-code.com.
|
|
|
|