UI translucent code problem... (1 Viewer)

croondevil

Registered User.
Local time
Today, 04:56
Joined
May 30, 2009
Messages
14
Hi all

I am working on a db.. On it i have a main (popout) form.



When the user clicks on a button on the main form a new form will popout.The new form is named as "frmstartmenu".I applied a translucent form effect on "frmstartmenu" as shown in DomDXecutioners sample db
http://www.access-programmers.co.uk/forums/showthread.php?t=131016

And when the user clicks on a button in the "frmstartmenu" a new form will popout.But the problem is that the new form pops out with a runtime error( runtime error 5). And he following part is highlited:-

Public Sub UIProcessFadeIn(UIForm As Form, Optional EndOpacity As Integer = 255)
'// loop counter
Dim i As Integer
For i = 1 To EndOpacity
Call SetTranslucent(UIForm.hWnd, i)
'// this is required for proper fade effect
'// otherwise you'll just jump to the transparency immediately

'// you may want to use another method to wait
DoEvents
Next i
End Sub




This new form does not have translucent effect applied on it.Hope thi makes sense.


And sorry for my bad english:p
 

RuralGuy

AWF VIP
Local time
Today, 05:56
Joined
Jul 2, 2005
Messages
13,826
Did you inport the modules too so that the SetTranslucent() function is included?
 

croondevil

Registered User.
Local time
Today, 04:56
Joined
May 30, 2009
Messages
14
yes i did... but still its not working.. An actually the thing is that when i open the debugging session that part is highlited in the module "API_TRANSLUCENT". btw if u really think it will work can u please upload a sample databse which shows that it can really be done under the circumstances which i provided.
 
Last edited:

RuralGuy

AWF VIP
Local time
Today, 05:56
Joined
Jul 2, 2005
Messages
13,826
When you do a FIND on the project, do you have a SetTranslucent() procedure? Does his sample work properly on your machine?
 

croondevil

Registered User.
Local time
Today, 04:56
Joined
May 30, 2009
Messages
14
no i cant find SetTranslucent(). And yes his sample works perfectly fine
 

croondevil

Registered User.
Local time
Today, 04:56
Joined
May 30, 2009
Messages
14
For i = 1 To EndOpacity
Call SetTranslucent(UIForm.hWnd, i)
'// this is required for proper fade effect
'// otherwise you'll just jump to the transparency immediately

'// you may want to use another method to wait
DoEvents
Next i



Same error is showing up..And by the way i did import the module at first also.
 

RuralGuy

AWF VIP
Local time
Today, 05:56
Joined
Jul 2, 2005
Messages
13,826
How about posting your db so we can look at it? Zip it up first.
 

Users who are viewing this thread

Top Bottom