DEVICE, Icon and program association.

Discussion in 'Share Your Creations' started by taximania, Jan 2, 2008.

  1. taximania

    taximania Well-Known Member Licensed User

    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.



    [​IMG]


    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:

    • dll.zip
      File size:
      1.5 KB
      Views:
      71
  2. taximania

    taximania Well-Known Member Licensed User

    So now I have 12 icons in a dll file :sign0060: 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.
     
    Last edited: Jan 3, 2008
  3. taximania

    taximania Well-Known Member Licensed User

    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.




    :sign0136: ha ha ha :sign0147:
     
Loading...