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.ActiveMil). 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:
Expand|Select|Wrap|Line Numbers
- ActiveMILApplication = CreateObject("MIL.Application")
- ActiveMILSystem = ActiveMILApplication.CreateObject("MIL.System", False)
- ActiveMILDigitizer = ActiveMILApplication.CreateObject("MIL.Digitizer", False)
- ActiveMILImage = ActiveMILApplication.CreateObject("MIL.Image", False)
- ActiveMILDisplay = ActiveMILApplication.CreateObject("MIL.Display", False)
- ActiveMILGraphicContext = ActiveMILApplication.CreateObject("MIL.GraphicContext", False)
- ActiveMILSystem.AutomaticAllocation = True
- ActiveMILDisplay.AutomaticAllocation = True
- ActiveMILGraphicContext.AutomaticAllocation = True
- ActiveMILDigitizer.AutomaticAllocation = False
- ActiveMILImage.AutomaticAllocation = False
- ActiveMILDisplay.Image = ActiveMILImage
- ActiveMILGraphicContext.Image = ActiveMILImage
- ActiveMILDisplay.DisplayType = dispUserWindow
- ActiveMILDisplay.UserWindow = Me.Handle().ToInt32()
- If ActiveMILSystem.IsAllocated = False Then
- ActiveMILSystem.Allocate()
- End If
- If ActiveMILSystem.NumberOfDigitizers > 0 Then
- ActiveMILDigitizer.Image = ActiveMILImage
- If Not ActiveMILDigitizer.IsAllocated Then
- ActiveMILDigitizer.Allocate()
- End If
- End If
Your help is much appreciated.