locked
Shapes RRS feed

  • Question

  • Hi people,
    I am trying to create a reusable hexagon shaped button (point at the top) with all the usual options a button would have.
    This is obviously because visual studio cant handle overlapping transparent images
    My project has come to a complete halt and that for 6 days now because i can't for the life of me find a working example that explains what is going on.

    Either the examples i have found are incomplete or outdated and 6 days of searching has brought my brain to a halt, i can't think straight anymore, i am lost in all the code and different ways of doing things, i don't know which is the correct direction to take.

    Point
    PointF
    sin

    If anyone knows how to make a hexagon button i can add to the toolbox then please, please, help me because 6 days halt because of transparent image issues is a real downer i just want to continue with the project :-(

    Please don't point me to links i have already been there, i have at least ten pages of search result and every one has been visited, read and tried. (seriously peed off with turning round in a circle of useless info).
    I even started the project again with wpf just for the hexagon shape, but that was a waste of time, no way i am starting to learn something new when i am this far in

    Thanks in advance
    A frustrated user of MS transparent issues


    regards Flatland France

    Tuesday, July 12, 2016 12:26 PM

Answers

  • Hi Thorsten or is it Lana Xu and sorry for the late reply.

    I actually found, what seems to be a working example of an arrow button which had 1 point to many. I removed this, looked at the code for a while and started to play around around with the points, positions and back ground images and am now in the process of making a 2.5/3D isometric map editor. I am just hoping i can get my head round the rest of the project. I am learning as i go.

    Unless someone has a better solution (before i get to far ahead),

    Here's a link to the file, is that ok here? Scan as always?
    I hope this can help someone else, link to zip file on the 3rd post.

    http://www.xtremevbtalk.com/-net-interface-and-graphics/176908-hexagon-button.html

    regards Flatland France

    Thursday, July 14, 2016 12:46 AM

All replies

  • HI,

    post a picture of what you want to have. And tell us, what technology you want to use (WinForms, WPF, or that new stuff).

    In WindowsForms, this is not that easy because of antialiasing the edges that are not horizontally or vertically aligned. You can set a Region to any Control, but to get smooth edges, you probably need an event thats raised after painting the control that then paints the shape/the outline of the Control antialiased to its parent.

    Regards,

      Thorsten

    • Proposed as answer by 宝宝徐 Wednesday, July 13, 2016 8:13 AM
    Tuesday, July 12, 2016 9:50 PM
  • Hi Thorsten or is it Lana Xu and sorry for the late reply.

    I actually found, what seems to be a working example of an arrow button which had 1 point to many. I removed this, looked at the code for a while and started to play around around with the points, positions and back ground images and am now in the process of making a 2.5/3D isometric map editor. I am just hoping i can get my head round the rest of the project. I am learning as i go.

    Unless someone has a better solution (before i get to far ahead),

    Here's a link to the file, is that ok here? Scan as always?
    I hope this can help someone else, link to zip file on the 3rd post.

    http://www.xtremevbtalk.com/-net-interface-and-graphics/176908-hexagon-button.html

    regards Flatland France

    Thursday, July 14, 2016 12:46 AM
  • Hi my friend,

    Glad to hear you have had your issue resolved. And thanks for sharing us your solution and result here.

    Have a nice day:)

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Thursday, July 14, 2016 2:58 AM