R
R K
Hi,
I'm new to WinForms and GDI+ and decided to use .NET and c# to complete an
assignment which all of my other classmates are doing in Java using AWT.
Being relatively new to WinForms and GDI+ I need help. I hate to be stuck
and submit an incomplete assignment being the only person doing it in .NET.
I am creating a report which reads an XML file containing the periodic table
and displays each element in a row as well as draws the circle whose radius
based on the atomic radius of the element. The circle is filled with blue
if element is solid, white if element is liquid and transparent if element
is gas (given room temperature).
Now in the Form() constructor I read the XML file, set the size of the form
based on the number of elements in the periodic table and and using GDI+
draw on the form itself using this.CreateGraphics() object and DrawString
() The problem is the form is much greater than the screen and I do not
handle the OnPaint, Move, Size events which makes the program very
complicated. Is there any easy way for me to use GDI+ on the form and have
WinForms handle all the events and display my form properly? My XML file
processing is done in the form constructor itself and all I need to do is
display the results.
I tried using the ListView control but it does not allow me to use GDI+ to
draw in the SubItems.
I'd appreciate your help, recommendations, pointers, suggestions on any easy
ways of doing this.
Thanks
I'm new to WinForms and GDI+ and decided to use .NET and c# to complete an
assignment which all of my other classmates are doing in Java using AWT.
Being relatively new to WinForms and GDI+ I need help. I hate to be stuck
and submit an incomplete assignment being the only person doing it in .NET.
I am creating a report which reads an XML file containing the periodic table
and displays each element in a row as well as draws the circle whose radius
based on the atomic radius of the element. The circle is filled with blue
if element is solid, white if element is liquid and transparent if element
is gas (given room temperature).
Now in the Form() constructor I read the XML file, set the size of the form
based on the number of elements in the periodic table and and using GDI+
draw on the form itself using this.CreateGraphics() object and DrawString
() The problem is the form is much greater than the screen and I do not
handle the OnPaint, Move, Size events which makes the program very
complicated. Is there any easy way for me to use GDI+ on the form and have
WinForms handle all the events and display my form properly? My XML file
processing is done in the form constructor itself and all I need to do is
display the results.
I tried using the ListView control but it does not allow me to use GDI+ to
draw in the SubItems.
I'd appreciate your help, recommendations, pointers, suggestions on any easy
ways of doing this.
Thanks