⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.vb

📁 这是一本用Visual Studio.NET进行多媒体编程的读物
💻 VB
📖 第 1 页 / 共 2 页
字号:
Option Strict Off
Option Explicit On
Friend Class Form1
	Inherits System.Windows.Forms.Form
#Region "Windows 窗体设计器生成的代码"
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'对于启动窗体,所创建的第一个实例为默认实例。
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'此调用是 Windows 窗体设计器所必需的。
		InitializeComponent()
	End Sub
	'窗体重写处置,以清理组件列表。
	Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
		If Disposing Then
			If Not components Is Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(Disposing)
	End Sub
	'Windows 窗体设计器所必需的
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents HScroll2 As System.Windows.Forms.HScrollBar
	Public WithEvents HScroll1 As System.Windows.Forms.HScrollBar
	Public WithEvents VScroll1 As System.Windows.Forms.VScrollBar
	Public WithEvents Text3 As System.Windows.Forms.TextBox
	Public WithEvents Text2 As System.Windows.Forms.TextBox
	Public WithEvents Text1 As System.Windows.Forms.TextBox
	Public WithEvents Pic1 As System.Windows.Forms.PictureBox
	'注意:以下过程是 Windows 窗体设计器所必需的
	'可以使用 Windows 窗体设计器来修改它。
	'不要使用代码编辑器来修改它。
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.HScroll2 = New System.Windows.Forms.HScrollBar()
        Me.HScroll1 = New System.Windows.Forms.HScrollBar()
        Me.VScroll1 = New System.Windows.Forms.VScrollBar()
        Me.Text3 = New System.Windows.Forms.TextBox()
        Me.Text2 = New System.Windows.Forms.TextBox()
        Me.Text1 = New System.Windows.Forms.TextBox()
        Me.Pic1 = New System.Windows.Forms.PictureBox()
        Me.SuspendLayout()
        '
        'HScroll2
        '
        Me.HScroll2.Cursor = System.Windows.Forms.Cursors.Default
        Me.HScroll2.Location = New System.Drawing.Point(112, 440)
        Me.HScroll2.Maximum = 99
        Me.HScroll2.Minimum = -90
        Me.HScroll2.Name = "HScroll2"
        Me.HScroll2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.HScroll2.Size = New System.Drawing.Size(409, 17)
        Me.HScroll2.TabIndex = 6
        Me.HScroll2.TabStop = True
        '
        'HScroll1
        '
        Me.HScroll1.Cursor = System.Windows.Forms.Cursors.Default
        Me.HScroll1.Location = New System.Drawing.Point(112, 416)
        Me.HScroll1.Maximum = 99
        Me.HScroll1.Minimum = -90
        Me.HScroll1.Name = "HScroll1"
        Me.HScroll1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.HScroll1.Size = New System.Drawing.Size(409, 17)
        Me.HScroll1.TabIndex = 5
        Me.HScroll1.TabStop = True
        '
        'VScroll1
        '
        Me.VScroll1.Cursor = System.Windows.Forms.Cursors.Default
        Me.VScroll1.Location = New System.Drawing.Point(88, 0)
        Me.VScroll1.Maximum = 99
        Me.VScroll1.Minimum = -90
        Me.VScroll1.Name = "VScroll1"
        Me.VScroll1.Size = New System.Drawing.Size(17, 409)
        Me.VScroll1.TabIndex = 4
        Me.VScroll1.TabStop = True
        '
        'Text3
        '
        Me.Text3.AcceptsReturn = True
        Me.Text3.AutoSize = False
        Me.Text3.BackColor = System.Drawing.SystemColors.Window
        Me.Text3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text3.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text3.Location = New System.Drawing.Point(0, 32)
        Me.Text3.MaxLength = 0
        Me.Text3.Name = "Text3"
        Me.Text3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text3.Size = New System.Drawing.Size(81, 19)
        Me.Text3.TabIndex = 3
        Me.Text3.Text = "Text3"
        '
        'Text2
        '
        Me.Text2.AcceptsReturn = True
        Me.Text2.AutoSize = False
        Me.Text2.BackColor = System.Drawing.SystemColors.Window
        Me.Text2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text2.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text2.Location = New System.Drawing.Point(0, 16)
        Me.Text2.MaxLength = 0
        Me.Text2.Name = "Text2"
        Me.Text2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text2.Size = New System.Drawing.Size(81, 19)
        Me.Text2.TabIndex = 2
        Me.Text2.Text = "Text2"
        '
        'Text1
        '
        Me.Text1.AcceptsReturn = True
        Me.Text1.AutoSize = False
        Me.Text1.BackColor = System.Drawing.SystemColors.Window
        Me.Text1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text1.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text1.MaxLength = 0
        Me.Text1.Name = "Text1"
        Me.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text1.Size = New System.Drawing.Size(81, 19)
        Me.Text1.TabIndex = 1
        Me.Text1.Text = "Text1"
        '
        'Pic1
        '
        Me.Pic1.BackColor = System.Drawing.SystemColors.Control
        Me.Pic1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.Pic1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Pic1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Pic1.Location = New System.Drawing.Point(112, 0)
        Me.Pic1.Name = "Pic1"
        Me.Pic1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Pic1.Size = New System.Drawing.Size(409, 409)
        Me.Pic1.TabIndex = 0
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(528, 461)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.HScroll2, Me.HScroll1, Me.VScroll1, Me.Text3, Me.Text2, Me.Text1, Me.Pic1})
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.Location = New System.Drawing.Point(365, 265)
        Me.Name = "Form1"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
        Me.Text = "3D Rotate"
        Me.ResumeLayout(False)

    End Sub
#End Region 
#Region "升级支持"
	Private Shared m_vb6FormDefInstance As Form1
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Form1
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Form1()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
    Dim g As Graphics
    Dim myPen As New Pen(Color.Black)
    Dim myColor As Color
    Private Sub DrawPart()
        Dim p8z As Single
        Dim p8y As Single
        Dim p8x As Single
        Dim p7z As Single
        Dim p7y As Single
        Dim p7x As Single
        Dim p6z As Single
        Dim p6y As Single
        Dim p6x As Single
        Dim p5z As Single
        Dim p5y As Single
        Dim p5x As Single
        Dim p4z As Single
        Dim p4y As Single
        Dim p4x As Single
        Dim p3z As Single
        Dim p3y As Single
        Dim p3x As Single
        Dim p2z As Single
        Dim p2y As Single
        Dim p2x As Single
        Dim p1z As Single
        Dim p1y As Single
        Dim p1x As Single
        Dim ZROT1 As Single
        Dim YROT1 As Single
        Dim XROT1 As Single
        Dim ZROT As Single
        Dim YROT As Single
        Dim XROT As Single
        Dim d8z As Single
        Dim d8y As Single
        Dim d8x As Single
        Dim d7z As Single
        Dim d7y As Single
        Dim d7x As Single
        Dim d6z As Single
        Dim d6y As Single
        Dim d6x As Single
        Dim d5z As Single
        Dim d5y As Single
        Dim d5x As Single
        Dim d4z As Single
        Dim d4y As Single
        Dim d4x As Single
        Dim d3z As Single
        Dim d3y As Single
        Dim d3x As Single
        Dim d2z As Single
        Dim d2y As Single
        Dim d2x As Single
        Dim d1z As Single
        Dim d1y As Single
        Dim d1x As Single
        Dim Angle3 As Single
        Dim Angle2 As Single
        Dim Angle1 As Single
        Dim Y As Single
        Dim X As Single
        Dim R As Object
        R = HScroll2.Value
        X = HScroll1.Value
        Y = VScroll1.Value

        Angle1 = DTOR(R)
        Angle2 = DTOR(Y)
        Angle3 = DTOR(X)
        Text1.Text = "A1= " & VB6.Format(X, "0.00000")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -