Convert code from VB.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Diego

    #1

    Convert code from VB.NET

    Hi,
    Anyone can help to convert this code to C#?

    Public Class MonImageConvert er
    Inherits System.Windows. Forms.AxHost

    Public Sub New()
    MyBase.New("59E E46BA-677D-4d20-BF10-8D8067CB8B33")
    'note the GUID here has no meaning.
    End Sub

    Public Shared Function ImageToIPicture (ByVal Image As
    System.Drawing. Image) As stdole.StdPictu re
    ImageToIPicture = AxHost.GetIPict ureFromPicture
    (Image)
    End Function

    Public Shared Function IPictureToImage (ByVal Image As
    stdole.StdPictu re) As System.Drawing. Image
    IPictureToImage = AxHost.GetPictu reFromIPicture
    (Image)
    End Function
    End Class
  • Chris Hornberger

    #2
    Re: Convert code from VB.NET

    Is that working code?

    "Diego" <diegom@amdocs. com> wrote in message news:<048201c35 4e0$f03cf4c0$a3 01280a@phx.gbl> ...[color=blue]
    > Hi,
    > Anyone can help to convert this code to C#?
    >
    > Public Class MonImageConvert er
    > Inherits System.Windows. Forms.AxHost
    >
    > Public Sub New()
    > MyBase.New("59E E46BA-677D-4d20-BF10-8D8067CB8B33")
    > 'note the GUID here has no meaning.
    > End Sub
    >
    > Public Shared Function ImageToIPicture (ByVal Image As
    > System.Drawing. Image) As stdole.StdPictu re
    > ImageToIPicture = AxHost.GetIPict ureFromPicture
    > (Image)
    > End Function
    >
    > Public Shared Function IPictureToImage (ByVal Image As
    > stdole.StdPictu re) As System.Drawing. Image
    > IPictureToImage = AxHost.GetPictu reFromIPicture
    > (Image)
    > End Function
    > End Class[/color]

    Comment

    Working...