I have a form in which a user clicks a button to make a choice, and that
choice is evaluated after the form is closed. Is there a way to create
custom dialog results, that is, dialog results other than OK, Cancel, Retry,
etc.? I know of other ways to work it, but I was just wondering if this
were possible. 5 7201
Hi Nathan,
I asume you use a dialogform
that goes something as this
\\\
frm as new form2
frm.showdialog
///
Then you can do
\\\\
if frm.myMessagefield = "Hello Nathan"
then DoHelloNathan
end if
frm.dispos
///
In your form2 you need therefore
public myMessagefield as string
(You can do it with a property but that is for me to much work for a
dialogform).
and somewhere in your dialog
myMessagefield="Hello Nathan"
I hope that was your question?
Cor I have a form in which a user clicks a button to make a choice, and that choice is evaluated after the form is closed. Is there a way to create custom dialog results, that is, dialog results other than OK, Cancel,
Retry, etc.? I know of other ways to work it, but I was just wondering if this were possible.
* "Nathan" <nk*********************@softhome.net> scripsit: I have a form in which a user clicks a button to make a choice, and that choice is evaluated after the form is closed. Is there a way to create custom dialog results, that is, dialog results other than OK, Cancel, Retry, etc.? I know of other ways to work it, but I was just wondering if this were possible.
Add a property to the form (of an enum type), set its value and check
the property after closing the form.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Thanks a lot. I'll give it a try and see if it works.
"Cor" <no*@non.com> wrote in message
news:up**************@TK2MSFTNGP09.phx.gbl... Hi Nathan,
I asume you use a dialogform that goes something as this \\\ frm as new form2 frm.showdialog /// Then you can do \\\\ if frm.myMessagefield = "Hello Nathan" then DoHelloNathan end if frm.dispos ///
In your form2 you need therefore public myMessagefield as string (You can do it with a property but that is for me to much work for a dialogform).
and somewhere in your dialog myMessagefield="Hello Nathan"
I hope that was your question?
Cor
I have a form in which a user clicks a button to make a choice, and that choice is evaluated after the form is closed. Is there a way to create custom dialog results, that is, dialog results other than OK, Cancel, Retry, etc.? I know of other ways to work it, but I was just wondering if this were possible.
Not exactly what I was hoping to do, but I think it will work easy enough.
Thanks.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e5**************@TK2MSFTNGP10.phx.gbl... * "Nathan" <nk*********************@softhome.net> scripsit: I have a form in which a user clicks a button to make a choice, and that choice is evaluated after the form is closed. Is there a way to create custom dialog results, that is, dialog results other than OK, Cancel,
Retry, etc.? I know of other ways to work it, but I was just wondering if this were possible.
Add a property to the form (of an enum type), set its value and check the property after closing the form.
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
"Nathan" <nk*********************@softhome.net> wrote...
Hi Nathan... I missed your original message and I see you have some
responses to: I have a form in which a user clicks a button to make a choice, and
that choice is evaluated after the form is closed. Is there a way to
create custom dialog results, that is, dialog results other than OK, Cancel, Retry, > > > etc.?
As you probably noticed the results of showdialog must be one of the
predefined DialogResult enums. On the other hand it seems to me you could
easily wrap your form which you intend to use as a dialog window. Call it
instead, have it display the dialog and have it do any additional
interpretive work you need eventually returning just the value you wanted.
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: AMDRIT |
last post by:
'System.Runtime.InteropServices.SEHException' occurred in
system.windows.forms.dll is generated when I use "My Custom Dialog". Any
ideas what I could be doing wrong?
Basically, I wanted to...
|
by: Dennis C. Drumm |
last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am
building a custom MessageBox dialog that has, among other things, a few new
button options (yes to all, no to all, etc.)...
|
by: logicalfeline |
last post by:
Hi there,
I'm creating an installation project where at a particular point in the
installation I want the user to be able to specify a filepath for use in the
program. My idea was to create a...
|
by: pswulius |
last post by:
Hey everyone,
for reasons I can't explain quickly, I'm developing a completely custom
OK/OK_CANCEL dialog, though I think many people would benifit from this
knowledge. I basically need to...
|
by: LhK-Soft |
last post by:
Hi,
I'm active in VC++ for several years now, so I know some things (I think).
Using MS-Access I store a db with lots of entries and uses the VBA
techniques to export those data to e.g. HTML, XML...
|
by: J-Rod |
last post by:
Hi everyone/anyone,
I am using a button in my app that opens the color dialog, and allows
the user to select a color which changes the backcolor of a label. I
then store the color in my db as a...
|
by: Kemin |
last post by:
Recently I built an ASP.NET application Installation program for deployment.
The ASP.NET app use a Sql Server db, I package it into the installation file
too.
The general step of building an...
|
by: Gancy |
last post by:
Hi
In my setup project I need a custom dialog box containing a drop down
list box. Since this is not avaialble from standard user interface
dialog boxes that visual studio supplies, I am using...
|
by: Gord |
last post by:
In VB6, a custom dialog can be easily created by adding a new form, adding
whatever controls you like, sizing it as you like, adding code and then just
loading/unloading it whenever you like....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
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...
|
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...
|
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...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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
| |