Home > Software engineering >  Simple VB obtain the number in the picture
Simple VB obtain the number in the picture

Time:10-09


How to use VB to identify Numbers in this picture?

CodePudding user response:

This question is difficult to? The great god, who help me

CodePudding user response:

With point statement,

Sampling eight points you need, you can calculate the coordinates and the width of each character, 8 section of pipe line, they have,

And then determine the number is few,

CodePudding user response:

Fyi:
 VERSION 5.00 
The Begin VB. Form Form1
Caption="numeye by [email protected]"
ClientHeight=1395
ClientLeft=60
ClientTop=345
ClientWidth=2055
LinkTopic="Form1"
ScaleHeight=93
ScaleMode=3 'Pixel
ScaleWidth=137
StartUpPosition=3 'Windows default
The Visible=0 'False
The Begin VB. The Timer Timer1
Enabled=0 'False
The Interval=1000
Left=480
Top=840
End
The Begin VB. PictureBox Picture1
Appearance=0 'Flat
AutoRedraw=1 'True
AutoSize=1 'True
BackColor=& amp; H80000005 & amp;
BorderStyle=0 'None
ForeColor=& amp; H80000008 & amp;
Height=375
Left=120
ScaleHeight=25
ScaleMode=3 'Pixel
ScaleWidth=81
TabIndex=0
Top=120
Width=1215
End
The Begin VB. Label Label1
Caption="Label1"
Height=255
Left=120
TabIndex=1
Top=840
Width=1215
End
End
The Attribute VB_Name="Form1"
The Attribute VB_GlobalNameSpace=False
The Attribute VB_Creatable=False
The Attribute VB_PredeclaredId=True
The Attribute VB_Exposed=False
Option Explicit
Dim FPFN As String 'FullPathFileName
Dim As Integer I
Dim t As Integer
Dim n As Integer
Dim x As Integer
Dim x1 As Integer
Dim y As Integer
Dim w As Integer
Dim h As Integer
Dim As Long b
Dim As a Boolean
Dim nm (9) As String
Dim s As String
Dim r As String

Private Sub Form_Load ()
FPFN=Command $
If Left (FPFN, 1)=CRH (34) Then FPFN=Mid (FPFN, 2)
If Right (FPFN, 1)=CRH (34) Then FPFN=Left (FPFN, Len (FPFN) - 1)
If Not FileExists (FPFN) Then
Logtofile "/" + FPFN + "file not find!"
End 'form
End the If
Nm (0)=_
"OOO -" + _
"- OO OO -" + _
"O -- -- - O -" + _
"OO OO -" + _
"OO OO -" + _
"OO OO -" + _
"OO OO -" + _
"OO OO -" + _
"OO OO -" + _
"O -- -- - O -" + _
"- OO OO -" + _
"OOO -"
Nm (1)=_
"-- OO -" + _
"OOOO -- --" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"-- OO -" + _
"OOOOOO -
"Nm (2)=_
"-- OOOO -- --" + _
"O, OOO -" + _
"O, OO -" + _
"-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -" + _
"-- -- -- -- -- - O +" _
"-- OO -" + _
"-- O -- -" + _
"-- - O -" + _
"- O - O +" _
"- OOOOOOO + _
""OOOOOOO -
"Nm (3)=_
"-- OOOO -- --" + _
"O, OOO -" + _
"O, OO -" + _
"-- -- -- -- - the OO -" + _
"-- OO -" + _
"- OOO -" + _
"-- OOO -" + _
"-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -" + _
"OO, OO," + _
"OOOOO -- -- --
"Nm (4)=_
"-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -" + _
"-- OOO -" + _
"O - OO -" + _
"- O - OO -" + _
"- O - OO -" + _
"- O OO -" + _
"O, OO -" + _
"OOOOOOOO + _
""-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -" + _
"-- -- -- -- - the OO -"
Nm (5)=_
"-- OOOO -- --" + _
"-- OOOO -- --" + _
"O -- -- -- -- -- --" + _
"- the OOO -" + _
OOOOO "-- -" + _
"- OOO -" + _
"-- OO -" + _
"-- -- -- -- -- - O +" _
"-- -- -- -- -- - O +" _
"-- -- -- -- -- - O +" _
"O O - - -" + _
"OOOO -
"Nm (6)=_
"-- -- -- -- - OOO" + _
"- OOO -" + _
"-- OO -" + _
"OO -- -- -- -- -" + _
"-o - OOO -" + _
"OOO OO -" + _
"OO, OO +" _
"OO, OO +" _
"OO, OO +" _
"OO, OO +" _
"OO, OO -" + _
"-- OOOO --
"Nm (7)=_
"- OOOOOOO + _
""- OOOOOO -" + _
"O - O -" + _
"-- -- -- -- -- - O +" _
"-- -- -- -- -- - O +" _
"-- -- -- -- -- - O +" _
"-- O -- -" + _
"-- O -- -" + _
"-- - O -" + _
"-- - O -" + _
"-- - O -" + _
"-- O -- -- -- -- --"
Nm (8)=_
"-- OOOO -- --" + _
"OO - OO" + _
"OO, OO +" _
"OO, OO +" _
"- OOO - OO -" + _
"OOO -" + _
"-- OOOO -- --" + _
"- O OO -" + _
"OO, OO +" _
"OO, OO +" _
"OO, OO -" + _
"-- OOOO --
"Nm (9)=_
"-- OOOO -- --" + _
"OO, OO -" + _
"OO, OO +" _
"OO, OO +" _
"OO, OO +" _
"OO, OO +" _
"OO - OO" + _
"-- OOOOO -" + _
"-- -- -- -- - the OO -" + _
"-- OO -" + _
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • VBA
  • Related