home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / w3dvb5 / supnas.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-12-22  |  6.9 KB  |  219 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
  3. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "Esempio 3D in VB5"
  6.    ClientHeight    =   5730
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1770
  9.    ClientWidth     =   8070
  10.    FillStyle       =   0  'Solid
  11.    BeginProperty Font 
  12.       Name            =   "MS Sans Serif"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Icon            =   "SUPNAS.frx":0000
  22.    LinkTopic       =   "Form1"
  23.    PaletteMode     =   1  'UseZOrder
  24.    ScaleHeight     =   382
  25.    ScaleMode       =   3  'Pixel
  26.    ScaleWidth      =   538
  27.    Begin ComctlLib.Toolbar TB 
  28.       Align           =   1  'Align Top
  29.       Height          =   420
  30.       Left            =   0
  31.       TabIndex        =   0
  32.       Top             =   0
  33.       Width           =   8070
  34.       _ExtentX        =   14235
  35.       _ExtentY        =   741
  36.       ButtonWidth     =   635
  37.       ButtonHeight    =   582
  38.       Appearance      =   1
  39.       ImageList       =   "Imgl"
  40.       _Version        =   327680
  41.       BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7} 
  42.          NumButtons      =   6
  43.          BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  44.             Key             =   "END"
  45.             Object.ToolTipText     =   "Fine"
  46.             Object.Tag             =   ""
  47.             ImageIndex      =   1
  48.          EndProperty
  49.          BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  50.             Key             =   "OPEN"
  51.             Object.ToolTipText     =   "Apri"
  52.             Object.Tag             =   ""
  53.             ImageIndex      =   2
  54.          EndProperty
  55.          BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  56.             Object.Tag             =   ""
  57.             Style           =   3
  58.             MixedState      =   -1  'True
  59.          EndProperty
  60.          BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  61.             Key             =   "WIRE"
  62.             Object.ToolTipText     =   "Struttura a Filo"
  63.             Object.Tag             =   ""
  64.             ImageIndex      =   3
  65.             Style           =   2
  66.          EndProperty
  67.          BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  68.             Key             =   "PITTORE"
  69.             Object.ToolTipText     =   "Resa Sfumata"
  70.             Object.Tag             =   ""
  71.             ImageIndex      =   4
  72.             Style           =   2
  73.          EndProperty
  74.          BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7} 
  75.             Key             =   "DIS"
  76.             Object.ToolTipText     =   "Ridisegna"
  77.             Object.Tag             =   ""
  78.             ImageIndex      =   5
  79.          EndProperty
  80.       EndProperty
  81.    End
  82.    Begin VB.PictureBox Pict 
  83.       BackColor       =   &H80000009&
  84.       Height          =   4575
  85.       Left            =   300
  86.       ScaleHeight     =   301
  87.       ScaleMode       =   3  'Pixel
  88.       ScaleWidth      =   489
  89.       TabIndex        =   1
  90.       Top             =   480
  91.       Width           =   7395
  92.    End
  93.    Begin MSComDlg.CommonDialog CMd1 
  94.       Left            =   -180
  95.       Top             =   4860
  96.       _ExtentX        =   847
  97.       _ExtentY        =   847
  98.       _Version        =   327680
  99.       Filter          =   "*.DAT"
  100.    End
  101.    Begin ComctlLib.ImageList Imgl 
  102.       Left            =   -180
  103.       Top             =   4200
  104.       _ExtentX        =   1005
  105.       _ExtentY        =   1005
  106.       BackColor       =   -2147483643
  107.       ImageWidth      =   16
  108.       ImageHeight     =   16
  109.       MaskColor       =   12632256
  110.       _Version        =   327680
  111.       BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
  112.          NumListImages   =   5
  113.          BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  114.             Picture         =   "SUPNAS.frx":08CA
  115.             Key             =   ""
  116.          EndProperty
  117.          BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  118.             Picture         =   "SUPNAS.frx":0BE4
  119.             Key             =   ""
  120.          EndProperty
  121.          BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  122.             Picture         =   "SUPNAS.frx":0EFE
  123.             Key             =   ""
  124.          EndProperty
  125.          BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  126.             Picture         =   "SUPNAS.frx":1218
  127.             Key             =   ""
  128.          EndProperty
  129.          BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  130.             Picture         =   "SUPNAS.frx":1532
  131.             Key             =   ""
  132.          EndProperty
  133.       EndProperty
  134.    End
  135.    Begin VB.Menu File_m 
  136.       Caption         =   "File"
  137.       Begin VB.Menu Open_i 
  138.          Caption         =   "Apri"
  139.       End
  140.       Begin VB.Menu Exit_i 
  141.          Caption         =   "Esci"
  142.       End
  143.    End
  144.    Begin VB.Menu Render_m 
  145.       Caption         =   "Render"
  146.       Begin VB.Menu Wire 
  147.          Caption         =   "Struttura a Filo"
  148.       End
  149.       Begin VB.Menu Painter_i 
  150.          Caption         =   "Render Sfumato"
  151.       End
  152.       Begin VB.Menu Ridis 
  153.          Caption         =   "Ridisegna"
  154.       End
  155.    End
  156. Attribute VB_Name = "Form1"
  157. Attribute VB_GlobalNameSpace = False
  158. Attribute VB_Creatable = False
  159. Attribute VB_PredeclaredId = True
  160. Attribute VB_Exposed = False
  161. Dim Metodo As Integer ' 0 Render a Filo, 1 = Render Sfufato
  162. Dim FileOpen As String
  163. Sub Render()
  164.  If Len(FileOpen) = 0 Then
  165.     MsgBox "Selezionare un file coordinate Valido!", 16
  166.     Exit Sub
  167.  End If
  168.  Pict.Cls
  169.  Pittore Pict, Metodo
  170. End Sub
  171. Private Sub Exit_i_Click()
  172.   End
  173. End Sub
  174. Private Sub Form_Load()
  175.   X__max = Pict.ScaleWidth
  176.   Y__max = Pict.ScaleHeight
  177. End Sub
  178. Private Sub Open_i_Click()
  179.  CMd1.Filter = "File Coordinate|*.DAT"
  180.  CMd1.ShowOpen
  181.  If Len(CMd1.filename) = 0 Then Exit Sub
  182.  FileOpen = CMd1.filename
  183.  If Not LoadFile(CMd1.filename) Then
  184.     MsgBox "File Non valido", 16, "Errore Apertura"
  185.     FileOpen = ""
  186.     Exit Sub
  187.  End If
  188.  SetColors Form1.Pict
  189.  Render
  190. End Sub
  191. Private Sub Painter_i_Click()
  192.   Wire.Checked = False
  193.   Painter_i.Checked = True
  194.   Metodo = 1
  195. End Sub
  196. Private Sub Ridis_Click()
  197.   Render
  198. End Sub
  199. Private Sub TB_ButtonClick(ByVal Button As ComctlLib.Button)
  200.    Select Case Button.Key
  201.      Case "END"
  202.        Exit_i_Click
  203.      Case "OPEN"
  204.        Open_i_Click
  205.      Case "WIRE"
  206.        Wire_Click
  207.      Case "PITTORE"
  208.        Painter_i_Click
  209.      Case "DIS"
  210.        Render
  211.    End Select
  212.      
  213. End Sub
  214. Private Sub Wire_Click()
  215.   Painter_i.Checked = False
  216.   Wire.Checked = True
  217.   Metodo = 0
  218. End Sub
  219.