Hallo,
die Lösung steht doch in der API-Hilfe:
' Declare variable for the calendar control.
Private WithEvents oCal As MSACAL.Calendar
' Declare global variables for the Inventor document and Application.
Private WithEvents oDocEvents As DocumentEvents
Private oPane As BrowserPane
Private oApp As Inventor.Application
Private Sub Form_Load()
' Set a reference to a running instance of Inventor.
' This expects Inventor to be running.
Set oApp = GetObject(, "Inventor.Application")
' Get the active document. This assumes a document is open.
Dim oDoc As Inventor.Document
Set oDoc = oApp.ActiveDocument
' Connect to the documents events. Used to
' listen for when the document is closed.
Set oDocEvents = oDoc.DocumentEvents
' Create a new browser pane using the Microsoft calendar control.
'---------------------> Auf diese Stelle kommt es an!!!!!
Set oPane = oDoc.BrowserPanes.Add("Calendar", "MSCAL.Calendar")
' Set a reference to the calendar control
' that was created on the pane.
Set oCal = oPane.Control
' Set the calendar to today's date.
oCal.Today
' Make the new pane the active pane.
oPane.Activate
End Sub
Sofern Du ein eigenes OCX-Control geschrieben hast, kannst Du es hier einfach anstelle des Windows-Taschenrechners einfügen!
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP