易截截图软件、单文件、免安装、纯绿色、仅160KB

VB的雷达扫描

自己整了4个目标用于扫描。以后可能可以自己添加删除(写到这儿忽然觉得C++的vector不能删除元素(反正C++ Primer里目前没找到)让人很郁闷)
Form1,须加一个Timer1
Dim CAngle As Integer 'Current Angle (Not Class Angle)
Private Sub Form_Load() '初始化
CAngle = 0
Me.BackColor = vbBlack
Me.BorderStyle = 3
Me.FillColor = vbYellow
Me.ForeColor = vbGreen
Me.FillStyle = 1
Me.ScaleMode = 3 'Pixel
Me.Width = 4590
Me.Height = 4980
Timer1.Interval = 10
End Sub
Private Sub Timer1_Timer()
Cls
Circle (150, 150), 130
If CAngle = 359 Then CAngle = 0 Else CAngle = CAngle + 1
Raida CAngle '绘制雷达
RaidaTarget 0.5, 20 '定义雷达目标1
RaidaTarget 0.7, 200 '定义雷达目标2
RaidaTarget 0.2, 100 '定义雷达目标3
RaidaTarget 0.9, 257 '定义雷达目标4
End Sub
Private Sub Raida(ByVal angle As Integer) '根据所给角度绘制雷达
Dim x As Single, y As Single, a As Single, _
ae As Single, g As Integer

g = 0

ae = angle - 45
For a = ae To angle
x = Cos(D2R(a)) * 130 + 150
y = Sin(D2R(a)) * 130 + 150
g = (a - ae) / 20 * 255
Line (150, 150)-(x, y), RGB(0, g, 0)
Next a
End Sub
Private Sub RaidaTarget(ByVal Row As Single, ByVal Thita As Integer) '根据雷达扫描区域绘制目标
Dim x As Integer, y As Integer
x = Cos(D2R(Thita)) * Row * 130 + 150
y = Sin(D2R(Thita)) * Row * 130 + 150
Form1.FillStyle = 0
If Me.Point(x, y) <> 0 Then Circle (x, y), 5, RGB(255, 255, 0) '如果雷达扫到目标则显示
Form1.FillStyle = 1
End Sub

Module1
Public Function D2R(ByVal d As Integer) As Single
D2R = CDbl(d) * (3.14159265359 / 180)
End Function
'貌似没必要专门弄一个模块去装这么一个小东西


相关文档:

VB中实现地图操作的方法

1.       在VB的Form设计时,加入一个picturebox控件,这个控件作为OLE容器,MapInfo中的地图将在该控件上显示。
2.       执行VB的函数Createobject(“MapInfo.Application”),启动MapInfo。这时MapInfo在后台启动,对用户来说不可见,不会弹出sp ......

ASP VB.NET 下载服务器文件到客户端


      Try
            Dim Path As String = Server.MapPath("~/Download/") '文件路径
            Path = Path & "file.txt" '文件的名称
     ......

ASP VB.NET 客户端上传文件到服务器端

  Dim strPath As String = Server.MapPath("~\文件夹")
        '判断保存文件路径是否存在 不存在则创建
        If Not Directory.Exists(strPath) Then
            Directory ......

VB 5·1第二天

上午先把主板术语挨个查了一遍,了解它的缩写由来、位置和功能。
主板英文缩写详解:
 http://user.qzone.qq.com/904515106/infocenter?ptlang=2052&ADUIN=904515106&ADSESSION=1272977059&ADTAG=CLIENT.QQ.2653_Mysrv.0
下午返工,这次给的教训是惨痛的,我们组试了半天都不能点亮,换硬盘·&mi ......

VB不使用 API,将 Utf8 转换为 Unicode

Private Function Utf8ToUni(B() As Byte) As String
   '不使用 API,将 Utf8 转换为 Unicode
   Dim BU As Long
  
   On Error Resume Next
   BU = -1: BU = UBound(B)
   If BU = -1 Then Exit Function
   On Error GoTo 0
 &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号