Guys ,i got this code in my project ,but i didnt understand most of it ,if any body can understand then please add comments in it to understand.

Private Sub cmdclose_Click()
Unload Me
Unload recoform
frmmain.Show
frmmain.Image1.Picture = LoadPicture(imagefile)
frmmain.cmdont.Enabled = True
frmmain.cmdpre.Enabled = True
frmmain.cmdrecognize.Enabled = True
End Sub

Private Sub cmdopen_Click()

' recoform.Show
On Error Resume Next
    dlgimage.CancelError = True
    dlgimage.Flags = _
        cdlOFNFileMustExist Or _
        cdlOFNHideReadOnly Or _
        cdlOFNLongNames
        dlgimage.InitDir = App.Path
    dlgimage.ShowOpen

    Image1.Picture = LoadPicture(dlgimage.FileName)
     recoform.Picdraw.Picture = LoadPicture(dlgimage.FileName)
recoform.Picdraw.Refresh
recoform.Text5.Text = ""
   
     'text5.Text = recoform.text5.Text
    
   str = dlgimage.FileName

    If Err.Number <> 0 Then Exit Sub

    dlgimage.InitDir = dlgimage.FileName
    dlgimage.FileName = dlgimage.FileTitle

End Sub

Private Sub cmdedit_Click()
frmEdit.Show
frmEdit.txtedit.Text = Text5.Text
End Sub

Private Sub cmdRecognized_Click()
cmdRecognized.Enabled = False
Me.MousePointer = vbHourglass
Text5.Text = ""
recoform.Text5.Text = ""
Call parse
Text5.Text = recoform.Text5.Text
Me.MousePointer = vbDefault
cmdRecognized.Enabled = True
End Sub

Private Sub cmdsave_Click()
dlgtext.ShowSave
If dlgtext.FileName = "" Then Exit Sub
 Open dlgtext.FileName For Output As #1
            Write #1, Text5.Text
        Close #1
End Sub

Private Sub cmdTeach_Click()
Load frmTeachfile
frmTeachfile.Show
frmTeachfile.dlgimage.FileName = str
frmDrawArea.picdrag.Picture = LoadPicture(str)
frmTeachfile.Image1.Picture = LoadPicture(str)
frmTeachfile.cmdopen.Enabled = False
End Sub

Private Sub Form_Load()
Load recoform
End Sub

Recommended Answers

All 2 Replies

This should be a paid job.

Guys ,i got this code in my project ,but i didnt understand most of it ,if any body can understand then please add comments in it to understand.

Private Sub cmdclose_Click()
Unload Me
Unload recoform
frmmain.Show
frmmain.Image1.Picture = LoadPicture(imagefile)
frmmain.cmdont.Enabled = True
frmmain.cmdpre.Enabled = True
frmmain.cmdrecognize.Enabled = True
End Sub

Private Sub cmdopen_Click()

' recoform.Show
On Error Resume Next
    dlgimage.CancelError = True
    dlgimage.Flags = _
        cdlOFNFileMustExist Or _
        cdlOFNHideReadOnly Or _
        cdlOFNLongNames
        dlgimage.InitDir = App.Path
    dlgimage.ShowOpen

    Image1.Picture = LoadPicture(dlgimage.FileName)
     recoform.Picdraw.Picture = LoadPicture(dlgimage.FileName)
recoform.Picdraw.Refresh
recoform.Text5.Text = ""
   
     'text5.Text = recoform.text5.Text
    
   str = dlgimage.FileName

    If Err.Number <> 0 Then Exit Sub

    dlgimage.InitDir = dlgimage.FileName
    dlgimage.FileName = dlgimage.FileTitle

End Sub

Private Sub cmdedit_Click()
frmEdit.Show
frmEdit.txtedit.Text = Text5.Text
End Sub

Private Sub cmdRecognized_Click()
cmdRecognized.Enabled = False
Me.MousePointer = vbHourglass
Text5.Text = ""
recoform.Text5.Text = ""
Call parse
Text5.Text = recoform.Text5.Text
Me.MousePointer = vbDefault
cmdRecognized.Enabled = True
End Sub

Private Sub cmdsave_Click()
dlgtext.ShowSave
If dlgtext.FileName = "" Then Exit Sub
 Open dlgtext.FileName For Output As #1
            Write #1, Text5.Text
        Close #1
End Sub

Private Sub cmdTeach_Click()
Load frmTeachfile
frmTeachfile.Show
frmTeachfile.dlgimage.FileName = str
frmDrawArea.picdrag.Picture = LoadPicture(str)
frmTeachfile.Image1.Picture = LoadPicture(str)
frmTeachfile.cmdopen.Enabled = False
End Sub

Private Sub Form_Load()
Load recoform
End Sub

are you really didn't understand any single code of your project??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.