频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

VB/vb.net 浙江移动发送手机短信实例!

来源: 作者: 出处:巧巧读书 2006-09-29 进入讨论组

  'Form1 窗体
Dim userID As String
Dim mobileNo As String
Dim checkRnd As String
Dim longin As Boolean
Dim checkRndBox As String
Public fileno As Variant
Dim ys As Integer
Dim su As Long
Dim sum As Long
Dim pas As String


Private Sub Check2_Click()
On Error GoTo err1
If Check2.Value Then
Open App.Path & "\" & Text9.Text For Input As #fileno

Else
Close #fileno
End If
Exit Sub
err1:
Stop
MsgBox "打开文件出错"
End Sub

Private Sub Command1_click()
On Error Resume Next
Dim allCol
Dim TagName As String
Dim allcount, i
Label2.Caption = "准备读取数据"
Set allCol = WebBrowser1.Document.All
allcount = allCol.length
For i = 0 To allcount - 1
TagName = allCol.Item(i).TagName
If "INPUT" = TagName Then
TagName = allCol.Item(i).Name
Select Case TagName
Case "userID"
userID = allCol.Item(i).Value
Case "mobileNo"
mobileNo = allCol.Item(i).Value
End Select
End If
Next
Timer5.Enabled = True
Exit Sub
End Sub
Private Sub Command2_Click()
Timer5.Enabled = True
End Sub

Private Sub Command3_Click()
Dim deskhdc&, ret&
Dim pxy As POINTAPI
deskhdc = GetDC(0)
pxy.x = Me.Left / Screen.TwipsPerPixelX + Picture1.Left
pxy.Y = Me.Top / Screen.TwipsPerPixelY + Picture1.Top + 17 + Val(Text1.Text)
deskhdc = BitBlt(Picture2.hdc, 0, 0, Picture1.Width + Val(Text3.Text), Picture1.Height + 6, deskhdc, pxy.x, pxy.Y, vbSrcCopy)
' Stop
ret = ReleaseDC(0&, deskhdc)
Picture2.Refresh

End Sub

Private Sub Command4_Click()
Dim i As Double
Dim Y As Integer
Dim deskhdc&, ret&
Dim pxy As POINTAPI
Dim pxy1 As POINTAPI
Dim pxy2 As POINTAPI
deskhdc = GetDC(0)
pxy.x = Me.Left / Screen.TwipsPerPixelX + Picture1.Left
pxy.Y = Me.Top / Screen.TwipsPerPixelY + Picture1.Top + 17
pxy1.x = Me.Left / Screen.TwipsPerPixelX + Picture1.Width + 5 + Picture1.Left
i = (pxy1.x - pxy.x) / 4
Select Case Val(Text1.Text)
Case 0
deskhdc = BitBlt(Picture2.hdc, 0, 0, i, Picture1.Height + 6, deskhdc, pxy.x + 2, pxy.Y, vbSrcCopy)
Case 1
deskhdc = BitBlt(Picture2.hdc, 0, 0, i, Picture1.Height + 6, deskhdc, pxy.x + i + 1, pxy.Y, vbSrcCopy)
Case 2
deskhdc = BitBlt(Picture2.hdc, 0, 0, i, Picture1.Height + 6, deskhdc, pxy.x + i * 2 + 1, pxy.Y, vbSrcCopy)
Case 3
pxy1.x = Me.Left / Screen.TwipsPerPixelX + Picture1.Width + Picture1.Left
i = (pxy1.x - pxy.x) / 4
deskhdc = BitBlt(Picture2.hdc, 0, 0, i + 2, Picture1.Height + 6, deskhdc, pxy.x + i * 3 + 3.5, pxy.Y, vbSrcCopy)
End Select
ret = ReleaseDC(0&, deskhdc)
Picture2.Refresh

End Sub

Private Sub Command5_Click()
Dim x1, y1 As Integer
Dim i As Integer
Dim h As Integer
Dim s As Long
Dim mu As Long
y1 = Picture2.ScaleHeight
'y2 = y1 * 7
x1 = Picture2.ScaleWidth
'x2 = x1 * 8
'================
For i = 1 To x1
For h = 1 To y1
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i

Select Case s

'1 30
'2 36
'3 36
'4 36
'5 31
'6 43
'7 23 24
'8 47
'9 42
'0 42
Case 20
mu = 2
Case 30
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 25 Then
mu = 5
Else
mu = 1
End If
Case 33, 14
mu = 3
Case 35
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 22 Then
mu = 2
ElseIf s = 35 Then
mu = 6
ElseIf s = 26 Then
mu = 5
Else
mu = 4
End If
Case 36
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 22 Then
mu = 2
ElseIf s = 32 Then
mu = 4
Else
mu = 3
End If
Case 31, 26
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 23 Then mu = 1 Else mu = 5

Case 37, 29
mu = 3
Case 43
mu = 6
Case 34
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 36 Then
mu = 6

ElseIf s = 22 Then
mu = 2
Else
mu = 0
End If
Case 22, 23, 24, 25, 16
mu = 7
Case 47, 50, 45
mu = 8
Case 42
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 37 Then
mu = 9
Else
mu = 0
End If
Case 40, 41
mu = 9
Case 21
s = 0
For i = 1 To x1
For h = 1 To y1 / 5 * 3
DoEvents
' Stop
'8396800
If 0 = GetPixel(Me.Picture2.hdc, i, h) Then
s = s + 1
End If
Next h
Next i
If s = 21 Then
mu = 2
Else
mu = 4
End If
Case Else
End Select

pas = Trim(pas & mu)
Debug.Print s & ": " & mu
End Sub

Private Sub Command6_Click()
Dim width5 As Long, heigh5 As Long, rgb5 As Long
Dim hdc5 As Long, i As Long, j As L请保留地址 http://www.qqread.com/vbdotnet/i229088.html 更多文章 更多内容请看手机病毒揭密.NET移动与嵌入式技术.NET开发手册专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
最新论坛文章
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章