求一个简单vb编程实例~
的有关信息介绍如下:控件:渗搭乱image,picture,timer代码:Dim x As IntegerDim y As IntegerPrivate Sub Form_Load()x = 100y = 100Timer1.Interval = 100End SubPrivate Sub Timer1_Timer()If img.Top >= pic.Height - img.Height Theny = -100End IfIf img.Top <= 0 Theny = 100End IfIf img.Left >= pic.Width - img.Width Thenx = -100End IfIf img.Left <= 0 Thenx = 100End Ifimg.Top = img.Top + yimg.Left = img.Left + xEnd Sub以上代码实现的是图片框中的一个小球做的规律的运动,当小球丛档碰到图片框边缘时便反弹枝颤继续运动