469,945 Members | 1,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

How make a picturebox public to forms?VB.net

MJ
i have form1 and form2, form1 has a picturebox which i
wish to make it accessible to other forms
after form2 perform some drawing, it need to call
form1.picbox.invalidate() to refresh the picbox, how to
declare the picbox?anyone have idea?

dim frm1 as form1
frm1 = new form1()

frm1.picbox.invalidate

the above code will not work becoz i not wish to create a
new instance of form1, wat i wan is to refresh the picbox
that already has some drawing on the activated form1..
any help is greatly appreciated...
Jul 21 '05 #1
2 1804
There is an article describing how to do this:
Working with Multiple Forms in Visual Basic .NET
http://msdn.microsoft.com/library/de...us/dv_vstechar
t/html/vbtchWorkingWithMultipleFormsInVisualBasicNETUpgra dingToNET.asp

Describes how working with multiple forms has changed from previous editions
of Microsoft Visual Basic and illustrates several key techniques, including
displaying a second form, changing the appearance of another form, and using
a form as a dialog. (8 printed pages)

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"MJ" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
i have form1 and form2, form1 has a picturebox which i
wish to make it accessible to other forms
after form2 perform some drawing, it need to call
form1.picbox.invalidate() to refresh the picbox, how to
declare the picbox?anyone have idea?

dim frm1 as form1
frm1 = new form1()

frm1.picbox.invalidate

the above code will not work becoz i not wish to create a
new instance of form1, wat i wan is to refresh the picbox
that already has some drawing on the activated form1..
any help is greatly appreciated...

Jul 21 '05 #2
There is an article describing how to do this:
Working with Multiple Forms in Visual Basic .NET
http://msdn.microsoft.com/library/de...us/dv_vstechar
t/html/vbtchWorkingWithMultipleFormsInVisualBasicNETUpgra dingToNET.asp

Describes how working with multiple forms has changed from previous editions
of Microsoft Visual Basic and illustrates several key techniques, including
displaying a second form, changing the appearance of another form, and using
a form as a dialog. (8 printed pages)

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"MJ" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
i have form1 and form2, form1 has a picturebox which i
wish to make it accessible to other forms
after form2 perform some drawing, it need to call
form1.picbox.invalidate() to refresh the picbox, how to
declare the picbox?anyone have idea?

dim frm1 as form1
frm1 = new form1()

frm1.picbox.invalidate

the above code will not work becoz i not wish to create a
new instance of form1, wat i wan is to refresh the picbox
that already has some drawing on the activated form1..
any help is greatly appreciated...

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ed Landau | last post: by
2 posts views Thread by David Ricker | last post: by
reply views Thread by akh | last post: by
5 posts views Thread by Christopher Kurtis Koeber | last post: by
reply views Thread by =?Utf-8?B?RG9jdG9y?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.