读书人

怎么将MDIform中的背景图片居中显示

发布时间: 2013-01-07 10:02:25 作者: rapoo

怎样将MDIform中的背景图片居中显示?
怎样将MDIform中的背景图片居中显示?
[解决办法]

引用:
引用:
VB code
Private Sub MDIForm_Resize()
Picture1.Height = Me.Height
Image1.Stretch = True
Image1.Top = Picture1.Height * 0.1
Image1.Left = Picture1.Width * 0.1
Image1.Height =……

动点脑就行:
Option Explicit
Dim flag As Boolean

Private Sub MDIForm_Resize()
Picture1.Height = Me.Height
Image1.Stretch = True
Image1.Top = Picture1.Height * 0.1
Image1.Left = Picture1.Width * 0.1
Image1.Height = Picture1.Height * 0.8
Image1.Width = Picture1.Width * 0.8
End Sub

Private Sub open_Click()
If flag Then
Me.Picture1.Visible = True
Form1.Hide
Else
Me.Picture1.Visible = False
Form1.Show
End If
flag = Not flag
End Sub

读书人网 >VB

热点推荐