|
Using VB.NET and coding "externally," I can't figure out how to get an image (picture, JPEG, PNG, whatever) of the map into a VB Form as the Form.backgroundimage. Obviously this can be done! How? Here's a snippet of code: Imports MI = Manifold.Interop Public Class frmShowManifoldJPEG Public MApp As MI.Application Private Sub btnDOIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDOIT.Click Dim MDoc As MI.Document Dim MDocComps As MI.ComponentSet Dim MTheMap As MI.Map MApp = CreateObject("Manifold.Application") MDoc = MApp.DocumentSet.Open("C:\ManifoldProj.map", False) MDocComps = MDoc.ComponentSet 'What's in the Document? MTheMap = MDocComps.Item(MDocComps.ItemByName("TheMapName")) Dim MTheImage As MI.Image MTheImage = MTheMap.DefaultView '<--- BLOWS UP HERE! Me.BackgroundImage = MTheImage '<---- THIS WON'T WORK EITHER (Need to convert Image to JPEG?) End Sub End Class
|