|
Hi all
Can anybody send me a sample code how to upload a file to VSS to a specified directory using c#???
Thanx
Akhil
|
|
|
|
|
You dont upload to VSS, you 'Check-In'.
|
|
|
|
|
Hi
In my application i am trying to send a mail through outlook
.. the problem is when i try to send the outlook first displays a security alert.. Can anybody suggest a way to avoid this warning ???
Thanks
Akhil
|
|
|
|
|
Don't send mail through Outlook.
The reason this security alert was added was to try to limit the spread of email-borne viruses. If you're trying to send email, use the classes from the System.Net.Mail namespace (from .NET 2.0) or System.Web.Mail (any version, but uses CDO rather than an implementation of the SMTP protocol).
|
|
|
|
|
How can i create Setup and Deployment project for an application usingVisual Studio 2005 (Profesional Edition)?
Thanks for consideration.
|
|
|
|
|
Just create a new project. You'll find several project types under "Setup and deployment".
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
when my appliction starts the process comes up and runs
but in case that the process is exited abnormally by program errors or exceptions, the process wouldn't be killed.
so, now i coded like the below..
**************************************
Process[] erssProcess = Process.GetProcessesByName("ERSS.WinUI");
if (erssProcess.Length > 1)
{
MessageBox.Show("The Proccess is running. Please kill the running process first");
return;
}
**************************************
but that's not enough. i like to kill the previous process and run the new process.
i don't know how to distinguish the first process and the second process.
please help~~
|
|
|
|
|
Get the process ID (the number) not the name from the other process and kill it.
|
|
|
|
|
but every time i run the process the process id is changed.
how do i know which one is which?
|
|
|
|
|
Process[] processes = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
foreach(Process p in processes)
{
if(p.Id != Process.GetCurrentProcess().Id)
{
p.Kill();
}
}
|
|
|
|
|
Iam Developing P2p file sharing application using VS2003, I have a list box of all the file names downloaded to my PC, i want to open the file on clicking the filename.
How is it possible?
|
|
|
|
|
System.Diagnostics.Process.Start(@"filepath");
|
|
|
|
|
Thanks a lot,I got the result I wanted.
|
|
|
|
|
hi there
can you please tell me how can i show a message if my app wasn't used for a specific period of time?
i mean how can i determine that my app wasn't used!!?
thanks
-- modified at 21:40 Friday 28th July, 2006
|
|
|
|
|
Use some flags, and set this flag in OnMouseMove or OnKeyDown.
For counting the time you can use timer.
|
|
|
|
|
Thanks but you mean OnMouseMove/OnKeyDown of the form?
What if the mouse was moved over a control, such as a treeview?
Should I handle OnMouseMove/OnMouseMove of all the controls in my form?!
This is not right.
|
|
|
|
|
I have written several services in C#.NET, but this is the first one which is self-installing (I scan the main(string[] args) for the "-i" or "-r" switches to install or remove the service respectively. I would like to give the administrator some indication of the success of the process, but it does not appear that Console.WriteLine() works in a C#.NET service (even when it is invoked in a command shell rather than from svchost.exe).
Am I missing something obvious (it would not be the first time)? Obviously, when the code is running as a service under svchost.exe, it will not have access to any consoles for output. But this is running in a command shell, so shouldn't console output work there?
BTW, this is .NET 1.1 (the "enterprise" does not support 2.0 yet).
Thanks!
gmorse@cox.net
-- modified at 22:05 Friday 28th July, 2006
|
|
|
|
|
Use the eventlog, or create a log file.
|
|
|
|
|
trying to create a generic indexer where the class definition does not have a <T>
psedo code below.
<code>
public myClass{
public T this<T>[ValueType item]{
get{
return null;
}
}
}</code>
other than creating two methods for get and set are there any other solutions? or explinations as to why this would not work
-- modified at 19:07 Friday 28th July, 2006
|
|
|
|
|
You cant use type arguments on property definitions.
|
|
|
|
|
Hi!
Is it possible to redirect the output from Process.Start to a textfile or (even better) a variable?
I'm using Process.Start to invocate ipconfig to get the mac address..
Thanks in advance,
-K
|
|
|
|
|
Use Process Start Info to indicate that the process will redirect its std out, in , and err then on then create a process object with the start info as a parameter. Set event listeners on the process for the 3 streams and viola.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Bien! Just what I wanted. Thanks a million...
-K
|
|
|
|
|
Process p = new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute = false;
//p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "ipconfig.exe";
p.StartInfo.Arguments = ("/all");
p.StartInfo.RedirectStandardOutput = true;
p.Start();
p.WaitForExit();
string s = p.StandardOutput.ReadToEnd();
Console.WriteLine(s);
Console.ReadKey();
-K
|
|
|
|
|
Hi,
I am deploying a C# application and along with that, i am also deploying SQL Express. Now i want to create the account for user of that application. Please tell me how can i do that.
Regards,
Wasif Ehsan.
|
|
|
|