|
OK
|
|
|
|
|
Thats like asking why would someone rather learn C++ than C#. =)
|
|
|
|
|
I would rather re-implement an ancient adventure game than learn an ancient language...
|
|
|
|
|
i have a widows service from which i need to invoke(Run) a windows application !! well i had a function which did that for me.In my computer having (windows xp 2002) i have only one account on which service in installed and run .. and it works fine but when i move to another machine windows 2000 server which have more than one account and i am not log in as administrator than it does not worl the process is shown on task manager only.. can any one suugest me where is the problem i will post a method which invokes application from my service in my computer.
public string LaunchProcess(string processname)
{
bool ret = false;
PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
STARTUPINFO si = new STARTUPINFO();
//Optional Startup Information.
si.cb = (uint)Marshal.SizeOf(si.GetType());
//Specially useful when Launching Apps from a non-interactive Service.
si.lpDesktop = @"WinSta0\Default";
si.dwFlags = STARTF_USESHOWWINDOW | STARTF_FORCEONFEEDBACK;
si.wShowWindow = SW_SHOW;
ret = CreateProcess( null,
new StringBuilder(processname),
IntPtr.Zero,
IntPtr.Zero,
true,
NORMAL_PRIORITY_CLASS,
IntPtr.Zero,
null,
ref si,
out pi);
if (ret == true)
{
Process p = Process.GetProcessById((int)pi.dwProcessId);
}
else
{
Process.Start(processname);
}
}
well i am a c# programmer(for saying).. plz do help me ((
|
|
|
|
|
try this
System.Diagnostics.Process.Start("nameofapplication");
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Also check in your service settings that the service can interact with the desktop.
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
I want to hide or remove the default text in a textbox (or table) I one report parameter is an empty string. How do I do that? I’m using rdlc and the ReportViewer in Visual Studio 2005.
_____________________________
...and justice for all
APe
|
|
|
|
|
first you need to select the text you want to delete then you delete it:
textbox1.Select(int index, int count);
textBox1.Selected = String.Empty.
|
|
|
|
|
Hi,
I'm working on a project where we need to use a ftp client for downloads and uploads. We formerly used a project downloaded from the internet, FtpFactory. This programm only supports passive mode.
We need to use PORT mode now. All goes well for downloading a file from the server. I use a socket that listens to the port I specified and when data is received it triggers a specific method:
socket.BeginAccept(new AsyncCallback(this.AcceptCallback), listensocket);
private void AcceptCallback(IAsyncResult ar)
{ .. start processing incoming data... }
However I also need to be able to upload files. I just can't get the better of this problem. Can someone help me on this one. The socket I'm listening on is not connected, so I cant use it for uploading (sending).
Thanks in advance,
Roeland
|
|
|
|
|
Good Day Sir/Maam,
Whats the best way to temporarily stop a loop and wait for a mouse click on a command button before proceeding?
while(True)
{
//Dothis
getch();
}
Just like the above code, but this time, not a key press but a click event on a command button.
Thanks in advance.
|
|
|
|
|
Hello,
I don't know if it's only me, but I don't like such solutions.
I would rather set a flag in the method (where you wanted to wait).
Than check this flag at the ButtonClick event, and go on with the code.
All the best,
Martin
|
|
|
|
|
Thanks for the reply.
I need it to make a program that simulates a sorting algorithm, So I need to show each pass so the user can "WATCH" it.
|
|
|
|
|
Ok!
So remember where you have been in your algorithm, and go an after the method is called again at your button click.
All the best,
Martin
|
|
|
|
|
You could use a ManualResetEvent or AutoRestEvent. Have the event triggered by the button click.
only two letters away from being an asset
|
|
|
|
|
What about:
while(True)
{
while(IsLoopPaused == true)
{
//Add thread.sleep or doevents code here.
}
getch()
}
Then have IsLoopPaused set to true when you want to pause and have your button click event set IsLoopPaused to true.
|
|
|
|
|
Hai everybody,
I got a problem in sending mail i used System.Net .Mail namespace when i tried it using int he local server it is working but whenever i tried it in the remote server it is not working it is showing some errors.
Can you please give me solution to it.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Check whether the remote server has port 25 unblocked.
Does that server also has permission to access the SMTP Server.
You can check this by telnet.
|
|
|
|
|
In your Server did you check the port 25 is Unblocked .
And also check with the Norton Antivirus is it Blocking or not.
Regards,
Satips.
|
|
|
|
|
Thank you so much for time being i got it another way. i will get back to you.
But port 25 is unblocked and i am using VS 2005.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
what is the error you are getting?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
I want to zip files of a folder and want to send them as e-mail attachment to the recepient.
|
|
|
|
|
Hello,
The SharpZipLib[^] is a freeware .Net Zipper.
All the best,
Martin
|
|
|
|
|
|
The issue with the GZipStream class is that it can only compress a single file. You can't use it to compress multiple files into a single archive like Zip or Rar.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi,
if you want to build the algorithm by your self, look for Huffman Coding in google. i have a dll library which compress and decompress files in real time! if you need it, so i can send you! and i coded a one by my self in C#, i can send you the code!;)
|
|
|
|