How to Create a shape and giving Color by X++ ?

I have one form in that i have to show one Shape , which control is best place to Keep that shape and how to Create a shape and giving color to that particular shape by using X++ .

What version of AX do you use? If AX2012, ManagedHost control + WinForms/WPF will be the easiest way.

Thanks for your valuable reply Mr Martin Drab ,

I am using AX 2009 . Please provide me a Piece of coding

You could use Window control WinGDI functions - see tutorial_Tetris form for example.

Another (and easier) option is to use an ActiveX control - if no existing ActiveX control is suitable, you can turn a Windows Forms control to ActiveX (see Exposing Windows Forms Controls as ActiveX controls).

In any way, it’s not completely trivial.