关于dxvb.net的信息
vb.net读取txt的数据作图问题
一、分析:
创新新互联,凭借十年的网站设计、做网站经验,本着真心·诚心服务的企业理念服务于成都中小企业设计网站有1000多家案例。做网站建设,选成都创新互联。
1,这一类随时间而变化的曲线图,通常把横轴作为时间,把纵轴作为相应的值,在这里就是密度值。
2,点的集合就是线;一组时间、密度值,对应一个点,把点连接起来就构成了线。
二、在VB.NET中作图,需要知道并解决几个问题:
1,与VB6一样,VB.NET中默认的坐标系统,左上角为坐标原点,X轴的正向为从左向右,Y轴的正向是从上向下。
为了使得它与数学中的坐标系统相一致,可以使用VB.NET中Graphics类的两个方法;
1、TranslateTransform----平移变换
格式:Graphics.TranslateTransform(dx,dy)
其中:dx 和 dy分别是Single数据类型
2、ScaleTransform----缩放变换
格式:Graphics.ScaleTransform(sx,sy)
其中:sx 和 sy分别是Single数据类型;
例如:为了符合数学中的一般格式,可以使用下述代码:
Graphics.ScaleTransform(1, -1)
这样就把Y轴的正方向给翻过来了。
三、VB.NET中绘制图形
1,绘制圆或椭圆
'绘制图形的三步曲
'1,获得一个Graphics对象
Dim MyGraphics As Graphics
MyGraphics = Me.CreateGraphics
'2,定义一个Pen对象,用于绘制图形(轮廓线)
Dim MyPen As New Pen(Color.Black)
'3,定义一个Brush对象,用于填充图形(如果需要填充的话)
Dim MyBrush As New SolidBrush(Color.Orange)
'绘制一个实心圆,该圆在:直线x=200,y=200,x=200+100,y=200+100所划的矩形区域内
MyGraphics.FillEllipse(Brush, 200, 200, 100, 100)
'绘制一个空心圆,该圆在:直线x=200,y=200,x=200+100,y=200+100所划的矩形区域内
MyGraphics.DrawEllipse(Pen, 200, 200, 100, 100)
注意:最后两个数值如果不等,就是绘制椭圆
当圆足够小,就是点了。
2,绘制直线
'1,获得一个Graphics对象
Dim MyGraphics As Graphics
MyGraphics = Me.CreateGraphics
'2,定义一个Pen对象,用于绘制图形(轮廓线)
Dim MyPen As New Pen(Color.Black)
MyGraphics.DrawLine(MyPen, 200, 200, 100, 100)
'或者直接用
Me.CreateGraphics.DrawLine(New Pen(Color.Black), 50, 50, 200, 200)
求造梦西游3极品号
75490135 zxc123
沙僧
账号89947587
密码zxc123
悟空
89944656 密码123456
八戒
89949753 123456
唐僧
89950130
123456
89924795
90157821
账号woduomaini 密码900628microma``滚球
工具:IE浏览器
SOL文件修改器
:先叫厉害号(我给号源省略)
我沙僧号
返图找脱机工作点号打修改器找文件夹 #4399
面号帐号进发现SOL文件打所数据复制(Ctrl C)关闭即
接着打游戏脱机工作取消进入号
写入题
找要复制存档同脱机、保存返#4399文件夹找号文件夹(用修改器)同找文件值全部掉复制(Ctrl V)号确定刷新游戏等刷新万看看效吧跟号哈哈远起强吧 号源:
-
沙僧
eNrtWVuP00YUfusDf6EvUd4Bz/iSWFoiFbVISCuotPT2hJzYuXjtJGS8ZB0dEHRpuah0gaXlUgqt2kIphVWXFhZ2gT zjpM/UXXGuWCvnY0N2XYfmmid7OSb882Zc b45Ms7f787RZTj2qemkbLsurYvfTivawUrnSoppibwsrwvbTXmtHRuVyo1RTZhqhSzL12dMwzv85GIuqHYWgMfreX1PtAHnbEalWppCNWsGbqe9N4xuMJcg H6g PQeaWk6gnwbEveVyzqNuYQ3s2h3Vx2ai8Zz0JaW7IcmjPzWmOAN8ofKwbbWyxyUdaDaOrxtHZco1uNxoNNmxRqDWo60vB7jYZiD6AVQqw51SazlWEYtwilL9hbLmC aPQW61/AVjvO6A/Rt693jWL9U3fYgmIF7IP5ejonYm58FDy6vD2r2WPTplCrWo2a8aF3qGJlg2d8umJWLLqaGAlRVwipHNdGpkTQei8CXHSwdjx0/LFWCtYRhcyOjQuNiVZRRxy5TSd/rjCrKpZCj34MfsPw HOIA8RxwAGryFBUDKKdkL0h9ucNssuJLGARJMEPy9BZYmCiFBoRQyMCMxQY4UMjeNMcFPw/VtUM18zhtOGk/TW6vUp1MKuskJJG05kxhcHBEsFuZTO9cjjmnBjoKIoVQGLwR3FsJB8TKcRmF2MjUex1SrFtZhKwx/U9G9smjo2UE9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N9CzjanUZ0RP/qLx63rr9s3XrWuv4ETRQKEuGYDlBFGvKI5VjE8gj2OrTzGO tZYLk0mHUfLimz742pv5FZc3B8akTBBgAT90MTtRkEE6AaPiA3rzRr1wyZmeM2V93tx igmYtmgKJJXFVMFgEAE0IdhCDOXUBj7AeSFsD5i 153/BZSFlbThfzPgkwMWIyfEsooMrsRfahEt24QaLoneLmIii6xHEfPKw1WJhLjCxIAcRCzjEY2TQqd1ouazfWyar5Qd38bq8YWtEHzirWruFGjWJQzuf4wBisfMhx7mdPzDWCY8uNGfn9N XjJ17 txtonlqVmqQWUYJWpOzHG y48gm2AfpbojdS2ePn6M4LknBCPv8PAdwVcP92 2PtNWfYD Nvf5UKdtAclZB49nxceTZmB281c4ewN5/Si2XkCwPb2zhjwFScrVSFjUa0RzLWhfIJ5LWBT SQxZiTWJ4LPlYufFSn0E8ngOTLF7mJ2hE2hGLl8k0/lQVWbog50qZCzmlIl3AQpTDl1JmYAK4Dhv2w7sk7P08670Jj0CJp34KF4aKKGZHCljvqQNKkSgcTkbjQB9ImuMUj8JhJBoH7kDigLUkCofvonFgD4QD1sIoHE4PKw4hJifvWSIV5SwxsU9niWz4o7yPyvSTOUt0Por5Cl5l/VAoqiIOdEa0D0V8zYfwDdb/xKT A2liO9Y=
如何在VB.net中用程序控制鼠标移动和点击
调用api
在Visual Baisc.net中的声明:
Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Const MOUSEEVENTF_LEFTDOWN = H2 '模拟鼠标左键按下
Public Const MOUSEEVENTF_LEFTUP = H4 ’模拟鼠标左键释放
Public Const MOUSEEVENTF_MIDDLEDOWN = H20 '模拟鼠标中间键按下
Public Const MOUSEEVENTF_MIDDLEUP = H40 '模拟鼠标中间键释放
Public Const MOUSEEVENTF_RIGHTDOWN = H8 '模拟鼠标右键按下
Public Const MOUSEEVENTF_RIGHTUP = H10 '模拟鼠标右键释放
Public Const MOUSEEVENTF_MOVE = H1 '模拟鼠标指针移动
例:
mouse_event MOUSEEVENTF_LEFTDOWN,10,10,0,0
'在(10,10)模拟鼠标左键按下
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
当前名称:关于dxvb.net的信息
当前网址:http://scjbc.cn/article/doddhdh.html