|
Hi,
I want to make an application in C# for Windows XP, which could run in the background and log all the URL visited in any browser by any user.
Any ideas where to start?
Thanks
Code Monkey
-- modified at 18:36 Wednesday 14th June, 2006
|
|
|
|
|
Oh, that could be tricky to implement. Sounds like you need to periodically monitor the processes on the system for any browsers that might start. Perhaps using Process.GetProcesses() .
You would then need to hook into the browser some how, either using a plugin written for the browser, or hooking via the system using via P/Invoke and Win32.
Also this application sounds like it should be implemented as a Windows service, and using some sort of logging mechanism.
Good luck!
Graham.
|
|
|
|
|
Hi
I have main form with a button, which when pressed, displays a second form. I don't want this form modal, so I use Show(). But, I only ever want one instance of this form. My confusion, and I am a real C# / .NET newbie, is when / where / how this is created / destroyed. Here's what I am doing...pseudoish
MainForm.OnClickEvent(...)
{
if secondform == null
secondform = new form(data_for_form_listbox)
secondform.show()
}
secondform.onCloseBUtton(....)
{
Close(); //or should this be hide();//I want the C++ equiv of EndDialog / CloseWindow which will actually delete the instance
}
On the 'secondform' I have a close button, which, calls - 'Close()'. Does that destroy the window? I want it destroyed so my OnClickEvent will create a new instance, so my second form can refresh its data (via the ctor).
I don't need code samples just a basic step by step of where I should create the second form / how I close it, (via teh second form), and should I destroy / recreate etc.
Does this make sense?
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|
|
If i get your problem: you wanna open form2 from form1. and then close form2. using this.close(); is good. it will close form2 but not form1. the next time u call form2 again form form1 everything should be refreshed.
Donkaiser
|
|
|
|
|
Angel1058 wrote: 'Close()'. Does that destroy the window?
If you mean will secondform be a null pointer after it's called, then no. Close() disposes the form and it's contents, and destroys it's window handle, but comparing secondform to null (like you're doing in your OnClickEvent() method) will return false.
You can use the IsDisposed property of the Form to check to see if the form has been disposed, and that should work (but you'd have to check if it's null first)...
if ( secondform == null || secondform.IsDisposed )
secondform = new MyForm(data_for_form_listbox) Hope that helps
“Accept that some days you are the pigeon, and some days you are the statue” -- David Brent
Cheers,
Will H
|
|
|
|
|
secondform.IsDisposed That's what I was missing - many thanks. Amazing, I've used MFC/VC++ for years and years and yet couldn't even successfully close and reopen a form in C#....doh.
Thanks again.
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|
|
Can we still drag and drop shape onto the form?
I want to draw 8 circles (names Circle) and each one is in an array (Circle #1 = Circle[0]).
How can we do that?
Thank you
Donkaiser
|
|
|
|
|
hi there !
I wrote the following Function , Like this :
private int YourNo(int Number)
{
...
Number=(X+Y)*100;
return Number;
}
I want to use of this function(the value of Number parameter) in this Event :
private void calculate_Click((object sender, EventArgs e)<br />
{<br />
txtNumber.Text=....?<br />
}
in txtNumber.Text I want to put the value of returning function(Number).
How can i use it(Number parameter) ?
thanks a lot
regards,
s_mostafa_h
-- modified at 16:18 Wednesday 14th June, 2006
|
|
|
|
|
Try this:
txtNumber.Text=YourNo(Number).ToString();
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
hi !
it doesn't work . did you test it ?
Regards ,
s_mostafa_h
|
|
|
|
|
No sorry,
It was an idea
What error message you get?
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
The code that Elina suggested is basically correct. What you have to do is just substitute the "Number" with the value you want to send into the function.
What do you mean by "doesn't work", really? What happens? Do you get an error message?
What does the "..." in the function represent? Do you use the value of the parameter at all?
---
b { font-weight: normal; }
|
|
|
|
|
private int YourNo(int Number)<br />
{<br />
int x = 10;<br />
int y = 5;<br />
Number=(X+Y)*100;<br />
return Number;<br />
}<br />
<br />
<br />
<br />
private void calculate_Click((object sender, EventArgs e)<br />
{<br />
txtNumber.Text= YourNo(Convert.ToInt32(txtNumber.Text)).ToString();<br />
}
|
|
|
|
|
hi there !
thnks for ur reply !
albCode wrote: txtNumber.Text= YourNo(Convert.ToInt32(txtNumber.Text)).ToString();
Why "YourNo(Convert.ToInt32(txtNumber.Text))..." ? , I want to use of "Number Parameter " , when I clicked the button ,
Regards ,
s_mostafa_h
|
|
|
|
|
mostafa_h wrote: Why "YourNo(Convert.ToInt32(txtNumber.Text))..." ?
txtNumber.Text is parameter which u give in YourNo
|
|
|
|
|
but I want to use the return Value "Number" in Event .
txtNumber.Text= YourNo(Number).ToString();
but I have this Error message :
the name 'Number' doesn't exist in the current context .
Regards ,
s_mostafa_h
|
|
|
|
|
the problem was solved as following :
private int YourNo(out int Number)
{
...
Number=(X+Y)*100;
return Number;
}
and :
private void calculate_Click((object sender, EventArgs e)
{
int output;
YourNo(out output);
txtNumber.Text=output.ToString();
}
Regards ,
s_mostafa_h
|
|
|
|
|
Hello i have a C# program which loads a excel file and read its contents. I want to know how can my program be notified if some one modifies the file i am using so that i get the new data. I can handle events for excel object which opened through my program but what if some other user opens the files and modifies and i want that notification. Is there way i can send a remoting message from excel event handlers to C# application?. If so any help or code snippets will be great help
venky
|
|
|
|
|
Why don't you just use a FileSystemWatcher to watch files in that directory?
Logifusion[^]
|
|
|
|
|
well,i can try that but is there any other way? Is there a way to send a remoting call from Excel event handlers?
|
|
|
|
|
what should i do to make my label accepting multiple line of text.
I remember in vb5 we can resize the label the way we want to and the text will wrap automatically too.
Donkaiser
|
|
|
|
|
set autosize to false
Donkaiser
|
|
|
|
|
Hey, I know there is suppose to be a class System.Runtime.Serialization.Formatters.SOAP.SoapFormatter
but I don't even have the namespace System.Runtime.Serialization.Formatters.SOAP, what's the problem?
NaNg.
|
|
|
|
|
You need to reference a separate assembly, with a name like System.Runtime.Serialization.Formatters.SOAP
Josh
|
|
|
|
|