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. custom controls

custom controls

Scheduled Pinned Locked Moved Visual Basic
tutorialquestionlounge
3 Posts 2 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. I have a general question about custom controls. I want to make a control on a windows form that has a nonrectangular shape and the control itself is divided into several nonrectangular shapes. I need to divide the control because i want the different areas in it to have different properties. I'd be very grateful if someone gives me a general advice on how to achieve that. I've already tried with transparent labels over a picture representing the control, but it is not nearly as good as i need it to be. Thank you in advance.

    D 1 Reply Last reply
    0
    • D Dobromir Dimitrov

      Hi. I have a general question about custom controls. I want to make a control on a windows form that has a nonrectangular shape and the control itself is divided into several nonrectangular shapes. I need to divide the control because i want the different areas in it to have different properties. I'd be very grateful if someone gives me a general advice on how to achieve that. I've already tried with transparent labels over a picture representing the control, but it is not nearly as good as i need it to be. Thank you in advance.

      D Offline
      D Offline
      Dave Sexton
      wrote on last edited by
      #2

      A possible cheat/workaround... Depending on how graphic you want your controls to be here's an idea (untested - something I've thought of doing but never got around to). 1. Draw your custom control in Flash (I choose Flash coz it's simple and powerful), 2. Add a Shockwave Flash object to your toolbox. 3. Create a new custom control, adding the Flash object to it. 4. Give the control applicable events like onClick, onMouseEnter/Leave, etc. 5. Use GDI+ to cut out the unwanted square bits around your control (using GDI+ available here[^]). 6. Build and test. As mentioned earlier, I have yet to try this myself so I'm not completely sure that it'll work tho I don't see why it shouldn't given a little elbow grease. The choice of doing it this way is yours, you take my advice at your own peril :) Good luck, if you get it to work please let me know - i'd be very interested to see.

      D 1 Reply Last reply
      0
      • D Dave Sexton

        A possible cheat/workaround... Depending on how graphic you want your controls to be here's an idea (untested - something I've thought of doing but never got around to). 1. Draw your custom control in Flash (I choose Flash coz it's simple and powerful), 2. Add a Shockwave Flash object to your toolbox. 3. Create a new custom control, adding the Flash object to it. 4. Give the control applicable events like onClick, onMouseEnter/Leave, etc. 5. Use GDI+ to cut out the unwanted square bits around your control (using GDI+ available here[^]). 6. Build and test. As mentioned earlier, I have yet to try this myself so I'm not completely sure that it'll work tho I don't see why it shouldn't given a little elbow grease. The choice of doing it this way is yours, you take my advice at your own peril :) Good luck, if you get it to work please let me know - i'd be very interested to see.

        D Offline
        D Offline
        Dobromir Dimitrov
        wrote on last edited by
        #3

        Thank you for the reply. I am not used to using any of the macromedia products but here's a good reason to try them out :-) As soon as I finish the control i will write you back. Thanks once again.

        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