Results 1 to 2 of 2

Thread: make a monochrome bitmap from a text box ???

  1. #1
    Guest
    I have a text box with data on it.

    what API call can give me raw data to be able to
    make a monochrome bitmap from that text box?

    I would build the bitmap myself; I just need the bits.

    from a pic box ctrl to another one, bitblt works fine.
    what would be the equivalent from text box to pic box ?

    thank you

    Yaz


  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    use this:
    Code:
    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)
    Picture1.Refresh
    End Sub
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width