By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,761 Members | 1,218 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,761 IT Pros & Developers. It's quick & easy.

MDI in

P: n/a

Do any1 know how to transfer an image from an MDI Child to its paren
plz? 10x alot

Below is my code:

Public Class frmPhotoWindow
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()

'This call is required by the Windows Form Designer.

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing A
If disposing Then
If Not (components Is Nothing) Then
End If
End If
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows For
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents picThumb As System.Windows.Forms.PictureBox
Friend WithEvents cmPic As System.Windows.Forms.ContextMenu
Friend WithEvents cmSelect As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Su
Me.picThumb = New System.Windows.Forms.PictureBox
Me.cmPic = New System.Windows.Forms.ContextMenu
Me.cmSelect = New System.Windows.Forms.MenuItem
Me.picThumb.ContextMenu = Me.cmPic
Me.picThumb.Location = New System.Drawing.Point(0, 0)
Me.picThumb.Name = "picThumb"
Me.picThumb.Size = New System.Drawing.Size(232, 160)
System.Windows.Forms.PictureBoxSizeMode.StretchIma ge
Me.picThumb.TabIndex = 0
Me.picThumb.TabStop = False
Me.cmPic.MenuItems.AddRange(New System.Windows.Forms.MenuItem(
Me.cmSelect.Index = 0
Me.cmSelect.Text = "Select"
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(224, 158)
Me.Name = "frmPhotoWindow"
System.Windows.Forms.FormStartPosition.CenterScree n

End Sub

#End Region
Dim Selection As Boolean = False
Dim main As frmMainLayout
Private Sub frmPhotoWindow_Load(ByVal sender As System.Object
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Height = 192
Me.Width = 240
Me.Text = "Photo [" & Selection & "]"
Dim Photo As New PictureBox
Photo.Width = 160
Photo.Height = 232
Photo.SizeMode = PictureBoxSizeMode.StretchImage
End Sub

Private Sub SelectPic()

Dim SelectPhoto As Image
SelectPhoto = picThumb.Image
main.SelectedPic = SelectPhoto

End Sub
Private Sub picThumb_Click(ByVal sender As System.Object, ByVal
As System.EventArgs) Handles picThumb.Click
If Selection = False Then
Selection = True

End If

End Sub

Private Sub cmSelect_Click(ByVal sender As System.Object, ByVal
As System.EventArgs) Handles cmSelect.Click
If Selection = False Then
Selection = True

End If

End Sub
End Clas

EkokuPosted from newsgroup acces

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"Ekoku" <Ekoku.1shhra@> schrieb:
Do any1 know how to transfer an image from an MDI Child to its parent

In the MDI child:

DirectCast(Me.MdiParent, MainForm).PictureBox1.Image = ...

M S Herfried K. Wagner
M V P <URL:>
V B <URL:>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.