Results 1 to 7 of 7

Thread: How to make own form designer?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2020
    Location
    Dhaka, Bangladesh
    Posts
    7

    Question How to make own form designer?

    Hello, I am developing an IDE for python in Visual Basic .NET. Currently the IDE supports only console application. I want to add a form designer just like Visual Studio. I want to make such form designers. How can I make this?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: How to make own form designer?

    If you're asking how to do that from scratch, with no indication that you've even researched anything that might be involved in it, then I'm inclined to think that it's beyond you. That said, what you do is up to you, so I would recommend that you follow the CodeBank link in my signature and check out my thread on Manipulating GDI+. Further down that thread, someone has extended my initial work and produced something resembling what you describe.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2020
    Location
    Dhaka, Bangladesh
    Posts
    7

    Re: How to make own form designer?

    Yes, I know GDI+. and have already started implementing my own form designer in GDI+. But I asked the question if there exists any class in .NET Framework for easing the work. Thanks

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: How to make own form designer?

    Quote Originally Posted by bdashraful View Post
    But I asked the question if there exists any class in .NET Framework for easing the work.
    No, that's not what you asked.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,347

    Re: How to make own form designer?

    With regards to drawing controls in a designer, you might look at the ControlPaint class. There are also various control-specific classes for drawing, including TextBoxRenderer and ButtonRenderer. I suspect that the former may use the latter or vice versa, but I've never bothered to check.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2020
    Location
    Dhaka, Bangladesh
    Posts
    7

    Re: How to make own form designer?

    Okay, Thanks for your help. These are really useful

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    Re: How to make own form designer?

    Don't be hard coding anything like this. From the start, design it so that people can extend it. The set of controls used in the designer will need to be expandable beyond whatever set of controls you originally come up with, so you should start from that consideration. For example, you will probably want at least labels and buttons, but don't just make a button and a label, instead, make a widget, where the widget can be anything, and each widget knows how to draw itself. Therefore, the widget will mostly be an interface with methods that allow it to be moved, stretched, drawn, and so on. It can have a location and a size. Given that, it should be able to draw itself into that size and location.
    My usual boring signature: Nothing

Posting Permissions

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



Click Here to Expand Forum to Full Width