Click here to Skip to main content
15,902,198 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Make Window Flash 3 Times Pin
Anonymous20-Feb-03 13:14
Anonymous20-Feb-03 13:14 
GeneralHelp is on the wheels............. Pin
r i s h a b h s20-Feb-03 21:03
r i s h a b h s20-Feb-03 21:03 
GeneralOLE control Pin
Anthony988719-Feb-03 7:01
Anthony988719-Feb-03 7:01 
GeneralOLE control Pin
Anthony988719-Feb-03 7:01
Anthony988719-Feb-03 7:01 
GeneralLaunch Application From Windows Service Pin
J Smith19-Feb-03 3:49
J Smith19-Feb-03 3:49 
Generalreport width larger then paper width Pin
mcm19-Feb-03 2:42
mcm19-Feb-03 2:42 
GeneralRe: report width larger then paper width Pin
thehms20-Feb-03 5:32
thehms20-Feb-03 5:32 
Generalhelp - Control Array and Refer to the control in KeyDown events in VB.net Pin
gilbertlow18-Feb-03 22:14
gilbertlow18-Feb-03 22:14 
plz help....

I used to use control array in vb which is currently not support by vb .net. For example, if i have 5 text box and make it as control array of text(0), text(1)...text(4) to refer to respective text control. what happen is i have a problem of refering to the control in the form when the control having the focus by press the f3 key to call the lookup windows...in vb .net. Attached with sample code for your reference and understanding in VB.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

With ActiveControl
Select Case KeyCode
Case vbKeyF3
Select Case .Name
Case "text"
Select Case .Index
Case cozsys_textbox0
If Lookup("select zsys_comid as Company_ID, " & _
"zsys_comnm as Company_Name, " & _
"zsys_regno as Register_No " & _
"from zsys order by zsys_comid") Then

.Text = LookupFields("Company_ID")

Case cozsys_textbox1

Case cozsys_textbox2

Case cozsys_textbox3


End If
End Select
text(.Index).SetFocus
text(.Index).DataChanged = False
End Select
End Select
End With

End Sub

where cozsys_textbox0, cozsys_textbox1, cozsys_textbox2, cozsys_textbox3 is the array index for text box 1 to 4


How could we refer the control array in the calling Private Sub form1_KeyDown(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown in vb .net. Please help me ? Any other methods ?

Thank you very much


Gilbert

QuestionUsing Windows Animations? Pin
nefilm18-Feb-03 9:52
nefilm18-Feb-03 9:52 
GeneralFreeze columns in MSHFlexGrid Pin
Andy H18-Feb-03 6:20
Andy H18-Feb-03 6:20 
QuestionHow to develop a wrapper around an executable and an argument? Pin
DengJW18-Feb-03 2:51
DengJW18-Feb-03 2:51 
QuestionHow to acces the component running on another machine Pin
suresh_sathya18-Feb-03 0:08
suresh_sathya18-Feb-03 0:08 
AnswerRe: How to acces the component running on another machine Pin
Paul Farry22-Feb-03 17:13
professionalPaul Farry22-Feb-03 17:13 
GeneralMoving around a dataset Pin
Mike Murphy17-Feb-03 7:02
Mike Murphy17-Feb-03 7:02 
GeneralKazaa Search Automation Pin
lumpyandsuspicious17-Feb-03 4:34
lumpyandsuspicious17-Feb-03 4:34 
GeneralRe: Kazaa Search Automation Pin
mikasa21-Feb-03 9:41
mikasa21-Feb-03 9:41 
GeneralReading file which is in source control Pin
suresh_sathya17-Feb-03 2:07
suresh_sathya17-Feb-03 2:07 
General.net Picturebox bug Pin
RZLR16-Feb-03 20:33
RZLR16-Feb-03 20:33 
GeneralGUI design problem Pin
Andy H16-Feb-03 6:09
Andy H16-Feb-03 6:09 
GeneralRe: GUI design problem Pin
manoj madahavan20-Feb-03 5:05
manoj madahavan20-Feb-03 5:05 
QuestionIs there any control for hyper-text besides IE? Pin
smartnose14-Feb-03 18:41
smartnose14-Feb-03 18:41 
AnswerRe: Is there any control for hyper-text besides IE? Pin
FruitBatInShades16-Feb-03 11:34
FruitBatInShades16-Feb-03 11:34 
GeneralIcon full quality issue Pin
NicoVB14-Feb-03 8:50
NicoVB14-Feb-03 8:50 
GeneralRe: Icon full quality issue Pin
Jeremy Falcon19-Feb-03 7:34
professionalJeremy Falcon19-Feb-03 7:34 
GeneralRe: Icon full quality issue Pin
NicoVB19-Feb-03 7:56
NicoVB19-Feb-03 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.