VERSION 5.00
Begin VB.Form TestDialog 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   4155
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   3600
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4155
   ScaleWidth      =   3600
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox ShowFrame 
      Height          =   3255
      Left            =   120
      ScaleHeight     =   3195
      ScaleWidth      =   3315
      TabIndex        =   2
      Top             =   120
      Width           =   3375
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   ""
      Height          =   375
      Left            =   2280
      TabIndex        =   1
      Top             =   3600
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   3600
      Width           =   1215
   End
End
Attribute VB_Name = "TestDialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Public kompasDocName As String
Public IdSlide As Integer
Public resurs As String
'Public doc As Object
'Public kompasOb As Object

Private Sub CancelButton_Click()
  Unload Me
End Sub

Private Sub Form_Load()
  kompasDocName = "c:\1.frw"
  IdSlide = 100
'      
'  resurs = kompasOb.ksReadString("  *.rc ", "c:\libVB\st4.rc")
End Sub

Public Sub TestShowDialog()
'  Set doc = doc_
'  Set kompasOb = kompas_
  '   -     ,   
  Dim dlg As TestDialog
  Set dlg = New TestDialog
  kompasOb.ksEnableTaskAccess 0  '    
  dlg.Show vbModal             '  
  kompasOb.ksEnableTaskAccess 1  '    
End Sub

Private Sub OKButton_Click()
  Unload Me
End Sub

Private Sub ShowFrame_Paint()
'  kompasOb.ksDrawSlide CLng(ShowFrame.hWnd), IdSlide
'  kompasOb.ksDrawBitmap CLng(ShowFrame.hWnd), IdSlide
'  docActive.ksDrawKompasDocument CLng(ShowFrame.hWnd), kompasDocName
  
  If Not docActive Is Nothing And docActive.Reference <> 0 Then
    Dim gr As Long
    gr = docActive.ksNewGroup(1)
      docActive.ksMtr 20, 15, 45, 1, 1
      docActive.ksLineSeg -10, 0, 10, 0, 1
      docActive.ksLineSeg 10, 0, 10, 20, 1
      docActive.ksLineSeg 10, 20, -10, 20, 1
      docActive.ksLineSeg -10, 20, -10, 0, 1
      docActive.ksDeleteMtr
    docActive.ksEndGroup
    docActive.ksDrawKompasGroup CLng(ShowFrame.hWnd), gr
    docActive.ksDeleteObj gr 
  Else
    kompasOb.ksError ("   ")
  End If

'       :    .rc  
'   
'  If Len(resurs) <> 0 Then
'    kompasOb.ksDrawSlideFromFile CLng(ShowFrame.hWnd), resurs
'  End If
End Sub
