|
Hi Erik,
This is realy helpful...Thank you very much.
Thanks.
|
|
|
|
|
hello
i am working on a project "Face Detection" in live video without OpenCv, EmguCV etc. so the first thing that I want to access the RGB values of each pixel and then set them back after some plus minus calculation. but the problem is that i can't use GetPixel and SetPixel methods because they are too slow. and i need heigh speed. in one second i have to process many frames. my question is that is there any other way to get the rgb values and set them back more faster than GetPixel and SetPixel, which full fill my requirements?
thaks
|
|
|
|
|
See here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Sir I don't have words to say thanks to you. you solved a very big problem of mine. God bless you..thank you very much..
i would like to ask one another question and that is.
"Is BitmapData and lockBits and then Unlock bits through pointers is the fastest way to access bits or do we have more faster method then this as well?".
thanks
|
|
|
|
|
Hi all,
There are all these nice types of columns you can add to a DataGridView - ex. DataGridViewCheckBoxColumn and DataGridViewButtonColumn
Is there a way to define my own type for such a column?
What I'd like to do is this; I have a DataGridView on my form in which I display the various values of a list of attributes (I'm not using data binding). The different attributes have different types of values, some are strings, some are integers, some are dates and some are byte values that represent a bit field.
These bit fields I'd like to display in the DataGridView as a group of checkboxes . So I had in mind to create a control that consists of a panel containing 8 check boxes (or something like that) and then display that control in the DataGridView cell. But how?
Any ideas or suggestions would be appreciated.
TIA
|
|
|
|
|
This Link[^] may help you to get some idea
|
|
|
|
|
Hi, all.
I now it's a long posted issue but I have a problem with keyup in my serialport and I can't find a solucion.I Work with a richtextbox to access to the serial and works fine but not the keyup. in console app when I press keyup the machine connected via serialport gives me the last typed command. but not in richtextbox, here do nothing. catching the ConsoleKey/ConsoleKeyInfo in console app and sending the same data on richtextbox doesn't help.
How I can catch the keycode/keydata/keyvalue/ or something for the keyup in cons. app. to use it in richtextbox? seems to be different.
Thanks.
|
|
|
|
|
you have to pass the hex value for the UP key , richtextbox doe's not support the upkey to send the value to your device.., think about alternative..
see below link for hex value for control characters
http://www.gsp.com/cgi-bin/man.cgi?section=4&topic=keyboard[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi Rajesh, Thanks for your answer.
I need a litle more help. I need to pass the string representation of the hex number of the upkey?
Iam trying this but doesnt work. may i not trying the on rigth way.
Thanks.
|
|
|
|
|
can u provide the code. what you tried.., so that i can help you on this...
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hi. here is the code porcion.
private void rtBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyValue == 38)//upkey
{
e.Handled = true; //for not executing on richtextbox directly the answer
//come from another function
serialPort1.Write("{0x26}");//This is the string representation of the
//hex keyup? I found more than one.
}
}
Thanks a lot for your time.
|
|
|
|
|
may be yoy are passing the wrong ASCII code,
0x26 for (Ctrl+Z),
Go through the below link , here all ASCII values are available
Ascii values[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
i'm trying to get files with the a specified extension in a folder using a batch file , but when i give *.resource it doesn't get any file instead it shows "*.resource" with the path. ant idea how to get the file with the extension .resource .
thanx in advance.
|
|
|
|
|
Maybe I am extra thick today, but what does this have to do with C# ?
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
|
why you are using the batch file to get the file list..,
use the .net methods system.io.directory.getfiles to get the file list from directory..,
go throgh the below link
Get File list[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
hi all,
i want a deskop notification from an xml file or from rss feed
with articles added when i be online
|
|
|
|
|
kjgiiy wrote: i want a deskop notification from an xml file or from rss feed
with articles added when i be online
And how do you plan to achieve this?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hi - I am trying to send a simple string over an established Bluetooth connection using serial port. The probelm here is I don't know if what I am doing is correct as neither application are throwing any exceptions. Here is the code for the remote application
private void btnConnect_Click(object sender, EventArgs e)
{
try
{
SerialPort inPort = new SerialPort("COM2", 9600);
inPort.Open();
string message = "Hello";
inPort.Write(message);
inPort.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
On the other end I have used an event handler:
private void DataReceviedHandler(object sender, SerialDataReceivedEventArgs e)
{
try
{
SerialPort inPort = new SerialPort("COM7", 9600);
inPort.Open();
string mess = inPort.ReadLine();
MessageBox.Show("This worked...");
inPort.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
When I click on the button on the external application nothing happens? Any ideas????
|
|
|
|
|
There could be dozens of things wrong, getting a serial communication up and running requires all of them being right. Here are some suggestions:
- start by checking your physical connection by the simplest means, e.g. one party is constantly sending text (say one line every second), the other party uses HyperTerminal to receive them. Now experiment with cables, connectors, port settings, until characters are coming in.
- only when that works is it worthwhile expanding the software.
One immediate hint: ReadLine waits for a line of text, i.e. some characters ending on SerialPort.NewLine (which defaults to CR or LF or both, I can't remember). Your Write isn't sending any of them, try WriteLine.
|
|
|
|
|
private void DataReceviedHandler(object sender, SerialDataReceivedEventArgs e)
{
try
{
SerialPort inPort = new SerialPort("COM7", 9600);
inPort.Open();
string mess = inPort.ReadLine();
MessageBox.Show("This worked...");
inPort.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
in the above handler comport should be open previously, the receive comport should be open before sending the data by the sender comport.,
And also problem may be the comport settings as said in the above answer.., check all the comport settings are correct before starting your serialport communication.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
After alot of hair pulling and banging my head on the wall, finally figured out why by code isn't working. First of all, there are 4 serial ports available on my PC. The fact that I am trying to use the same serial port to test my Windows mobile application and send data over the same serial port explains why. So one would then suggest trying to use another port, well there is two problems with this; first active sync lunches and takes this spare serial port(have tried killing the process, this didn't help), Secondly also discovered that my Windows mobile device only supports on connection at a time so hence while I am testing it I can not open another port, which really sucks... So now I am diching using bluetooth all together and am using WiFi. I know what your thinking (won't I run into the same problems as with bluetooth), well with WiFi I am going to create a dummy application (desktop) that will sent strings, if this works I will then rebuild it as a Windows Mobile application, hopefully it should work...Thanks for the help everyone...
|
|
|
|
|
So in an effort to better learn C#, I'm taking a Java program used in one of my old classes and converting it. For the most part I've gotten things figured out, however the generics are throwing me for a loop as they aren't quite the same as Java.
I have a custom List class declared as follows:
public class List<A>
I also have a Function interface which is:
interface Function<A,B>
{
B f(A o);
}
Inside the List class I try the following and I get an error on the 'B' type, it's complaining that the namespace B could not be found. This sort of thing works fine in Java, I'm trying to figure out the comparable way to do it in C#.
public List<A> map (Function<A,B> fun)
|
|
|
|
|
That's because you used B as a generic type parameter but B does not exist.
If you change map to map<B> it should work (and with some luck you won't even need to make B explicit in invocations of map , if the compiler can figure out the type for you)
|
|
|
|
|
Thanks, that took care of it for me.
|
|
|
|