15,914,419 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MI_KRISHNAN (Top 10 by date)
MI_KRISHNAN
25-Jan-17 5:18am
View
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 System.IO.Ports;
using System.Threading;
using System.Data.SqlClient;
using System.IO;
using DirectX.Capture;
using DShowNET.Device;
using System.Text.RegularExpressions;
using Microsoft.VisualBasic.PowerPacks;
namespace LINEAR_SC
{
public partial class Form1 : Form
{
public DirectX.Capture.Filter Camera;
public DirectX.Capture.Capture CaptureInfo;
public DirectX.Capture.Filters CamContainer;
Image captureImage;
SerialPort _serialPort;
Double Disp, Init_Disp;
int ri = 0;
int lastX = 0;
int lastY = 0;
public Form1()
{
InitializeComponent();
}
public SqlConnection GetsqlCon()
{
string connstring = "Data Source=.\\SQLEXPRESS;Initial Catalog=UI;Integrated Security=True";
SqlConnection mycon = new SqlConnection(connstring);
return mycon;
}
public bool getComm(string connstring1)
{
try
{
SqlConnection sqlcon = this.GetsqlCon();
SqlCommand sqlcomm = new SqlCommand(connstring1, sqlcon);
sqlcon.Open();
sqlcomm.ExecuteNonQuery();
sqlcomm.Dispose();
sqlcon.Close();
sqlcon.Dispose();
return true;
}
catch (Exception ex1)
{
return false;
}
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
Region r = new Region();
r.Union(new Rectangle(0, lastY, this.Width, 1));
r.Union(new Rectangle(lastX, 0, 1, this.Height));
this.Invalidate(r);
this.Update();
Graphics g = Graphics.FromHwnd(this.Handle);
g.DrawLine(Pens.Black, 0, e.Y, this.Width, e.Y);
g.DrawLine(Pens.Black, e.X, 0, e.X, this.Height);
lastX = e.X;
lastY = e.Y;
}
private void Form1_MouseLeave(object sender, EventArgs e)
{
this.Invalidate();
}
private void button2_Click(object sender, EventArgs e)
{
//_serialPort = new SerialPort(portNameComboBox.Text, Convert.ToInt32(baudRateComboBox.Text), Parity.None, 8, StopBits.One);
//_serialPort.Handshake = Handshake.None;
//_serialPort.Open();
//timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
string data = _serialPort.ReadExisting();
String[] qw = data.Split('#');
if (qw.Length > 2)
{
data = qw[1];
if (data.Length == 35)
{
Disp = Convert.ToDouble(data.Substring(16, 11));
label3.Text = ((Disp - Init_Disp) / 1000).ToString();
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
{
CamContainer = new DirectX.Capture.Filters();
try
{
int no_of_cam = CamContainer.VideoInputDevices.Count;
for (int i = 0; i < no_of_cam; i++)
{
try
{
// get the video input device
Camera = CamContainer.VideoInputDevices[i];
// initialize the Capture using the video input device
CaptureInfo = new DirectX.Capture.Capture(Camera, null);
MI_KRISHNAN
22-Jul-16 3:59am
View
near
"i = cmd.ExecuteNonQuery();"
MI_KRISHNAN
22-Jul-16 3:58am
View
same error continuous.....
MI_KRISHNAN
22-Jul-16 3:58am
View
tried bro....
MI_KRISHNAN
17-Dec-15 7:46am
View
I have another doubt
static float billno = ICPL/15/CL0055/M-01;
billno = billno + 1;
textBox1.Text = billno.ToString();
is it possible
MI_KRISHNAN
17-Dec-15 7:22am
View
Initially starts with 01,02,03 and goes on upto 999
MI_KRISHNAN
17-Dec-15 7:07am
View
I need auto Increment like "ICPL/15/CL0055/M-01"
"ICPL/15/CL0055/M-02","ICPL/15/CL0055/M-03".....etc what to do
MI_KRISHNAN
16-Dec-15 7:47am
View
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
MI_KRISHNAN
16-Dec-15 5:16am
View
like PDF or DOC
MI_KRISHNAN
16-Dec-15 5:15am
View
how to save Print Preview in C#
Show More