|
Since that's deigned generated code, the changes you make in there will be overwritten the next time the designed refreshes it. You can also break the designer by messing with that code too!
|
|
|
|
|
No, No, No!
What I mean is removing the interface from the Custom controls (labels,...)
Hope he understood it.
|
|
|
|
|
Error
------------
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
-------------
i try to use this code
but i have error
***************
using System;
using System.IO;
using System.Net;
using System.Text;
namespace Examples.System.Net
{
public class WebRequestGetExample
{
public static void Main()
{
// Create a request for the URL.
WebRequest request = WebRequest.Create("https://isp.paltel.net/login.cfm");
// If required by the server, set the credentials.
request.PreAuthenticate = true;
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Display the status.
Console.WriteLine(response.StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer);
// Cleanup the streams and the response.
reader.Close();
dataStream.Close();
response.Close();
Console.Read();
}
}
}
***************
Palestine
|
|
|
|
|
This must be the seventh time you're asking the same question in the last few days.
Last time kubben asked you if you have tried HttpWebRequest.ClientCertificates and you didn't answer.
HAVE YOU??
|
|
|
|
|
Hi all,
I have to switch from one application to another,
I have found this method:
System.Diagnostics.Process.Start("application");
that allow me to open an application...
Then when i press my button for the second time, i don't want
to start a new application but i want to open the existing one.
in this way:
System.Diagnostics.Process[] myProcesses;
myProcesses = System.Diagnostics.Process.GetProcessesByName("application");
i can know if my process is already running but now I don't know
to show this application...
Can someone help me??
Thanks a lot.
Cliffer
|
|
|
|
|
Hello,
You could use the MainWindowHandle property of the process in combination with BringWindowtoTop method of user32.dll.
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int BringWindowToTop(IntPtr hwnd);
public IntPtr HWND_TOPMOST =(IntPtr)(-1);
public IntPtr HWND_NOTOPMOST =(IntPtr)(-2);
System.Diagnostics.ProcessStartInfo psi;
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
psi.FileName = "???.exe";
using(System.Diagnostics.Process process = new System.Diagnostics.Process())
{
process.Start(psi);
process.WaitForInputIdle();
BringWindowToTop(process.Handle);
}
I'm using this in .Net1.1, maybe in .Net 2.0 there is a more elegant way.
Hope it helps!
All the best,
Martin
|
|
|
|
|
Yes thanks this work fine...
The only problem is that I hope to find a method that works
without import user32.dll
So now i work with this but if someone know a method that not use
user32.dll it would be better..
thanks
|
|
|
|
|
hi,
i want to control the keyboard a system through another system.ie i need to get the controls of the keyboard of a system to the keyboard of another system which are connected through network.plz help me.
Exploring C#...
|
|
|
|
|
Apart from that I don't understand all, it sound a little "illegal"!
|
|
|
|
|
illegal??? havent u seen the VNC viewer????
we are creating a software which enables server to control its clients.....
This code was posted by me...
|
|
|
|
|
Maybe I didn't understood you wright, for me it sounds like you whanted to create a keygrapper.
Sorry I couldn't help.
All the best,
Martin
|
|
|
|
|
okies.....is there any way we can stimulate a keypress???
i mean if we give the corresponding ASCII value of a key,the program should do the key press.....
This code was posted by me...
|
|
|
|
|
|
Have a look at the SendKeys class
|
|
|
|
|
thank you martin and Luc.it worked....
This code was posted by me...
|
|
|
|
|
|
that code helped me in the client side by stimualating the key press...but im having a problem with getting the parameter for the function from the keyboard of the server.how can i identify which key is pressed??it works with the GetChar() only for the alpha numeric keys.how can i make it working for all the keys????
This code was posted by me...
|
|
|
|
|
If you are handling the KeyPress event you can use the KeyPressEventArgs member KeyChar.
For example "Enter" is pressed:
if(e.KeyChar == 13)
If you are handling the KeyDown event you can use the KeyEventArgs members KeyData, KeyCode and KeyValue.
Hope it helps!
All the best,
Martin
|
|
|
|
|
Vivek is probably gonna make a password grabber and put it onto a machine in the pentagon. He will then proceed to take over the world and it will be all your fault. Thanks Martin#
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Yes, that's all included in my plan!
Because if all works well, he will remember me, and make me a the Co leader of the world! ;P
|
|
|
|
|
he he.....thats a good idea smyers .
thanks for the tips martin#.thanking you on behalf of all my team members..
This code was posted by me...
|
|
|
|
|
You are very much wellcome!
It's allways nice to hear that somebody had benefit from my tips!
|
|
|
|
|
hey....SendKeys() is not working for the windows logo key(start menu key)...there is no code for these keys in that function....any solution??
This code was posted by me...
|
|
|
|
|
Hello everyone,
I have an ASP.NET C# website that loads data (modules). This is my code below:
private void prevMod()
{
string[] stModArray = (string[])Session["modArray"];
for (int i=stModArray.Length-1; i>0; i--)
{
if (Session["selectedModule"].ToString() == stModArray[i].ToString())
{
Session["selectedModule"] = stModArray[i-1].ToString();
break;
}
}
BindData();
}
Ultimately, this button loads all the data into a string array and when you press it it moves to the previous item in the array but before I'm able to do that I get this error:
Object reference not set to an instance of an object. - for (int i=stModArray.Length-1; i>0; i--)
Does anyone have any ideas? Thanks in advance I appreciate the help
|
|
|
|
|
Have you tried stepping through the code to see what causes the error ? Is modArray always a string array ? Are the strings ever null ?
Michael101 wrote: stModArray[i].ToString(
This is kind of ridiculous, you call ToString on a string, and it could be null, which would cause your error.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|