Public declarations not accepted 
Author Message
 Public declarations not accepted

I'm trying out some sample code from the MS site.  This concerns the systray.

1.Add the following code to the declarations section of a standard module in
       your project:

             'user defined type required by Shell_NotifyIcon API call
             Public Type NOTIFYICONDATA
              cbSize As Long
              hwnd As Long
              uId As Long
              uFlags As Long
              uCallBackMessage As Long
              hIcon As Long
              szTip As String * 64
             End Type

             'constants required by Shell_NotifyIcon API call:
             Public Const NIM_ADD = &H0
             Public Const NIM_MODIFY = &H1
             Public Const NIM_DELETE = &H2

But, when I try to run this, I get errors on all these Public statements.  So,
are the instructions of where to put these in error, or what?

Quote:
>\J  



Fri, 08 Mar 2002 03:00:00 GMT  
 Public declarations not accepted
I had no problems adding these declarations to a module, my guess is that
you are confusing a module with a form.

In the main menu

Click on Project
Click on Add Module
Click New
Then add the code to this Module1

I hope that was helpful.

Quote:

>I'm trying out some sample code from the MS site.  This concerns the
systray.

>1.Add the following code to the declarations section of a standard module
in
>       your project:

>             'user defined type required by Shell_NotifyIcon API call
>             Public Type NOTIFYICONDATA
>              cbSize As Long
>              hwnd As Long
>              uId As Long
>              uFlags As Long
>              uCallBackMessage As Long
>              hIcon As Long
>              szTip As String * 64
>             End Type

>             'constants required by Shell_NotifyIcon API call:
>             Public Const NIM_ADD = &H0
>             Public Const NIM_MODIFY = &H1
>             Public Const NIM_DELETE = &H2

>But, when I try to run this, I get errors on all these Public statements.
So,
>are the instructions of where to put these in error, or what?

>>\J



Fri, 08 Mar 2002 03:00:00 GMT  
 Public declarations not accepted
The declarations work fine for me.  You do know that "standard module" means a
BAS code module, right?

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner

Quote:

>I'm trying out some sample code from the MS site.  This concerns the systray.

>1.Add the following code to the declarations section of a standard module in
>       your project:

>             'user defined type required by Shell_NotifyIcon API call
>             Public Type NOTIFYICONDATA
>              cbSize As Long
>              hwnd As Long
>              uId As Long
>              uFlags As Long
>              uCallBackMessage As Long
>              hIcon As Long
>              szTip As String * 64
>             End Type

>             'constants required by Shell_NotifyIcon API call:
>             Public Const NIM_ADD = &H0
>             Public Const NIM_MODIFY = &H1
>             Public Const NIM_DELETE = &H2

>But, when I try to run this, I get errors on all these Public statements.  So,
>are the instructions of where to put these in error, or what?

>>\J    



Fri, 08 Mar 2002 03:00:00 GMT  
 Public declarations not accepted
You are adding them to a Module, aren't you? (In VB6 use the Project / Add
Module menu).

Mike


Quote:
> I'm trying out some sample code from the MS site.  This concerns the
systray.

> 1.Add the following code to the declarations section of a standard module
in
>        your project:

>              'user defined type required by Shell_NotifyIcon API call
>              Public Type NOTIFYICONDATA
>               cbSize As Long
>               hwnd As Long
>               uId As Long
>               uFlags As Long
>               uCallBackMessage As Long
>               hIcon As Long
>               szTip As String * 64
>              End Type

>              'constants required by Shell_NotifyIcon API call:
>              Public Const NIM_ADD = &H0
>              Public Const NIM_MODIFY = &H1
>              Public Const NIM_DELETE = &H2

> But, when I try to run this, I get errors on all these Public statements.
So,
> are the instructions of where to put these in error, or what?

> >\J



Fri, 08 Mar 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. public variables not public

2. Public variable not acting public (VB 5.0)

3. Help needed for a Public declaration of a DataSet object variable

4. Public declaration

5. Public Declarations

6. Public or Private Declaration

7. VB5: Public Declarations for Workspace & DB

8. Public declaration

9. dbVersion20 does not accept dbText?

10. CreateTableDef Does Not Accept vbAttachedTable as Parameter

11. Number Keypad Values Not accepted as Numieric

12. NDR from Exchange some servers not accept

 

 
Powered by phpBB® Forum Software