473,408 Members | 2,113 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,408 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 1940
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.