derez Expert Licensed User Longtime User Jul 31, 2010 #1 Agraham & Klaus I combined Agraham's ColorDialog and Klaus's ColorPalette module to one library. I request your permission to publish it. Thanks. Edit: The zip file contains dll & cs files, simple demo program which can be used to see the use of the few methods, and the palette. The palette should be placed with the application or in directory "images" underneath. Preset colors can be changed one at a time. The lib is for use of Desktop and Device, tested for QVGA and VGA. Edit: - ver 1.1, the palette is embeded in the code, and also I found that a desktop version is required for compilation. Attachments cp.jpg 23.4 KB · Views: 52 CP 1.1.zip CP 1.1.zip 22.3 KB · Views: 86 Last edited: Aug 4, 2010
Agraham & Klaus I combined Agraham's ColorDialog and Klaus's ColorPalette module to one library. I request your permission to publish it. Thanks. Edit: The zip file contains dll & cs files, simple demo program which can be used to see the use of the few methods, and the palette. The palette should be placed with the application or in directory "images" underneath. Preset colors can be changed one at a time. The lib is for use of Desktop and Device, tested for QVGA and VGA. Edit: - ver 1.1, the palette is embeded in the code, and also I found that a desktop version is required for compilation.
klaus Expert Licensed User Longtime User Jul 31, 2010 #2 Hi derez, No problem for me, you can publish it. Best regards and thank you.
derez Expert Licensed User Longtime User Aug 1, 2010 #4 Thank you both. The library is at the first post.
C ceaser Active Member Licensed User Aug 3, 2010 #5 Hi Derez Thanks for the combined library. Just one question. Is it please possible to put the color palette in an imagelist so that it gets compliled with the program. Regards Michael
Hi Derez Thanks for the combined library. Just one question. Is it please possible to put the color palette in an imagelist so that it gets compliled with the program. Regards Michael
derez Expert Licensed User Longtime User Aug 3, 2010 #6 Do believe me I wanted to do it when tackled with the folder and file icon images in TvDialog. I wanted the library to load the images from the Library directory to a imagelist and then use it. I asked Erel how to do it and this is what he answered: It is not possible to embed this files in the compiled executable without a user action (adding them to an Imagelist). These files are only added when you target smartphones and it is not configured. If you like you can embed them in your DLL, however you will need to distribute the dll instead of compiling the code. Click to expand... If someone will show me how - I'll be glad to do it.
Do believe me I wanted to do it when tackled with the folder and file icon images in TvDialog. I wanted the library to load the images from the Library directory to a imagelist and then use it. I asked Erel how to do it and this is what he answered: It is not possible to embed this files in the compiled executable without a user action (adding them to an Imagelist). These files are only added when you target smartphones and it is not configured. If you like you can embed them in your DLL, however you will need to distribute the dll instead of compiling the code. Click to expand... If someone will show me how - I'll be glad to do it.
agraham Expert Licensed User Longtime User Aug 3, 2010 #7 You could always generate the bitmap yourself in the library if you really want to get rid of the file. An unoptimised algorithm is in the attached project. It's a bit slow in the IDE but runs in a flash when compiled. Attachments ColorBmp.sbp ColorBmp.sbp 2.5 KB · Views: 23
You could always generate the bitmap yourself in the library if you really want to get rid of the file. An unoptimised algorithm is in the attached project. It's a bit slow in the IDE but runs in a flash when compiled.
derez Expert Licensed User Longtime User Aug 3, 2010 #8 Thank you Agraham, I'll try to integrate it into the library. Last edited: Aug 3, 2010
agraham Expert Licensed User Longtime User Aug 3, 2010 #9 Here's the C# equivalent to kick you off. Attachments Class1.zip Class1.zip 984 bytes · Views: 15
derez Expert Licensed User Longtime User Aug 4, 2010 #10 Thank you Agraham but I used the existing private method in the library, and the bitmap creation is reduced to this piece of code : Code: this.palette = new Bitmap(120,120) ;// create the palette bitmap for (int h = 0;h <120;h++) for(int s = 0;s <120;s++) this.palette.SetPixel(h,s,HSLToRGB(h*2,240-s*2,120)); The library is updated to ver 1.1 Last edited: Aug 4, 2010
Thank you Agraham but I used the existing private method in the library, and the bitmap creation is reduced to this piece of code : Code: this.palette = new Bitmap(120,120) ;// create the palette bitmap for (int h = 0;h <120;h++) for(int s = 0;s <120;s++) this.palette.SetPixel(h,s,HSLToRGB(h*2,240-s*2,120)); The library is updated to ver 1.1
agraham Expert Licensed User Longtime User Aug 4, 2010 #11 derez said: HSLToRGB Click to expand... That's nice!
aklisiewicz Active Member Licensed User Longtime User Jun 1, 2011 #12 running DialogsDemo gives me an error: Compiling code. Error Error parsing program. Error description: Unknown type: colordialog Are you missing a library reference? Occurred on line: 71 Dim cd As ColorDialog Arthur
running DialogsDemo gives me an error: Compiling code. Error Error parsing program. Error description: Unknown type: colordialog Are you missing a library reference? Occurred on line: 71 Dim cd As ColorDialog Arthur
klaus Expert Licensed User Longtime User Jun 1, 2011 #13 You are missing the Dialogs library. Answer here. Best regards.