Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with browser object
Message
 
À
01/12/2008 14:58:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01364734
Message ID:
01364928
Vues:
15
That works for me:
oForm = CREATEOBJECT([Form1])
oForm.Show(1)


DEFINE CLASS Form1 AS form


    DoCreate = .T.
    lbopenconfig = .F.
    Name = "form1"

    ADD OBJECT olecontrol1 AS olecontrol WITH ;
        Top = 36, ;
        Left = 8, ;
        Height = 191, ;
        Width = 352, ;
        Name = "Olecontrol1",;
        oleClass = [Shell.Explorer.2]


    ADD OBJECT command1 AS commandbutton WITH ;
        Top = 4, ;
        Left = 86, ;
        Height = 27, ;
        Width = 84, ;
        Caption = "Command1", ;
        Name = "Command1"


    PROCEDURE command1.Click
         TEXT TO lcHTML NOSHOW
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">

        <head>
        <meta http-equiv="Content-Language" content="en-us" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled 1</title>
        <style type="text/css">
        .style2 {
            border: 2px solid #999966;
            text-align: center;
                font-family: Tahoma;
                background-color: #800000;
        }
        .style3 {
            border: 2px solid #999966;
            text-align: center;
            font-family: Tahoma;
            color: #FFFFFF;
            background-color: #800000;
        }
        .style4 {
            color: #FFFFFF;
        }
        .style5 {
            background-color: #999966;
        }
        .style6 {
            text-align: center;
        }
        .style7 {
            text-align: left;
        }
        .style8 {
            background-color: #999966;
            text-align: center;
            color: #FFFFFF;
        }
        .style9 {
            background-color: #999966;
            color: #FFFFFF;
        }
        .style10 {
            text-align: left;
            color: #FFFFFF;
        }
        .style11 {
            font-family: Tahoma;
            font-size: small;
        }
        </style>
        </head>

        <body>

        <table style="width: 100%" class="style11">
            <tr>

                <td class="style3"><strong>Due Date</strong></td>
                <td class="style2"><strong><span class="style4">Vendor/Contract</span></strong></td>
                <td class="style3"><strong>Notes</strong></td>
                <td class="style3"><strong>Date Created</strong></td>
            </tr>
                        
            <tr>
                <td valign="top" class="style6">

                    No Due Date
                </td>
                
                <td valign="top" align="center">
                    <table style="width: 100%">
                        <tr>
                            <td rowspan="3" style="width: 42px">
                                <img alt="" src="file:///C:\VAPPTEST\VCOM\IMAGES\CONTRACTICON.PNG" width="39" height="34" align="top" />
                            </td>
                            <td valign="top" class="style7">

                                <a href="vfps://VENDOR/100004">
                                    ??
                                </a>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" class="style7">
                                
                            </td>
                        </tr>

                        <tr>
                            <td valign="top" class="style7">
                                
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top">
                    WEFWEFWEFWEFWEFWEFWEFWEF
                </td>

                <td valign="top" class="style6">
                    11/26/2008
                </td>
            </tr>
                        
            <tr>
                <td class="style8" valign="top">11/30/2008</td>
                <td class="style5" valign="top">
                <table style="width: 100%">
                    <tr>

                        <td rowspan="3" style="width: 42px" class="style4">
                        <img alt="" src="file:///C:\VAPPTEST\VCOM\IMAGES\CONTRACTICON.PNG" width="39" height="34" align="top" /></td>
                        <td valign="top" class="style7"><a href="vfps://VENDOR/100003">
                        <span class="style4">??</span></a></td>
                    </tr>
                    <tr>
                        <td valign="top" class="style10"></td>
                    </tr>

                    <tr>
                        <td valign="top" class="style10"></td>
                    </tr>
                </table>
                </td>
                <td class="style9" valign="top" style="height: 75px">diary <b /><b />1<b />1<b />1<b />1</td>

                <td class="style8" valign="top">11/26/2008</td>
            </tr>
                        
            <tr>
                <td valign="top" class="style6">
                    12/01/2008
                </td>
                
                <td valign="top" align="center">
                    <table style="width: 100%">
                        <tr>

                            <td rowspan="3" style="width: 42px">
                                <img alt="" src="file:///C:\VAPPTEST\VCOM\IMAGES\CONTRACTICON.PNG" width="39" height="34" align="top" />
                            </td>
                            <td valign="top" class="style7">
                                <a href="vfps://VENDOR/100006">
                                    ??
                                </a>
                            </td>
                        </tr>

                        <tr>
                            <td valign="top" class="style7">
                                
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" class="style7">
                                
                            </td>
                        </tr>
                    </table>

                </td>
                <td valign="top">
                    asfasfasfasfasfasfasfasf
                </td>
                <td valign="top" class="style6">
                    11/29/2008
                </td>
            </tr>
        </table></body></html>
         ENDTEXT
         STRTOFILE(lcHTML,[Test.htm])
         aFile = [file://]+FULLPATH([Test.htm])
        thisform.olecontrol1.object.Navigate(aFile)
    ENDPROC


ENDDEFINE
Just click on the button.

As you see I use oleControl.OBJECT instead of oleContol itself.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform