minajo21(大眼睛)同志所说的也是一种办法,但作为一个程序员来将,解决问题才是上策,回避问题只有不得已而为之,况且该界面在1024*768方式下较为合适,我很想知道问题所在。

解决方案 »

  1.   

    是window的桌面没有根据的程序的调整而自动refresh的缘故
    你可以自己给它发个刷新消息
      

  2.   

    那如何对window桌面发刷新消息呢?同时会使任务栏自动置于底边吗?
      

  3.   

    给你一代码请你尝试,效果还过得去
    VB6 SP5 WINDOWSME下调 试通过
    Private Sub Form_Load()
     ResiZe1 Me
    End Sub
    '检查屏幕的分辨率确定窗体的大小----保证窗体在不同分辨率下大小近似不变
    Private Function CheckRez(pixelWidth As Long, pixelHeight As Long) As Boolean    Dim lngTwipsX As Long
        Dim lngTwipsY As Long    lngTwipsX = pixelWidth * 15
        lngTwipsY = pixelHeight * 15    If lngTwipsX <> Screen.Width Then
            CheckRez = False
        Else
            If lngTwipsY <> Screen.Height Then
                CheckRez = False
            Else
                CheckRez = True
            End If
        End IfEnd Function'获取系统显示分辨率控制在不同分辨率下大小不变
    '此处只列举了640X480;1024X768与800X600
    '窗体在800X600时设计
    '具体请应用时灵活设计
    Function XRatioFun() As Single
     If CheckRez(640, 480) Then
         XRatioFun = 0.8ElseIf CheckRez(1024, 768) Then
         XRatioFun = 1.28
         
    ElseIf CheckRez(800, 600) Then
         XRatioFun = 1
    Else
         XRatioFun = 1
    End If
    End Function'重定位窗体与其上的控件
    Sub ResiZe1(theForm As Form)
    Dim Z&
    Dim xfactor!
        xfactor = XRatioFun
       
        theForm.Move theForm.Left * xfactor, theForm.Top * xfactor, _
    theForm.Width * xfactor, theForm.Height * xfactor    For Z = 0 To theForm.Controls.Count - 1        'If TypeOf TheForm.Controls(Z) Is CommonDialog Then
            '如果在窗体上有运行时不可见的ACTIVEX控件不要移动,比如IMAGELIST与CommonDialog等等
            'If TypeOf theForm.Controls(Z) Is ImageList Then
            If TypeOf theForm.Controls(Z) Is Menu Then
            '菜单系统会自动处理
            ElseIf TypeOf theForm.Controls(Z) Is Line Then
            '直线控件不要处理
            ElseIf TypeOf theForm.Controls(Z) Is DriveListBox Then
            
                theForm.Controls(Z).Move theForm.Controls(Z).Left * xfactor, _
                theForm.Controls(Z).Top, theForm.Controls(Z).Width * xfactor
                
            ElseIf TypeOf theForm.Controls(Z) Is ComboBox Then
            
                If theForm.Controls(Z).Style <> 1 Then
                
                    theForm.Controls(Z).Move theForm.Controls(Z).Left * xfactor, _
                    theForm.Controls(Z).Top * xfactor, theForm.Controls(Z).Width * _
                    xfactor
                
                End If
                
            ElseIf Not theForm.Controls(Z) Is Nothing Then
            
                theForm.Controls(Z).Move theForm.Controls(Z).Left * xfactor, _
                theForm.Controls(Z).Top * xfactor, theForm.Controls(Z).Width _
                * xfactor, theForm.Controls(Z).Height * xfactor            If TypeOf theForm.Controls(Z) Is TextBox Then
                    theForm.Controls(Z).FontSize = theForm.Controls(Z).FontSize * xfactor
                ElseIf TypeOf theForm.Controls(Z) Is Label Then
                    theForm.Controls(Z).FontSize = theForm.Controls(Z).FontSize * xfactor
                End If
                
            End If
         Next ZEnd Sub
      

  4.   

    98 me 下涮新桌面可用如下方法:
    Shell "rundll32 user,repaintscreen"
      

  5.   

    谢谢dengwei007(邓蔚)和zhou_huanxi(阿周)两位,但到目前为止,用刷新桌面的办法还是无法解决问题,急呀...,难道只有少数机子会出现这个问题吗?