Hi , i got some situation over here.
I have PROCEDURE (A) that set public, when PROCEDURE (A) call i pass to it some obejct on FORM where PROCEDURE (A) being call.
When the PROCEDURE (A) end i want the PROCEDURE (A) to call some FUNCTION or PROCEDURE (B) reside on the FORM where this public PROCEDURE (A) beeing call. On this PROCEDURE (B), i'm going to change some other control that FORM.
your logic is very confusing, can you explain your argument clearly. i suggest you dont hide sime info of your project coz you cant get any help if you hide it and present a confusing problem here on the forums
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved" option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
you need not to use call since these are just procedures and not functions
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved" option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
Using method number 1- Problem arise because "test" will execute after "hitung" being excecute not after "hitung" finished.
Using method number 2-
I'm using MDI FORM
I'm calling MDI child FORM MDI Main
VB Code:
Dim frm As FORM1
Set frm = New FORM1
Set frm.fMain = Me
frm.Show
Set frm = Nothing
'on FORM1
Public fMain As frmMain
'where frmMain are name MDI Main
when i'm calling "test" it give me error to all object/control on FORM1 that reference to frmMain. I have imagelist on frmMain that i accessing from FORM1 and some other thing.
Using method number 1- Problem arise because "test" will execute after "hitung" being excecute not after "hitung" finished.
That was confusing... After it has been executed means that it has finished. When you call a procedure the execution will not continue until that procedure has finished its job.
upps, my fault
the "hitung" procedure was detect mouse movement.
Joacim,
actually "hitung" procedure is mousehook procedure you give me the other day.
And what i want is when it is click outside the area, i want it to call some function/procedure on FORM1.
Aha, I see. Well, since the callback procedure that the mouse hook is using is called by Windows it's actually called by another thread then the one you're running and trying to access your Form from such a callback procedure will crash your program.
But since that is showing a Frame and you want to call the next procedure after the Frame is "closed" simply loop and check if the frame is visible or not.
First add the following to the General Declaration section of your Form:
VB Code:
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)