Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Share Your Creations
Home Register FAQ Members List 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 Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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, 30 views)
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #2 (permalink)  
Old 01-03-2008, 06:58 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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.
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net

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 Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
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 On
Pingbacks are On
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 17 11-18-2008 04:05 PM
running .cab files from a program on the device Louis Questions & Help Needed 3 10-27-2008 09:00 PM
Can i use Basic4PPC to run a program whilst a device is in 'standby' Stead Questions & Help Needed 2 02-13-2008 07:30 AM
Icon association Cableguy Questions & Help Needed 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 05:18 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0