




Vb.Net İle Yazılan Kodları Nasıl C# Göre Uyarlıyabilrim
-
Merhaba hocalar başlıkta belirttiğim gibi vb ile yazılan kodu nasıl c#'a nasıl uyarlıyabilirim bu programı yapmak istiyorum.
https://www.youtube.com/watch?v=Kjdu8SjEtG0&t=142s
kodlar .
infazteam tarafından 07/Tem/17 19:06 tarihinde düzenlenmiştir
Imports Emgu.CV
Imports Emgu.Util
Imports Emgu.CV.OCR
Imports Emgu.CV.Structure
Public Class Form1
Dim OCRz As Tesseract = New Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY)
Dim pic As Bitmap = New Bitmap(270, 100)
Dim gfx As Graphics = Graphics.FromImage(pic)
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'If Windows XP
gfx.CopyFromScreen(New Point(Me.Location.X + PictureBox1.Location.X + 4, Me.Location.Y + PictureBox1.Location.Y + 30), New Point(0, 0), pic.Size)
PictureBox1.Image = pic
'If Windows 7
'gfx.CopyFromScreen(MousePosition, New Point(0, 0), pic.Size)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OCRz.Recognize(New Image(Of Bgr, Byte)(pic))
RichTextBox1.Text = OCRz.GetText -
using Emgu.CV; using Emgu.Util; using Emgu.CV.OCR; using Emgu.CV.Structure; public class Form1 { private Tesseract OCRz = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY); private Bitmap pic = new Bitmap(270, 100); private Graphics gfx = Graphics.FromImage(pic); private void Timer1_Tick(object sender, System.EventArgs e) { // If Windows XP gfx.CopyFromScreen(new Point((this.Location.X + (PictureBox1.Location.X + 4)), (this.Location.Y + (PictureBox1.Location.Y + 30))), new Point(0, 0), pic.Size); PictureBox1.Image = pic; // If Windows 7 // gfx.CopyFromScreen(MousePositi�on, New Point(0, 0), pic.Size) } private void Button1_Click(object sender, System.EventArgs e) { OCRz.Recognize(new Image<Bgr, byte>(pic)); RichTextBox1.Text = OCRz.GetText; } }
https://www.google.com.tr/search?client=opera&q=vb.net+to+c%23+conversion&sourceid=opera&ie=UTF-8&oe=UTF-8 -
using Microsoft.VisualBasic; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Diagnostics; using Emgu.CV; using Emgu.Util; using Emgu.CV.OCR; using Emgu.CV.Structure; public class Form1 { Tesseract OCRz = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY); Bitmap pic = new Bitmap(270, 100); Graphics gfx = Graphics.FromImage(pic); private void Timer1_Tick(System.Object sender, System.EventArgs e) { //If Windows XP gfx.CopyFromScreen(new Point(this.Location.X + PictureBox1.Location.X + 4, this.Location.Y + PictureBox1.Location.Y + 30), new Point(0, 0), pic.Size); PictureBox1.Image = pic; //If Windows 7 //gfx.CopyFromScreen(MousePosition, New Point(0, 0), pic.Size) } private void Button1_Click(System.Object sender, System.EventArgs e) { OCRz.Recognize(new Image<Bgr, byte>(pic)); RichTextBox1.Text = OCRz.GetText; } }
-
nurulmac11 bunu yazdı
using Emgu.CV; using Emgu.Util; using Emgu.CV.OCR; using Emgu.CV.Structure; public class Form1 { private Tesseract OCRz = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY); private Bitmap pic = new Bitmap(270, 100); private Graphics gfx = Graphics.FromImage(pic); private void Timer1_Tick(object sender, System.EventArgs e) { // If Windows XP gfx.CopyFromScreen(new Point((this.Location.X + (PictureBox1.Location.X + 4)), (this.Location.Y + (PictureBox1.Location.Y + 30))), new Point(0, 0), pic.Size); PictureBox1.Image = pic; // If Windows 7 // gfx.CopyFromScreen(MousePositi�on, New Point(0, 0), pic.Size) } private void Button1_Click(object sender, System.EventArgs e) { OCRz.Recognize(new Image<Bgr, byte>(pic)); RichTextBox1.Text = OCRz.GetText; } }
https://www.google.com.tr/search?client=opera&q=vb.net+to+c%23+conversion&sourceid=opera&ie=UTF-8&oe=UTF-8teşekürler hocam
-
tolgasen bunu yazdı
using Microsoft.VisualBasic; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Diagnostics; using Emgu.CV; using Emgu.Util; using Emgu.CV.OCR; using Emgu.CV.Structure; public class Form1 { Tesseract OCRz = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY); Bitmap pic = new Bitmap(270, 100); Graphics gfx = Graphics.FromImage(pic); private void Timer1_Tick(System.Object sender, System.EventArgs e) { //If Windows XP gfx.CopyFromScreen(new Point(this.Location.X + PictureBox1.Location.X + 4, this.Location.Y + PictureBox1.Location.Y + 30), new Point(0, 0), pic.Size); PictureBox1.Image = pic; //If Windows 7 //gfx.CopyFromScreen(MousePosition, New Point(0, 0), pic.Size) } private void Button1_Click(System.Object sender, System.EventArgs e) { OCRz.Recognize(new Image<Bgr, byte>(pic)); RichTextBox1.Text = OCRz.GetText; } }
teşekürler hocam iyi varsınız
-
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Emgu.CV;
using Emgu.Util;
using Emgu.CV.OCR;
using Emgu.CV.Structure;
namespace ekranyakalamadenem
{
public partial class Form1 : Form
{
public Form1()
{
}
Tesseract OCRz = new Tesseract("tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY);
Bitmap pic = new Bitmap(270, 100);
Graphics gfx = Graphics.FromImage(pic); <-- burdaki (pic) ' hata veriyor sebebi ne olabilir hocalar ?
private void button1_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
OCRz.Recognize(new Image<Bgr, byte>(pic));
pictureBox2.Text = OCRz.GetText();
}
private void timer1_Tick(object sender, EventArgs e)
{
//If Windows XP
{
gfx.CopyFromScreen(new Point(this.Location.X + pictureBox1.Location.X + 4, this.Location.Y + pictureBox1.Location.Y + 30), new Point(0, 0), pic.Size);
pictureBox1.Image = pic;
}
//If Windows 7
//gfx.CopyFromScreen(MousePosition, New Point(0, 0), pic.Size)
}
}
}
-
Graphics gfx = Graphics.FromImage((Image)pic);
-
unbalanced bunu yazdı
Graphics gfx = Graphics.FromImage((Image)pic);
olmadı hocam gene altını çizdi
-
teamviwer yolla bakayim hocam
-
yav kod çok işlevsel , acaba düzenleyince burda paylaşmanız mümkün müdür?
saklayalım lazım olur , teşekkürler
-
Daha once office modi kullanarak bir captcha okuyucusu yapmistim. Tesseract ile de yaptim aslinda resmi searchable pdf e donusturen bir proje. Ancak sirkette suan. Pazartesi bakabilirim.. Ayrica arkadasin hatasini düzelttim ancak suan emgucv nin dll leri ile ilgili baska problem var. Gerekli dll lerin ilgili klasorde olmasi lazim aksi halde calismaz. Arkadas yarina kadar yapamazsa, yarin öglen bakmaya calisacagim. Sonra da sizinle paylasabilir