none
请教一段VB6.0代码升级到VB2010的问题?急! RRS feed

  • 问题

  • VB6.0代码:Private Sub DrawBackground()
      With UserControl
            .AutoRedraw = True
            Dim hOld As Long
            Dim hTmpBrush As Long, hTBmpBack As Long
            'hTBmpBack = LoadBitmapBynum(App.hInstance, dwBg)
            hTBmpBack = .picBlankCol.Picture.Handle
            hTmpBrush = CreatePatternBrush(hTBmpBack)
            hOld = SelectObject(hDC, hTmpBrush)
            PatBlt .hDC, 0, 0, .ScaleWidth, .ScaleHeight, PATCOPY
            DeleteObject hTmpBrush
            SelectObject hDC, hOld
            'm_Color = CTL_WHITE
           
            .AutoRedraw = False
      End With
    End Sub

    在VB.NET中如何写呢?  多谢!!

    2010年9月23日 12:00

答案