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. non rectangular control

non rectangular control

Scheduled Pinned Locked Moved Visual Basic
graphicshelpcloudquestion
1 Posts 1 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.
  • D Offline
    D Offline
    Dobromir Dimitrov
    wrote on last edited by
    #1

    Hi there. I have the following problem: I need to make a control that has an irregular shape. So far so good - I have no problem drawing it using something like this: Private Sub TabPage4_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TabPage4.Paint Dim myPointArray As Point() = {New Point(50, 50), New Point(100, 120), New Point(140, 100)} Dim MyGraphics As Graphics = e.Graphics Dim MyPen As New Pen(Color.Azure, 2) Dim mySolidBrush As New SolidBrush(Color.Aqua) myGraphics.DrawClosedCurve(myPen, myPointArray) MyGraphics.FillClosedCurve(mySolidBrush, myPointArray) End Sub So now I have drawn part of the control. The problem comes when I try to raise an event regarding the irregular shape I've drawn, not the ractangle containing it. Can anyone help me with an idea, or maybe a hole new different approach to make such a control?

    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