|
I want to hide the processes in the task manager using C#.Let me tell you it's only for the learning purpose it doesn't mean that i want to make a key logger.
I would appreciate if someone helps me
Fahad Ali
|
|
|
|
|
I'll tell you how to do it on 98
On 2k / XP it's not going to happen with C#, sorry.
Alex Korchemniy
|
|
|
|
|
I could use some advice on how to automate the following .aspx upload snippet to where there would be no user interaction required and all form field values would be passed instead of keyed in. A C# class to do this work would be ideal. I know that I would need to use a HttpWebRequest method, but I am unsure how to do this use using just a C# class.
The .aspx form code below is what I am trying to automate. Thanks.
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="https://somesite.com/someuploadpage.aspx" ID="Form7">
<input type="text" name="FOLDER"> FOLDER<br>
<input type="text" name="PORT_ID"> Port Id
<input type="text" name="Id" ID="Text1"> Id
<input type="PASSWORD" name="PASSWORD"> Pwd
<INPUT TYPE="FILE" SIZE="40" NAME="FILE1" ID="File1"><BR>
<input type="text" name="Type1"> Type
<input type="text" name="INVOICE_NUM" ID="INVOICE_NUM"> INVOICE_NUM
<input type="text" name="TOTAL_FEE" ID="TOTAL_FEE"> TOTAL_FEE
<INPUT TYPE="SUBMIT" VALUE="Upload!" ID="Submit6" NAME="Submit6">
</FORM>
GG
|
|
|
|
|
Look at the System.Net.WebRequest documentation. It shows much of what you need.
Then you need to learn how to put the request data together for posting form variables. They are basically an amperstand (&) delimited collection of name=value pairs of strings where the values are URL Encoded.
So an un-encoded string containing form variables named (this,date,theother) would look like:
this=that&date=5/15/2006&theother=whatever you need
The value portions would need to be urlencoded. See System.Web.HttpUtility.UrlEncode.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Thanks for advice. I will look in the documentation provided for the System.Net.WebRequest.
GG
|
|
|
|
|
How can i generate random Int64 with c#
|
|
|
|
|
System.Random.NextBytes()[^]
Here's another way:
System.Security.Cryptography.RNGCryptoServiceProvider rng = new System.Security.Cryptography.RNGCryptoServiceProvider ();<br />
Byte[] bytes8 = new Byte[8];<br />
rng.GetBytes (bytes8);<br />
Int64 rand = BitConverter.ToInt64 (bytes8, 0);
Jon Sagara
When I grow up, I'm changing my name to Joe Kickass!
My Site | My Blog | My Articles
|
|
|
|
|
|
Judah Himango wrote: long rand64 = rand.Next() + rand.Next()
I hope that was a joke
|
|
|
|
|
It wasn't, what can I say, for some reason I was thinking that would work but of course it won't. +
I guess a better idea would be to use the Random.NextBytes, then generate a long from those bytes. Something like
Random rand = new Random();
byte[] longBytes = new byte[8];
rand.NextBytes(longBytes);
long random64 = BitConverter.ToInt64(longBytes, 0);
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you!
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I was thinking more along the lines of:
long r64 = (long)r.Next() << 32 + r.Next();
|
|
|
|
|
|
Random r = new Random();
Int64 i = (Int64)r.Next() + ((Int64)r.Next() << 32);
|
|
|
|
|
Hi
How do I read one line at a time from a text file?
I use the .ReadLine, now when i click my ReadFromFile button it reads the first line prints it to txtBox, which is fine but now when i click ReadFromFile again it must go to the next string in my textfile and write that line to my textBox. So everytime i click Next it must show me the next line from the txtFile.
I know its easy stuff, but im a beginner.
Please help
|
|
|
|
|
You need to contain the object you are using to read the file (MyObject.ReadLine) in the proper scope. If you are starting out in software development there are fundamental constructs (like scope) that you must understand or you will quickly be lost in a pile of spaghetti code.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
class YourClass : Form
{
StreamReader reader;
void button_Click(object sender, EventArgs e)
{
textBox.Text = reader.ReadLine();
}
}
Notice the reader object is outside the function, so it gets kept for as long as your class is kept.
You also have to create the reader first; until you assign an object to it, it's just a placeholder.
Something like this:
reader = new StreamReader("somefile.txt");
|
|
|
|
|
Hi people, I have successfully download SMS from a phone using a Serial connection in C#, but i´ve been unable to download MMS from the phone...
Any ideas where can I start??
Thanks in advance.
Uncle
|
|
|
|
|
Hello,
How to represent DateTime in specified format?
For example yyyy-mm-dd?
|
|
|
|
|
DateTime dt = new DateTime();<br />
string strdate = dt.ToString("yyyy-MM-dd");
|
|
|
|
|
|
|
Hello. I want to open a new Browser window, for example Internet Explorer or Firefox, depending of what is your default navegator.
One way will be this:
System.Diagnostics.Process.Start("http://www.google.com");
But the problem of that is that if I have a Internet explorer window open, and I execute the line, it'll be open the google page in that explorer. I want to open the google page in a new web browser.
An other option is this:
System.Diagnostics.Process.Start("IExplore.exe", strLink);
But I only open with IExplorer
Any ideas ?
Thanks a lot.
|
|
|
|
|
Process p = new Process();<br />
p.StartInfo.FileName = "iexplore.exe";<br />
p.StartInfo.Arguments = "http://www.ryanfarley.com/";<br />
p.Start();
|
|
|
|
|
Hello albCode. The problem is that I want to open the default web broswer of the client.
Thanks a lot.
|
|
|
|
|
Hi, I need help with a Regular Expression for an integer between 0 and 2,147,483,647... I need this to validate than a positive integer in a int32.
Thanks, I would appreciate any help I can get..
|
|
|
|