Erdenemandal
Regular
Hallo
I am working in VB.NET, and I want to write a DLL for Visual C++. It works in VB.net (Create a DLL and use it in VB.NET) but in Visual C++, It does not recognize a function.
This is a code.
Please help me.
I am working in VB.NET, and I want to write a DLL for Visual C++. It works in VB.net (Create a DLL and use it in VB.NET) but in Visual C++, It does not recognize a function.
This is a code.
Code:
Imports System.Drawing
Public Class clsMyClass
Private mMyName As String
Property MyName() As String
Get
MyName = mMyName
End Get
Set(ByVal Value As String)
mMyName = Value
End Set
End Property
Public Function GetDate() As String
' Return today's date
Return "Today is " & Today
End Function
Public Sub DrawResult(ByRef Obj As Windows.Forms.Panel, _
ByRef TotalHit As Integer, _
ByRef RightHit As Integer, _
ByRef FormObj As Windows.Forms.TabPage)
Obj.Visible = False
' Get a Graphics object from the current form and clear its background.
Dim gr As Graphics = FormObj.CreateGraphics
Dim mPen As New Pen(Color.White, 2)
Dim mPen2 As New Pen(Color.RoyalBlue.Black, 1)
Dim TotalProzent, Total2 As Integer
Dim rr As New Rectangle(Obj.Left, Obj.Top, Obj.Width, Obj.Height)
gr.FillRectangle(Brushes.White, rr)
TotalProzent = Int(RightHit / TotalHit * 360)
' Draw a green filled rectangle.
Dim x, y, mWidth, mHeight, StartAngle, SweepAngle As Integer
x = Obj.Left + 10
y = Obj.Top + 10
mHeight = Obj.Height - 20
mWidth = Obj.Width - 20
' Draw a red pie (portion of an ellipse).
Dim i, j As Integer
For i = 0 To TotalProzent
gr.FillPie(Brushes.Blue, x, y, mWidth, mHeight, 0, i)
Next
gr.DrawPie(mPen2, x, y, mWidth, mHeight, 0, TotalProzent)
Total2 = 360 - TotalProzent
For i = 0 To Total2
gr.FillPie(Brushes.Red, x, y, mWidth, mHeight, TotalProzent, i)
Next
gr.DrawPie(mPen2, x, y, mWidth, mHeight, TotalProzent, Total2)
gr.Dispose()
End Sub
End Class
Please help me.