|
d@nish have you ever gotten anything transparent to work on Windows CE? I've tried transparent gif's, bmp's with a transparent color.
From what I am reading trasnparency is not supported in Windows CE. So I guess I am going to have to use GAPI and do it the hard way but I was hoping someone had some useful hints for me.
Thanks
|
|
|
|
|
I need to remove the error occurred row in DataError event in DataGrid View. How can I do this. Please Help me.
Dushan Perera
|
|
|
|
|
Remove the DataGridView.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
I need to delete entire row of a DataGridView when I select the entire row and press delete button. In this data grid view contains two combobox columns. Please Help me to do this
Dushan Perera
|
|
|
|
|
hi,
Listen, you edit the datasource (that you show in the DGV), you dont edit the DGV.
Edit the datasource, after refresh dgv.
dont know what you got there to help
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I am did not use the Data Grid View Data Source property to set the data source. According to my requirement i will populate the data to the two combo boxes in data grid view. So i need to remove the entire row when user select the entire row and press delete button
Dushan Perera
|
|
|
|
|
If you don't use DataSource for your grid view then how are you populating it? Manually? Then reconstruct it without the deleted row.
only two letters away from being an asset
|
|
|
|
|
remove a entire row of data? ok, where is the data sql server? xml?
data from the comboboxes? ok. i think you populate at runtime ok, i always have a data source.
listen, i load data (from sgl) in the DGV and i always have a id column in my "tables", so i select a row, press delete button and it triggers a delete row procedure in my database, after a refresh DGV and the row is no more.
So, that what i do.
Better keep asking, merry x-mas
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
listen to mark, see dushan.
like i told, you edit the database not the database displayer, in your case the DGV, got it?
you can do it like i told in my previous post, ok?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hi!
I would really appreciate some info about how to compare two image files to see if they are equal, .png files in this case. What techniques are there? Any help appreciated..
And merry coding christmas everybody!
|
|
|
|
|
It depends on how you define equal images. You can check if all the pixels are the same but I don't think it has too much sense.
|
|
|
|
|
Yes, check if all pixels are the same is what I want to do, sorry if I wasn't clear enough. They are the same size with the same colours but the pixels are placed differently, so to check if they're all the same would be the best say I guess. Ofcourse I could compare the images exact size (lots of them have different size ofcourse), but since I'll have a few hundreds of images, that wouldn't be the best way to do it I guess. Do you have any knowledge about how to easily compare all the pixels? Is there any existing function for this or so?
/Joplinazz
|
|
|
|
|
You can use GetPixel() method of Image class but it will be slow so I suggest you use unsafe code. Here are several articles that should help you: Articles by Christian Graus[^]
|
|
|
|
|
I would probably try it this way first:
1) Make both images the same size. I would probably shrink the larger of the two. You could probably deduce that if the images don't have the same size ratio, then they aren't the same, thus possibly short-cutting this step.
2) Convert both images to 8 bit color, and change resulting black pixels to some other 8-bit color.
3) Combine both images into a single image by or'ing the colors for each pixel position. If the pixel has the same color value for both images, change it to black.
4) See what percentage of of pixels are not black, and set some sort of percentage threshold for determining equality.
I am NOT a graphics guy, so someone else may be able to suggest a better solution. If nothing else, it would be a fun programming exercise.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks for your answer. That thing about to check some sort of percentage of the pixels that's black doesn't sound too stupid.. I'll look into it. Do you happen to have any knowledge about how to easily check if all the pixels are the same in both images?
|
|
|
|
|
Joplinazz wrote: Do you happen to have any knowledge about how to easily check if all the pixels are the same in both images?
You're gonna have to do that one pixel at a time I think...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
you could read the files as binary data and calculate a CRC on them, assuming equal CRC
means equal data (there is an odd chance this is not true, depending on the length of
the CRC).
but then different files might still represent the same image (not sure PNG format allows for that to happen); if this matters, read the image with Image.FromFile, save it in a fixed non-compressing format to a MemoryStream and do the CRC stuff (or a full compare) on the MemoryStreams.
If you rely on CRC, you can fill a Dictionary with filenames and CRCs;
if you rely on full image compare, you may end up trying to hold all images at the same
time, severely loading your system.
|
|
|
|
|
Hi,
How to get the url and webpage name from IE browser and firefox in window with c# ?
Thanks
|
|
|
|
|
You can try finding url textbox by using FindWindowEx api and then retrieving text by getwindowtext api.
|
|
|
|
|
It's okay, I've figured out how to do it. Thanks for the really quick reply though
jt.
j.t.
|
|
|
|
|
Next time reply in the same thread, no need to start a new one.
|
|
|
|
|
You are welcome
|
|
|
|
|
Hi All!
I'm working on a small personal project, hoping that it will eventually automate pretty much everything I do in Windows. But, the only thing I cannot find information regarding is how to launch a WindowsScriptHost (wsh) file from a c# application. For example:
I have a form, and on that form is a button named "Copy File". Now I want to click that button and then have some c# code that will just simple run/launch that file that I specify. I am using JScript for WSH. Does any body have any ideas/pointers? Any help would be much appreciated.
Regards,
jt
j.t.
|
|
|
|
|
You can use Process class to launch files programmatically.
|
|
|
|
|
Incase anybody else needs to know, I have the following code which launches my Jscript file once a buttonn is clicked:
private void button1_Click(object sender, EventArgs e)
{
Process CopyFile = new Process();
CopyFile.StartInfo.FileName = "C:\\Users\\jason\\Development\\Client\\Playground\\CopyFile.js";
CopyFile.StartInfo.Arguments = "ProcessStart.cs";
CopyFile.Start();
}
j.t.
|
|
|
|