Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem with API

Problem with API

Scheduled Pinned Locked Moved Visual Basic
csharpjsonhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pasan148
    wrote on last edited by
    #1

    Public Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal crColor As Integer, ByVal wFillType As Integer) As Integer I want above API use with VB.NET. But I can't found hdc property in Picturebox control. Any body tell me how to use this function.

    H B 2 Replies Last reply
    0
    • P Pasan148

      Public Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal crColor As Integer, ByVal wFillType As Integer) As Integer I want above API use with VB.NET. But I can't found hdc property in Picturebox control. Any body tell me how to use this function.

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      Take a look at this[^], and see if you can work out how to apply it to a PictureBox. BTW, unless you absolutely have to, avoid PictureBox. It is only good for displaying a picture that you will never, and I mean never, interact with.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      1 Reply Last reply
      0
      • P Pasan148

        Public Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal crColor As Integer, ByVal wFillType As Integer) As Integer I want above API use with VB.NET. But I can't found hdc property in Picturebox control. Any body tell me how to use this function.

        B Offline
        B Offline
        Bharat Jain
        wrote on last edited by
        #3

        Hi ,

        PictureBox1.Handle

        is how you get the handel (hdc) you will require to change the declaration a bit , the new declaration of the API should be as following

        Public Declare Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill"
        (ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal
        crColor As Integer, ByVal wFillType As Integer) As Integer

        Hope this helps Let me know if you need further help

        -Regards Bharat Jain bharat.jain.nagpur@gmail.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups