home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 November
/
pcwk_11_98a.iso
/
Wtestowe
/
SOFTSRC
/
vtrial15.exe
/
DATA.1
/
Zoom.frm
< prev
next >
Wrap
Text File
|
1997-02-14
|
4KB
|
165 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "The Zoomer"
ClientHeight = 1620
ClientLeft = 8940
ClientTop = 1470
ClientWidth = 3225
ControlBox = 0 'False
Height = 2025
Icon = "Zoom.frx":0000
Left = 8880
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1620
ScaleWidth = 3225
ShowInTaskbar = 0 'False
Top = 1125
WhatsThisHelp = -1 'True
Width = 3345
Begin VB.CommandButton Command1
Caption = "Zoom Extents"
Height = 375
Left = 1800
TabIndex = 6
Top = 120
Width = 1215
End
Begin VB.Frame Frame1
Height = 1455
Left = 120
TabIndex = 2
Top = 0
Width = 1455
Begin VB.CommandButton ZoomCmd
Caption = "Zoom !"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 4
Top = 960
Width = 975
End
Begin VB.TextBox ZoomFactor
Height = 285
Left = 240
TabIndex = 3
Text = "0.9"
Top = 480
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Zoom Factor"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 5
Top = 240
Width = 1215
End
End
Begin VB.CommandButton AboutCmd
Caption = "About"
Height = 375
Left = 1800
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton QuitCmd
Caption = "&Quit"
Height = 375
Left = 1800
TabIndex = 0
Top = 1080
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
' (C) Copyright 1997 by SoftSource. All rights reserved.
' Sample Visual Basic code for working with Vdraft
'
' This code demonstrates changing the view
' in a drawing
Option Explicit
Dim Vdraft As Object
Private Sub AboutCmd_Click()
'
' show the about box
'
AboutForm.Show
End Sub
Private Sub Command1_Click()
'
' zoom extents
'
If Not Vdraft.Documents.Count = 0 Then
Vdraft.ActiveDocument.Views.ActiveView.Extents
End If
End Sub
Private Sub Form_Load()
'
' main form inits
'
WindowOnTop hWnd
Form1.Left = (Screen.Width - Form1.Width) / 2
Form1.Top = (Screen.Height - Form1.Height) / 2
Set Vdraft = CreateObject("Vdraft.Application")
End Sub
Private Sub QuitCmd_Click()
End
End Sub
Private Sub ZoomCmd_Click()
'
' do the requested zoom
'
Dim ZoomFactor As Double
If Vdraft.Documents.Count = 0 Then
Exit Sub
End If
ZoomFactor = Val(Form1.ZoomFactor.Text)
'
' be sure the requested zoom factor is valid
If (ZoomFactor = 0) Then Exit Sub ' doesn't make sense
If (ZoomFactor = 1) Then Exit Sub ' same as what's already there
Vdraft.ActiveDocument.Views.ActiveView.ZoomFactor ZoomFactor
End Sub