How to share data between forms, remotely fire events?

B

Bradley1234

Hi

Im using an example on graphics from my Deitel book,
http://www.deitel.com/books/csharpAPI1/

there are nice downloads, this one shows a GDI+ example where you describe
a rectangle, color and Alpha? Alpha being the opacity or transparency.

What Im trying to do is control that forms opacity, or the Alpha variable,
from another form. Its not going well, either the compiler errors out or it
runs but doesnt work (imagine that)

In the books example, there are 2 colored rectangles, overlapping and you
set colors and opacity. It has a button where you click to accept that
setting, then it invalidates a rectangle, to be efficient? rather than
redraw the whole page.

So in the second form is started as a thread, there is a slider control and
a text box to show the current number. Im trying to force that number into
the other one, the graphics form and cause it to act like the button push
and take my new alpha value.

It seems there is some protection wall there, and am searching for some way;
Perhaps making a parent/child form declaration, but isnt there some other
direct way????


mtia
 
B

Bradley1234

Okay, Im able to share data across forms by making everything public.

But can events be fired from another form? Can I trigger an Invalidate()
from a remote form?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top