Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

ColorDialog for device

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2008, 12:15 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default ColorDialog for device

The Compact Framework lacks a ColorDialog. Here's one to make up for that lack, it also works on the desktop. Needs .NET 2.0. No help file as it is very simple and is documented in the demo source. No source for merging for the time being as I can't get it to compile for the device.

EDIT : Source for merging posted. I don't know why I couldn't get it to merge on the device before - finger trouble I guess!
Attached Files
File Type: zip ColorDialog1.0.zip (5.3 KB, 327 views)
File Type: zip ColorDialog1.0_MergeSource.zip (2.8 KB, 207 views)

Last edited by agraham : 07-29-2008 at 01:26 PM.
Reply With Quote
  #2 (permalink)  
Old 07-29-2008, 12:29 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Great work (as usual)
May I have your permission to use it in the device IDE ?
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 01:02 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Erel View Post
May I have your permission to use it in the device IDE ?
Of course, though it's so simple I would have thought you could do much better

Do you want the VS2005 project or source code?
Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 01:29 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Please send me the source code.
Reply With Quote
  #5 (permalink)  
Old 07-30-2008, 10:58 AM
JJM JJM is offline
Senior Member
 
Join Date: Apr 2007
Location: France
Posts: 150
Default Color dialog

Agraham,

Thank you for your dll.
Is it possible that the windows is smaller because I woul like get on my screen the window of chosing color and an other programm to compare the colors in the both programms?

Best regards

JJ M
Reply With Quote
  #6 (permalink)  
Old 07-30-2008, 11:14 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by JJM View Post
Is it possible that the windows is smaller
No. On a Pocket PC forms (which can host controls) are always full screen. As far as I know (someone please correct me if they know otherwise) there is no way of overcoming this. The only things that can be displayed smaller are Notifiers and MessageBoxes but they can't host controls.
Reply With Quote
  #7 (permalink)  
Old 07-30-2008, 02:29 PM
JJM JJM is offline
Senior Member
 
Join Date: Apr 2007
Location: France
Posts: 150
Default

Thank you Agraham

JJ M
Reply With Quote
  #8 (permalink)  
Old 05-26-2009, 12:21 PM
Knows the basics
 
Join Date: Apr 2007
Location: Slovakia, Martin
Posts: 51
Send a message via ICQ to PatrikL Send a message via Skype™ to PatrikL
Default

Hi agraham,

thanx for good ColorDialog. But I want use this dialog in my programm, and my program is multilanguage. So its possible change dll and add possibility to change texts (also name of form) and color of form?

Example
colorDialog.Caption = "Hi"
colorDialog.txtRed = "Red"
colorDialog.txtGreen = "Green"
colorDialog.txtBlue = "Blue"
colorDialog.Color = frmmain.Color

Thanks.
__________________
Sirus Samsung Omnia i8000 WM6.5
Basic4PPC 6.90

Last edited by PatrikL : 05-26-2009 at 12:23 PM.
Reply With Quote
  #9 (permalink)  
Old 05-26-2009, 01:39 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Use the Door library. Obj1, Obj2 and Obj3 are Door library Objects
Code:
    Obj1.New1(False)
Obj2.New1(
False)
Obj3.New1(
False)

Form = 
"Couleur"
Red = 
"Rouge"
Green = 
"Vert"
Blue = 
"Bleu"
OK = 
"D'accord"
Cancel = 
"Annulez" 
Color = Rgb(
250240230)

Obj1.FromLibrary(
"Main.ColorDialog""dialog", B4PObject(2))
Obj1.SetProperty(
"Text", Form) ' Form text
  Obj2.CreateNew("System.Drawing.Color" & Obj2.System_Drawing)
  Obj1.SetProperty2(
"BackColor",Obj2.RunMethod2("FromArgb",Color,"System.Int32")) 'Color
    
Obj2.Value = Obj1.GetProperty(
"Controls")
Obj3.Value = Obj2.GetProperty2(
"Item"13'Blue
Obj3.SetProperty("Text", Blue)    
Obj3.Value = Obj2.GetProperty2(
"Item"14'Green
Obj3.SetProperty("Text", Green)
Obj3.Value = Obj2.GetProperty2(
"Item"15'Red
Obj3.SetProperty("Text", Red)

Obj2.Value = Obj1.GetProperty(
"Menu")
Obj3.Value = Obj2.GetProperty(
"MenuItems"
Obj3.Value = Obj3.GetProperty2(
"Item"0'OK
Obj3.SetProperty("Text", OK)
Obj3.Value = Obj2.GetProperty(
"MenuItems"
Obj3.Value = Obj3.GetProperty2(
"Item"1'Cancel
Obj3.SetProperty("Text", Cancel)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #10 (permalink)  
Old 05-28-2009, 08:30 AM
Knows the basics
 
Join Date: Apr 2007
Location: Slovakia, Martin
Posts: 51
Send a message via ICQ to PatrikL Send a message via Skype™ to PatrikL
Default

Hi agraham,

thanks for door code, because I'm not so skilled programmer for using door library.
I copy your code into your colordialog demo. And doesn't work. I dont know why. Please look on it (or somebody who know how this work) where is mistake.

Thanks a lot.
Attached Files
File Type: zip Colordialog.zip (9.8 KB, 22 views)
__________________
Sirus Samsung Omnia i8000 WM6.5
Basic4PPC 6.90
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 10:44 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0