Home > Software engineering >  About array subscript cross-border questions. Thank you
About array subscript cross-border questions. Thank you

Time:11-17

 
DimEnv Frame (6), dar (6)


The Event Form1. For. Click
/* 640 * 376 * 3 * 3 GongGe resolution/
//according to the wizard button at location out of the window handle handle
HwndTx=Plugin. Window. SearchEx (" LDPlayerMainFrame ", "", 0)
HwndL=Split (HwndTx, "|")

For I=0 To UBound (HwndL) - 1//3 window, UBound (HwndL) For 3
If the dar (I) & gt; 0 Then
StopThread dar (I)
Dar (I)=1
End the If
Frame (I)=Clng (HwndL (I))
Next
End the Event



The above is a part of my code, the runtime always quote subscript crossing the line, my understanding is I range of 0 ~ 2 at this moment, how can cross? The subscript 1 began?

CodePudding user response:

HwndTx=Plugin. Window. SearchEx (" LDPlayerMainFrame ", "", 0)
msgbox HWNDTX
HwndL=Split (HwndTx, "|")
msgbox ubound (HWNDL)
Add the red code, run and see,
  • Related