www.pudn.com > Intra3D-Software.rar > frmMain.frm


VERSION 5.00 
Object = "{4D8BEF20-5303-11D3-BEE0-0080C842CA37}#1.0#0"; "INTRA3D.OCX" 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.Form frmMain  
   Caption         =   "Intra3D Example - Charts" 
   ClientHeight    =   6675 
   ClientLeft      =   165 
   ClientTop       =   735 
   ClientWidth     =   7455 
   Icon            =   "frmMain.frx":0000 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   6675 
   ScaleWidth      =   7455 
   StartUpPosition =   3  'Windows Default 
   Begin INTRA3DLibCtl.SceneView AppView  
      Height          =   3735 
      Left            =   1320 
      OleObjectBlob   =   "frmMain.frx":0442 
      TabIndex        =   3 
      Top             =   1200 
      Width           =   4935 
   End 
   Begin MSComctlLib.Toolbar tbDetailed  
      Align           =   4  'Align Right 
      Height          =   6315 
      Left            =   7095 
      TabIndex        =   2 
      Top             =   360 
      Width           =   360 
      _ExtentX        =   635 
      _ExtentY        =   11139 
      ButtonWidth     =   609 
      ButtonHeight    =   582 
      Appearance      =   1 
      Style           =   1 
      ImageList       =   "ImageList2" 
      _Version        =   393216 
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}  
         NumButtons      =   21 
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateXP" 
            Object.ToolTipText     =   "Translate  to +X" 
            ImageIndex      =   1 
         EndProperty 
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateYP" 
            Object.ToolTipText     =   "Translate  to +Y" 
            ImageIndex      =   2 
         EndProperty 
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateZP" 
            Object.ToolTipText     =   "Translate  to +Z" 
            ImageIndex      =   3 
         EndProperty 
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateXN" 
            Object.ToolTipText     =   "Translate  to -X" 
            ImageIndex      =   4 
         EndProperty 
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateYN" 
            Object.ToolTipText     =   "Translate  to -Y" 
            ImageIndex      =   5 
         EndProperty 
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateZN" 
            Object.ToolTipText     =   "Translate  to -Z" 
            ImageIndex      =   6 
         EndProperty 
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateXP" 
            Object.ToolTipText     =   "Rotate from X" 
            ImageIndex      =   7 
         EndProperty 
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateYP" 
            Object.ToolTipText     =   "Rotate from Y" 
            ImageIndex      =   8 
         EndProperty 
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateZP" 
            Object.ToolTipText     =   "Rotate from Z" 
            ImageIndex      =   9 
         EndProperty 
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateXN" 
            Object.ToolTipText     =   "Rotate from X" 
            ImageIndex      =   10 
         EndProperty 
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateYN" 
            Object.ToolTipText     =   "Rotate from Y" 
            ImageIndex      =   11 
         EndProperty 
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateZN" 
            Object.ToolTipText     =   "Rotate from Z" 
            ImageIndex      =   12 
         EndProperty 
         BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleXP" 
            Object.ToolTipText     =   "Scale Up X" 
            ImageIndex      =   13 
         EndProperty 
         BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleYP" 
            Object.ToolTipText     =   "Scale Up Y" 
            ImageIndex      =   14 
         EndProperty 
         BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleZP" 
            Object.ToolTipText     =   "Scale Up Z" 
            ImageIndex      =   15 
         EndProperty 
         BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleXN" 
            Object.ToolTipText     =   "Scale Down X" 
            ImageIndex      =   16 
         EndProperty 
         BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleYN" 
            Object.ToolTipText     =   "Scale Down Y" 
            ImageIndex      =   17 
         EndProperty 
         BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleZN" 
            Object.ToolTipText     =   "Scale Down Z" 
            ImageIndex      =   18 
         EndProperty 
         BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628}  
         EndProperty 
      EndProperty 
   End 
   Begin MSComctlLib.Toolbar tbApp  
      Align           =   3  'Align Left 
      Height          =   6315 
      Left            =   0 
      TabIndex        =   1 
      Top             =   360 
      Width           =   360 
      _ExtentX        =   635 
      _ExtentY        =   11139 
      ButtonWidth     =   609 
      ButtonHeight    =   582 
      Appearance      =   1 
      Style           =   1 
      ImageList       =   "ImageList3" 
      _Version        =   393216 
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}  
         NumButtons      =   7 
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Font" 
            Object.ToolTipText     =   "Edit Font" 
            ImageIndex      =   1 
         EndProperty 
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ColumnChart" 
            Object.ToolTipText     =   "Column Chart" 
            ImageIndex      =   2 
            Style           =   2 
         EndProperty 
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RibbonChart" 
            Object.ToolTipText     =   "Ribbon Chart" 
            ImageIndex      =   3 
            Style           =   2 
         EndProperty 
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "LineChart" 
            Object.ToolTipText     =   "Line Chart" 
            ImageIndex      =   4 
            Style           =   2 
         EndProperty 
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "BarChart" 
            Object.ToolTipText     =   "Bar Chart" 
            ImageIndex      =   5 
            Style           =   2 
         EndProperty 
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
      EndProperty 
      BorderStyle     =   1 
   End 
   Begin MSComctlLib.Toolbar tbStandard  
      Align           =   1  'Align Top 
      Height          =   360 
      Left            =   0 
      TabIndex        =   0 
      Top             =   0 
      Width           =   7455 
      _ExtentX        =   13150 
      _ExtentY        =   635 
      ButtonWidth     =   609 
      ButtonHeight    =   582 
      Appearance      =   1 
      Style           =   1 
      ImageList       =   "ImageList1" 
      _Version        =   393216 
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}  
         NumButtons      =   17 
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Animate" 
            Object.ToolTipText     =   "Toggle Animate" 
            ImageIndex      =   1 
            Style           =   1 
         EndProperty 
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "TranslateXY" 
            Object.ToolTipText     =   "Translate in XY-Plane" 
            ImageIndex      =   3 
            Style           =   1 
         EndProperty 
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Trackball" 
            Object.ToolTipText     =   "Trackball" 
            ImageIndex      =   5 
            Style           =   1 
         EndProperty 
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateLR" 
            Object.ToolTipText     =   "Rotate Left-Right" 
            ImageIndex      =   6 
            Style           =   1 
         EndProperty 
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateUD" 
            Object.ToolTipText     =   "Rotate Up-Down" 
            ImageIndex      =   7 
            Style           =   1 
         EndProperty 
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "RotateCW" 
            Object.ToolTipText     =   "Rotate CW-CCW" 
            ImageIndex      =   8 
            Style           =   1 
         EndProperty 
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleUp" 
            Object.ToolTipText     =   "Scale Up" 
            ImageIndex      =   9 
         EndProperty 
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ScaleDown" 
            Object.ToolTipText     =   "Scale Down" 
            ImageIndex      =   10 
         EndProperty 
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ZoomOut" 
            Object.ToolTipText     =   "Increase ViewAngle" 
            ImageIndex      =   11 
         EndProperty 
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "ZoomIn" 
            Object.ToolTipText     =   "Decrease ViewAngle" 
            ImageIndex      =   12 
         EndProperty 
         BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Perspective" 
            Object.ToolTipText     =   "Perspective" 
            ImageIndex      =   13 
            Style           =   1 
         EndProperty 
         BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Ortho" 
            Object.ToolTipText     =   "Ortho" 
            ImageIndex      =   14 
            Style           =   1 
         EndProperty 
         BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Key             =   "Reset" 
            Object.ToolTipText     =   "Reset" 
            ImageIndex      =   15 
         EndProperty 
         BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}  
            Style           =   3 
         EndProperty 
      EndProperty 
      BorderStyle     =   1 
   End 
   Begin MSComctlLib.ImageList ImageList3  
      Left            =   3360 
      Top             =   5520 
      _ExtentX        =   1005 
      _ExtentY        =   1005 
      BackColor       =   -2147483643 
      ImageWidth      =   16 
      ImageHeight     =   16 
      MaskColor       =   12632256 
      _Version        =   393216 
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
         NumListImages   =   5 
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0466 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":057A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":068E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":07A2 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":08B6 
            Key             =   "" 
         EndProperty 
      EndProperty 
   End 
   Begin MSComctlLib.ImageList ImageList2  
      Left            =   2400 
      Top             =   5520 
      _ExtentX        =   1005 
      _ExtentY        =   1005 
      BackColor       =   -2147483643 
      ImageWidth      =   16 
      ImageHeight     =   16 
      MaskColor       =   12632256 
      _Version        =   393216 
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
         NumListImages   =   18 
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":09CA 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0AE6 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0C02 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0D1E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0E3A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":0F56 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1072 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":118E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":12AA 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":13C6 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":14E2 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":15FE 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":171A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1836 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1952 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1A6E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1B8A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1CA6 
            Key             =   "" 
         EndProperty 
      EndProperty 
   End 
   Begin MSComctlLib.ImageList ImageList1  
      Left            =   1440 
      Top             =   5520 
      _ExtentX        =   1005 
      _ExtentY        =   1005 
      BackColor       =   -2147483643 
      ImageWidth      =   16 
      ImageHeight     =   16 
      MaskColor       =   12632256 
      _Version        =   393216 
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
         NumListImages   =   15 
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1DC2 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1ED6 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":1FEA 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":20FE 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2212 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2326 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":243A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":254E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2662 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2776 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":288A 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":299E 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2AB2 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2BC6 
            Key             =   "" 
         EndProperty 
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}  
            Picture         =   "frmMain.frx":2CE2 
            Key             =   "" 
         EndProperty 
      EndProperty 
   End 
   Begin VB.Menu mnuFile  
      Caption         =   "&File" 
      Begin VB.Menu mnuSave  
         Caption         =   "Save as temp.bmp" 
      End 
      Begin VB.Menu mnuFileBar  
         Caption         =   "-" 
      End 
      Begin VB.Menu mnuExit  
         Caption         =   "Exit" 
      End 
   End 
   Begin VB.Menu mnuOptions  
      Caption         =   "&Options" 
      Begin VB.Menu mnuColormapX  
         Caption         =   "Colormap -> X" 
         Checked         =   -1  'True 
      End 
      Begin VB.Menu mnuColormapY  
         Caption         =   "Colormap -> Y" 
      End 
      Begin VB.Menu mnuOptionsBar  
         Caption         =   "-" 
      End 
      Begin VB.Menu mnuAntialiasing  
         Caption         =   "Antialiasing" 
      End 
   End 
   Begin VB.Menu mnuHelp  
      Caption         =   "&Help" 
      Begin VB.Menu mnuAbout  
         Caption         =   "About..." 
      End 
   End 
End 
Attribute VB_Name = "frmMain" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
'Intra3D 2.0 Example : Charts 
'มึศ๑ , 1999/08/22 
 
Option Explicit 
Dim objectIndex As Integer 
 
Private Sub AppView_InitScene() 
     
    ogl.glDepthFunc GL_Less 
    ogl.glEnable GL_DEPTH_TEST 
    ogl.glEnable GL_NORMALIZE 
    ogl.glEnable GL_LIGHTING 
     
    Dim font As New BitmapFont 
    font.SetBitmapFont BITMAP_HELVETICA_12 
     
    CreateScene 
    AppView.SetClearColor 1, 1, 1, 1 
    AppView.SetSceneRoot m_pGroup 
    AppView.SelectNode "Shape" 
    objectIndex = 1 
 
End Sub 
 
Private Sub AppView_ControlAnimate() 
    ControlAnimate 
End Sub 
 
Private Sub Form_Load() 
    tbStandard.Buttons("Perspective").Value = tbrPressed 
    tbApp.Buttons("ColumnChart").Value = tbrPressed 
End Sub 
 
Private Sub Form_Resize() 
 
If (Me.WindowState = 1) Then Exit Sub   'ื๎ะกปฏ 
    AppView.Move tbApp.Width, tbStandard.Height, _ 
             Me.ScaleWidth - tbApp.Width - tbDetailed.Width - 3, _ 
             Me.ScaleHeight - tbStandard.Height 
 
End Sub 
 
Private Sub mnuAbout_Click() 
    frmAbout.Show vbModal, Me 
End Sub 
 
Private Sub mnuExit_Click() 
End 
End Sub 
 
Private Sub mnuSave_Click() 
    AppView.SaveAsBMP "temp.bmp" 
End Sub 
 
Private Sub mnuAntialiasing_Click() 
    Dim flag As Long 
    Dim times As EnumJitterTimes 
    AppView.GetAntialiasingInfo flag, times 
     
    If flag Then 
        AppView.DisableAntialiasing 
        mnuAntialiasing.Checked = False 
    Else 
        AppView.EnableAntialiasing JITTER_TIMES_4 
        mnuAntialiasing.Checked = True 
    End If 
       
    AppView.Run 
 
End Sub 
 
Private Sub UpdateMenu() 
 
    If m_colormapAxis = COLOR_MAP_X Then 
        mnuColormapX.Checked = True 
        mnuColormapY.Checked = False 
    Else 
        mnuColormapX.Checked = False 
        mnuColormapY.Checked = True 
    End If 
     
End Sub 
 
Private Sub mnuColormapX_Click() 
    If m_colormapAxis = COLOR_MAP_X Then Exit Sub 
    m_colormapAxis = COLOR_MAP_X 
    m_pColumn3d.SetColorMapAxis m_colormapAxis 
    m_pRibbon3d.SetColorMapAxis m_colormapAxis 
    m_pLine2d.SetColorMapAxis m_colormapAxis 
    m_pBar2d.SetColorMapAxis m_colormapAxis 
    UpdateMenu 
     
    AppView.Run 
End Sub 
 
Private Sub mnuColormapY_Click() 
    If m_colormapAxis = COLOR_MAP_Y Then Exit Sub 
    m_colormapAxis = COLOR_MAP_Y 
    m_pColumn3d.SetColorMapAxis m_colormapAxis 
    m_pRibbon3d.SetColorMapAxis m_colormapAxis 
    m_pLine2d.SetColorMapAxis m_colormapAxis 
    m_pBar2d.SetColorMapAxis m_colormapAxis 
    UpdateMenu 
     
    AppView.Run 
End Sub 
 
Private Sub EditVectorFont() 
    Dim dialog As New CommonDialog 
    Dim flag As Long 
    flag = dialog.EditVectorFontDialog("Change Font") 
    If flag Then AppView.Run 
 
End Sub 
Private Sub DrawColumnChart() 
    If objectIndex = 1 Then Exit Sub 
    objectIndex = 1 
    m_pShape.SetGraphicalObject m_pColumn3d 
    Dim node As SceneNode 
    Set node = m_pShape 
    node.SetPosition 0, 0, 0 
    node.SetScale 1, 1, 0.9 
    node.SetRotation m_angle, m_nx, m_ny, m_nz 
    AppView.Run 
 
End Sub 
Private Sub DrawRibbonChart() 
    If objectIndex = 2 Then Exit Sub 
    objectIndex = 2 
    m_pShape.SetGraphicalObject m_pRibbon3d 
    Dim node As SceneNode 
    Set node = m_pShape 
    node.SetPosition 0, 0, 0 
    node.SetScale 1, 1, 0.9 
    node.SetRotation m_angle, m_nx, m_ny, m_nz 
    AppView.Run 
 
End Sub 
Private Sub DrawLineChart() 
    If objectIndex = 3 Then Exit Sub 
    objectIndex = 3 
    m_pShape.SetGraphicalObject m_pLine2d 
    Dim node As SceneNode 
    Set node = m_pShape 
    node.SetPosition 0, 0, 0 
    node.SetScale 1.4, 1.2, 1.4 
    node.SetRotation 0, 1, 0, 0 
    AppView.Run 
 
End Sub 
Private Sub DrawBarChart() 
    If objectIndex = 4 Then Exit Sub 
    objectIndex = 4 
    m_pShape.SetGraphicalObject m_pBar2d 
    Dim node As SceneNode 
    Set node = m_pShape 
    node.SetPosition 0, 0, 0 
    node.SetScale 1.4, 1.2, 1.4 
    node.SetRotation 0, 1, 0, 0 
    AppView.Run 
 
End Sub 
 
Private Sub tbApp_ButtonClick(ByVal Button As MSComctlLib.Button) 
 
Select Case Button.Key 
    Case "Font" 
                EditVectorFont 
    Case "ColumnChart" 
                DrawColumnChart 
    Case "RibbonChart" 
                DrawRibbonChart 
    Case "LineChart" 
                DrawLineChart 
    Case "BarChart" 
                DrawBarChart 
End Select 
 
    If objectIndex = 1 Then tbApp.Buttons("ColumnChart").Value = tbrPressed 
    If objectIndex = 2 Then tbApp.Buttons("RibbonChart").Value = tbrPressed 
    If objectIndex = 3 Then tbApp.Buttons("LineChart").Value = tbrPressed 
    If objectIndex = 4 Then tbApp.Buttons("BarChart").Value = tbrPressed 
     
End Sub 
 
Private Sub tbStandard_ButtonClick(ByVal Button As MSComctlLib.Button) 
 
Select Case Button.Key 
    Case "Animate" 
                AppView.OnToggleAnimate 
    Case "TranslateXY" 
                AppView.OnMouseTranslateXY 
    Case "Trackball" 
                AppView.OnMouseRotate 
    Case "RotateLR" 
                AppView.OnMouseRotateLeftRight 
    Case "RotateUD" 
                AppView.OnMouseRotateUpDown 
    Case "RotateCW" 
                AppView.OnMouseRotateCWCCW 
    Case "ScaleUp" 
                AppView.OnScaleUp 
    Case "ScaleDown" 
                AppView.OnScaleDown 
    Case "ZoomOut" 
                AppView.OnZoomOut 
    Case "ZoomIn" 
                AppView.OnZoomIn 
    Case "Perspective" 
                AppView.OnPerspective 
    Case "Ortho" 
                AppView.OnOrtho 
    Case "Reset" 
                AppView.OnReset 
                 
End Select 
     
    If AppView.IsAnimateEnabled() Then 
        tbStandard.Buttons("Animate").Value = tbrPressed 
    Else 
        tbStandard.Buttons("Animate").Value = tbrUnpressed 
    End If 
     
    Dim interaction As EnumMouseInteraction 
    interaction = AppView.MouseInteractionType 
     
      
    If interaction <> MOUSE_TRANSLATE_XY Then 
        tbStandard.Buttons("TranslateXY").Value = tbrUnpressed 
    End If 
         
    If interaction <> MOUSE_ROTATE Then 
        tbStandard.Buttons("Trackball").Value = tbrUnpressed 
    End If 
                 
    If interaction <> MOUSE_ROTATE_LEFT_RIGHT Then 
        tbStandard.Buttons("RotateLR").Value = tbrUnpressed 
    End If 
                 
    If interaction <> MOUSE_ROTATE_UP_DOWN Then 
        tbStandard.Buttons("RotateUD").Value = tbrUnpressed 
    End If 
         
    If interaction <> MOUSE_ROTATE_CW_CCW Then 
        tbStandard.Buttons("RotateCW").Value = tbrUnpressed 
    End If 
         
    If AppView.ProjectionMode = PERSPECTIVE Then 
        tbStandard.Buttons("Perspective").Value = tbrPressed 
        tbStandard.Buttons("Ortho").Value = tbrUnpressed 
    Else 
        tbStandard.Buttons("Perspective").Value = tbrUnpressed 
        tbStandard.Buttons("Ortho").Value = tbrPressed 
    End If 
 
End Sub 
 
Private Sub tbDetailed_ButtonClick(ByVal Button As MSComctlLib.Button) 
 
Select Case Button.Key 
    Case "TranslateXP" 
                AppView.OnTranslateXP 
    Case "TranslateYP" 
                AppView.OnTranslateYP 
    Case "TranslateZP" 
                AppView.OnTranslateZP 
    Case "TranslateXN" 
                AppView.OnTranslateXN 
    Case "TranslateYN" 
                AppView.OnTranslateYN 
    Case "TranslateZN" 
                AppView.OnTranslateZN 
     
    Case "RotateXP" 
                AppView.OnRotateXP 
    Case "RotateYP" 
                AppView.OnRotateYP 
    Case "RotateZP" 
                AppView.OnRotateZP 
    Case "RotateXN" 
                AppView.OnRotateXN 
    Case "RotateYN" 
                AppView.OnRotateYN 
    Case "RotateZN" 
                AppView.OnRotateZN 
                 
    Case "ScaleXP" 
                AppView.OnScaleXP 
    Case "ScaleYP" 
                AppView.OnScaleYP 
    Case "ScaleZP" 
                AppView.OnScaleZP 
    Case "ScaleXN" 
                AppView.OnScaleXN 
    Case "ScaleYN" 
                AppView.OnScaleYN 
    Case "ScaleZN" 
                AppView.OnScaleZN 
                 
End Select 
 
End Sub