首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

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

2013-01-07 
怎样将MDIform中的背景图片居中显示?怎样将MDIform中的背景图片居中显示?[解决办法]引用:引用:VB codePriv

怎样将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

热点排行