Results 1 to 2 of 2

Thread: In GW-BASIC Command, Paint (x,y) is used to colour any closed area.

  1. #1
    Join Date
    Apr 2008
    Posts
    1

    Default In GW-BASIC Command, Paint (x,y) is used to colour any closed area.

    What is its equivalent in VISUAL BASIC? I am an ammetuar programmer. Years back, I used to make small programmes with the above command in GW-BASIC. Now I want to do same thing in VISUAL BASIC. But there is no such command. How can it be achieved?
    Powered by Yahoo!

  2. #2
    Join Date
    Oct 2009
    Posts
    2

    Default

    1) You have to use the line method with proper syntax to get a box type region filled.

    2) You can use Win32 API either Polygon or in combination with FillRgn

    Private Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As Any, ByVal nCount As Long) As Long
    Private Declare Function FillRgn Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long

    Hope this helps.

Tags for this Thread

Bookmarks

Posting Permissions

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