PsychoBlade
New member
- Joined
- Jun 6, 2004
- Messages
- 1
I have the source code for the mouse query of a CAD program (Solid Edge V15) using Visual Basic 6.0 which is working wonderful with Visual Studio 6.0. Now I have to rewrite this code to work with Visual Basic .Net using Visual Studio .Net and I can't get it running. I get the error message that there is a type library missing and that I should install Visual Studio 6.0 as well. But unfortunately this is not possible on the system that I have to use.
I'm using the control elements "igCommand" and igMouse" which I get from Solid Edge.
- The Source Code consists of a form with just the empty "Sub Main" being
used as the start object.
There also is a class with the following code:
- The main form ("DrawHexagon") has this code:
(I didn't include the code for the function ("Hexagon"9 since this is not
important for my issue and the function is already working in VB.Net)
I suppose, that in VB.Net I don't use these extra class and extra form and include their task into the main form "DrawHexagon" (parts of it in the "Sub New" section). But I'm not able to get it running. Using this old method with extra class and extra form nothing is happening. And trying to move their function into the main form the "DrawHexagon" form pops up, but querying the mouse of the solid edge application doesn't work at all. I hope there's someone out there who can help with this problem!!
Thanks,
Blade
I'm using the control elements "igCommand" and igMouse" which I get from Solid Edge.
- The Source Code consists of a form with just the empty "Sub Main" being
used as the start object.
VB.NET:
Public Sub Main()
End Sub
VB.NET:
Private Sub Class_Terminate()
Unload DrawHexagon
End Sub
Public Sub Command_Initialize(BasicCmd As Object)
Set DrawHexagon.igCommand1.Command = BasicCmd
End Sub
- The main form ("DrawHexagon") has this code:
(I didn't include the code for the function ("Hexagon"9 since this is not
important for my issue and the function is already working in VB.Net)
VB.NET:
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub igCommand1_Activate()
DrawHexagon.Show
txtHexagonSize.SelLength = Len(txtHexagonSize.Text)
End Sub
Private Sub igCommand1_Deactivate()
DrawHexagon.Hide
End Sub
Private Sub igMouse1_MouseClick(ByVal Button As Integer, _
ByVal Shift As Integer, _
ByVal x As Double, _
ByVal y As Double, _
ByVal z As Double, _
ByVal Window As Object, _
ByVal KeyPointType As Long, _
ByVal Graphic As Object)
DrawHexagon.Hide
Call Hexagon(x, y, CDbl(txtHexagonSize) * 0.001)
DrawHexagon.Show
End Sub
Private Sub igMouse1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, _
ByVal x As Double, _
ByVal y As Double, _
ByVal z As Double, _
ByVal Window As Object, _
ByVal KeyPointType As Long, _
ByVal Graphic As Object)
Dim strOut As String
txtCoordinateX.Text = Format(x, ".0000")
txtCoordinateY.Text = Format(y, ".0000")
End Sub
Thanks,
Blade