|
Hi,
I am using HP DEKJET INK ADVATAGE4645 PRINTER TO scan documents
by using my program.
after scanning a page if any barcode is there i need to decode that barcode using Decoding Methods.
I am using One third party tool ImageaMan.
after scanning some documents i am unable to decode a barcode on page.
If I press the option RestoreToDefault option On Scaneer again it is working fine.
so how to RestoreToDefault settings of a scaner using .net code...?
sunanda
ph:07760675056
email:sunanda1989@gmail.com,sunanda.lankipalli@cgi.com
|
|
|
|
|
Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
avoid blinking screen+window form application c#
|
|
|
|
|
Okay, I will. How?
As it stands, your question is far too vague to get anything remotely resembling a full answer to solve your issue. You need to fully define your problem, what you have tried and what the relevant code section looks like.
This space for rent
|
|
|
|
|
As Pete says, that isn't a question we can answer as it stands - we have no idea what you are talking about other than 1) it's a C# WinForms app, and 2) the screen is probably "blinking".
The trouble is that we have no idea what you app does, or how it does it, and we can't see your screen, access your HDD, or read your mind!
So explain what you are doing, what problem you are having, and try to give us relevant code fragments to work with.
At the moment, we can't even begin to help you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
|
Yes ... because it can cause fits in some people.
|
|
|
|
|
i am looking for code example which teach me how abstract class can be use to version class /component. please discuss with code example or redirect me to right article. thanks
tbhattacharjee
|
|
|
|
|
|
i searched google but unfortunately found no good one write up with code example for implement class /component Versioning using abstract class in c#.
tbhattacharjee
|
|
|
|
|
|
Hi All.
I would like to ask how to read variable with period of time or if this variable has change.
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
And at the moment I have no idea what you are trying to work out!
Try expanding on what you have told us - because at the moment we can't help you.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hi.
I'm sorry from my negligence.
I create Windows Forms application. In this application I would like to read data form PLC (Real Variable).
Now when I run this program I read value but only one time.
In my PLC I see that my variable has change but in C# application not.
In conclusion I would like to read my variable continuously or if it change.
My Code:
private void Form1_Load(object sender, EventArgs e)
{
SIS7.Net.Channel myChannel = new SIS7.Net.Channel();
SIS7.Device myDevice = new SIS7.Device("10.228.216.156,0,1", SIS7.Model.S7_1200);
SIS7.Group myGroup = new SIS7.Group(false, 500);
SIS7.Item myItem = new SIS7.Item("DB4.DBD68", 1, SIS7.DataType.Int32);
SIS7.Item myItem1 = new SIS7.Item("DB4.DBD100", 1, SIS7.DataType.Single);
myChannel.Devices.Add(myDevice);
myDevice.Groups.Add(myGroup);
myGroup.Items.Add(myItem);
myGroup.Items.Add(myItem1);
System.Single myFloat32;
try
{
myItem.Read();
myItem1.Read();
textBoxItemRead.Text = myItem.Values[0].ToString();
textBox1.Text = myItem1.Values[0].ToString();
}
catch (Exception ex)
{
}
myChannel.Dispose();
}
Regards
Pawel
|
|
|
|
|
Well...that code reads from the PLC only once (when the form loads) and then closes and Disposes your channel immediately.
So when the form is displayed, the PLC isn't communicating with the application at all - and couldn't if it wanted to because the connection isn't there any more.
Probably, you want to move that into a different thread, and make it loop to read the values, and then update the textboxes.
I'd suggest that you look at a BackgroundWorker[^] as that allows you to use the Progress to pass the messages back to the main thread for display (you can't change UI items from any thread except the main thread) via the BackgroundWorker.ProgressChanged Event (System.ComponentModel)[^] - the ProgressChangedEventArgs contains a UserState property you can transfer it in.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I need to transfer files to/from a server. I've done FTP in C# before but never used SCP.
From what I can find in Google, there isn't a lot available about using SCP in C#.
- Can anyone shed some light on SCP?
- Any reason not to use FTP assuming I encrypt the files before transfer?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
SCP[^] is an earlier and more primitive incarnation of the SFTP[^] protocol.
(Not to be confused with FTPS[^], which is just standard FTP over SSL.)
SCP, SFTP or FTPS would likely be a better choice than rolling your own encryption code. They've been written by experts and battle-tested by thousands of users over several decades.
The BCL has built-in support for FTPS via the FtpWebRequest.EnableSsl property[^]. For SFTP or SCP, you'll need a third-party library:
- SSH.NET[^] provides SCP and SFTP support.
- WinSCP[^] also has a .NET / COM wrapper.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Excellent info.. Thank you!
If it's not broken, fix it until it is
|
|
|
|
|
This kind of answer is what makes me scan every answer in this forum. Always nice to learn something new
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
The SCS TCP Server/ Client implementation, i would like to know if the Server side is also included and how to use it as part of implementation to a Server. Does SCS TCP Server take care of itself in this case. Thank you. http://codeproject.cachefly.net/script/Forums/Images/thumbs_up.gif
|
|
|
|
|
I'm working on making an app that scrapes my debit card account for my current balance and account activity. (I recently bought a Windows Phone, and they don't have an app for WP, and their website is not mobile friendly).
I'm running into an issue that has me a bit stumped. They use 2 steps for authentication. The first form submits the username and password, the 2nd asks for your date of birth as a secondary authentication.
I'm not sure where it's failing. I know the first request is good, as it brings up the DOB verify page, however after posting the DOB data, the 3rd response is back at the login screen.
The cookie headers are being filled, and all the response codes seem to be good. Does anyone see where the potential problem might be in this?
HttpWebRequest http = WebRequest.Create(LoginURL) as HttpWebRequest;
http.KeepAlive = true;
http.Method = "POST";
http.ContentType = "application/x-www-form-urlencoded";
string postData = "languageCode=&reqType=&j_username=myuser&j_password=mypass&sign-in.x=29&sign-in.y=7";
byte[] dataBytes = UTF8Encoding.UTF8.GetBytes(postData);
http.ContentLength = postData.Length;
using (Stream postStream = http.GetRequestStream())
{
postStream.Write(dataBytes, 0, dataBytes.Length);
}
HttpWebResponse httpResponse = http.GetResponse() as HttpWebResponse;
using (Stream respStream = httpResponse.GetResponseStream())
{
StreamReader reader = new StreamReader(respStream, Encoding.UTF8);
File.WriteAllText("loginresp.html", reader.ReadToEnd());
reader.Close();
}
httpResponse.Close();
HttpWebRequest http2 = WebRequest.Create(DOBVerifyURL) as HttpWebRequest;
http2.KeepAlive = true;
http2.Method = "POST";
http2.ContentType = "application/x-www-form-urlencoded";
http2.Headers["Cookie"] = httpResponse.Headers["Set-Cookie"];
http2.Referer = LoginURL;
http2.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36";
postData = "reqType=&cmd=checkSecu&languageCode=&additionalHolderAuthValue=urlencodeddob&continue.x=86&continue.y=13";
dataBytes = UTF8Encoding.UTF8.GetBytes(postData);
http2.ContentLength = postData.Length;
using (Stream postStream = http2.GetRequestStream())
{
postStream.Write(dataBytes, 0, dataBytes.Length);
}
HttpWebResponse httpResponse2 = http2.GetResponse() as HttpWebResponse;
using (Stream respStream2 = httpResponse2.GetResponseStream())
{
HttpWebRequest http3 = WebRequest.Create(AcctActivityURL) as HttpWebRequest;
http3.KeepAlive = true;
http3.ContentType = "text/html";
http3.Headers["Cookie"] = httpResponse2.Headers["Set-Cookie"];
http3.Referer = LoginURL;
http3.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36";
http3.AllowAutoRedirect = false;
HttpWebResponse httpResponse3 = http3.GetResponse() as HttpWebResponse;
using (Stream respStream3 = httpResponse3.GetResponseStream())
{
StreamReader reader = new StreamReader(respStream3, Encoding.UTF8);
File.WriteAllText("dobresp.html", reader.ReadToEnd());
reader.Close();
}
}
I copied the headers using Chrome's dev tools.
I can provide the working (from Chrome) headers, html, etc (edited of any personal info, of course) if needed.
(Side note: I don't plan on releasing or selling this app, this is purely for my own use. And it doesn't violate any terms or conditions so far as I can tell)
|
|
|
|
|
To be perfectly honest, I wouldn't do this.
Partly because it's going to fail in interesting ways - my bank throws in additional security questions at random intervals to throw keyloggers off and yours probably does the same. Partly becuase my bank changes its login page pretty often, again for the same reason. But mostly because you are planning on writing an application which automatically logs into your bank account and you want to put it on a phone. Tell me, which is the easiest piece of electronic kit you own to steal? Which is the most commonly lost or stolen? Yes - it's your phone. And if it's stolen, or found you have just handed the keys to your bank account to total strangers...
Are you really sure this is a good idea?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Normally, I'd agree with you 100%. However, the only thing you can do with this website is check your balance and the latest activity on your account. Neither the card number nor my social are listed on there. And in order to change anything on the account, you need to call customer service and provide both of those. It's not a bank account, per say, just a payroll deposit account with a debit card attached. If it was anything more, I'd not even consider doing this myself. And in the 4 years I've had the account, the front page hasn't changed, nor have I been asked for anything other than my dob
|
|
|
|
|
Steal a Windows Phone??
|
|
|
|