EDN Admin
Well-known member
Hi,
Ive got 2 forms:
1: SelectandPrint
2: Cuttingwood
From the "SelectandPrint" Form Ive got this declared:
Private Sub btnCutSelectedSheet_Click(sender As System.Object, e As System.EventArgs) Handles btnCutSelectedSheet.Click<br/>
If TotalPrice.Text = 0 Then<br/>
MsgBox("Please order first the choosen wood", MsgBoxStyle.Critical, "Allens Woodshop")<br/>
Else<br/>
CuttingWood.Show()<br/>
MsgBox("Item 0 is: " & Item(0))<br/>
Dim frmCut As New CuttingWood<br/>
frmCut.fileArticle = Item(0)<br/>
frmCut.ShowDialog()<br/>
End If<br/>
End Sub
(the msgbox I used to see if the variable contains indeed the value selected. Which it did).
But I am not able to retrieve that value in the "Cuttingwood" form.. What I am doing wrong with the code below?
Private CutArticle(3) As String<br/>
Public Property [fileArticle]() As String<br/>
Get<br/>
Return CutArticle(0)<br/>
End Get<br/>
Set(ByVal Value As String)<br/>
CutArticle(0) = Value<br/>
End Set<br/>
End Property
Any clue? CutArticle(0) e.g. always contains the last selected value...Not the current selected value which is in Item(0)
Regards, Lars
View the full article
Ive got 2 forms:
1: SelectandPrint
2: Cuttingwood
From the "SelectandPrint" Form Ive got this declared:
Private Sub btnCutSelectedSheet_Click(sender As System.Object, e As System.EventArgs) Handles btnCutSelectedSheet.Click<br/>
If TotalPrice.Text = 0 Then<br/>
MsgBox("Please order first the choosen wood", MsgBoxStyle.Critical, "Allens Woodshop")<br/>
Else<br/>
CuttingWood.Show()<br/>
MsgBox("Item 0 is: " & Item(0))<br/>
Dim frmCut As New CuttingWood<br/>
frmCut.fileArticle = Item(0)<br/>
frmCut.ShowDialog()<br/>
End If<br/>
End Sub
(the msgbox I used to see if the variable contains indeed the value selected. Which it did).
But I am not able to retrieve that value in the "Cuttingwood" form.. What I am doing wrong with the code below?
Private CutArticle(3) As String<br/>
Public Property [fileArticle]() As String<br/>
Get<br/>
Return CutArticle(0)<br/>
End Get<br/>
Set(ByVal Value As String)<br/>
CutArticle(0) = Value<br/>
End Set<br/>
End Property
Any clue? CutArticle(0) e.g. always contains the last selected value...Not the current selected value which is in Item(0)
Regards, Lars
View the full article