help !!! 
Author Message
 help !!!

help !!

1:

how can i find the hwnd of an usercontrol from a bas module within
the same project ? in the usercontrol i can use "UserControl.hwnd",
but vb doesn't support using the usercontrol's name in a module,
like :

'--- module cut ---
dim i as long
i = usercontrol1.hwnd
'--- cut end ---

2:

how do i call an sub in a usercontrol from an module ?
(pretty much the same as 1...)

'--- module cut ---
call usercontrol1.ProcMsg
'--- cut end ---

********************************************************************

does anybody understand my problem ?? does anybody know how to help ?

thanx in advance..

- retro



Sun, 30 Apr 2000 03:00:00 GMT  
 help !!!

What you're trying to do is to get a property or invoke a method of an
object without instantiating it first. UserControl1 is the _type_ of
object, not an instance of it.

What the .BAS code needs is a reference to an instance of the
UserControl to be passed into it.

You can see this if you change your code to

dim i as long
dim uc as usercontrol1

set uc = new usercontrol1
i = uc.hwnd

call uc.ProcMsg

(This isn't necessarily what you want to do - it's only an illustration
of the principle).

Regards
{*filter*}



Mon, 01 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. help,help,help,help,help,help,help,help,help,help,help,help,help,

2. Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,

3. Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help,

4. HELP HELP HELP HELP HELP HELPHELP HELP HELPHELP HELP HELP

5. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

6. HELP HELP HELP HELP HELP HELP HELP HEL P HELP HE LP HELP HELP HEL P HELP HELP

7. Help Help Help Help Help Help !!!!!

8. HELP HELP HELP Set document name of print job from VB HELP HELP HELP

9. HELP HELP HELP Early Binding Excel 5.0 HELP HELP HELP

10. HELP HELP HELP HELP HELP

11. Help - Print - Help -Print - Help - Print - Help - Print - Help

12. help help help help help

 

 
Powered by phpBB® Forum Software