|
|
How to work with PrintDialog?
I want to Print for example a Doc File that has opened in my application
What should I do for it?
Hello Friends
|
|
|
|
|
How to know shutdown using c#?
Not using service or SessionEnding event.
Thanks a lot!
|
|
|
|
|
You can use the InitiateSystemShutdown[^] function.
You'll need to use pinvoke to call it from C#. pinvoke.net[^] will help you find the right signature for the declaration.
(Alternatively, you can use WMI if you prefer. Just google it)
Simon
|
|
|
|
|
Hi,
I have a desktop Human Resource (HR) application developed in WPF that does some employee management work for the HR,I need to implement user groups based security,meaning that I need to manage users who can access the system(username /password) and also give them CRUD Right and Screen Rights.Is that any basic framework I can build over or should I start from scratch? Any feedback, suggestion regarding this?
Thanks in advance.
|
|
|
|
|
\root\cimv2
Do you know if the above wmi path is looking at the registry?
if so, please let me know where in the registry I can find it.
Thanks.
|
|
|
|
|
root\cimv2 is a WMI namespace.
Although much of the info obtainable from the classes in that
namespace may ultimately be stored in the registry, there is no
connection between the namespace and the registry.
Windows Management Instrumentation[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi I have a dataset which its views don't appear in any datamember list.
I created another project and added the same database,in that new project every thing is working fine.so I just removed the dataset and added it again but the problem persists.
can any one help me? should I correct any configuration setting?
by the way I haven't changed any configuration in any project and I am using VS2008.
thanx
|
|
|
|
|
How to work with Shortcut & Keyboard
For Example I want Manage Keys like "Ctrl+F" for Search
How to do it?
Thanks in advance
Hello Friends
|
|
|
|
|
private void frmFormName_KeyDown(object sender, KeyEventArgs e)<br />
{ <br />
if (e.Control && e.KeyCode == Keys.F)<br />
{ <br />
MessageBox.Show("Conbination key CTRL+F is pressed"); <br />
}<br />
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Thank you very much
Hello Friends
|
|
|
|
|
You are welcome.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
|
|
Sneaker.Net
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
Kindly let me know that, how to avoid messageBox windows using following?
System.Diagnostics.Process objProc = new System.Diagnostics.Process();
objProc.StartInfo.FileName = "REGSVR32";
objProc.StartInfo.Arguments = "ABC.ocx";
objProc.Start();
Thank you in Advance
(Riaz)
|
|
|
|
|
|
objProc.StartInfo.Arguments = "/s ABC.ocx";
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hi all,
i want to write prime numbers program in c# 2.0
Regards
Vidhish
|
|
|
|
|
public bool IsPrime(int number)
{
for (int i = 2; i < number; i++)
{
if (number % i == 0)
{
return false;
}
}
return true;
}
This method should do it
|
|
|
|
|
Is 1 prime?
Is 0 prime?
Is -1 prime?
What happens with IsPrime(int.MaxValue) ?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
The main purpose of the messages posted here is not directly giving solution or the project. It was just an idea and improvements are up to user. And if the solutions that suggested are at the level of a user, then it can be helpfull.
For your mathematical questions :
1 is not a prime number.
0 is not a prime number.
-1 is not a prime number.
For your logical questions:
ulong can be used too. But i dont think that this is not necesarry for a user that can not search google.
For information with corrections the metod should be like this.
public bool IsPrime(ulong number)
{
if (number < 2)
{
return false;
}
for (ulong i = 2; i < number; i++)
{
if (number % i == 0)
{
return false;
}
}
return true;
}
|
|
|
|
|
please, i want 2 write this program without using "bool" just a simple program, if, else, for..
the program should read an integer and display all prime numbers between it and 10.000
thank you
|
|
|
|
|
vidhish wrote: i want to write prime numbers program in c# 2.0
That's nice. It will be a good exercise for you, to warm up those programming skills. Start with something simple/slow that will work, like testing division for every lower number. Then try improve it, then turn to Google for more ideas.
Good luck.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|