Results 1 to 3 of 3

Thread: Resource files and Icon handles

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    14
    Question #1

    I need to supply an icon handle for the tray. Since this program I'm writing doesn't have any forms (I use CreateWindowEx so that I have a hWnd to use) I can't do what I usually do and use the handle of the form's icon.

    However, I did add a resource file with an icon in it. How may I supply a handle to this icon to be used in the NOTIFYICONDATA structure?

    Question #2

    Since I don't have any forms, I cannot specify in the project properties the icon that I want as my program's icon. How can I specify the program's icon despite?

    Remark:
    I do realize that it would oh so much easier to write this program using a VB form. The reason I'm doing things this way is for the challenge of making the program pure API and as small as possible - 20K is what I've achieved. 24K with the form. 16K is the minimum possible. I'm using VB6 professional.

  2. #2
    Megatron
    Guest
    You can get the Picture using the LoadResPicture function.

    By the way: You 16K App will become roughly 2MB including the runtimes

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    14

    Wink

    I knew how to get the picture. I'm wanting the handle to the picture. Believe me, I couldn't get this far without knowing how to read documentation. Thanks though.

    As for the 2M. It's not really that necessary when most people have the VB runtimes. Even if I did distribute. I'd distribute the runtimes separately rather than making an installation package. So it's all good.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width