Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT olecontrol1 AS olecontrol WITH ;
Top = 24, ;
Left = 48, ;
Height = 169, ;
Width = 241, ;
Name = "Olecontrol1" ,;
OleClass = "Shell.Explorer.2"
ADD OBJECT command1 AS commandbutton WITH ;
AutoSize = .T., ;
Top = 216, ;
Left = 120, ;
Height = 27, ;
Width = 114, ;
Caption = "Get folder content", ;
Name = "Command1"
PROCEDURE Init
this.olecontrol1.oBJECT.Navigate2("c:\")
ENDPROC
PROCEDURE command1.Click
LOCAL cDir
cDir = GETDIR('','','',2)
thisform.olecontrol1.navigate2(cDir)
ENDPROC
ENDDEFINE
Declare short SHGetSpecialFolderPath in Shell32.dll ;
integer hwndOwner, string @ lpszPath, ;
integer nFolder, short fCreate
#Define MAX_PATH 267
lpszPath = Replicate(Chr(0),MAX_PATH)
if SHGetSpecialFolderPath(0,@lpszPath,0x0005,0) # 0
lcFolder = left(lpszPath,at(chr(0),lpszPath))
ENDIF
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.addobject("ole1","ole1")
oform1.ole1.navigate2(lcFolder)
oform1.Show()
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "My Document Folder"
Name = "Form1"
height = 600
width = 800
ENDDEFINE
DEFINE CLASS ole1 as olecontrol
OleClass = "Shell.Explorer.2"
visible = .t.
height = 500
width = 700
ENDDEFINE