|
|
|
The user could still kill it from there. A Service is less visible and therefore a somewhat better solution, though still not perfect. Basically, what you are trying to do is impossible on a couple of levels.
|
|
|
|
|
Completely agree. It is impossible to hide window application
from user in a way that user cannot kill it.
However, if will consider of this point then user can also
kill service from "Task Manager" but it is true that the
service is less visible than to minimize application on
system tray.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
This is not the way to go. Since your app will run AS THE USER at all times, they can easily kill it. A user can kill off any process they launch.
A Windows Service can run as Local System, which only an Admin level user can kill. Also, normal users cannot start/stop services.
|
|
|
|
|
Hi, I'm just wondering if there are any rules to follow when displaying messages to users. Are there any particular circumstances in which you should "command" the user to do something rather than "ask" them to do something? For example, say you have a login form. The user must of course provide a username and password. If the user does not provide a password should you say "Provide a password and try again" or "Please specify a password and try again"?
I ask this question because I watched a video on YouTube involving ASP .NET Web Form user input validation techniques. The "instructor" said he did not want to command the user to do something but rather inform them politely that they must do it. But I see in some software (and on various products' packaging, too) a mix of "commands" and "polite requests". Some may say "You must provide search terms before you can continue" and then later on something like "Please fill in the required fields and try again".
I hope this makes sense. Hehe. I'm never great with explanations and creating/using examples. But I try. :-P
Thanks in advance!
|
|
|
|
|
As a general rule always be polite and ask.
However this depends on your audience and the subject matter. If you are working on a corporate production system, calling your user an idiot is generally frowned upon, but I have seen game and entertainment systems where this is common.
Do your users have a sense of humour? if so you can be a little more relaxed.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That makes sense to me and that's what I was expecting. I just wanted to make sure. Thanks!
|
|
|
|
|
I'm always polite I ask them to please provide a valid entry, if they don't, tough - they just don't get what they want
But yes, like Mycroft Holmes mentioned, it's dependent on your audience: would be different for games etc.
modified on Sunday, July 25, 2010 6:15 PM
|
|
|
|
|
I recommend never doing something like this[^].
/ravi
|
|
|
|
|
Maybe you gave poor examples; perhaps the user has decided not to proceed and asking him to "try again" is also somewhat rude. I would prefer to simply make a statement "Login failed".
Let's say you stumble across a login page (maybe it's a members-only area of a website), consider the options:
0) "Enter your username and password" -- perhaps a bit commanding
1) "Please log in to continue to our members-only area" -- requesting, but maybe I don't want to do that (I don't)
2) "Access to our members-only area requires a current username and password" -- a simple statement, it doesn't tell, it doesn't ask
|
|
|
|
|
Please help me with the following using the 5.0.2
1-How to write automatic page numbers in PDF files generated?
2-How to write footers?
Kindly point me to an example that really works. I have seen several that did not work.
Thanks
EK
|
|
|
|
|
What is the exact code to write a fixed width text file in C#?
example:
instead of this:
IPLPPHPGHPGYINFSYEVLTPLKWYQSMMRHEYPSYGYEPMGGWLHHQIIPVLSQQHSPSHSLPPQHHIPI
I want:
IPLPPHPGHPG
YINFSYEVLTP
LKWYQSMMRHE
YPSYGYEPMGG
WLHHQIIPVLS
QQHSPSHSLPP
QHHIPI
|
|
|
|
|
I gave you the algorithm.
Do not repost, its rude, and we will not do your homework assignments for you.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
It is not a job nor a homework assignment so relax tool
|
|
|
|
|
Iman Mohtashemi wrote: It is not a job nor a homework assignment so relax tool
Look, I can do this, in a far more efficent manner with shorter and clearer code you were given. I gave you the algorithm you needed, but it turns out you are either too stupid or too lazy to work out how to code it yourself.
Worse, when you weren't given the the code you wanted immediately you reposed with the standard "snd codez plz" response we get so much of here. It's not too much to posit you are in fact the tool in all this, at least I can code.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Are you kidding me? It's not even hard.
|
|
|
|
|
that does not look like a fixed width at all, it is all jagged.
|
|
|
|
|
The exact code has some letters, punctuation and some numbers. There, all you need to do is rearrange them into the correct sequence.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hello,
How do I write a fixed width text file (say 80 characters per line) using the streamwriter in C#?
shekee
|
|
|
|
|
Seeing as you asked a general question, here is a general answer:
Prepare the string for the current line. If it is too long, truncate and use the remainder for the next line. If it is too short, pad it with spaces. Repeat until you have written everything.
To write to a file you'll need System.IO , there is a TextWriter class in there that you can use.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Sorry,
What is the exact code to write a fixed width text file in C#?
example:
instead of this:
IPLPPHPGHPGYINFSYEVLTPLKWYQSMMRHEYPSYGYEPMGGWLHHQIIPVLSQQHSPSHSLPPQHHIPI
I want:
IPLPPHPGHPG
YINFSYEVLTP
LKWYQSMMRHE
YPSYGYEPMGG
WLHHQIIPVLS
QQHSPSHSLPP
QHHIPI
|
|
|
|
|
I gave you a basic algorithm to do exactly what you want (and information about file IO) , I'm not going to write the code for you, that is your job / assignment.
No-one is going to give you the code here, please read the FAQs and Sickies at the top of the forum.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Try this code ...
FileStream fs = new FileStream("<Full Path FileName>", FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
string message = "<TextToWrite>";
int charcount = 0;
foreach(char ch in message)
{
sw.Write(ch);
charcount++;
if (charcount % 80 == 0)
sw.WriteLine();
}
sw.Close();
|
|
|
|
|