Private Sub CommandButton1_Click() InkPicture1.SetGestureStatus IAG_Circle, True End Sub
Private Sub CommandButton1_Click() Call InkPicture1.SetGestureStatus(IAG_Circle, True) End Sub
Private Sub InkPicture1_Gesture(ByVal Cursor As MSINKAUTLib.IInkCursor, ByVal Strokes As MSINKAUTLib.IInkStrokes, ByVal Gestures As Variant, Cancel As Boolean) Debug.Print Gestures(0).ID, MSINKAUTLib.InkApplicationGesture.IAG_NoGesture If Gestures(0).ID <> MSINKAUTLib.InkApplicationGesture.IAG_NoGesture Then Dim newGuid As String newGuid = 識別用に生成したGuid値 Strokes(0).ExtendedProperties.Add newGuid, Gestures(0).ID Cancel = True End If End Sub
With CreateObject("Scriptlet.TypeLib") newID = Left(.Guid, 38) End With
Private Declare PtrSafe Function CoCreateGuid Lib "ole32.dll" (ByRef pGuid As Currency) As LongPtr Private Declare PtrSafe Function StringFromGUID2 Lib "ole32.dll" (ByRef pGuid As Currency, ByVal lpStrGuid As LongPtr, ByVal cbMax As Long) As LongPtr Public Function CreateGuid() As String Dim id(1) As Currency CreateGuid = "{00000000-0000-0000-0000-000000000000}" If CoCreateGuid(id(0)) = 0 Then Dim s As String s = String(39, 0) If StringFromGUID2(id(0), StrPtr(s), 39) <> 0 Then CreateGuid = Split(s, vbNullChar, 2)(0) End If End If End Function