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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

DEVICE, Icon and program association.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-02-2008, 09:39 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default DEVICE, Icon and program association.

This example adds the dll.ico to all the .dll's on your Device.

1. Unzip dll.zip to the Desktop.
2. Open dll.sbp and add dll.ico as the icon, if it isn't by default.
3. Compile using 'Optimized' for Device.
4. Copy the compiled dll.exe and AnyFileAssociation.sbp to your Device.
5. Run AnyFileAssociation.sbp on your Device.

xxxfile: is a unique name to you for the icon association.
e.g. dllTaxi

.xxx: is the 3 letter extension of the associated file
e.g. .dll

Icon: Browse to 'dll.exe' (on this occassion), on your device.
You need 3rd party software to find the offset for other .exe or .dll's
Offset: 32512 is the default value in a Basic4ppc.sbp file.

Associate program: If you check this box, when you double click a file on your Device of type .dll (in this example), It will start dll.exe.
This merely shows the msgbox() in dll.exe, or what ever lines of code you put in dll.sbp before compiling it. (Step 2 above)

Save Changes: Does exactly that.

WARNING:
If you associate the program (checkbox1.checked=true) then you have to use a registry editor to remove the association.






Many thanks to Erel. (And his code, library's etc)
I've spent about 6 hours on this project and 6 more on Google.


@Anybody:
How can I add all the .ico files I have created into 1 VB.NET .dll
This would do away with the need to have an sbp.exe file for each icon.

And less google time for me looking for answers.
Attached Files
File Type: zip dll.zip (1.5 KB, 52 views)
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #2 (permalink)  
Old 01-03-2008, 06:58 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by taximania View Post
How can I add all the .ico files I have created into 1 VB.NET .dll
This would do away with the need to have an sbp.exe file for each icon.

And less google time for me looking for answers.
So now I have 12 icons in a dll file I used rc.exe and link.exe etc
Can I for the life of me get it to display anything than the first icon.

I've been googling for offset figures for 3 hours now

Edit: Make that 6 hours. I'm going backwards.
I now have 12 .dll's with 1 icon in each.
It's the only way I can find to do it.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk

Last edited by taximania : 01-03-2008 at 09:47 PM. Reason: Fed up.
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 08:20 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default I give up on this one !!

A registry key, 'DefaultIcon', when set to "\all.dll" ,n
Should display the n+1 .ico in file, all.dll
(all.dll has no code in it, just ico files)

On my device it doesn't. I've googled my backside off. 'It Dont work.'

If '.dll' has an ico associated with it, 'DefaultIcon' when set to "\all.dll" ,0'
shows the default ico for .dll, not the icon in all.dll.
If I set the value '0' to any other value, no ico is visible.

So as far as I can make out, the first way I did it is the only way it can work.
Compile an sbp.exe with the ico you require.

The reason behind me trying all this is because I can take .asm (Microchip assembly source code files)
to work with me and write code for my PIC projects.
.asm are actually .txt files. Not dissimiliar to .sbp files.
At least now, on my device, I can see what file type I'm looking at.




ha ha ha
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
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
Add file association to Basic4ppc source code files (on the device) Erel Code Samples & Tips 22 07-01-2010 08:06 PM
Can i use Basic4PPC to run a program whilst a device is in 'standby' Stead Questions (Windows Mobile) 3 08-03-2009 10:50 PM
running .cab files from a program on the device Louis Questions (Windows Mobile) 3 10-27-2008 09:00 PM
Icon association Cableguy Questions (Windows Mobile) 9 05-22-2007 08:43 PM
.sbp file association in the Device Cableguy Code Samples & Tips 8 05-18-2007 03:12 PM


All times are GMT. The time now is 04:13 AM.


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