-
Two forms
Hi,
I have two forms. the one is created from the other:
Dim frmPicture As Form
frmPicture = New frmPicture()
frmPicture.ShowDialog
My idea is that before showing I want to put a picture in a picturebox on
the frmPicture form a file.
frmPicture.pctPicture.Image.FromFile(strFile)
But I don't have access to it. Tells me that pctPicture is not a member of
the System.Windows.Forms.Form, which is the absolute true.
What is the way to do it?
Thanks
Max
-
Re: Two forms
"Max" <max_saint@yahoo.com> wrote:
>
>Hi,
>I have two forms. the one is created from the other:
>
> Dim frmPicture As Form
> frmPicture = New frmPicture()
>
> frmPicture.ShowDialog
>
>My idea is that before showing I want to put a picture in a picturebox on
>the frmPicture form a file.
>
> frmPicture.pctPicture.Image.FromFile(strFile)
>
>But I don't have access to it. Tells me that pctPicture is not a member
of
>the System.Windows.Forms.Form, which is the absolute true.
>
>What is the way to do it?
>
>Thanks
>Max
If I am understanding your intention I think you can just do the following.
Dim NewForm As New frmPicture
NewForm.pctPicture.Image etc etc
-
Re: Two forms
> Dim NewForm As New frmPicture
> NewForm.pctPicture.Image, etc., etc.
Max: You'll also need to declare pctPicture as Public in frmPicture.
---
Phil Weber
-
Re: Two forms
"Max" <max_saint@yahoo.com> wrote:
>
>Hi,
>I have two forms. the one is created from the other:
>
> Dim frmPicture As Form
> frmPicture = New frmPicture()
>
> frmPicture.ShowDialog
>
>My idea is that before showing I want to put a picture in a picturebox on
>the frmPicture form a file.
>
> frmPicture.pctPicture.Image.FromFile(strFile)
>
>But I don't have access to it. Tells me that pctPicture is not a member
of
>the System.Windows.Forms.Form, which is the absolute true.
>
>What is the way to do it?
>
>Thanks
>Max
You need to declare it as Public, I have trouble with that as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks