Option Explicit Private Declare PtrSafe Function GetDC Lib "user32" (ByVal hWnd As LongPtr) As LongPtr Private Declare PtrSafe Function ReleaseDC Lib "user32" (ByVal hWnd As LongPtr, ByVal hDC As LongPtr) As Long Private Sub CommandButton1_Click() Dim r As IInkRenderer Set r = New InkRenderer Dim hDC As LongPtr hDC = GetDC(0) r.Draw hDC, InkPicture1.Ink.Strokes ReleaseDC 0, hDC End Sub