Home All Groups Group Topic Archive Search About
Author
6 Apr 2006 1:26 PM
G .Net
Hi

Is there any way I can a DialogResult with a label click on a form? That is,
I would like to be able to close a form when a label is clicked and also
send, for example, DialogResult.OK to the calling routine for the form e.g.

Dim f As frmMyForm = New frmMyForm
If f.ShowDialog = DialogResult.OK Then
.......
End If

Thanks in advance

Author
6 Apr 2006 1:31 PM
Chris Dunaway
Can't you assign the DialogResult in the click event of the label?
What problem are you having?
Author
6 Apr 2006 1:36 PM
G .Net
Hi Chris

You'll have to forgive my ignorance but I'm not sure how to do that. I can
generate the code for the click event but I don't know how to take it from
there.

G

Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1144330284.022149.153080@u72g2000cwu.googlegroups.com...
> Can't you assign the DialogResult in the click event of the label?
> What problem are you having?
>
Author
6 Apr 2006 2:05 PM
G .Net
D'OH!

Ok, just realised what you meant Chris!

Thanks. Problem solved.


Show quoteHide quote
"G .Net" <nodamnspam@email.com> wrote in message
news:T_KdnSpEPbKihKjZnZ2dnUVZ8qadnZ2d@pipex.net...
> Hi Chris
>
> You'll have to forgive my ignorance but I'm not sure how to do that. I can
> generate the code for the click event but I don't know how to take it from
> there.
>
> G
>
> "Chris Dunaway" <dunaw***@gmail.com> wrote in message
> news:1144330284.022149.153080@u72g2000cwu.googlegroups.com...
>> Can't you assign the DialogResult in the click event of the label?
>> What problem are you having?
>>
>
>