ExtractIcon API:NewBie needs help 
Author Message
 ExtractIcon API:NewBie needs help

I'm new to VB, but not to Windows programming.

I'm trying to use the ExtractIcon API function. Once I get the return
value how do I use it. Since it returns HICON I want to assign it to my
main form.

Private Sub Command1_Click()
 Dim rc As Long

 CommonDialog1.ShowOpen

 rc = ExtractIcon(Form1.hwnd, CommonDialog1.filename, 0)

End Sub

What do I need to add?

Thanks in advance.

Mauro Patino



Tue, 02 Jul 2002 03:00:00 GMT  
 ExtractIcon API:NewBie needs help

Quote:
>I'm trying to use the ExtractIcon API function. Once I get the return
>value how do I use it. Since it returns HICON I want to assign it to my
>main form.

Mauro,

You can:

* Send a WM_SETICON message to your Form

or

* Create a StdPicture object from the icon handle, and then Set
Form.Icon = TheNewPictureObject. See the Tips section at
http://www.vbaccelerator.com for sample code.

Mattias

__________________________________________________

     VB+ http://hem.spray.se/mattias.sjogren/
 Please send questions/replies to the newsgroups



Wed, 03 Jul 2002 03:00:00 GMT  
 ExtractIcon API:NewBie needs help
Thanks!
Quote:

> >I'm trying to use the ExtractIcon API function. Once I get the return
> >value how do I use it. Since it returns HICON I want to assign it to my
> >main form.

> Mauro,

> You can:

> * Send a WM_SETICON message to your Form

> or

> * Create a StdPicture object from the icon handle, and then Set
> Form.Icon = TheNewPictureObject. See the Tips section at
> http://www.vbaccelerator.com for sample code.

> Mattias

> __________________________________________________

>      VB+ http://hem.spray.se/mattias.sjogren/
>  Please send questions/replies to the newsgroups



Wed, 03 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ExtractIcon api call and then saving the icon to a file (HELP)

2. Newbie Needs API Help To Switch" Screens

3. Newbie to VB4 needs help w/ API call to DestroyWindow

4. VB Newbie needs HELP with API's and Syntax

5. Newbie Needs Help With Windows API

6. VB/API Newbie Needs Help

7. newbie in api, need help for the function AVIStreamGetFrame

8. newbie in API, need help for playing a .avi

9. Newbie To API and banging my head in Need of Help

10. VB4.0 ExtractIcon, DrawIcon API calls

11. API: Using ExtractIcon and .Picture property

12. Icons, extracticon API

 

 
Powered by phpBB® Forum Software