
正文
vb.net曲面显示软件的简单介绍
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
vb.net 将excel中数据显示到软件界面
给你看一段我的代码
Public xlApp As Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp = CreateObject("Excel.Application") '创建EXCEL对象
xlBook = xlApp.Workbooks.Open(OpenFileDialog1.FileName) '打开已经存在的EXCEL工件簿文件
xlSheet = xlBook.Worksheets(xlBook.Sheets(1).name) '读取excel
'****************************读取excel数据,显示在数据表上****************************************
DataGridView1.Rows.Clear() '清空记录
For i = 5 To 19
If xlSheet.Cells(i, 1).value "" Then
DataGridView1.Rows.Add(xlSheet.Cells(2, 9).value, xlSheet.Cells(i, 1).value, xlSheet.Cells(2, 2).value, xlSheet.Cells(2, 7).value, xlSheet.Cells(2, 4).value, CDate(DateTimePicker1.Value), "", xlSheet.Cells(i, 5).value, Combo_CZZ.Text, Combo_MacName.Text, "", xlSheet.Cells(1, 3).value, xlSheet.Cells(1, 6).value, "", Combo_BanCi.Text, "")
End If
Next
相关问答
Q1: vb.net 模拟 Win + D 显示桌面
显示桌面的本质是个系统 Shell(IShellDispatch4.ToggleDesktop()),所以只需要调用这个 Shell 就好了,用不着模拟按键。
项目引用 C:\Windows\System32\shell32.dll,参考代码:
Dim objShel As Shell32.ShellClass = New Shell32.ShellClass()
CType(objShel, Shell32.IShellDispatch4).ToggleDesktop()
Q2: vb.net中怎么可以让窗体全屏显示?
Me.Height = My.Computer.Screen.Bounds.Height
Me.Width = My.Computer.Screen.Bounds.Width
这是设置窗体vb.net曲面显示软件的长宽和屏幕的分辨率一样大小vb.net曲面显示软件,相当于全屏。
如果Me.WindowState=FormWindowState.Maximized的话,只是单纯的将窗体最大化,但恢复窗口大小后窗体的大小实际上还和原来一样大。
VB.NET的特点
1.真正成为面向对象以及支持继承性的语言。
2.窗体设计器支持可视化继承,并且包含vb.net曲面显示软件了许多新的特性,比如自动改变窗体大小、资源本地化支持、数据类工具内在支持XML数据。
3.直接建立在.NET的框架结构上,因此开发人员可以充分利用所有.NET平台特性,也可以与其vb.net曲面显示软件他的.NET语言交互。
4.为Windows应用程序提供vb.net曲面显示软件了XCOPY部署,开发者不再需要为DLL的版本问题担忧。
Q3: vb.net软件哪里可以下载
vb.net是基于visual
studio的一个产品.可以去vs官网下载。或者百度一下vs2005
2008或者2010都可以。如果你只需要vb的话可以在安装的时候只选择vb.但是下载是全部语言都要下载的。
Q4: VB.net怎么进行实时的3D曲面绘图
这份文件列出了参数在PowerMILL提供。 表1 列出一般PowerMILL参数, 表2 列出了有效的PowerMILL安装额外的参数表。 表1。 PowerMILL参数。 标识符说明 (AdditionalStock)最大厚度的股票估计要去除刀具路径。这是用来作为一种辅助手
Q5: VB.net可以开发小型3D图形显示软件吗?
可以借助DirectX来编程。免费3D引擎可不好找,一般来说速度比不上硬件加速后的DX,尤其令人头疼的是一般都没有针对VB的文档,LZ有这方面理想的话,自己写一个吧……
我不得不承认在VB上写DirectX的教程相当难找!如果LZ想深入研究三维图形问题,C++一定要学,就算不能用C++编程,起码要能把C++程序翻译成VB程序。
我自己学会DX编程花了两三个月(很浅)。编这样一个程序难度是有点大的。
工具:DirectX9和其针对VB的库(项目-添加引用。.NET库里DX库一般都有),VB不知道现在支不支持DX10以上的版本,不过9绝对够用了。
思路:一切3D图形都是由三角形拼成的。矩形挖掉一个圆孔可不是一个方便画的图形,我估计至少得有24个三角形。你需要记录这些点的坐标,或者干脆把它们写在文件里,到时读出来。
这是我的一个老DX程序的不完全的代码(显示一个黑乎乎的平面),不一定能编译,可以参考一下。
Imports Microsoft.DirectX '一定要~
Public Class FormMain
'Direct3D Startup
Dim d3dpp As New Direct3D.PresentParameters 'DX基本参数,例如全屏还是窗口等
Public MyDevice As Direct3D.Device ‘DX基本设备,画图就靠它。
'Matrices
Dim matWorld, matView, matProj As Matrix '世界位置矩阵,摄像机位置矩阵和透视矩阵,数学要学好啊。
'mesh
Public MyPlane as Direct3D.Mesh ’我们的物体
Public VBPlane(3) As Direct3D.CustomVertex.PositionNormalTextured '存放顶点位置的数组
#Region "DX Core"
Public Sub InitDeviceObjects()
With d3dpp ‘以下请照抄。
.Windowed = True ‘不全屏。
.SwapEffect = Direct3D.SwapEffect.Discard ’双缓冲交换效果。请百度“双缓冲”
.BackBufferFormat = Direct3D.Format.Unknown
.EnableAutoDepthStencil = True ’让DX自动管理深度缓冲
.AutoDepthStencilFormat = Direct3D.DepthFormat.D16
End With
MyDevice = New Direct3D.Device(0, Direct3D.DeviceType.Hardware, Me.Handle, Direct3D.CreateFlags.HardwareVertexProcessing, d3dpp) '创建DX设备啦!以下两句请照抄。
MyDevice.SetRenderState(Direct3D.RenderStates.ZEnable, True) ‘Z缓冲
MyDevice.SetRenderState(Direct3D.RenderStates.NormalizeNormals, True)'法线归一化,请看相关数学书籍。
End Sub
Public Sub RestoreDeviceObjects()
Dim PlaneIB() As Short = {0, 1, 3, 0, 2, 3} ’顶点索引信息。
Dim AttrTable(1) As Direct3D.AttributeRange ‘顶点分组属性表
AttrTable(0).AttributeId = 0
AttrTable(0).FaceStart = 0
AttrTable(0).FaceCount = 2 ’有两个三角形
AttrTable(0).VertexStart = 0
AttrTable(0).VertexCount = 4 ‘四个点
‘顶点坐标信息。
VBPlane(0) = New Direct3D.CustomVertex.PositionNormalTextured(-500, -500, 0, 0, 0, 1, 0, 0)
VBPlane(1) = New Direct3D.CustomVertex.PositionNormalTextured(500, -500, 0, 0, 0, 1, 1, 0)
VBPlane(2) = New Direct3D.CustomVertex.PositionNormalTextured(-500, 500, 0, 0, 0, 1, 0, 1)
VBPlane(3) = New Direct3D.CustomVertex.PositionNormalTextured(500, 500, 0, 0, 0, 1, 1, 1)
MyPlane = New Direct3D.Mesh(2, 4, Direct3D.MeshFlags.Managed, Direct3D.VertexFormats.Position + Direct3D.VertexFormats.Normal + Direct3D.VertexFormats.Texture1, MyDevice) ’创建物体
MyPlane.SetVertexBufferData(VBPlane, Direct3D.LockFlags.None) ‘输入顶点坐标数据
MyPlane.SetIndexBufferData(PlaneIB, Direct3D.LockFlags.None) ‘输入索引数据
MyPlane.SetAttributeTable(AttrTable) ‘输入顶点分组属性表
End Sub
Public Sub Render() ‘调用它画图
Dim vlook As New Vector3(1, 0, 0)
Dim vPos As New Vector3(0,0,0)
Dim vUp As New Vector3(0, 0, 1)
MatView = Matrix.LookAtLH(vPos, vlook, vUp) ‘计算摄像机位置矩阵
Device.SetTransform(Direct3D.TransformType.View, MatView) ‘设置当前摄像机位置矩阵为MatView。
Dim fAspect As Single = Me.Width / Me.Height ’窗口长宽比
matProj = Matrix.PerspectiveFovLH(Math.PI / 4, fAspect, 1.0F, 10001) ‘计算透视矩阵MatProj。
MyDevice.SetTransform(Direct3D.TransformType.Projection, matProj) ‘设置当前透视矩阵为MatProj。
MyDevice.Clear(Direct3D.ClearFlags.Target + Direct3D.ClearFlags.ZBuffer, Color.Blue, 1.0F, 0) ’先刷蓝屏
MyDevice.BeginScene() ‘开始画
MatWorld = Matrix.Identity ’物体位于原点,不旋转
Device.SetTransform(Direct3D.TransformType.World, MatWorld) ’设置物体位置
Me.Mesh.DrawSubset(0) ‘画物体
MyDevice.EndScene() ’结束
MyDevice.Present() ‘显示在屏幕上
End Sub
Public Sub DeleteDeviceObjects() ’结束程序时放掉资源
MyPlane.Dispose()
MyDevice.Dispose()
End Sub
#End Region
Private Sub FormMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
DeleteDeviceObjects()
Windows.Forms.Cursor.Show()
End Sub
Private Sub FormMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InitDeviceObjects()
RestoreDeviceObjects()
Windows.Forms.Cursor.Hide()
Render()
End Sub
End Class
vb.net曲面显示软件的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于、vb.net曲面显示软件的信息别忘了在本站进行查找喔。







