ram123
Member
- Joined
- Mar 25, 2008
- Messages
- 5
- Programming Experience
- 1-3
I’m facing small problem while I’m trying to convert the vb6.0 form resize code to vb.net.
I converted the vb6 resize.dll to myresize.dll using tlbimp.exe
Here we have two methods in the resize.dll
They are
1) Sub InitResizeClass(ByRef FRM As Object)
2) Sub ResizeControls(ByRef FRM As Object)
Here is the vb6 code
****************************
Option Explicit
Private Temp_Class As Resize_Class
Private Sub Form_Load()
Set Temp_Class = New Resize_Class
Temp_Class.InitResizeClass Me
End Sub
Private Sub Form_Resize()
Temp_Class.ResizeControls Me
End Sub
***************************
I’m expecting the same in vb.net
Here is the code how I tried
**********************
Dim ourresize As New Resize_Class
ourresize.InitResizeClass(Me) //Here it is saying that invalid castException
please help me
I converted the vb6 resize.dll to myresize.dll using tlbimp.exe
Here we have two methods in the resize.dll
They are
1) Sub InitResizeClass(ByRef FRM As Object)
2) Sub ResizeControls(ByRef FRM As Object)
Here is the vb6 code
****************************
Option Explicit
Private Temp_Class As Resize_Class
Private Sub Form_Load()
Set Temp_Class = New Resize_Class
Temp_Class.InitResizeClass Me
End Sub
Private Sub Form_Resize()
Temp_Class.ResizeControls Me
End Sub
***************************
I’m expecting the same in vb.net
Here is the code how I tried
**********************
Dim ourresize As New Resize_Class
ourresize.InitResizeClass(Me) //Here it is saying that invalid castException
please help me