Q&A

  • Microsoft Tablet PC 샘플소스 VB를 델파이7로...
Microsoft Tablet PC Platform SDK1.5를 설치했는데 샘플소스가 VB만 있어(아래) 델파이로 변환해야하는데
도와 주세요!

VB Code
<!--
    Imports Microsoft.Ink

    Dim InkLayers(3) As InkLayer
    Dim emptyInk As Ink

    emptyInk = New Ink()

    ' Initialize the four different layers of ink on the vehicle diagram:
    ' vehicle body, windows, tires, and headlights.
    inkLayers(0) = New InkLayer(New Ink(), Color.Red, False)
    inkLayers(1) = New InkLayer(New Ink(), Color.Violet, False)
    inkLayers(2) = New InkLayer(New Ink(), Color.LightGreen, False)
    inkLayers(3) = New InkLayer(New Ink(), Color.Aqua, False)

    lstAnnotationLayer.SelectedIndex = 0

    inkPictVehicle.DefaultDrawingAttributes.Color = inkLayers

    Dim layer As InkLayer
    For Each layer In inkLayers
        If (Not layer.Hidden) Then
            inkPictVehicle.Renderer.Draw(e.Graphics, layer.ActiveInk.Strokes)
        End If
    Next

' Provided that the new selected index value is different than

' the previous value...

If (Not (lstAnnotationLayer.SelectedIndex = selectedIndex)) Then

    If (Not inkPictVehicle.CollectingInk) Then

        ' Set the ink and visiblity of the current ink layer

        inkPictVehicle.DefaultDrawingAttributes.Color = inkLayers(lstAnnotationLayer.SelectedIndex).ActiveColor

        chHideLayer.Checked = inkLayers(lstAnnotationLayer.SelectedIndex).Hidden

        inkPictVehicle.InkEnabled = False
        If (chHideLayer.Checked) Then
            inkPictVehicle.Ink = emptyInk
        Else
            inkPictVehicle.Ink = inkLayers(lstAnnotationLayer.SelectedIndex).ActiveInk
        End If
        inkPictVehicle.InkEnabled = True

If (Not (chHideLayer.Checked = selectedHidden)) Then
    If (Not (inkPictVehicle.CollectingInk)) Then

        inkLayers(lstAnnotationLayer.SelectedIndex).Hidden = chHideLayer.Checked

        inkPictVehicle.InkEnabled = False
        If (chHideLayer.Checked) Then
            inkPictVehicle.Ink = emptyInk
        Else
            inkPictVehicle.Ink = inkLayers(lstAnnotationLayer.SelectedIndex).ActiveInk
        End If

        inkPictVehicle.InkEnabled = Not chHideLayer.Checked
        Me.Refresh()
-->
0  COMMENTS