|
これでどうでしょうか
Private FormB As New Form2
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FormB.Show(Me) whitecard = New Form2()
whitecard.WhiteCard(C\:画像.jpg)
End Sub
Public Class Form2
Dim Wcard As String
Public Sub WhiteCard(ByVal card As String) Wcard = card
WhiteCard2()
End Sub
Public Sub WhiteCard2() With PictureBox1
.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
.Image = System.Drawing.Image.FromFile(Wcard)
End With End Sub End Class
|