Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transparent forms
Message
 
To
13/01/2008 09:06:07
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01280806
Message ID:
01281444
Views:
25
Sorry,
I thought I answered already.
This works perfect for me:
oForm = CREATEOBJECT([form1])
oForm.Show()
oForm1 = CREATEOBJECT([form1])
oForm1.Show()
READ EVENTS

**************************************************
*-- Form:         aladinform1 (c:\all_zapl\test.scx)
*-- ParentClass:  aladinform (c:\all_zapl\lib\mc_win95.vcx)
*-- BaseClass:    form
*-- Time Stamp:   01/10/08 01:41:09 PM
*
DEFINE CLASS form1 AS Form


    Top = 0
    Left = 0
    Height = 577
    Width = 674
    ShowWindow = 2
    DoCreate = .T.
    AlwaysOnTop = .T.
    Name = "Aladinform1"


    ADD OBJECT olecontrol2 AS olecontrol WITH ;
        Top = 488, ;
        Left = 30, ;
        Height = 36, ;
        Width = 625, ;
        Name = "Olecontrol2",;
        OleClass=[MSComctlLib.Slider.2]



    ADD OBJECT olecontrol1 AS olecontrol WITH ;
        Top = 7, ;
        Left = 10, ;
        Height = 474, ;
        Width = 659, ;
        Name = "Olecontrol1",;
        oleClass = [WMPlayer.OCX.7]        


    PROCEDURE Init
        DECLARE SetWindowLong In WIN32API Integer, Integer, Integer
        DECLARE SetLayeredWindowAttributes In WIN32API Integer, String, Integer, Integer

        SetWindowLong(THISFORM.hWnd, -20, 0x00080000)
        SetLayeredWindowAttributes(THISFORM.hWnd, 0, 255, 2)
        THISFORM.Olecontrol1.SetFocus()
    ENDPROC

    PROCEDURE Destroy
       CLEAR EVENTS
    ENDPROC

    PROCEDURE olecontrol2.Change
        *** ActiveX Control Event ***
        LOCAL lnValue
        DO CASE
        CASE THIS.Value = 0
            lnValue = 0
        CASE THIS.Value = 10
            lnValue = 255
        OTHERWISE
            lnValue = THIS.Value * 10
        ENDCASE
        SetLayeredWindowAttributes(THISFORM.hWnd, 0, lnValue, 2)
    ENDPROC


ENDDEFINE
*
*-- EndDefine: aladinform1
**************************************************
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform