home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
bp_1_94
/
vbwin
/
visio
/
zahnrad.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1993-10-27
|
9KB
|
216 lines
frmGEAR
GEARMAKER
"System
LLLLLLLLLLLLLLLL
LLLLL
LLLLLLLLLL
LLLLLJLLLL
LLLLLLLLLLLLLLLL
LLLLLLLLLLLLLLLL
Form15
lstUnitList
txtNteeth
txtRin
txtRout
Command3
&Draw Gear
Command2
&Quit
Command1
&New Page
Frame1
Gear Properties
Label3
&Teeth
Label2
&In Rad.
Label1
&Out Rad.
Statusbar
Statusbar
@ Form_Load
vaoGetObject
visOK
g_Appvisio
ActiveDocument
Command1_Click
Drawing+
object&
DocumentsU
Command2_Clickn
Text1_Change-
lblRin_Click
Label3_Click
Label2_Clicky
SetWindowPos0
HWND_TOPMOST
SWP_NOACTIVATEv
SWP_SHOWWINDOW
AppConnect
FormUpdateF
txtRout_Change
Command3_Click
Theta
txtNteeth
Text0
txtWatchW
HWND_NOTOPMOST
hWndInsertAfterY
wFlags
txtWatch_Change
txtRout
txtRin/
drawline
visio
activepage
activewindow
Xcenter
YcenterX
DrawRectangle
AddRow
visSectionGeometry
visSectionGeometry1
visTagLineTos
visSectionFirstComponent
visRowFirst
CellsSRC
visRowVertex
Formula
First
Nteeth
cells
WidthC
heightg
RoutF
Sizeg
Rectsize
Frame1_DragDrop
Source
Control
Form_Resized
Picture1_Click
Text_Click
About_ClickX
Form_Activate
Form_QueryUnload
Cancel
UnloadModem
Form_LostFocusO
DoubleYc
Text1
Text2
onerr
continue
OnError4
optUnits_Click
index
Units~
optunits
Value
Form_GotFocus
Form_Deactivate
txtRout_DragDrop
txtRin_Change
txtRin_LostFocus]
Parse
txtRout_LostFocus
txtRout_KeyPress
KeyAscii4
CheckText)
txtNteeth_Changet
TextBoxJ
txtNteeth_KeyPress
txtRin_KeyPress
Status
Statusbar
Combo1_Change
lstUnitList
stClient
lstUnitList_Change
ListIndex
lstUnitList_Click
-- Window Position Constants & Declarationsl
CheckText
If KeyAscii ain't a number, a point, or a backspace then do nothing.
Command1_Click
Make a new page when the button is clicked
Command2_Click
Command3_Click
Counters, temporary variables.
3.1415926538
Size of dummy rectangle that becomes the gear.
Location of dummy rectangle on page.
Number of gear teeth, from txtNTeeth.
In/out radii of gear, from txtRin & txtRout.
X locations of gear geometry.e
Y locations of gear geometry.
A = Angle; changes often, used in loops.
Aw = Angle of wedge.
Width of gear = 2 times outside radius.2
Units of gear, from optUnits.h
Width of gear = 2 x Outside radius.e
Initialize "homemade" status bar.n
Get units for gear.
Setup Visio as object stuff.
No Active page!
Set the centerof the gear on the page.
Calculate all of the points on the gear and load them into p
Px and Py string arrays.
Point 11
Width*
###0.######
Height*
###0.######
Point 22
Width*
###0.######
Height*
###0.######
Point 31
Width*
###0.######
Height*
###0.######
Point 4
Width*
###0.######
Height*
###0.######
Draw a square.
Modify the square by adding all of the rows needed to make the gear.
Size the rectangle to the size of the gear
width
###0.######
height
###0.######
Load the values from the arrays Px() & Py() into the geometry sections
of the gear.
Determines position in Px() & Py() arrays during following loop.
Change to kth Geometry row, (k), X cell.
Change to kth Geometry row, Y cell.o
Update "home made" status bar.
Close up the object by referring the last X and Y to the first ones.
Geometry1.X1
Geometry1.Y1
Form_Load
--- Form_Load
-- On startup we set the window to *ALWAYS* be on top. After that weO
-- connect to an instance of Visio through VISREG.BAS.
If AppConnect() Then FormUpdate
couldn't get instance of Visio
Millimeter
Zentimeter
Meter
Form_Resize
--- Form_Load
-- On startup we set the window to *ALWAYS* be on top. After that we
-- connect to an instance of Visio through VISREG.BAS.
If AppConnect() Then FormUpdate
couldn't get instance of Visio
txtNteeth_KeyPress
Check keystrokes for numbers, points, or backspace.
txtRin_KeyPress
Check keystrokes for numbers, points, or backspace.
txtRout_KeyPress
Check keystrokes for numbers, points, or backspace.