This code is really neat, draws a control into a picture box.
More to come ?Code:'Author: gwdash ? 'Origin: http://forums.vb-world.net/showthrea...threadid=30473 'Purpose: monochrome bitmap from a text box 'VB version: VB4+ 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 GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long Private Sub Command1_Click() Dim DC As Long Dim ret As Long DC = GetWindowDC(Text1.hwnd) ret = BitBlt(Picture1.hDC, 0, 0, Text1.Width / Screen.TwipsPerPixelX, Text1.Height / Screen.TwipsPerPixelY, DC, 0, 0, vbSrcCopy) End Sub![]()




Reply With Quote