From 5532a70acd81f32c121967f86b32524aa3cae9fa Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Tue, 14 May 2024 10:52:19 +0200 Subject: [PATCH] =?UTF-8?q?Projektdateien=20hinzuf=C3=BCgen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERAG_OCR.sln | 25 ++ VERAG_OCR/App.config | 11 + VERAG_OCR/My Project/Application.Designer.vb | 13 + VERAG_OCR/My Project/Application.myapp | 11 + VERAG_OCR/My Project/AssemblyInfo.vb | 35 ++ VERAG_OCR/My Project/Resources.Designer.vb | 93 +++++ VERAG_OCR/My Project/Resources.resx | 130 +++++++ VERAG_OCR/My Project/Settings.Designer.vb | 73 ++++ VERAG_OCR/My Project/Settings.settings | 7 + VERAG_OCR/My Project/app.manifest | 81 +++++ .../My First Project-bb8af69631fc.json | 12 + VERAG_OCR/Resources/cursor-24.ico | Bin 0 -> 729 bytes VERAG_OCR/Resources/cursor-48.ico | Bin 0 -> 9662 bytes VERAG_OCR/VERAG_OCR.vbproj | 172 ++++++++++ VERAG_OCR/cMain.vb | 35 ++ VERAG_OCR/frmFullScreen.Designer.vb | 56 +++ VERAG_OCR/frmFullScreen.resx | 120 +++++++ VERAG_OCR/frmFullScreen.vb | 129 +++++++ VERAG_OCR/frmMainOCR.Designer.vb | 77 +++++ VERAG_OCR/frmMainOCR.resx | 120 +++++++ VERAG_OCR/frmMainOCR.vb | 323 ++++++++++++++++++ VERAG_OCR/frmMessage.Designer.vb | 104 ++++++ VERAG_OCR/frmMessage.resx | 123 +++++++ VERAG_OCR/frmMessage.vb | 21 ++ 24 files changed, 1771 insertions(+) create mode 100644 VERAG_OCR.sln create mode 100644 VERAG_OCR/App.config create mode 100644 VERAG_OCR/My Project/Application.Designer.vb create mode 100644 VERAG_OCR/My Project/Application.myapp create mode 100644 VERAG_OCR/My Project/AssemblyInfo.vb create mode 100644 VERAG_OCR/My Project/Resources.Designer.vb create mode 100644 VERAG_OCR/My Project/Resources.resx create mode 100644 VERAG_OCR/My Project/Settings.Designer.vb create mode 100644 VERAG_OCR/My Project/Settings.settings create mode 100644 VERAG_OCR/My Project/app.manifest create mode 100644 VERAG_OCR/Resources/My First Project-bb8af69631fc.json create mode 100644 VERAG_OCR/Resources/cursor-24.ico create mode 100644 VERAG_OCR/Resources/cursor-48.ico create mode 100644 VERAG_OCR/VERAG_OCR.vbproj create mode 100644 VERAG_OCR/cMain.vb create mode 100644 VERAG_OCR/frmFullScreen.Designer.vb create mode 100644 VERAG_OCR/frmFullScreen.resx create mode 100644 VERAG_OCR/frmFullScreen.vb create mode 100644 VERAG_OCR/frmMainOCR.Designer.vb create mode 100644 VERAG_OCR/frmMainOCR.resx create mode 100644 VERAG_OCR/frmMainOCR.vb create mode 100644 VERAG_OCR/frmMessage.Designer.vb create mode 100644 VERAG_OCR/frmMessage.resx create mode 100644 VERAG_OCR/frmMessage.vb diff --git a/VERAG_OCR.sln b/VERAG_OCR.sln new file mode 100644 index 0000000..763cd06 --- /dev/null +++ b/VERAG_OCR.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.106 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VERAG_OCR", "VERAG_OCR\VERAG_OCR.vbproj", "{13E50121-CD65-4DFD-BF2B-5D0AC7C613E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13E50121-CD65-4DFD-BF2B-5D0AC7C613E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13E50121-CD65-4DFD-BF2B-5D0AC7C613E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13E50121-CD65-4DFD-BF2B-5D0AC7C613E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13E50121-CD65-4DFD-BF2B-5D0AC7C613E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BF2A7BF5-46A2-41F0-A1B9-C349439F55EB} + EndGlobalSection +EndGlobal diff --git a/VERAG_OCR/App.config b/VERAG_OCR/App.config new file mode 100644 index 0000000..0028de8 --- /dev/null +++ b/VERAG_OCR/App.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/VERAG_OCR/My Project/Application.Designer.vb b/VERAG_OCR/My Project/Application.Designer.vb new file mode 100644 index 0000000..8ab460b --- /dev/null +++ b/VERAG_OCR/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/VERAG_OCR/My Project/Application.myapp b/VERAG_OCR/My Project/Application.myapp new file mode 100644 index 0000000..1243847 --- /dev/null +++ b/VERAG_OCR/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/VERAG_OCR/My Project/AssemblyInfo.vb b/VERAG_OCR/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..fe0c47c --- /dev/null +++ b/VERAG_OCR/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' Allgemeine Informationen über eine Assembly werden über die folgenden +' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die einer Assembly zugeordnet sind. + +' Werte der Assemblyattribute überprüfen + + + + + + + + + + +'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +' übernehmen, indem Sie "*" eingeben: +' + + + diff --git a/VERAG_OCR/My Project/Resources.Designer.vb b/VERAG_OCR/My Project/Resources.Designer.vb new file mode 100644 index 0000000..da763bd --- /dev/null +++ b/VERAG_OCR/My Project/Resources.Designer.vb @@ -0,0 +1,93 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VERAG_OCR.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + ''' + Friend ReadOnly Property cursor_24() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("cursor_24", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol). + ''' + Friend ReadOnly Property cursor_48() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("cursor_48", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + ''' + Friend ReadOnly Property google() As Byte() + Get + Dim obj As Object = ResourceManager.GetObject("google", resourceCulture) + Return CType(obj,Byte()) + End Get + End Property + End Module +End Namespace diff --git a/VERAG_OCR/My Project/Resources.resx b/VERAG_OCR/My Project/Resources.resx new file mode 100644 index 0000000..2475929 --- /dev/null +++ b/VERAG_OCR/My Project/Resources.resx @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\cursor-24.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\cursor-48.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\My First Project-bb8af69631fc.json;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VERAG_OCR/My Project/Settings.Designer.vb b/VERAG_OCR/My Project/Settings.Designer.vb new file mode 100644 index 0000000..8924808 --- /dev/null +++ b/VERAG_OCR/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "Automatische My.Settings-Speicherfunktion" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.VERAG_OCR.My.MySettings + Get + Return Global.VERAG_OCR.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/VERAG_OCR/My Project/Settings.settings b/VERAG_OCR/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/VERAG_OCR/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/VERAG_OCR/My Project/app.manifest b/VERAG_OCR/My Project/app.manifest new file mode 100644 index 0000000..0aed746 --- /dev/null +++ b/VERAG_OCR/My Project/app.manifest @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + true/pm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VERAG_OCR/Resources/My First Project-bb8af69631fc.json b/VERAG_OCR/Resources/My First Project-bb8af69631fc.json new file mode 100644 index 0000000..a7a1c3f --- /dev/null +++ b/VERAG_OCR/Resources/My First Project-bb8af69631fc.json @@ -0,0 +1,12 @@ +{ + "type": "service_account", + "project_id": "utopian-hearth-294922", + "private_key_id": "bb8af69631fc80d6d868f883341642fcb2ce92e5", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDKyrdcugJoJLNV\nbvsBT7X5gi8hI/zkSKYX5cmWvUWdXcWPnvq95j4k2p7iCeF39vHg6DwsqHtmWpET\nMLujhf8qWIwgMrUCrXHRKuswQUdD09GNtCYkzDprc579wwFOGhZFvF+/SdMecUb6\n6VEMpbWisGsA7jwLkWTvRuqPqa5G04fH6QPVUrYOwbYdMrGyW/049o3JG7E4UTfa\nlwemacso+Ecx5P98Kd95ocT1B5Np6eX1acEPaYcWf8YALHbVvA6MQQ5yumiNBA/X\n6gDoELLVh7W7ngETIEmitgtpK+menr+pWLHre9nWGgEWNEjdIWsP9N6B4AP6iYRl\ns2Qyy9qdAgMBAAECggEADICoAmMDb/lHRy6i8gdAkGP61N+7oTVrbBDCN3Vu289i\ntUKXcerGjQ4feo8iY/uJGRUoVJaEmSBfTmAUSXYi77Dq3rdRmpsn573uJxj3NFLU\nWhivu1gOB/7mX/3MUEzib6U3//qktf1E44ZL9WwoASJATpvhftMVdn0YTAgpkvsu\nYv8hl+Uln50dDJGPyYVwBqkDJy7Ey354J6ItcSWCRaWJp3dZkEKntJy21NM63Xvf\nfHX8bnlvszgGNiU1R14MWBTUJpj8Uw+eDfRBkX82R5t0NjF6+jSAkOoVBFxZ4cRU\nS9R2uYD8/gsA/TgRqmCdkSJesBF0h+fp01RQkDrL0QKBgQD92ZcICwnT+4tSd1tp\nPiL5Eg8UI48Sgsgk9fdbq9JiFtsa4t98QqRcQaoSieo29kdanOAQyEZy27Eh8veY\nkLmVNfzFhjOtf6BYD83UQC9FvxHgSgzeFwkpJTFI1ld6p2xZvY9l/GZ9hBxwyzEB\nMz/66xVdSfNgi2Z4i4RlQAn0iQKBgQDMgmtqkiJD0hi6Jv1/UTPxzbFpGQZtlvK/\nEDF8kPG7ri2QWft36ID8DtpdlDLkFrRhsrr9Ae0eQx/nCt4KTIdSxm6X9+P3txE3\nwuUdTpc3PpVFY4VXVrnYlW1SXokl7/4HQNw8wvjx0Ard7LtP3zXuHdgigF2hy6zu\ncEVeRLBYdQKBgQCnbk75lR5EXVNFb0gxoDQ9B7Y+WD3TvcL47era4fd/jwexMhap\nxOLXns/oLmL3IXVqxLHdH9unglPQyoqYbEybp+Iy/hMzykweCT5/Ul5bqGzH/M+D\n5Lm8E7XwDr/gPHFwt2DPqayH+Q0xMDQAUKdQfqG2yEHoWcmalJsclSJ70QKBgQC3\nOKU53mC6eFFU/behSEQMf+dRLG1444LpsH1Vh5o7Nkp2CFfmTrS4nin/KtYJSVok\nKXejUwV4VlUPrsnNWlDm1QaiOiHQff/8AC06e324reYYO5hr7jQkmYNPB4lCJuhk\n4TQvb9KO+n+x4fTTEzyC79QC3RSF7y8olAdh9JI1PQKBgBJZrFe3stDA4q+xAF3k\nh0nNwjLd3bcOeFDnCJNZkuaseWKPalpJ1KmW7ydCGXFU83S6w99o9+VYf1dTdAe/\nPrGplUBxNEXQ4+bpMH2YLPNtAwcct/Z82u5XgjFW/D9FF36MQiMQR/wjVK+xnnJT\nasIh21aWDlahsZgPT3ya78Ng\n-----END PRIVATE KEY-----\n", + "client_email": "luxbauer@utopian-hearth-294922.iam.gserviceaccount.com", + "client_id": "106198620318819149794", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/luxbauer%40utopian-hearth-294922.iam.gserviceaccount.com" +} diff --git a/VERAG_OCR/Resources/cursor-24.ico b/VERAG_OCR/Resources/cursor-24.ico new file mode 100644 index 0000000000000000000000000000000000000000..f6209c6e2ddabd3b2836579f07469a3399bc3635 GIT binary patch literal 729 zcmZQzU<5(~0|p?ez;Kv}fkBLcfuS?N&z+Y`iVMi(_4IHF0@6Sg3 zu|5!(&bv>-9M%F_LcF)*ru=Y;FQX%1r6A!|bz*mm#LnKJd@ zl!NZw0{JY$OBn^;$b~ohsH(BPzvK6wb@Fnq1Bz-a*?G%L4~7&mG|zPud)2gpbJ`uh zvwI4EeS0`L>w<+^1_Q67t;5`mxm6wieV_LROEesKQFXiOyu57Z)S1k26^GmpG}$xG zd&(a&r*#|eH)99WgIy0+-uLI)w<}eSBaPL#Y4hPHp*KusZJkg)E%kv~!Sw{21LX%7 z*_$)ga9rRjFbG+|wEM!gqlLTPEf~~(xrkVRmh^%?@i+fAuwdjq`kIjLplEKr}&t;uc GLK6VFnkOXy literal 0 HcmV?d00001 diff --git a/VERAG_OCR/Resources/cursor-48.ico b/VERAG_OCR/Resources/cursor-48.ico new file mode 100644 index 0000000000000000000000000000000000000000..f8c86d5abe44e927a69552ac77fbdb99f63c9b6f GIT binary patch literal 9662 zcmeI1F=!M)6o$tj5>ymajtBuo5K>sAvPfaXLPUaCh=^DO3kwmk5KGTO#7eDkAR?k77D3iK31&%QHRs`#$4L428KLZnZKkMOUo>_8{E#EC`&USL$!~uE z&7nyYy_Y-e>-n?!wPo0o8JHNC(u1Cw=Q>Wq`xrJt*~M{&-lCF?-N296TBL?15I)O0 z`W0FIHLLTNL$gwC{0y9tU%`ZVNA9Dmh8g3 zavtgXQ2rRhzRs(stxb_zc?}0F%at(ioPhlT?XIJ{=n2yPOfPrUzpMA~>l)Q*3HhaK zg7Py~iZ1d7FFWLyZM1zDy?;UMEt(#N4*A14*7=pSLY|>o@$5?A;r~<=J z*m)0SDPc|eP5ww9yo}Q@Uhfg(yi^5#oqN2lxtcShsJkrGIfwH7Du2Q^^Lxt~xkW4? zyY?dZyCi?)AYRXMPJQQ_q0GOz+Vfw!U>!pGtu_b$B_efYF75dvCt+?NWj|AXcJ*~} z{`cqDZz1^g_gGbm=sK!-K94@5LscO+POoECzk#NR1Jz=QlsZ + + + + Debug + AnyCPU + {13E50121-CD65-4DFD-BF2B-5D0AC7C613E3} + WinExe + VERAG_OCR.cMain + VERAG_OCR + VERAG_OCR + 512 + Console + v4.7 + true + true + + + x64 + true + full + true + true + bin\Debug\ + VERAG_OCR.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + VERAG_OCR.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + My Project\app.manifest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + frmMainOCR.vb + Form + + + frmFullScreen.vb + + + Form + + + frmMessage.vb + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmMainOCR.vb + + + frmFullScreen.vb + + + frmMessage.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + Always + + + + + 1.0.0 + + + 2.0.0 + + + 4.4.0 + + + + + + + + Always + + + + + + + \ No newline at end of file diff --git a/VERAG_OCR/cMain.vb b/VERAG_OCR/cMain.vb new file mode 100644 index 0000000..8716372 --- /dev/null +++ b/VERAG_OCR/cMain.vb @@ -0,0 +1,35 @@ + +Public Class cMain + + + + Private Shared Function SetProcessDPIAware() As Boolean + + + End Function + + Shared Sub Main() + + + If Environment.OSVersion.Version.Major >= 6 Then SetProcessDPIAware() + Application.EnableVisualStyles() + Application.SetCompatibleTextRenderingDefault(False) + Application.Run(New frmMainOCR()) + ' cMain.Main() + + + + 'MsgBox("GO") + 'Dim Ocr As New AutoOcr() + 'Dim Result = Ocr.Read("C:\Users\DEVELOPER1\Desktop\test.png") + + + + + 'MsgBox(Result.Text) + End Sub + + 'Public captured As System.Drawing.Bitmap + + +End Class diff --git a/VERAG_OCR/frmFullScreen.Designer.vb b/VERAG_OCR/frmFullScreen.Designer.vb new file mode 100644 index 0000000..e67c6d1 --- /dev/null +++ b/VERAG_OCR/frmFullScreen.Designer.vb @@ -0,0 +1,56 @@ + _ +Partial Class frmFullScreen + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.pic = New System.Windows.Forms.PictureBox() + CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'pic + ' + Me.pic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch + Me.pic.Dock = System.Windows.Forms.DockStyle.Fill + Me.pic.Location = New System.Drawing.Point(0, 0) + Me.pic.Name = "pic" + Me.pic.Size = New System.Drawing.Size(800, 450) + Me.pic.TabIndex = 0 + Me.pic.TabStop = False + ' + 'frmFullScreen + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.pic) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None + Me.Name = "frmFullScreen" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "frmFullScreen" + Me.WindowState = System.Windows.Forms.FormWindowState.Maximized + CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents pic As PictureBox +End Class diff --git a/VERAG_OCR/frmFullScreen.resx b/VERAG_OCR/frmFullScreen.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/VERAG_OCR/frmFullScreen.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VERAG_OCR/frmFullScreen.vb b/VERAG_OCR/frmFullScreen.vb new file mode 100644 index 0000000..cd95685 --- /dev/null +++ b/VERAG_OCR/frmFullScreen.vb @@ -0,0 +1,129 @@ +Imports System.ComponentModel + +Public Class frmFullScreen + + Event CAPTURED_IMG(frmFullScreen As frmFullScreen) + + Public bg As System.Drawing.Bitmap + Dim CursorPos1 As Point + Dim CursorPos2 As Point + + Private isMouseDown As Boolean = False + Private rect As Rectangle = New Rectangle(125, 125, 50, 50) + + Public captured As System.Drawing.Bitmap + Sub New(bg) + + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + Me.bg = bg + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + + End Sub + + + Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown + Me.Close() + End Sub + + Private Sub frmFullScreen_Load(sender As Object, e As EventArgs) Handles Me.Load + pic.BackgroundImage = bg + Dim mycursor As Icon = My.Resources.cursor_48 ' normal is my curosor icon + Me.Cursor = New Cursor(mycursor.Handle) + + End Sub + + Private Sub pic_MouseDown(sender As Object, e As MouseEventArgs) Handles pic.MouseDown + CursorPos1 = Cursor.Position + isMouseDown = True + End Sub + + Private Sub pic_MouseUp(sender As Object, e As MouseEventArgs) Handles pic.MouseUp + isMouseDown = False + CursorPos2 = Cursor.Position + captured = MakeScreenshot() + ' MsgBox(CursorPos1.X & "-" & CursorPos1.Y & ", " & CursorPos1.X - CursorPos2.X & "-" & CursorPos1.Y - CursorPos2.Y) + If captured IsNot Nothing Then RaiseEvent CAPTURED_IMG(Me) + 'Me.Close() + End Sub + + Private Function MakeScreenshot() As Bitmap + Dim tmp_width As Integer = CursorPos1.X - CursorPos2.X + Dim tmp_Height As Integer = CursorPos1.Y - CursorPos2.Y + If tmp_width = 0 Then Return Nothing + If tmp_Height = 0 Then Return Nothing + + If tmp_width <= 0 Then tmp_width *= -1 'Me.Close() + If tmp_Height <= 0 Then tmp_Height *= -1 ' Me.Close() + ' MsgBox(tmp_width & "-" & tmp_Height) + Dim bmp As New Bitmap(tmp_width, tmp_Height) + Dim g = Graphics.FromImage(bmp) + g.CopyFromScreen(CursorPos1.X, CursorPos1.Y, 0, 0, New Size(tmp_width, tmp_Height)) + g.Dispose() + Return bmp + End Function + + Private Sub frmFullScreen_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing + Me.Cursor = Cursors.Default + End Sub + + + + + Private MouseDownStage, MouseDownX, MouseDownY As Integer + Private x1, y1, x2, y2 As Integer + + + Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles pic.MouseMove + 'If isMouseDown = True Then + ' rect.Location = e.Location + + ' If rect.Right > pic.Width Then + ' rect.X = pic.Width - rect.Width + ' End If + + ' If rect.Top < 0 Then + ' rect.Y = 0 + ' End If + + ' If rect.Left < 0 Then + ' rect.X = 0 + ' End If + + ' If rect.Bottom > pic.Height Then + ' rect.Y = pic.Height - rect.Height + ' End If + + ' Refresh() + 'End If + + If isMouseDown = True Then + rect.Location = CursorPos1 + + + Dim tmp_width As Integer = CursorPos1.X - Cursor.Position.X + Dim tmp_Height As Integer = CursorPos1.Y - Cursor.Position.Y + If tmp_width <= 0 Then tmp_width *= -1 'Me.Close() + If tmp_Height <= 0 Then tmp_Height *= -1 ' Me.Close() + + rect.Width = tmp_width + rect.Height = tmp_Height + + + Refresh() + End If + End Sub + + + + Private Sub PictureBox1_Paint(sender As Object, e As PaintEventArgs) Handles pic.Paint + If isMouseDown Then + e.Graphics.DrawRectangle(New Pen(Color.Red, 3), rect) + End If + End Sub + + + + +End Class + diff --git a/VERAG_OCR/frmMainOCR.Designer.vb b/VERAG_OCR/frmMainOCR.Designer.vb new file mode 100644 index 0000000..c80dfee --- /dev/null +++ b/VERAG_OCR/frmMainOCR.Designer.vb @@ -0,0 +1,77 @@ + _ +Partial Class frmMainOCR + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.PictureBox1 = New System.Windows.Forms.PictureBox() + Me.txt = New System.Windows.Forms.RichTextBox() + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(12, 307) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "GET" + Me.Button1.UseVisualStyleBackColor = True + ' + 'PictureBox1 + ' + Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.PictureBox1.Location = New System.Drawing.Point(12, 3) + Me.PictureBox1.Name = "PictureBox1" + Me.PictureBox1.Size = New System.Drawing.Size(776, 271) + Me.PictureBox1.TabIndex = 1 + Me.PictureBox1.TabStop = False + ' + 'txt + ' + Me.txt.Location = New System.Drawing.Point(121, 307) + Me.txt.Name = "txt" + Me.txt.Size = New System.Drawing.Size(667, 131) + Me.txt.TabIndex = 2 + Me.txt.Text = "" + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.txt) + Me.Controls.Add(Me.PictureBox1) + Me.Controls.Add(Me.Button1) + Me.Name = "Form1" + Me.ShowInTaskbar = False + Me.Text = "Form1" + Me.WindowState = System.Windows.Forms.FormWindowState.Minimized + CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents PictureBox1 As PictureBox + Friend WithEvents txt As RichTextBox +End Class diff --git a/VERAG_OCR/frmMainOCR.resx b/VERAG_OCR/frmMainOCR.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/VERAG_OCR/frmMainOCR.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VERAG_OCR/frmMainOCR.vb b/VERAG_OCR/frmMainOCR.vb new file mode 100644 index 0000000..c8adea6 --- /dev/null +++ b/VERAG_OCR/frmMainOCR.vb @@ -0,0 +1,323 @@ + +Imports System.Drawing.Drawing2D +Imports System.IO +Imports System.Net +Imports System.Text +Imports System.Threading +Imports Google.Apis.Auth.OAuth2 +Imports Google.Apis.Services +Imports Google.Apis.Util.Store +Imports Google.Cloud.Vision.V1 +Imports IronOcr + + +Public Class frmMainOCR + + Private Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As IntPtr, ByVal id As Integer, ByVal fsModifier As Integer, ByVal vk As Integer) As Integer + Private Declare Sub UnregisterHotKey Lib "user32" (ByVal hWnd As IntPtr, ByVal id As Integer) + Private Const Key_NONE As Integer = &H0 + Private Const WM_HOTKEY As Integer = &H312 + Protected Overrides Sub WndProc(ByRef m As Message) + 'die messages auswerten + If m.Msg = WM_HOTKEY Then + 'hier wird entschieden welcher hotkey es war + 'einfach die übergebene id auswerten + Select Case m.WParam + Case 1 + ' MessageBox.Show("Sie haben die SUPTERTEST gedrückt!") + Button1.PerformClick() + End Select + End If + MyBase.WndProc(m) + End Sub + Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing + 'die tab taste wieder freigeben + UnregisterHotKey(Me.Handle, 1) + + End Sub + + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load + + + 'die tab taste abfangen + RegisterHotKey(Me.Handle, 1, 2, Keys.NumPad0) ' 2=CONTROL! + + + AuthExplicit() + ' cMain.Main() + + + End Sub + + + Public Function AuthExplicit() As Object + + Dim pathJson = System.IO.Path.GetFullPath(Application.StartupPath & "\Resources\") & "\My First Project-bb8af69631fc.json" '"C:\Users\DEVELOPER1\Downloads\My First Project-bb8af69631fc.json" + System.Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", pathJson) + Dim Pathsave = System.Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS") + + + 'Dim credential As UserCredential + + 'Using stream = New FileStream("client_secret.json", FileMode.Open, FileAccess.Read) + ' Dim credPath As String = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + ' credPath = Path.Combine(credPath, ".credentials/drive-dotnet-quickstart.json") + + ' credential = GoogleWebAuthorizationBroker.AuthorizeAsync( + ' GoogleClientSecrets.Load(stream).Secrets, Scopes, "user", CancellationToken.None, New FileDataStore(credPath, True)).Result + ' 'Console.WriteLine("Credential file saved to: " + credPath) + 'End Using + + + + End Function + + 'Public Shared Function getServiceInitializer() As BaseClientService + ' Dim serviceAccountCredentialFilePath = "Path to Json service account key file" REM from Google Developers console + ' Dim myKeyEMail = "XXX@developer.gserviceaccount.com" REM from Google Developers console + ' Dim scope = Google.Apis.Auth.OAuth2..v4.AnalyticsReportingService.Scope.AnalyticsReadonly + + + ' Try + + ' Dim credential + ' Using stream As New FileStream(serviceAccountCredentialFilePath, FileMode.Open, FileAccess.Read) + + ' credential = GoogleCredential.FromStream(stream).CreateScoped(scope) + + ' End Using + + ' Dim Initializer As New BaseClientService.Initializer() + ' Initializer.HttpClientInitializer = credential + ' Initializer.ApplicationName = "SRJCGMail" + + ' Dim service As New AnalyticsReportingService(Initializer) + ' Return service + + ' Catch ex As Exception + ' Console.WriteLine(ex.Message) + ' Return Nothing + ' End Try + + + 'End Function + + + Public captured As System.Drawing.Bitmap + Dim FORMS_SCR As New List(Of frmFullScreen) + Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click + + FORMS_SCR.Clear() + + For Each SCR In Screen.AllScreens() + initCapture(SCR) + Next + + + End Sub + + + Sub initCapture(SCR As Screen) + Try + + captured = TakeScreenShot(SCR) + Dim f As New frmFullScreen(captured) + f.Location = SCR.WorkingArea.Location + 'f.ShowDialog() + f.Show() + FORMS_SCR.Add(f) + PictureBox1.BackgroundImage = f.captured + AddHandler f.CAPTURED_IMG, Sub(frmFullScreen As frmFullScreen) + Dim imgLocationTMp = saveIMGToClipboard(frmFullScreen) + closeAllFrms() + readOCR(imgLocationTMp) + End Sub + + Catch ex As Exception + MsgBox(ex.Message & ex.StackTrace) + End Try + Me.Cursor = Cursors.Default + + + + ' Exit Sub + + + + ''THIS PART TAKES A SCREENSHOT + 'Dim area As Rectangle + 'Dim graph As Graphics + 'area = Screen.PrimaryScreen.Bounds + 'captured = New System.Drawing.Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb) + 'graph = Graphics.FromImage(captured) + 'graph.CopyFromScreen(area.X, area.Y, 0, 0, area.Size, CopyPixelOperation.SourceCopy) + + ''HERE WE INSERT THE MOUSE CURSOR + 'Cursor.Draw(graph, New Rectangle(New Point(Cursor.Position.X - Cursor.HotSpot.X, Cursor.Position.Y - Cursor.HotSpot.Y), Cursor.Size)) + + ''AND WE PUT THE PICTURE IN A PICTUREBOX + 'PictureBox1.BackgroundImage = captured + End Sub + + + Sub closeAllFrms() + Try + For Each f In FORMS_SCR + f.Close() + Next + Catch ex As Exception + MsgBox(ex.Message & ex.StackTrace) + End Try + End Sub + + Function saveIMGToClipboard(f As frmFullScreen) As String + Try + + Dim imgLocationTMp = System.IO.Path.GetTempPath() & Guid.NewGuid().ToString() & ".png" '"C:\Users\DEVELOPER1\Desktop\testSC2.png" + + f.captured.Save(imgLocationTMp) + + Return imgLocationTMp + Catch ex As Exception + MsgBox(ex.Message & ex.StackTrace) + + End Try + Return "" + End Function + + Sub readOCR(imgLocationTMp) + Try + + + Me.Cursor = Cursors.WaitCursor + + + Dim TMPgoogle = 1 + If TMPgoogle Then + + + Dim client = ImageAnnotatorClient.Create() + Dim image = Google.Cloud.Vision.V1.Image.FromFile(imgLocationTMp) + Dim response = client.DetectLabels(image) + Dim response2 = client.DetectDocumentText(image) + ' Dim response = client.DetectLabels(DirectCast(f.captured.Clone(), Image)) + + Dim ResultText = "" + 'For Each annotation In response + ' If annotation.Description IsNot Nothing Then ResultText &= annotation.Description & vbNewLine + ' 'If annotation.Description IsNot Nothing Then ResultText &= annotation.Description & vbNewLine + ' ' If annotation.IsNot Nothing Then ResultText &= annotation.Description & vbNewLine + 'Next + If response2 IsNot Nothing AndAlso response2.Text <> "" Then + Dim f2 As New frmMessage(response2.Text) + f2.Show() + End If + + 'txt.Text = response2.Text + Else + 'Dim Ocr As New AutoOcr() + 'Dim Result = Ocr.Read(f.captured) + + 'txt.Text = Result.Text + End If + + Catch ex As Exception + MsgBox(ex.Message & ex.StackTrace) + + End Try + End Sub + Private Function TakeScreenShot(SCR As Screen) As Bitmap + + + 'the working area excludes all docked toolbars like taskbar, etc. + Dim currentScreen = SCR.WorkingArea + + 'create a bitmap of the working area + Dim bmp As New Bitmap(currentScreen.Width, currentScreen.Height) + + 'copy the screen to the image + Using g = Graphics.FromImage(bmp) + + g.CompositingQuality = CompositingQuality.HighQuality + g.InterpolationMode = InterpolationMode.HighQualityBicubic + g.SmoothingMode = SmoothingMode.HighQuality + + g.CopyFromScreen(New Point(currentScreen.X, currentScreen.Y), New Point(0, 0), currentScreen.Size) + End Using + + ''save the image + 'Using sfd As New SaveFileDialog() With {.Filter = "PNG Image|*.png", + ' .InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop} + + ' 'If sfd.ShowDialog() = Windows.Forms.DialogResult.OK Then + ' ' bmp.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Png) + ' 'End If + ' End Using + Return bmp + + + If False Then + + + Dim screenSize As Size = New Size(SCR.Bounds.Width, SCR.Bounds.Height) + + Dim screenGrab As New Bitmap(SCR.Bounds.Width, SCR.Bounds.Height) + + Dim g As Graphics = Graphics.FromImage(screenGrab) + + g.CopyFromScreen(New Point(0, 0), New Point(0, 0), screenSize) + + Return screenGrab + + End If + End Function + + 'Private Function TakeScreenShot() As Bitmap + + + ' 'the working area excludes all docked toolbars like taskbar, etc. + ' Dim currentScreen = Screen.FromHandle(Me.Handle).WorkingArea + + ' 'create a bitmap of the working area + ' Dim bmp As New Bitmap(currentScreen.Width, currentScreen.Height) + + ' 'copy the screen to the image + ' Using g = Graphics.FromImage(bmp) + + ' g.CompositingQuality = CompositingQuality.HighQuality + ' g.InterpolationMode = InterpolationMode.HighQualityBicubic + ' g.SmoothingMode = SmoothingMode.HighQuality + + ' g.CopyFromScreen(New Point(0, 0), New Point(0, 0), currentScreen.Size) + ' End Using + + ' ''save the image + ' 'Using sfd As New SaveFileDialog() With {.Filter = "PNG Image|*.png", + ' ' .InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop} + + ' ' 'If sfd.ShowDialog() = Windows.Forms.DialogResult.OK Then + ' ' ' bmp.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Png) + ' ' 'End If + ' ' End Using + ' Return bmp + + + ' If False Then + + + ' Dim screenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) + + ' Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) + + ' Dim g As Graphics = Graphics.FromImage(screenGrab) + + ' g.CopyFromScreen(New Point(0, 0), New Point(0, 0), screenSize) + + ' Return screenGrab + + ' End If + 'End Function + + + +End Class diff --git a/VERAG_OCR/frmMessage.Designer.vb b/VERAG_OCR/frmMessage.Designer.vb new file mode 100644 index 0000000..0726930 --- /dev/null +++ b/VERAG_OCR/frmMessage.Designer.vb @@ -0,0 +1,104 @@ + _ +Partial Class frmMessage + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Me.pnl = New System.Windows.Forms.Panel() + Me.RichTextBox = New System.Windows.Forms.RichTextBox() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.lbl = New System.Windows.Forms.Label() + Me.Timer = New System.Windows.Forms.Timer(Me.components) + Me.pnl.SuspendLayout() + Me.Panel1.SuspendLayout() + Me.SuspendLayout() + ' + 'pnl + ' + Me.pnl.BackColor = System.Drawing.Color.White + Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.pnl.Controls.Add(Me.RichTextBox) + Me.pnl.Controls.Add(Me.Panel1) + Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill + Me.pnl.Location = New System.Drawing.Point(0, 0) + Me.pnl.Name = "pnl" + Me.pnl.Size = New System.Drawing.Size(371, 120) + Me.pnl.TabIndex = 0 + ' + 'RichTextBox + ' + Me.RichTextBox.Dock = System.Windows.Forms.DockStyle.Fill + Me.RichTextBox.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) + Me.RichTextBox.Location = New System.Drawing.Point(0, 30) + Me.RichTextBox.Name = "RichTextBox" + Me.RichTextBox.Size = New System.Drawing.Size(369, 88) + Me.RichTextBox.TabIndex = 1 + Me.RichTextBox.Text = "" + ' + 'Panel1 + ' + Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer)) + Me.Panel1.Controls.Add(Me.lbl) + Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top + Me.Panel1.Location = New System.Drawing.Point(0, 0) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(369, 30) + Me.Panel1.TabIndex = 0 + ' + 'lbl + ' + Me.lbl.AutoSize = True + Me.lbl.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!) + Me.lbl.ForeColor = System.Drawing.Color.White + Me.lbl.Location = New System.Drawing.Point(13, 8) + Me.lbl.Name = "lbl" + Me.lbl.Size = New System.Drawing.Size(207, 17) + Me.lbl.TabIndex = 0 + Me.lbl.Text = "Text in Zwischenablage kopiert:" + ' + 'Timer + ' + Me.Timer.Enabled = True + Me.Timer.Interval = 3000 + ' + 'frmMessage + ' + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None + Me.ClientSize = New System.Drawing.Size(371, 120) + Me.Controls.Add(Me.pnl) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None + Me.Name = "frmMessage" + Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual + Me.TopMost = True + Me.pnl.ResumeLayout(False) + Me.Panel1.ResumeLayout(False) + Me.Panel1.PerformLayout() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents pnl As Panel + Friend WithEvents RichTextBox As RichTextBox + Friend WithEvents Panel1 As Panel + Friend WithEvents lbl As Label + Friend WithEvents Timer As Timer +End Class diff --git a/VERAG_OCR/frmMessage.resx b/VERAG_OCR/frmMessage.resx new file mode 100644 index 0000000..7ed5960 --- /dev/null +++ b/VERAG_OCR/frmMessage.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/VERAG_OCR/frmMessage.vb b/VERAG_OCR/frmMessage.vb new file mode 100644 index 0000000..d1d400c --- /dev/null +++ b/VERAG_OCR/frmMessage.vb @@ -0,0 +1,21 @@ +Public Class frmMessage + + Dim MessageTxt + Sub New(MessageTxt) + + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + Me.MessageTxt = MessageTxt + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + + End Sub + + Private Sub frmMessage_Load(sender As Object, e As EventArgs) Handles Me.Load + RichTextBox.Text = MessageTxt + Clipboard.SetText(MessageTxt.Replace("\n", "\r\n")) + End Sub + + Private Sub Timer_Tick(sender As Object, e As EventArgs) Handles Timer.Tick + Me.Close() + End Sub +End Class \ No newline at end of file