Display an image grab from Matrox Morphis card to PictureBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nanaalwi
    New Member
    • Dec 2006
    • 5

    Display an image grab from Matrox Morphis card to PictureBox

    Hi,

    Currently I'm developing a software using VB.net that can grab an image using Matrox Morphis card and display it in a PictureBox. The software can grab the image already and display it in the form (Imports Matrox.ActiveMi l). But the problem is I need to display the image in the PictureBox but I don't know how.

    The coding to grab the image is as follows:

    [CODE=vbnet]
    ActiveMILApplic ation = CreateObject("M IL.Application" )


    ActiveMILSystem = ActiveMILApplic ation.CreateObj ect("MIL.System ", False)
    ActiveMILDigiti zer = ActiveMILApplic ation.CreateObj ect("MIL.Digiti zer", False)
    ActiveMILImage = ActiveMILApplic ation.CreateObj ect("MIL.Image" , False)
    ActiveMILDispla y = ActiveMILApplic ation.CreateObj ect("MIL.Displa y", False)
    ActiveMILGraphi cContext = ActiveMILApplic ation.CreateObj ect("MIL.Graphi cContext", False)


    ActiveMILSystem .AutomaticAlloc ation = True
    ActiveMILDispla y.AutomaticAllo cation = True
    ActiveMILGraphi cContext.Automa ticAllocation = True

    ActiveMILDigiti zer.AutomaticAl location = False

    ActiveMILImage. AutomaticAlloca tion = False


    ActiveMILDispla y.Image = ActiveMILImage
    ActiveMILGraphi cContext.Image = ActiveMILImage

    ActiveMILDispla y.DisplayType = dispUserWindow


    ActiveMILDispla y.UserWindow = Me.Handle().ToI nt32()

    If ActiveMILSystem .IsAllocated = False Then
    ActiveMILSystem .Allocate()
    End If

    If ActiveMILSystem .NumberOfDigiti zers > 0 Then

    ActiveMILDigiti zer.Image = ActiveMILImage

    If Not ActiveMILDigiti zer.IsAllocated Then
    ActiveMILDigiti zer.Allocate()
    End If
    End If
    [/CODE]

    How do I display the image in a PictureBox from this coding?
    Your help is much appreciated.
    Last edited by Killer42; Sep 11 '07, 05:24 AM. Reason: Added [CODE=vbnet] tag.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Question moved to .NET Forum.

    Comment

    Working...