Re: Graphics Drawing in Form Load
From: Al Sav (AlSav_at_discussions.microsoft.com)
Date: 12/08/04
- Next message: Rajagopal Pasupuleti: "RE: Making User Control visible"
- Previous message: jdmartinez_at_ea.com: "Re: C# and garbage collection"
- In reply to: Bob Powell [MVP]: "Re: Graphics Drawing in Form Load"
- Next in thread: Paul E Collins: "Re: Graphics Drawing in Form Load"
- Reply: Paul E Collins: "Re: Graphics Drawing in Form Load"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Dec 2004 09:09:05 -0800
Thanks for the info.
I am new to .net, but been programming for a dozen years mostly on VB. With
that credential I would like to make this comment about this graphic change
in .Net.
The way graphic drawing was implemented in VB6 seems better than this. Now,
I am tied to one event (that too, I guess, is not always fully controllable
by programmer) to make it persistent. That seems a step backwards.
A pic box is a pic box, if I want draw a line on it, I will do it from
whichever event I want to. Language implementation should not restrict me in
doing that. Now, if Windows has an inherent design anamoly that this way
(.net way) seems better for MS guys, then the windows design is not good
enough to make my life easier. This atleast is one are where .net has gone a
step behind.
Also:
An USB cable is designed to not to fit into PS/2 socket, because then USB
device wont work. Thats good design. If drawing a line on a group box from a
button click wont work, why let us do it in the first place??? Thats bad
design.
Sorry for making this stupid statement:
I there is another product by Sun, which is basically the ditto of .Net and
C#, byte for byte, except that,they let me draw line on group box and persist
it too, then I will say goodbye to MS.NET.
Alwin S.
"Bob Powell [MVP]" wrote:
> See the GDI+ FAQ #1 annoying question for all the details.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tipstricks.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/faqmain.htm
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Al Sav" <AlSav@discussions.microsoft.com> wrote in message
> news:8BDDEA03-DB2C-48F5-9029-8DBCB2D0CD6E@microsoft.com...
> > I have the following in form load. When the form shows up, the graphics
> > vanishes.
> > This works, if I execute this from button_click. But, even that vanishes
> if
> > minimize and restore the form. Similar to the functionality of
> ClipControls =
> > False in VB6. How do I get to draw in a groupbox (same problem in picture
> > box) and retain the graphics?
> >
> > Thanks in advance.
> > Alwin S.
> >
> > SolidBrush myBrush = new SolidBrush(Color.Red);
> > Pen myPen = new Pen(myBrush);
> > Graphics g=grpDisplay.CreateGraphics();
> > g.DrawLine(myPen,0,15,grpDisplay.Width,15);
> >
>
>
>
- Next message: Rajagopal Pasupuleti: "RE: Making User Control visible"
- Previous message: jdmartinez_at_ea.com: "Re: C# and garbage collection"
- In reply to: Bob Powell [MVP]: "Re: Graphics Drawing in Form Load"
- Next in thread: Paul E Collins: "Re: Graphics Drawing in Form Load"
- Reply: Paul E Collins: "Re: Graphics Drawing in Form Load"
- Messages sorted by: [ date ] [ thread ]