Let me first say that I used to love VB.
With that said, let me say that I kind of dislike .NET.
Firstly I hate the fact that you have to deploy the whole .NET framework. I think it's way too much overhead, and YES I understand that it has a lot of useful objects but undoubtedly it slows down the machine and certain aspects of programming the .NET framework are extremely abstract and not very well documented.
Ok, that was just my opinion- here is my most recent problem.
In trying to use the clipboard object in VB, I keep getting a value of nothing from the GetData method of the clipboard whenever I set it to an instance of an object other than text.
Here's an example:
(Assuming I want to copy the contents of the listbox: List1)
Private Sub btnCopy_Click(....)
'To copy the listbox items
Clipboard.SetDataObject(cmb1.Items)
btnPaste.Enabled = True
End Sub
Private Sub btnPaste_Click(...)
' to paste the listbox items
Dim Data As IDataObject = Clipboard.GetDataObject
Dim C As ComboBox.ObjectCollection = Data.GetData(GetType(ComboBox.ObjectCollection))
Dim O as object
'The next line causes the NullReference error
For Each O in C
...
Next
End Sub
With that said, let me say that I kind of dislike .NET.
Firstly I hate the fact that you have to deploy the whole .NET framework. I think it's way too much overhead, and YES I understand that it has a lot of useful objects but undoubtedly it slows down the machine and certain aspects of programming the .NET framework are extremely abstract and not very well documented.
Ok, that was just my opinion- here is my most recent problem.
In trying to use the clipboard object in VB, I keep getting a value of nothing from the GetData method of the clipboard whenever I set it to an instance of an object other than text.
Here's an example:
(Assuming I want to copy the contents of the listbox: List1)
Private Sub btnCopy_Click(....)
'To copy the listbox items
Clipboard.SetDataObject(cmb1.Items)
btnPaste.Enabled = True
End Sub
Private Sub btnPaste_Click(...)
' to paste the listbox items
Dim Data As IDataObject = Clipboard.GetDataObject
Dim C As ComboBox.ObjectCollection = Data.GetData(GetType(ComboBox.ObjectCollection))
Dim O as object
'The next line causes the NullReference error
For Each O in C
...
Next
End Sub