|
hi,
suppose i have two forms. form1 and form2.
form1 have 5 text boxes with data and 1 button.
i want, when i click the button i get those data in the form 2 using Delegate.
xyz.
xzv
|
|
|
|
|
Explain?
Sig cops got me...
|
|
|
|
|
i can't get u..... i want the code. plz explain that.
xzv
|
|
|
|
|
onlybabla wrote: i can't get u
You didn't explain why you want to use a delegate very clearly (well that's being polite, unlike someone, you didn't actually explain at all).
onlybabla wrote: i want the code
Obviously. You might as well ask nicely for it, or be willing to pay for it.
onlybabla wrote: plz explain that.
You've been set a task / created a task yourself and you would like some code to accomplish a particular function, that is why you want the code. As you why you're being rude I cannot explain that.
Sig cops got me...
|
|
|
|
|
Why would you need a delegate? Why not simply call form2 with a query string, or use session variables?
|
|
|
|
|
i can't call session variables because i am telling about Windows applications. not web.
xzv
|
|
|
|
|
Why not just create a public method in form2 that will return the values you need? You can then create a delegate on your main form (or even an anonymous delegate).
|
|
|
|
|
Hi
I am developing Windows Mobile Application using VS2005.
I am requesting File Details(XML output) from server, but the response is very slow.
FileDetails Consist of File info and its Chunks Info.
Can anybody suggests improvements in the below code to speedup the server response.
public static void httpRequest(string uri, bool isGetMethod)
{
try
{
// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create(uri);
Console.WriteLine(uri);
// We use POST ( we can also use GET )
if (isGetMethod)
myRequest.Method = "GET";
else
{
myRequest.Method = "POST";
// Set the content type to a FORM
myRequest.ContentType = "application/x-www-form-urlencoded";
Stream newStream = myRequest.GetRequestStream();
newStream.Close();
}
// Assign the response object of 'HttpWebRequest' to a 'HttpWebResponse' variable.
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myRequest.GetResponse();
// Display the contents of the page to the console.
Stream streamResponse = myHttpWebResponse.GetResponseStream();
// Get stream object
StreamReader streamRead = new StreamReader(streamResponse);
Char[] readBuffer = new Char[256];
// Read from buffer
int count = streamRead.Read(readBuffer, 0, 256);
while (count > 0)
{
//get string
string resultData = new String(readBuffer, 0, count);
HTTPClass.resultData = resultData;
// Write the data
Console.WriteLine(resultData);
// Read from buffer
count = streamRead.Read(readBuffer, 0, 256);
}
// Release the response object resources.
streamRead.Close();
streamResponse.Close();
//Close response
myHttpWebResponse.Close();
}
|
|
|
|
|
Hello,
Fews days that I try to resolve difficult code.
I nead really your help.
A windows service launch a server programm.
When the server detect an usb key whit bad number, the key is eject by CM_Request_Device_Eject
automaticaly. ( this is that I would like !)
sad reality :
If I run directly the server (whitout windows service, server launch by user ), when the user insert bad usb key, the server eject automaticaly the key. All is ok
If windows service launch server, the server cannot remote CM_Request_Device_Eject !!!
I dont know why, certainly securtity, How to give the right of the user to the server ??
Thanks
Vincent
|
|
|
|
|
If you run the server directly, it has assumed your identity. Thus it functions and performs everything that you can.
If you have it launched by the server, it runs with the assumed identity of System.
Check your rights on the box for that device.
You may need to so an Assert of the necessary security. I suggest you contact the vendor of that device to find out the security needed.
|
|
|
|
|
hi
How do can i send a sms through C#.
arnab
xzv
|
|
|
|
|
That depends on the service provider.
The service provider we use only requires a uri request which includes your account username password, the message and the numbers to which you want to send
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi
thanx for the reply but i am sorry..i can't understand that. accually i want the code for sending sms.
do u help me for how i use the service provider and username,password etc.
xzv
|
|
|
|
|
First you need to decide on the service provider you want to use to supply you with the sms's.
With them you can send sms's using your Address bar of your web browser.
ie.. www.serviceprovider.com?username?password?message?numb1,numb2 etc, just to give you a basic idea.
So through your code you build that string, then you can use command prompt to execute that line or you can use httpWebRequest.
So contact your service provider and find out from there what their requirements are, they surely will have had such a request before and might have an easier approach to this.
I know that some service provider even have prebuild webservice classes that you can just attach onto your application, that contains all needed methods for sending messages, it has needed connection settings to their servers etc.
He who laughs last is a bit on the slow side
|
|
|
|
|
I don't know how to monitor the keystrokes made on my keyboard.
To save the keystrokes of all working programs.
I have Visual Studio 2003.
Help please.
Vasildb
|
|
|
|
|
To receive system-wide keyboard input you need to use a global keyboard hook. There are some articles here on CP that cover the use of global hooks.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
i'm getting the menu container from another form..this is code..
frmMain obj_frmMain = new frmMain();
this.Menu = obj_frmMain.mainMenu1.CloneMenu();
HOW TO GET THE CLICK EVENT OR CONTROL(MENUITEM) IN MY FORM..
|
|
|
|
|
I assume your cloning of the menu was an attempt to take the events of the menu???
Wrong.
In the main form you will have to make a public accessor to your menu.
Then in your application:
frmMain mainMenu = new frmMain();
mainMenu.Menu.MyMenuOption.Click += new ClickEventHandler(MyEventHandler);
BTW: I see you are still using very old naming conventions in your code. To make it more usable you may want to read up on the Microsoft Naming Standards for .NET.
|
|
|
|
|
Hi there,
I am trying to write a procedure where my application can write some information to a file should the running executable crashes. The written info should be related to the crash, and it may be a help to understand why it happened. In C and C++, miini dump is used, what can I use for C# projects?
Please help
Many thnx
raff
|
|
|
|
|
You could attach a handler to Application.ThreadException and simply write the information of the exception to a file, this could be done by serialization. It depends on what information you want to save to disk.
Sig cops got me...
|
|
|
|
|
How did you generate minidumps in C/C++? You could get minidumps with C# also with the same method, and they'll typically contain more stack and memory information.
|
|
|
|
|
hi
i have problem in c#. how to create messenger like that yahoo.
thirumal rao
|
|
|
|
|
shri_scorpio wrote: how to create messenger like that yahoo.
By writing some code...
If you want a more specific answer than that, I am afraid that you have to ask a more specific question.
---
b { font-weight: normal; }
|
|
|
|
|
I think your problem is that you're knowledge in C# is not (yet) profound enough to develop a messenger application...
Determin first how you're going to send the data over the internet. If you know that, then you can ask here on CP what classes you use eg...
Good luck.
|
|
|
|
|
Hi,
You can find such application hare in codeproect only.....
<marquee>nishu
|
|
|
|