界面问题,急用!

ivt 2002-09-30 08:54:20
我的程序主窗体是mdiform
由菜单栏---工具栏---picture控件里面有一image控件二者一样大小

这样作的目的是在工具栏下面能显示一幅图片比如本软件的相关图片或介绍

但是按这种方面制作主窗体后,其mdi子窗体就不能显示出来,我试过了,
mdi子窗体要显示在picture控件的下方,

求助各位大虾
...全文
32 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
ivt 2002-09-30
  • 打赏
  • 举报
回复
求教关于得到系统当前分辨率的API

以及 800*600
1024*768
1052*768
对应的图片应为多大
ivt 2002-09-30
  • 打赏
  • 举报
回复
请问怎样判断系统当前的分辨率
本人以来没有接触过,请帮忙

另外,关于这个问题,还有没有更好的办法呀

希望能找到更好的解决办法,不仅是为了这个问题,希望能
学习更好,谢谢!
gxingmin 2002-09-30
  • 打赏
  • 举报
回复
对,就是作为mdi的背景图。放到picture属性里。
最好多做几个图片,判断不同分辨率来调用不同的图片
shepherd228 2002-09-30
  • 打赏
  • 举报
回复
我遇到过同样的问题,只有改图片拉,我当时改拉3个版本1024*768,800*600
1052*768,启动时判断一下系统当前的分辨率,加载相应的画面!就OK了,尽管很
呆板,但可以实现!
shepherd228 2002-09-30
  • 打赏
  • 举报
回复
把你的image放到picture里咯,效果一样!
ivt 2002-09-30
  • 打赏
  • 举报
回复
我试过了
把这副图片当作是mdi的背景图是可以正常显示

但是图片和我的窗体大小不一致,我怎样才能调整图片
覆盖所有主窗体剩下的空间呢
ivt 2002-09-30
  • 打赏
  • 举报
回复
TO:
你的意思是把图片当作是主窗体的背景图还是。。。。。。
因为主窗体是mdi的,没法放下image控件,所以我借助于picture
gxingmin 2002-09-30
  • 打赏
  • 举报
回复
主窗体上放置的picture控件是为了作工具栏用的,所以自窗体当然在“工具栏”下面了。
解决的方法是:把你的image图片直接放到主窗体的picture属性里。
shepherd228 2002-09-30
  • 打赏
  • 举报
回复
图片大小就只能靠你自己去做拉!
shepherd228 2002-09-30
  • 打赏
  • 举报
回复
我的方法:
Private Sub MDIForm_Resize()
If Screen.Width / Screen.TwipsPerPixelX = 1024 And Screen.Height / Screen.TwipsPerPixelY = 768 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-768.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX = 1152 And Screen.Height / Screen.TwipsPerPixelY = 864 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-864.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX = 800 And Screen.Height / Screen.TwipsPerPixelY = 600 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS800-600.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX < 800 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS800-600.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX > 1152 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-864.jpg")
End If
MDIVisible = False
End Sub
shepherd228 2002-09-30
  • 打赏
  • 举报
回复
不好意思,急着回家,控件已经发给你拉,下面是判断方法:
Private Sub MDIForm_Resize()
If Screen.Width / Screen.TwipsPerPixelX = 1024 And Screen.Height / Screen.TwipsPerPixelY = 768 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-768.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX = 1152 And Screen.Height / Screen.TwipsPerPixelY = 864 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-864.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX = 800 And Screen.Height / Screen.TwipsPerPixelY = 600 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS800-600.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX < 800 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS800-600.jpg")
ElseIf Screen.Width / Screen.TwipsPerPixelX > 1152 Then
Me.Picture = LoadPicture(App.Path & "\RES\MIS1024-864.jpg")
End If
MDIVisible = False
End Sub
zyl910 2002-09-30
  • 打赏
  • 举报
回复
http://www.mvps.org/vbvision/_samples/MDI_Background_Demo.zip
MDI Background Demo.zip (25KB)
This project shows how you can use memory device contexts to create pictures that can be assigned to the picture property of a VB MDI parent form. The project contains routines to stretch a bitmap across the background of the form and center a bitmap on top of a background as well as a routine for tiling a bitmap onto the background. It also contains code to draw transparent bitmaps that is used when overlaying a foreground bitmap onto the background. This project replaces a previous demo that used subclassing to attain a similar result. The routines in this project are generic enough that they can be used with any VB form or control that has a picture property.

604

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 控件与界面
社区管理员
  • 控件与界面社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧