home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / show / showprop.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1999-08-06  |  10.6 KB  |  363 lines

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Properties"
  6.    ClientHeight    =   3600
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   3660
  10.    DrawStyle       =   5  'Transparent
  11.    FillColor       =   &H80000007&
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3600
  16.    ScaleWidth      =   3660
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   3  'Windows Default
  19.    Begin VB.TextBox Text10 
  20.       BackColor       =   &H80000007&
  21.       ForeColor       =   &H80000005&
  22.       Height          =   285
  23.       Left            =   3000
  24.       TabIndex        =   9
  25.       Top             =   2160
  26.       Width           =   495
  27.    End
  28.    Begin VB.TextBox Text9 
  29.       BackColor       =   &H80000007&
  30.       ForeColor       =   &H80000005&
  31.       Height          =   285
  32.       Left            =   3000
  33.       TabIndex        =   8
  34.       Top             =   1800
  35.       Width           =   495
  36.    End
  37.    Begin VB.TextBox Text8 
  38.       BackColor       =   &H80000007&
  39.       ForeColor       =   &H80000005&
  40.       Height          =   285
  41.       Left            =   3000
  42.       TabIndex        =   7
  43.       Top             =   1440
  44.       Width           =   495
  45.    End
  46.    Begin VB.TextBox Text7 
  47.       BackColor       =   &H80000007&
  48.       ForeColor       =   &H80000005&
  49.       Height          =   285
  50.       Left            =   3000
  51.       TabIndex        =   6
  52.       Top             =   1080
  53.       Width           =   495
  54.    End
  55.    Begin VB.TextBox Text6 
  56.       BackColor       =   &H80000007&
  57.       ForeColor       =   &H80000005&
  58.       Height          =   285
  59.       Left            =   1200
  60.       TabIndex        =   5
  61.       Top             =   2640
  62.       Width           =   495
  63.    End
  64.    Begin VB.CommandButton Command2 
  65.       BackColor       =   &H00000000&
  66.       Caption         =   "Default"
  67.       BeginProperty Font 
  68.          Name            =   "MS Sans Serif"
  69.          Size            =   8.25
  70.          Charset         =   162
  71.          Weight          =   700
  72.          Underline       =   0   'False
  73.          Italic          =   0   'False
  74.          Strikethrough   =   0   'False
  75.       EndProperty
  76.       Height          =   255
  77.       Left            =   120
  78.       MaskColor       =   &H00000000&
  79.       TabIndex        =   10
  80.       Top             =   3240
  81.       UseMaskColor    =   -1  'True
  82.       Width           =   975
  83.    End
  84.    Begin VB.TextBox Text5 
  85.       BackColor       =   &H80000007&
  86.       ForeColor       =   &H80000005&
  87.       Height          =   285
  88.       Left            =   1200
  89.       TabIndex        =   4
  90.       Top             =   2160
  91.       Width           =   495
  92.    End
  93.    Begin VB.TextBox Text4 
  94.       BackColor       =   &H80000007&
  95.       ForeColor       =   &H80000005&
  96.       Height          =   285
  97.       Left            =   1200
  98.       TabIndex        =   3
  99.       Top             =   1800
  100.       Width           =   495
  101.    End
  102.    Begin VB.CommandButton Command1 
  103.       BackColor       =   &H00000000&
  104.       Caption         =   "OK"
  105.       BeginProperty Font 
  106.          Name            =   "MS Sans Serif"
  107.          Size            =   8.25
  108.          Charset         =   162
  109.          Weight          =   700
  110.          Underline       =   0   'False
  111.          Italic          =   0   'False
  112.          Strikethrough   =   0   'False
  113.       EndProperty
  114.       Height          =   255
  115.       Left            =   3000
  116.       MaskColor       =   &H00000000&
  117.       TabIndex        =   11
  118.       Top             =   3240
  119.       UseMaskColor    =   -1  'True
  120.       Width           =   495
  121.    End
  122.    Begin VB.TextBox Text3 
  123.       BackColor       =   &H80000007&
  124.       ForeColor       =   &H80000005&
  125.       Height          =   285
  126.       Left            =   1200
  127.       TabIndex        =   2
  128.       Top             =   1440
  129.       Width           =   495
  130.    End
  131.    Begin VB.TextBox Text2 
  132.       BackColor       =   &H80000007&
  133.       ForeColor       =   &H80000005&
  134.       Height          =   285
  135.       Left            =   1200
  136.       TabIndex        =   1
  137.       Top             =   1080
  138.       Width           =   495
  139.    End
  140.    Begin VB.TextBox Text1 
  141.       BackColor       =   &H80000007&
  142.       ForeColor       =   &H80000005&
  143.       Height          =   285
  144.       Left            =   1200
  145.       TabIndex        =   0
  146.       Top             =   120
  147.       Width           =   495
  148.    End
  149.    Begin VB.Label Label12 
  150.       BackStyle       =   0  'Transparent
  151.       Caption         =   "Unit_vy"
  152.       ForeColor       =   &H80000005&
  153.       Height          =   255
  154.       Left            =   1920
  155.       TabIndex        =   23
  156.       Top             =   2160
  157.       Width           =   735
  158.    End
  159.    Begin VB.Label Label11 
  160.       BackStyle       =   0  'Transparent
  161.       Caption         =   "Unit_vx"
  162.       ForeColor       =   &H80000005&
  163.       Height          =   255
  164.       Left            =   1920
  165.       TabIndex        =   22
  166.       Top             =   1800
  167.       Width           =   735
  168.    End
  169.    Begin VB.Label Label10 
  170.       BackStyle       =   0  'Transparent
  171.       Caption         =   "Unit_y"
  172.       ForeColor       =   &H80000005&
  173.       Height          =   255
  174.       Left            =   1920
  175.       TabIndex        =   21
  176.       Top             =   1440
  177.       Width           =   735
  178.    End
  179.    Begin VB.Label Label9 
  180.       BackStyle       =   0  'Transparent
  181.       Caption         =   "Unit_x"
  182.       ForeColor       =   &H80000005&
  183.       Height          =   255
  184.       Left            =   1920
  185.       TabIndex        =   20
  186.       Top             =   1080
  187.       Width           =   735
  188.    End
  189.    Begin VB.Label Label8 
  190.       BackStyle       =   0  'Transparent
  191.       Caption         =   "g (Earth)"
  192.       ForeColor       =   &H80000005&
  193.       Height          =   255
  194.       Left            =   120
  195.       TabIndex        =   19
  196.       Top             =   2640
  197.       Width           =   735
  198.    End
  199.    Begin VB.Label Label7 
  200.       BackStyle       =   0  'Transparent
  201.       Caption         =   "4"
  202.       ForeColor       =   &H80000005&
  203.       Height          =   255
  204.       Left            =   360
  205.       TabIndex        =   18
  206.       Top             =   2160
  207.       Width           =   135
  208.    End
  209.    Begin VB.Label Label6 
  210.       BackStyle       =   0  'Transparent
  211.       Caption         =   "3"
  212.       ForeColor       =   &H80000005&
  213.       Height          =   255
  214.       Left            =   360
  215.       TabIndex        =   17
  216.       Top             =   1800
  217.       Width           =   135
  218.    End
  219.    Begin VB.Label Label5 
  220.       BackStyle       =   0  'Transparent
  221.       Caption         =   "2"
  222.       ForeColor       =   &H80000005&
  223.       Height          =   255
  224.       Left            =   360
  225.       TabIndex        =   16
  226.       Top             =   1440
  227.       Width           =   255
  228.    End
  229.    Begin VB.Label Label4 
  230.       BackStyle       =   0  'Transparent
  231.       Caption         =   "1"
  232.       ForeColor       =   &H80000005&
  233.       Height          =   255
  234.       Left            =   360
  235.       TabIndex        =   15
  236.       Top             =   1080
  237.       Width           =   255
  238.    End
  239.    Begin VB.Label Label3 
  240.       BackColor       =   &H80000007&
  241.       BackStyle       =   0  'Transparent
  242.       Caption         =   "Explosion#"
  243.       ForeColor       =   &H80000005&
  244.       Height          =   255
  245.       Left            =   120
  246.       TabIndex        =   14
  247.       Top             =   720
  248.       Width           =   855
  249.    End
  250.    Begin VB.Label Label2 
  251.       BackColor       =   &H80000007&
  252.       BackStyle       =   0  'Transparent
  253.       Caption         =   "Pieces"
  254.       ForeColor       =   &H80000005&
  255.       Height          =   255
  256.       Left            =   1200
  257.       TabIndex        =   13
  258.       Top             =   720
  259.       Width           =   495
  260.    End
  261.    Begin VB.Label Label1 
  262.       BackColor       =   &H80000007&
  263.       BackStyle       =   0  'Transparent
  264.       Caption         =   "Explosions"
  265.       ForeColor       =   &H80000005&
  266.       Height          =   255
  267.       Left            =   120
  268.       TabIndex        =   12
  269.       Top             =   240
  270.       Width           =   975
  271.    End
  272. Attribute VB_Name = "Form2"
  273. Attribute VB_GlobalNameSpace = False
  274. Attribute VB_Creatable = False
  275. Attribute VB_PredeclaredId = True
  276. Attribute VB_Exposed = False
  277. Private Sub Command1_Click()
  278. File_Stop_Bit = 1
  279. Explosions = Val(Text1.Text)
  280. If Explosions > 4 Then Explosions = 4
  281. If Explosions < 0 Then Explosions = 1
  282. Pieces(1) = Val(Text2.Text)
  283. Pieces(2) = Val(Text3.Text)
  284. Pieces(3) = Val(Text4.Text)
  285. Pieces(4) = Val(Text5.Text)
  286. g = Val(Text6.Text) / 3.333333
  287. Unit_x = Val((Text7.Text))
  288. Unit_y = Val((Text8.Text))
  289. Unit_vx = Val((Text9.Text))
  290. Unit_vy = Val((Text10.Text))
  291. For Counter = 1 To Explosions
  292.     If Pieces(Counter_F2) > 64 Then
  293.         Pieces(Counter_F2) = 64
  294.     ElseIf Pieces(Counter_F2) < 1 Then
  295.         Pieces(Counter_F2) = 1
  296.     End If
  297.     Form1.SET_NEW_VALUES Counter_F2
  298. Next Counter
  299. Coming_From_Form_2 = 1
  300. Unload Me
  301. End Sub
  302. Private Sub Command2_Click()
  303. Text1.Text = "4"
  304. Text2.Text = "16"
  305. Text3.Text = "16"
  306. Text4.Text = "16"
  307. Text5.Text = "16"
  308. End Sub
  309. Private Sub Form_Load()
  310. Text1.Text = LTrim(Str$(Explosions))
  311. Text2.Text = LTrim(Str$(Pieces(1)))
  312. Text3.Text = LTrim(Str$(Pieces(2)))
  313. Text4.Text = LTrim(Str$(Pieces(3)))
  314. Text5.Text = LTrim(Str$(Pieces(4)))
  315. Text6.Text = LTrim(Str$(3.333333 * g))
  316. Text7.Text = LTrim(Str$(Unit_x))
  317. Text8.Text = LTrim(Str$(Unit_y))
  318. Text9.Text = LTrim(Str$(Unit_vx))
  319. Text10.Text = LTrim(Str$(Unit_vy))
  320. Form2.Top = Form1.Top + Form1.Height / 4
  321. Form2.Left = Form1.Left + (Form1.Width - Form2.Width) / 2
  322. End Sub
  323. Private Sub Text1_GotFocus()
  324. Text1.SelStart = 0
  325. Text1.SelLength = Len(Text1.Text)
  326. End Sub
  327. Private Sub Text2_GotFocus()
  328. Text2.SelStart = 0
  329. Text2.SelLength = Len(Text2.Text)
  330. End Sub
  331. Private Sub Text3_GotFocus()
  332. Text3.SelStart = 0
  333. Text3.SelLength = Len(Text3.Text)
  334. End Sub
  335. Private Sub Text4_GotFocus()
  336. Text4.SelStart = 0
  337. Text4.SelLength = Len(Text4.Text)
  338. End Sub
  339. Private Sub Text5_GotFocus()
  340. Text5.SelStart = 0
  341. Text5.SelLength = Len(Text5.Text)
  342. End Sub
  343. Private Sub Text6_GotFocus()
  344. Text6.SelStart = 0
  345. Text6.SelLength = Len(Text6.Text)
  346. End Sub
  347. Private Sub Text7_GotFocus()
  348. Text7.SelStart = 0
  349. Text7.SelLength = Len(Text8.Text)
  350. End Sub
  351. Private Sub Text8_GotFocus()
  352. Text8.SelStart = 0
  353. Text8.SelLength = Len(Text8.Text)
  354. End Sub
  355. Private Sub Text9_GotFocus()
  356. Text9.SelStart = 0
  357. Text9.SelLength = Len(Text9.Text)
  358. End Sub
  359. Private Sub text10_GotFocus()
  360. Text10.SelStart = 0
  361. Text10.SelLength = Len(Text10.Text)
  362. End Sub
  363.