|
Hi,
I have created a Windows Service which monitors certain directories on the local drives. Firstly, I created a service so that it would not be visible in the process list of the Task Manager. But I notice that when I start the service, the process name is being shown in the Process list. Is this normal or did I do anything wrong?
I was of the impression than a service would not be visible in the Process list of the Task Manager. Am I wrong? Did I change my application to a Windows Service for no reason?
Thanks,
Bikash Rai
|
|
|
|
|
Where does it say that a Windows service will be hidden from view?
Just about any process running on the system will show up in Task Manager.
Why do you need to 'hide' from Task Manager?
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hi,
Thanks for your reply.
Where does it say that a Windows service will be hidden from view?
Well it does say in most of the sites that since RegisterServiceProcess does not work with WinXP, creating a webservice would be the best bet.
Ok so I don't want to hide it from the process list. Seems like the moment someone talks about hiding a process, people start thinking in negative ways. I just don't want someone to kill my process. I have seem some processes in the process list of the task manager which cannot be killed like smss.exe. Can that be done?
Thanks.
Bikash Rai
|
|
|
|
|
I don't know about preventing a process from being killed, but you can configure a service to restart automatically if it is killed. See the recovery tab of the property dialog in the services management applet.
|
|
|
|
|
Is there any way to do this using code? I would want to do it during the installation process. And does a Servic failing include someone killing the process?
Thanks for your time.
Bikash Rai
|
|
|
|
|
Bikash Rai wrote: Firstly, I created a service so that it would not be visible in the process list of the Task Manager....Am I wrong?
Yep. All processes show up in the Task Manager, whether it's a Win Forms app or a Windows Service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
how can i arrange my ownedforms.
IN this.addownedforms(sampleform)
thanks,
bye
tonato
|
|
|
|
|
Are ownedforms child forms of an MDI container? If you are talking about arranging child forms in an MDI environment then look into "Form.LayoutMdi()". You should get what you need.
Hope this helps.
Bikash Rai
|
|
|
|
|
My application consists of a few forms. When i press a button on the main form it shows another form. Its more like a message box dialog, that I want the main form to be deactivated unil the ok button on the message form is pressed.
How do i go about doing this??
Thx thx
|
|
|
|
|
How do you mean ? It is deactivated, it won't respond while a modal dialog exists above it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think "Form.ShowDialog()" is what you are looking for.
Hope this helps.
Bikash Rai
|
|
|
|
|
I'm wrestling with the new Windows Forms data binding in .Net 2.0 without much luck.
Here's my data binding source object:
public class UserCredentials<br />
{<br />
#region Fields<br />
<br />
private string userName;<br />
private string password;<br />
<br />
#endregion<br />
<br />
#region Properties<br />
<br />
public string UserName<br />
{<br />
get { return userName; }<br />
set { userName = value; }<br />
}<br />
<br />
public string Password<br />
{<br />
get { return password; }<br />
set { password = value; }<br />
}<br />
<br />
#endregion<br />
}
I then create a simple Form with TextBoxes for the user name and password, and bind the Text property to the relevant properties in my binding source. I also have some simple validation code to check that data has been entered, and have provided a Cancel button on the Form so the user can back out of any changes made.
In the form's constructor I set the DataSource property of the BindingSource to an instance of the UserCredentials class. So far so good, the UserName and Password properties of the UserCredentials class are binding to my two TextBoxes just fine.
The problem is, I can't find any way to roll-back the changes made to my UserCredentials instance if validation fails, or the user clicks Cancel.
I'm sure it's very simple, but I just can't see it right now.. Any ideas?
|
|
|
|
|
use a BindingManagerBase object to send the values back to the data source
unfortunately, its only set up for a dataViewRow objects.
But if you extend the BindingManagerBase and a few other classes you can get there
I believe the class you need to get to is ContextManager which has the refresh method to create your own deriving it from BinidingManagerBase.
Its been a year since I did that. But, it rocks when your done.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hrmm, are you sure you're talking about .Net 2.0 object data binding?
It would be much easier just to Set/Get the Text properties of a couple of TextBox controls than go to that level of work.
I was really hoping the data binding in .Net 2.0 was an improvemnt over the 1.0 stuff
|
|
|
|
|
You need to implement IEditableObjectinterface.
And write code to BeginEdit, EndEdit and CancelEdit
You can check CSLA Framework on Internet to check how implement IEditableObject interface
Regards
|
|
|
|
|
Thanks bismark, that of course worked.
After seeing all the improvements to data binding during design time, I had hoped the powers that be had built a better mousetrap for object binding in V2.0, but not so hey.
|
|
|
|
|
Is there a way to zoom an image quickly that doesn't make it all fuzzy like using drawImage does. (I'm making a paint like program and I would like the pixels to stay rectangular as you zoom in). thnx
|
|
|
|
|
use the directx libraries for that type of effeciency
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
bobisreallycool wrote: Is there a way to zoom an image quickly that doesn't make it all fuzzy like using drawImage does.
You can't zoom into an image without losing quality.
bobisreallycool wrote: (I'm making a paint like program and I would like the pixels to stay rectangular as you zoom in).
Pixels are not quite rectangular, but you can keep them correctly drawn by making sure you zoom to a correct aspect ratio.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need an example in c# with a timer.
I never has program in this lenguage .
Soy estudiante de 4to año de Informatica
|
|
|
|
|
Rosayne wrote: need an example in c# with a timer.
Google 'C# timer'
Rosayne wrote: I never has program in this lenguage .
What languages have you programmed in ? If none, then you should not worry about timers just yet, IMO.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
is so easy.
please write me to my personal email, I can help you... inclusive in Spanish.
|
|
|
|
|
Hi friends,
the follow code will be run normally in WindowsApplication:
string userName = "a";
string userPass = "a";
string address = "192.168.18.145";
int port = 8080;
WebProxy myproxy = new WebProxy(address , port);
NetworkCredential credentials = new NetworkCredential(userName, userPass, null);
myproxy.Credentials = credentials;
WebRequest rqt = WebRequest.Create(this.textBox2.Text.Trim());
rqt.Proxy = myproxy;
rqt.PreAuthenticate = true;
WebResponse rsp = rqt.GetResponse();
System.IO.Stream stream = rsp.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(stream);
this.textBox1.Text = reader.ReadToEnd();
stream.Close();
reader.Close();
but in the SmartDeviceApplication,,it will cause the problem :
The response did not contain an end of entity mark.
Can you tell me why and how to solve the problem??
Thank you !!
22
|
|
|
|
|
|
WebResponse rsp = rqt.GetResponse();
this line.....
|
|
|
|