473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1938
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Jose Michael Meo R. Barrido | last post by:
Hi! Can u please tech me a way to know if the image in the picturebox has changed? what event should i catch the chage?
4
by: Ed Landau | last post by:
In VB6.0, I can put an image on a form and assign it's .picture property at run-time. In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image...
7
by: Randy Vande Hei | last post by:
Does anyone know how to change the the GDI+ coordinate system like you used to be able to do in VB6 with the picturebox.scale method. The picturebox.scale method took an x,y point defining the...
2
by: David Ricker | last post by:
I have created a PictureBox control which can have it's Image property directly bound to an image field in a database. This works perfectly for showing the images that are in the database. When I...
16
by: Neal | last post by:
Hi, I saw the VB6 Code to do this at this link: http://www.dotnet247.com/247reference/msgs/11/56581.aspx The VB6 Code reads as follows: Private Type Rect Left As Long
0
by: akh | last post by:
I want to use de Drag and Drop ´s event to move a picture box from a form and within a Picture Box. But I have behaviour if the MyPBox As PictureBox as the Globale varible or not Thanks for...
5
by: Christopher Kurtis Koeber | last post by:
Dear All, This may sound like an elementary question but how do you implement scrollbars for the Picturebox control. Do I have to create my own code to do this or is there some property that I can...
3
by: EnglishMan69 | last post by:
Hello All, I am using VB2005 Beta 2 in VS 2005 and am running into a small problem. I need to be able to add a picture box to the main form from within a thread. The program goes to a web...
3
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
0
by: =?Utf-8?B?RG9jdG9y?= | last post by:
I am making an application that streams video from a web camera onto the client area of a PictureBox on a Windows CLR Form in MS Visual Studio 2005 (using C++). The streaming video works fine, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.