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
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

Some Modules

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-13-2009, 02:41 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default Some Modules

Here are some general modules included in a test program.
- Setup language choice, prompt before exit, default folder
- FileChooser file chooser based on Erel's FolderChooser and an improvement of specci48
- ColorPalette from the IconEdit program
- About form
- RPNCalc Reverse Polish Notation calculator
- Draw Bitmap drawing program

I added a seperate folder for each module with all files needed for it.

Hope these could be usefull, and best regards.

EDIT: 2009.02.04 Improved Setup and FileChooser modules.

EDIT: 2009.03.14 Added Draw module
Attached Files
File Type: zip TestModulesV1_2.zip (339.6 KB, 158 views)
File Type: zip About.zip (848 Bytes, 129 views)
File Type: zip ColorPalette.zip (51.2 KB, 113 views)
File Type: zip Draw.zip (240.1 KB, 112 views)
File Type: zip FileChooser.zip (5.4 KB, 136 views)
File Type: zip RPNCalc.zip (9.6 KB, 109 views)
File Type: zip Setup.zip (5.9 KB, 117 views)
__________________
Klaus
Switzerland

Last edited by klaus : 03-14-2009 at 04:23 PM.
Reply With Quote
  #2 (permalink)  
Old 01-13-2009, 03:59 PM
Senior Member
 
Join Date: Apr 2007
Location: Canari Islan
Posts: 102
Awards Showcase
Beta Tester 
Total Awards: 1
Default

thanks Klaus

very good examples, it is very difficult to absorb everything that goes in the forum every day, here is a marvel

best regards
Reply With Quote
  #3 (permalink)  
Old 02-01-2009, 10:19 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Thanks Klaus
I used the color selection module in my navigation program, to enable the user to select the colors of route points, lines etc.
The integration was very easy

I had a problem that forelayer erased area done with FErase command became White instead of transparent, after doing color selection. I solved it by using

Code:
SetTransparentColor (cWhite) 
forrm5.ForeLayer = 
True
at the end of "Public Sub ReturnColorPalette(col)"
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #4 (permalink)  
Old 02-02-2009, 06:42 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi derez,

I am glad to hear that this module is helpfull for others.

I don't really understand the problem you had with the transparency color.

I use transpareny in some of my programs, but I didn't need to add the two lines you mention.

I tested it also on a second form without the need of the two lines.

Did you declare the transparency color in AppStart before the Form.Forelayer=True and Form.Show lines?
Code:
<font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Sub </font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">App_Start</font></font>
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"> SetTransparentColor</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2"> (</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">cWhite</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">)</font></font>
<font size=
"2"><font face="Courier New"> frmTest.ForeLayer=</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">True</font></font></font>
</font></font></font></font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"Sip</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">(</font></font></font></font><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080"><font face="Courier New"><font size="2"><font color="#800080">False</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">)</font></font>
<font size=
"2"><font face="Courier New"> frmMain.Show</font></font></font></font>
Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #5 (permalink)  
Old 02-02-2009, 07:59 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Quote:
Originally Posted by klaus View Post
Did you declare the transparency color in AppStart before the Form.Forelayer=True and Form.Show lines?
Before the addition of the module I had only the Form.Forelayer=True.
The addition of settransparency there did not change the situation - I understand that the selection of color changes the transparency color, so I had to write it again for white after the color selection.

When I retry this again, compiling with my Laptop instead of the Desktop, the problem does not occure even without the settransparency, so there is probably some older version of something in my Desktop....

Anyway, when I check the global definitions of the module, I see that settransparency is defined with color closer to white - RGB(250,250,250),
Is there a reason for it ? may be this is causing the problem .
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #6 (permalink)  
Old 02-04-2009, 02:44 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

There is an update to version 1.1 in the first post.

Improvement of the Setup and FileChooser modules.

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #7 (permalink)  
Old 02-04-2009, 03:17 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi derez,

I still don't know why you needed to declate the transparent color again when coming back from the ColorPalette.

Attached is a modifyed version of the TestModule program.
There is a new button called 'Draw Test', a click on this button shows a new Form, 'frmTest' with cWhite as transparent color, declared at the beginning of the AppStart routine.
On this form you can draw lines, point - move - release. During move a red line is drawn on the forelayer.
From this form you can call the ColorPalette (with RGB(250,250,250) transparent color) and choose another color, and also White and it works, without setting the transparent color for the 'frmTest' form again.

I choose the transparent color for the ColorPaltte to RGB(250,250,250) to be able to use the true white color also on the forelayer. RGB(250,250,250) looks like white but is not white.

Best regards.
Attached Files
File Type: sbp TestModules1.sbp (5.0 KB, 54 views)
__________________
Klaus
Switzerland

Last edited by klaus : 02-04-2009 at 03:36 PM.
Reply With Quote
  #8 (permalink)  
Old 02-05-2009, 12:40 PM
snoman's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 10
Default

Quote:
Originally Posted by klaus View Post
Here are some general modules included in a test program.
Very useful for b4p-beginners like me. My fav (because most useful 4me): the fileselect dlg


thank u!

snoman
Reply With Quote
  #9 (permalink)  
Old 02-06-2009, 11:31 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Italy
Posts: 540
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Great stuff !

Thank you Klaus

rgds,
moster67
Reply With Quote
  #10 (permalink)  
Old 03-14-2009, 04:25 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

There is an update to version 1.2 in the first post.

Added the Draw Bitmap drawing prgram module.

Best regards.
__________________
Klaus
Switzerland
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modules and Events Cableguy Questions (Windows Mobile) 6 01-04-2009 07:31 PM
FormLib and modules Cableguy Questions (Windows Mobile) 3 10-23-2008 10:26 PM
Designer with modules derez Beta Versions 3 09-18-2008 06:02 PM
Modules - more information Erel Beta Versions 4 09-02-2008 06:42 AM
Unhiding hidden modules? agraham Beta Versions 0 08-27-2008 07:14 PM


All times are GMT. The time now is 09:24 PM.


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