473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Passing a parameter into ShowDialog

I need to pass a parameter to a class while calling Showdialog method, is
this possible?
Thanks,
Carmen
Nov 16 '05 #1
3 13910
Hi Carmen,

Sure it is. Either expose some public method or property in the dialog, or pass it a reference that it can use to obtain data when needed.

Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
I used public static my_variable and it worked. Thank you!

"Morten Wennevik" <Mo************@hotmail.com> escribió en el mensaje news:opr8hw2jt8klbvpo@morten_x.edunord...
Hi Carmen,

Sure it is. Either expose some public method or property in the dialog, or pass it a reference that it can use to obtain data when needed.

Happy coding!
Morten Wennevik [C# MVP]

Nov 16 '05 #3
protected override DialogResult ShowDialog(object MyCustomParameterObject)
{
this.CustomParam = MyCustomParameterObject;
return this.ShowDialog();
}
"carmen" <ce*********@yahoo.es> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
I need to pass a parameter to a class while calling Showdialog method, is
this possible?
Thanks,
Carmen

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: andy | last post by:
i am coding a dll which contains a function take a const wchar_t* as parameter, call it form a exe, the wchar_t is passed to dll function, but the function in dll will then call another function...
3
by: No Spam Man | last post by:
I've got an app that I've written using C# and some type libraries I've generated from some of the directx .IDL files. I have got a problem with calling some of the methods on the generated...
6
by: wiredless | last post by:
What is the advantage of passing an interface type? according to UML (visio) when i reverse engineer existing code to a UML diagram I get the error "UMLE00046: sample : - An interface cannot...
2
by: Khamal | last post by:
need to passing parameter from 1st page to 2nd page... try to use public static void user_param(string namaku ,string umurku ) but still cannot why?? please help... -- :: KHAMAL ::
1
by: Joe Smith | last post by:
How to pass parameter to a Vb.Net application? ..Net Framework 1.1. Thanks, Joe
4
by: Ranginald | last post by:
Hi, I'm having trouble passing a parameter from my default.aspx page to my default2.aspx page. I have values from a query in a list box and the goal is to pass the "catID" from default.aspx...
1
by: anushree1631 | last post by:
hi I am working in C#.Net 2005. I want the whole code for Passing Parameter in Crystal report Please send it fast It's very urgent with regards, Anushree
2
by: Hakan Örnek | last post by:
Hi , I want to parameter passing to my windows sevice. I call service commands like this ; '------------------------------------------------------------ Dim sc As ServiceController sc = New...
1
by: nabakishorebehera | last post by:
Hi All, I am Nabakishore, I am passing the parameter in a function as pointer,but i am passing that parameter as refernce in the definition. iam geting some warnig like function definition...
7
by: AmiMitra | last post by:
i am having problem with passing parameter through navigateUrl property of a hyperlink. in the page where i am using the hyperlink , i am getting the data thorugh commonutility. i want to pass this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.