By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,044 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,044 IT Pros & Developers. It's quick & easy.

Handle

P: n/a
I am converting a project from VB6 to VB.Net. In vb6, I created a textbox array on the form, and depending on the table querying, I would load new textbox's based on the fields in the table. I would store the index in a user defined type fldInfo array that also stored the field name. Then, when the user double clicked a textbox, depending on the field name stored in type fldInfo, I would perform some function such as opening a dialog box

In vb.net, how would I perform this same function without the indexes? I know that you set the Handles on a function to handle a double click. Is it possible to add handles at runtime?
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Addhandler.
"Doug" <an*******@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
I am converting a project from VB6 to VB.Net. In vb6, I created a textbox array on the form, and depending on the table querying, I would load new
textbox's based on the fields in the table. I would store the index in a
user defined type fldInfo array that also stored the field name. Then, when
the user double clicked a textbox, depending on the field name stored in
type fldInfo, I would perform some function such as opening a dialog box.
In vb.net, how would I perform this same function without the indexes? I

know that you set the Handles on a function to handle a double click. Is it
possible to add handles at runtime?
Nov 20 '05 #2

P: n/a
"Doug" <an*******@discussions.microsoft.com> schrieb
I am converting a project from VB6 to VB.Net. In vb6, I created a
textbox array on the form, and depending on the table querying, I
would load new textbox's based on the fields in the table. I would
store the index in a user defined type fldInfo array that also stored
the field name. Then, when the user double clicked a textbox,
depending on the field name stored in type fldInfo, I would perform
some function such as opening a dialog box.

In vb.net, how would I perform this same function without the
indexes? I know that you set the Handles on a function to handle a
double click. Is it possible to add handles at runtime?


Yes, use the Addhandler statement.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

P: n/a
* "=?Utf-8?B?RG91Zw==?=" <an*******@discussions.microsoft.com> scripsit:
I am converting a project from VB6 to VB.Net. In vb6, I created a
textbox array on the form, and depending on the table querying, I would
load new textbox's based on the fields in the table. I would store the
index in a user defined type fldInfo array that also stored the field
name. Then, when the user double clicked a textbox, depending on the
field name stored in type fldInfo, I would perform some function such as
opening a dialog box.

In vb.net, how would I perform this same function without the indexes?
I know that you set the Handles on a function to handle a double click.
Is it possible to add handles at runtime?


Add the handler using 'AddHandler' and have a look at the handler's
'sender' parameter to get a reference to the control that raised the
event.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

P: n/a
Thanks! Works great

----- CJ Taylor wrote: ----

Addhandler
"Doug" <an*******@discussions.microsoft.com> wrote in messag
news:A8**********************************@microsof t.com..
I am converting a project from VB6 to VB.Net. In vb6, I created a textbo

array on the form, and depending on the table querying, I would load ne
textbox's based on the fields in the table. I would store the index in
user defined type fldInfo array that also stored the field name. Then, whe
the user double clicked a textbox, depending on the field name stored i
type fldInfo, I would perform some function such as opening a dialog box
In vb.net, how would I perform this same function without the indexes?

know that you set the Handles on a function to handle a double click. Is i
possible to add handles at runtime

Nov 20 '05 #5

P: n/a
JLW
Just don't forget to set the name property accordingly... It caused me 3
hours of nightmares :)

JLW

"Doug" <an*******@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
I am converting a project from VB6 to VB.Net. In vb6, I created a textbox array on the form, and depending on the table querying, I would load new
textbox's based on the fields in the table. I would store the index in a
user defined type fldInfo array that also stored the field name. Then, when
the user double clicked a textbox, depending on the field name stored in
type fldInfo, I would perform some function such as opening a dialog box.
In vb.net, how would I perform this same function without the indexes? I

know that you set the Handles on a function to handle a double click. Is it
possible to add handles at runtime?
Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.