当然可以!
你可以在设计时把其他控件都放在picture中,也可以在运行时用API SetParent动态放入。

解决方案 »

  1.   

    Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
    Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As LongPrivate Const SRCCOPY = &HCC0020
    Private Const SRCAND = &H8800C6
    Private Const SRCPAINT = &HEE0086
    Private Const SRCINVERT = &H660046
    Private Const SRCERASE = &H440328
    Private Const NOTSRCERASE = &H1100A6
    Private Const NOTSRCCOPY = &H330008
    Private Const PATPAINT = &HFB0A09
    Private Const PATINVERT = &H5A0049
    Private Const PATCOPY = &HF00021
    Private Const MERGEPAINT = &HBB0226
    Private Const MERGECOPY = &HC000CA
    Private Const DSTINVERT = &H550009Private Sub cmdDisplay_Click()
        Dim hdc As Long
        Dim lReturn As Long
        Dim hWnd As Long
        
        hWnd = fra.hWnd
        hdc = GetDC(hWnd)
        pic.AutoRedraw = True
        With pic
    ZoomDraw .hdc, .ScaleWidth, .ScaleHeight, hdc, Val(cboRate.Text)
            .Refresh
        End With
        pic.AutoRedraw = False
        lReturn = ReleaseDC(hWnd, hdc)
    End SubPrivate Sub ZoomDraw(ByVal hDestDC As Long, ByVal Width As Long, ByVal Height As Long, hSrcDC As Long, Optional ByVal dblZoom As Double = 1)
        Dim lReturn As Long
        lReturn = StretchBlt(hDestDC, 0, 0, Width * dblZoom, Height * dblZoom, hSrcDC, 0, 0, Width, Height, SRCCOPY)
    End Sub
      

  2.   

    Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
    Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As LongPrivate Const SRCCOPY = &HCC0020
    Private Const SRCAND = &H8800C6
    Private Const SRCPAINT = &HEE0086
    Private Const SRCINVERT = &H660046
    Private Const SRCERASE = &H440328
    Private Const NOTSRCERASE = &H1100A6
    Private Const NOTSRCCOPY = &H330008
    Private Const PATPAINT = &HFB0A09
    Private Const PATINVERT = &H5A0049
    Private Const PATCOPY = &HF00021
    Private Const MERGEPAINT = &HBB0226
    Private Const MERGECOPY = &HC000CA
    Private Const DSTINVERT = &H550009Private Sub cmdDisplay_Click()
        Dim hdc As Long
        Dim lReturn As Long
        Dim hWnd As Long
        
        hWnd = fra.hWnd
        hdc = GetDC(hWnd)
        pic.AutoRedraw = True
        With pic
    ZoomDraw .hdc, .ScaleWidth, .ScaleHeight, hdc, Val(cboRate.Text)
            .Refresh
        End With
        pic.AutoRedraw = False
        lReturn = ReleaseDC(hWnd, hdc)
    End SubPrivate Sub ZoomDraw(ByVal hDestDC As Long, ByVal Width As Long, ByVal Height As Long, hSrcDC As Long, Optional ByVal dblZoom As Double = 1)
        Dim lReturn As Long
        lReturn = StretchBlt(hDestDC, 0, 0, Width * dblZoom, Height * dblZoom, hSrcDC, 0, 0, Width, Height, SRCCOPY)
    End Sub
      

  3.   

    很容易呀你在窗体上添一个picture控件,然后把其他控件直接放进去就行了
      

  4.   

    : fq1() 只要图
    nik_Amis(Azrael) 昨天给你分,怎么没给上?
    窗体大到屏幕外怎么取?有好方法吗?
     starlee(独孤一星) 谢谢,你没明白我的意思