其次,在主窗体的Private
Sub
Form-load()中加入以下代码: Form1.Command1.Top=Form1.Height-7000 Form1.Command1.Left=Form1.Width-1300 Form1.Command2.Top=Form1.Height-7000 Form1.Command2.Left=Form1.Width-1300′使这两个按钮重合并放置在窗体的右上角 Form1.Command1.Visible=TrueForm1.Command2.Visible=False ′隐藏Command2按钮,显示Command1按钮 再次,在Command1-MouseMove事件里加入以下代码: If
Form1.Command1.Visible=True
Then Form1.Command1.Visible=False Form1.Command2.Visible=True End
If ′如果鼠标移到按钮上就显示打开信封的图案
最后,在Form-MouseMove事件里加入如下代码:(如果按钮放置在图件框上,就在Picture1-MouseMove事件里加入代码) If
Form1.Command1.Visible=False
Then Form1.Command2.Visible=False Form1.Command1.Visible=True End
If ′如果鼠标移到按钮外就显示关闭信封的图案