Please support our VB.NET advertiser: Programming Forums
Views: 232 | Replies: 2 | Solved
![]() |
•
•
Join Date: Oct 2005
Posts: 11
Reputation:
Rep Power: 4
Solved Threads: 0
Hi,
I am trying to use a 2D array to gather information from a dialogue box. The array has been publicly dimensioned in a module. Before the dialogue box is opened, there is data in the array, and thats fine, but as soon as soon as the dialogue box is loaded, the contents of the array become "Nothing". The dialogue box is a seperate form that is loaded using the form2.showdialogue command.
If anybody knows why this is happening or how to fix it, any help would be greatly appreciated.
Thanks in advance.
I am trying to use a 2D array to gather information from a dialogue box. The array has been publicly dimensioned in a module. Before the dialogue box is opened, there is data in the array, and thats fine, but as soon as soon as the dialogue box is loaded, the contents of the array become "Nothing". The dialogue box is a seperate form that is loaded using the form2.showdialogue command.
If anybody knows why this is happening or how to fix it, any help would be greatly appreciated.
Thanks in advance.
•
•
Join Date: Dec 2002
Location: West Virginia
Posts: 412
Reputation:
Rep Power: 6
Solved Threads: 45
•
•
Join Date: Oct 2005
Posts: 11
Reputation:
Rep Power: 4
Solved Threads: 0
Hi,
Thanks for the reply but I actually managed to sort it out a few minutes before you replied. I managed to do it by declaring an object, putting the data from the array into the object and then using the following code
Dim objArray As Object
objArray = array
Dim CreateHeader As New frmCreateHeader(objArray)
'Where frmCreateheader is the form being used as the dialogue box
CreateHeader.ShowDialog()
and then on the other form, I had the following code
Public Sub New(ByVal arraydata As Object)
'Dim arraytmp(,) As String
arraytmp = arraydata 'Where arraytmp is glob var defined in a mod.
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
There might be a better way to do it, and if you know please let me know, but that seems to be the most efficient method i have come across
Regards,
Kevin
Thanks for the reply but I actually managed to sort it out a few minutes before you replied. I managed to do it by declaring an object, putting the data from the array into the object and then using the following code
Dim objArray As Object
objArray = array
Dim CreateHeader As New frmCreateHeader(objArray)
'Where frmCreateheader is the form being used as the dialogue box
CreateHeader.ShowDialog()
and then on the other form, I had the following code
Public Sub New(ByVal arraydata As Object)
'Dim arraytmp(,) As String
arraytmp = arraydata 'Where arraytmp is glob var defined in a mod.
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
There might be a better way to do it, and if you know please let me know, but that seems to be the most efficient method i have come across
Regards,
Kevin
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode