For USB based control and measurement of external devices I'm a big fan of the miniLAB 1008[^]
2 10 bit analog outputs
4 12 bit analog inputs or 8 11 bit single ended
Slight overkill for just turning one device on and off (for which you would need to use the miniLAB to switch a relay), but should you progress to analog contol and measurement or decide to control several devices it's pretty cheap and very easy to set up and use.
No doubt there are loads of other similar bits of kit - I've just had a lot of success with these.
I have a weird problem. I'm using 2 applications (Client and Server). Both are connected using remoting. Somehow, I got a problem, if I say connect to server, I got an exception :
"The input stream is not a valid format. 3C-22-....".. something like that.
(I'm using username : userA)
BUT, if I logout from windows and login again using another username (userB), it works.
Both users are Administrator.
If I delete userA, then create it again, it works....
Does anybody knows, what's wrong with remoting or user problem ??
Alright, I have a log console that i have created that is specific for my multi-form application. It is a grid view with methods to write to that grid view, in the event of an Exception, it will take that information then write it to the system log. But, my concept is to have the log console instantiated from the beginning and just toggling the visibility of the form.
I've been playing around and reading on the internet different ways to do what i am looking on doing but have not had much luck being able to access that specific method LogConsole.WriteLine(string) other than where it has been instantiated.
This would be more of debugging console kinda of, but is ment for the IT people with in my company to be able to pin-point future issues, the log will display, errors, informational sql connection information, etc, etc.
Have you considered creating a form that would always be on top in your main method? Creating it from the start, then all the other windows would be under your control as well but would be fired up after the creation of your logging form.
This is assuming that I've understood your problem correctly.
Hi, I am a VB.NET programmer trying to get to grips with C# and it seems as far as I can see that events in VB are very different in C#
I have this in VB:
Public Class CGeneralParameters
Public Event ClassError(ByVal e As ClassErrorData, ByVal CriticalError As Boolean, ByVal MustDisplay As Boolean)
Private m_strConnectionString As String = ""
Private m_sAppData As String = ""
Private e As ClassErrorData
The code translator has done this to it:
<pre>public class CGeneralParameters : IDisposable
<big>private ClassErrorData e;</big>
private bool CriticalError;
private bool MustDisplay;
private string m_strConnectionString = "";
private string m_sAppData = "";
<big>private ClassErrorData e;</big>
and has pushed the structure to the end of the class.
Can I use events in this DLL to pass errors back to the calling program, or shouyld I be looking at another way to do this?
Generally, code translators are not the best at converting code from one language to another. There will be something missing.
From what you've posted, I can't really see where the problem is. Event declaration in a class is not important, assigning it (aka wiring) is. And yes, any exceptions thrown by a dll method that has been called by your application will be captured in the calling method as long as it is not being handled in that method.
Use a different converter - this code is very simple to convert.
In VB, you can specify an event combined with an implicit delegate.
The conversion to C# (via Instant C#) is:
public delegate void ClassErrorEventHandler(ClassErrorData e, bool CriticalError, bool MustDisplay);
public event ClassErrorEventHandler ClassError;
(the formerly implicit delegate has been named 'ClassErrorEventHandler' in the conversion).
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
VB & C# to Java Converter
Java to VB & C# Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
If you put the server listining you will(or not) accept clients and by that get their ip.
Having the ip´s send whatever package you want to.
I assume that you didn´t start yet. Download some application here and see the code, if you have doubts ask here then.
My advice is simply, do it with SQL store procedures.
Don´t filter, sort, edit in c#. Do the store procedures and trigger then in c#, with whatever event you want button_click, form_load etc.
It´s very easy
If you have doubts ask here how to make them(SP).
I want to develop an object tracking application using a web cam. I have captured the video using visual C# 2005. And now I stuck in finding way to obtain pixel color values of incoming video frame.Please can anyone tell me how to obtain RGB values of incoming video frame into an array.
'This get from image saved in ur pc.I am 'using picture box mouse click event in visual basic.Net '2010 .Add pic box to ur form & add these lables to y 're form thanks
' Yohan & Laleen From Sri Lanka
Dim TempBitmap As New Bitmap(PictureBox1.Image)
Dim MyColor As Color
MyColor = TempBitmap.GetPixel(e.X, e.Y)
' MessageBox.Show("Pixel x=" & e.X & ", y=" & e.Y & ", color=" & MyColor.ToString, "Color", MessageBoxButtons.OK, MessageBoxIcon.Information)
Label5.Text = MyColor.R.ToString()
Label6.Text = MyColor.G.ToString()
Label7.Text = MyColor.B.ToString()
Label8.Text = e.X.ToString()
Label10.Text = e.Y.ToString()
Dim r1 As String = Hex(MyColor.R)
Dim g1 As String = Hex(MyColor.G)
Dim b1 As String = Hex(MyColor.B)
'MessageBox.Show(r1 & g1 & b1)
Label12.Text = r1 & g1 & b1
Not sure what this is called exactly. I am after creating a method or class you can pass variables to. I want to be able to give them a pre-set list of what variables they can pass e.g. "txtOutcomes.TextMode = " automatically brings up "TextBoxMode", where you can select ".MultiLine;". Hope this makes sense. Many thanks.
Last Visit: 28-Mar-20 13:56 Last Update: 28-Mar-20 13:56