VB performance record

Source: Internet
Author: User

This post is specially used to record the test program I wrote in VB, and the test code

Version 5.00 begin VB. form form1 caption = "form1" clientheight = 6945 clientleft = 60 clienttop = 345 clientwidth = 9045 linktopic = "form1" scaleheight = 6945 scalewidth = 9045 startupposition = 3' window default begin VB. timer timer1 interval = 100 left = 3960 Top = 3240 end begin VB. commandbutton command1 caption = "command1" Height = 495 left = 1080 tabindex = 0 Top = 3360 width = 1215 end begin VB. shape shape2 Height = 735 Index = 0 left = 8160 Top = 720 width = 735 end begin VB. shape shape1 Height = 735 left = 480 Top = 720 width = 735 end begin VB. line line1 X1 = 240x2 = 8880 Y1 = 1080 y2 = 1080 bytes vb_name = "form1" attribute vb_globalnamespace = falseattribute vb_creatable = falseattribute principal = trueattribute principal = falsedim strtmp1 as stringdim lngtime as longdim strarray1 () as stringdim I1 as integer, II2 as integerprivate sub form_load () 'strtmp1 = "a, B, B, A, B, B "I1 = 0 strarray1 = Split (strtmp1,", ") Call createshape debug. print ubound (strarray1) debug. print me. shape2.ubound lngtime = 0end subprivate sub timer1_timer () 'dim L1 as long 'call test1' call shape_move1' if I1> = II2 then I1 = 1' I1 = I1 + 1 debug. print I1 call shape_move2 (Me. shape2 (I1) end subsub test1 () 'If I1> 4 then I1 = 0 I1 = I1 + 1 me. shape1.shape = I1 print I1 end subprivate sub shape_move1 () 'me. shape2 (0 ). left = me. shape2 (0 ). left-100 end subprivate sub shape_move2 (shptmp1 as shape) 'shptmp1.left = shptmp1.left-100 end subprivate sub createshape () 'dim I1 as integer, I2 as integer debug. print ubound (strarray1) I2 = 0 for I1 = 0 to ubound (strarray1) debug. print strarray1 (I1) If strarray1 (I1) = "A" then I2 = me. shape2.ubound + 1 Load shape2 (I2) 'shape2 (I2 ). left = 0 'shape2 (I2 ). top = 0 shape2 (I2 ). shape = 2 shape2 (I2 ). visible = true end if strarray1 (I1) = "B" then I2 = me. shape2.ubound + 1 Load shape2 (I2) 'shape2 (I2 ). left = 0 'shape2 (I2 ). top = 0 shape2 (I2 ). shape = 4 shape2 (I2 ). visible = true end if next I1 II2 = me. shape2.ubound debug. print ii2end sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.