How can I clone a ColumnHeader object?
Here is the code:
Here is the error:
Option Strict On disallows implicit conversions from 'Object' to 'System.Windows.Forms.ColumnHeader'.
It is possible to clone a ColumnHeader object?
I am trying to use this code, with no luck (I am not sure if this is even possible):
May I please have some help?
Here is the code:
Code:
Dim ColumnHeaderToClone As New ColumnHeader
ColumnHeaderToClone.Name = "Test"
ColumnHeaderToClone.Text = "TestText"
Dim ClonedColumnHeader As New ColumnHeader
ClonedColumnHeader = ColumnHeaderToClone.CloneQuote:
Option Strict On disallows implicit conversions from 'Object' to 'System.Windows.Forms.ColumnHeader'.
I am trying to use this code, with no luck (I am not sure if this is even possible):
Code:
DirectCast(ColumnHeaderToClone("System.Windows.Forms.ColumnHeader()"), ColumnHeader())