Private Sub Form_Load() CommonDialog1.InitDir = "c:\" CommonDialog1.Flags = cdlCCRGBInit + cdlCFEffects CommonDialog1.FontName = "華文彩云" lblTitle.FontName = "華文彩云" lblTitle.FontSize = 18 lblTitle.ForeColor = QBColor(5) lblTitle.Caption = "姹紫嫣紅 爭奇斗艷" Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Pic1.Top = (Me.ScaleHeight - Pic1.Height) / 2 Pic1.Left = (Me.ScaleWidth - Pic1.Width) / 2 Img1.Top = (Pic1.ScaleHeight - Img1.Height) / 2 Img1.Left = (Pic1.Width - Img1.Width) / 2 End Sub Private Sub cmdBack_Click() CommonDialog1.ShowColor Pic1.BackColor = CommonDialog1.Color End Sub Private Sub cmdFont_Click() CommonDialog1.ShowFont lblTitle.FontName = CommonDialog1.FontName lblTitle.FontSize = CommonDialog1.FontSize lblTitle.ForeColor = CommonDialog1.Color End Sub Private Sub cmdPic_Click() CommonDialog1.CancelError = True On Error GoTo Cancel CommonDialog1.DialogTitle = "選擇圖片" CommonDialog1.Filter = "位圖|*.bmp|JPG圖片|*.jpg|GIF圖片|*.gif|圖標(biāo)|*.ico;cur|所有文件|*.*" CommonDialog1.FilterIndex = 2 CommonDialog1.ShowOpen Img1.Picture = LoadPicture(CommonDialog1.FileName) CommonDialog1.InitDir = Left(CommonDialog1.FileName, Len(CommonDialog1.FileName) - Len(CommonDialog1.Name) - 1) Cancel: End Sub |
|
联系客服
微信扫码,添加客服企业微信
客服QQ:
1732698931联系电话:4000-999-276
客服工作时间9:00-18:00,晚上非工作时间,请在微信或QQ留言,第二天客服上班后会立即联系您。