S
Steve Koon
Any thoughts on getting this project to work or suggesting another method
would be appreciated.
Steve
==========================================
Project:
A Windows Form which acts as a Whiteboard. The Form contains 3
layered UserControls. The upper most control frame is the 'event_frame'
which handles mouse events. (This frame will handle further events in the
future). The middle frame is the 'drag_frame', which draws out mouse move
events.like dragging mouse boxes on a windows desktop. The bottom frame is
the 'render_frame' which is the main canvas of the whiteboard. On object
creation (after a successful mouse down,drag,up event) the render_frame
would contain the drawing of all current objects.
Problem:
We would like to have all control frames transparent, and yet still be able
to see the contents of the underlying control frames. Currently when one
control is set completely transparent.all controls appear fully transparent
and the underlying form displays through.
Our completed project should have a total transparent event_frame that you
could see through to the render_frame. Upon click on the event_frame.the
event_frame is hidden and the drag_frame becomes visible. (assuming the
mouse is in a down state) You are able to see through the drag_frame to the
render_frame and its contents. As the user drags out a bounding box, the box
is drawn on the drag_frame. Upon mouseup the object is created, the
drag_frame is cleared & hidden, the object is drawn on the render_frame and
the event_frame is visible again.
Solution:
We have successfully set the control styles to allow transparent background
colors and overridden the OnPaintBackground events. This provides some of
the effect we would like to achieve, however we still cannot see the
contents of the control frames underneath each other.
Secondary Question:
Is there any way to flush out, clear or dispose of a Graphics object
without using the .Clear(Color) method? This method simply fills the entire
object with a given color, we would like a way to simply clear the data in
the graphics object and start anew.or something similar to using
*.Clear(Color.FromArgb( 0, Color.White )) This uses an Alpha value of 0 to
hopefully achieve a completely transparent effect.but when we use this the
screen is completely Black.not transparent.
would be appreciated.
Steve
==========================================
Project:
A Windows Form which acts as a Whiteboard. The Form contains 3
layered UserControls. The upper most control frame is the 'event_frame'
which handles mouse events. (This frame will handle further events in the
future). The middle frame is the 'drag_frame', which draws out mouse move
events.like dragging mouse boxes on a windows desktop. The bottom frame is
the 'render_frame' which is the main canvas of the whiteboard. On object
creation (after a successful mouse down,drag,up event) the render_frame
would contain the drawing of all current objects.
Problem:
We would like to have all control frames transparent, and yet still be able
to see the contents of the underlying control frames. Currently when one
control is set completely transparent.all controls appear fully transparent
and the underlying form displays through.
Our completed project should have a total transparent event_frame that you
could see through to the render_frame. Upon click on the event_frame.the
event_frame is hidden and the drag_frame becomes visible. (assuming the
mouse is in a down state) You are able to see through the drag_frame to the
render_frame and its contents. As the user drags out a bounding box, the box
is drawn on the drag_frame. Upon mouseup the object is created, the
drag_frame is cleared & hidden, the object is drawn on the render_frame and
the event_frame is visible again.
Solution:
We have successfully set the control styles to allow transparent background
colors and overridden the OnPaintBackground events. This provides some of
the effect we would like to achieve, however we still cannot see the
contents of the control frames underneath each other.
Secondary Question:
Is there any way to flush out, clear or dispose of a Graphics object
without using the .Clear(Color) method? This method simply fills the entire
object with a given color, we would like a way to simply clear the data in
the graphics object and start anew.or something similar to using
*.Clear(Color.FromArgb( 0, Color.White )) This uses an Alpha value of 0 to
hopefully achieve a completely transparent effect.but when we use this the
screen is completely Black.not transparent.