Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #2881 > unrolled thread
| Started by | Martin <spam@spam.spam> |
|---|---|
| First post | 2012-01-31 17:00 +0000 |
| Last post | 2012-02-01 00:13 -0800 |
| Articles | 6 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Select a drive - best method Martin <spam@spam.spam> - 2012-01-31 17:00 +0000
Re: Select a drive - best method John Martens <adsl672100@tiscali.nl> - 2012-01-31 18:43 +0100
Re: Select a drive - best method Massimo Bighelli <info@arcasistemi.it> - 2012-01-31 19:43 +0100
Re: Select a drive - best method Martin <spam@spam.spam> - 2012-02-01 11:02 +0000
Re: Select a drive - best method "Jamal" <vodotnet_nospam@yahoo.com> - 2012-01-31 14:14 -0500
Re: Select a drive - best method Mathias <mathias.hakansson@consultec.se> - 2012-02-01 00:13 -0800
| From | Martin <spam@spam.spam> |
|---|---|
| Date | 2012-01-31 17:00 +0000 |
| Subject | Select a drive - best method |
| Message-ID | <U6VVq.1314$cl.401@newsfe21.ams2> |
OK I have been caught out and need to write a select the drive screen, for reading archived data off a CD. Only 1 site use this and they have just asked us to do it. (Went Clipper to VO in December). Used to be a simple GET with 1 character for the drive letter then ':\' added on. What dialogue is best to use for this in VO? Thanks Martin
[toc] | [next] | [standalone]
| From | John Martens <adsl672100@tiscali.nl> |
|---|---|
| Date | 2012-01-31 18:43 +0100 |
| Message-ID | <4f282840$0$14712$5fc3050@news.tiscali.nl> |
| In reply to | #2881 |
so you want to open a dialog window and let the user select a file on the CD to read from ? John Op 31-1-2012 18:00, Martin schreef: > OK I have been caught out and need to write a select the drive screen, > for reading archived data off a CD. > > Only 1 site use this and they have just asked us to do it. (Went Clipper > to VO in December). > > Used to be a simple GET with 1 character for the drive letter then ':\' > added on. > > What dialogue is best to use for this in VO? > > Thanks > > Martin
[toc] | [prev] | [next] | [standalone]
| From | Massimo Bighelli <info@arcasistemi.it> |
|---|---|
| Date | 2012-01-31 19:43 +0100 |
| Message-ID | <jg9coh$643$1@speranza.aioe.org> |
| In reply to | #2881 |
This is the Postinit() of my Dialog showing PC's drivers
(Loading combobox or listview)
HTH
Massimo Bighelli
METHOD PostInit(oParent,uExtra) CLASS DriversDLG
LOCAL nLen AS DWORD
LOCAL P, pszBuffer AS PSZ
LOCAL cBuffer, s AS STRING
LOCAL aDisk AS ARRAY
pszBuffer :=PSZ( MemAlloc( 256 )) // Alloc mem for buffer
nLen := GetLogicalDriveStrings(256, pszBuffer)
cBuffer := Psz2String( pszBuffer ) // Convert to string to get it returned
aDisk := ArrayCreate(0)
// FISSI
//------
P := pszBuffer
WHILE ! Empty(s:=Psz2String(P))
IF GetDriveType(PSZ( s) ) ==DRIVE_FIXED //.OR. GetDriveType(PSZ( s)
)==DRIVE_REMOTE
AAdd(aDisk,s)
ENDIF
p :=p+SLen(S)+1
ENDDO
SELF:oDcListaDriveF:fillusing(aDisk)
aDisk := {}
// RETE
//------
P := pszBuffer
WHILE ! Empty(s:=Psz2String(P))
IF GetDriveType(PSZ( s) ) == DRIVE_REMOTE
AAdd(aDisk,s)
ENDIF
P :=P+SLen(s)+1
ENDDO
SELF:oDcListaDriveN:fillusing(aDisk)
aDisk := {}
// REMOVIBILI
//-----------
P := pszBuffer
WHILE ! Empty(s:=Psz2String(P))
IF GetDriveType(PSZ( s) ) == DRIVE_REMOVABLE
AAdd(aDisk,s)
ENDIF
P :=P+SLen(s)+1
ENDDO
SELF:oDcListaDriveR:fillusing(aDisk)
aDisk := {}
// CD-ROM
//-------
P := pszBuffer
WHILE ! Empty(s:=Psz2String(P))
IF GetDriveType(PSZ( s) ) == DRIVE_CDROM
AAdd(aDisk,s)
ENDIF
P :=P+SLen(s)+1
ENDDO
SELF:oDcListaDriveC:fillusing(aDisk)
aDisk := {}
// RAM
//----
P := pszBuffer
WHILE ! Empty(s:=Psz2String(P))
IF GetDriveType(PSZ( s) ) == DRIVE_RAMDISK
AAdd(aDisk,s)
ENDIF
P :=P+SLen(s)+1
ENDDO
SELF:oDcListaDriveN:fillusing(aDisk)
aDisk := {}
MemFree(pszBuffer)
aDisk :=NULL_ARRAY
RETURN NIL
Il 31/01/2012 18:00, Martin ha scritto:
> OK I have been caught out and need to write a select the drive screen,
> for reading archived data off a CD.
>
> Only 1 site use this and they have just asked us to do it. (Went Clipper
> to VO in December).
>
> Used to be a simple GET with 1 character for the drive letter then ':\'
> added on.
>
> What dialogue is best to use for this in VO?
>
> Thanks
>
> Martin
[toc] | [prev] | [next] | [standalone]
| From | Martin <spam@spam.spam> |
|---|---|
| Date | 2012-02-01 11:02 +0000 |
| Message-ID | <wZ8Wq.889$vf5.58@newsfe14.ams2> |
| In reply to | #2883 |
Thanks Massimo, this was ideal to base mine on Martin On 31/01/2012 18:43, Massimo Bighelli wrote: > Massimo Bighelli
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <vodotnet_nospam@yahoo.com> |
|---|---|
| Date | 2012-01-31 14:14 -0500 |
| Message-ID | <jg9ej0$na6$1@dont-email.me> |
| In reply to | #2881 |
Example:
LOCAL oOpenDialog AS OpenDialog
LOCAL uFileName AS USUAL
oOpenDialog := OpenDialog{SELF}
oOpenDialog:Caption:="Open Zip File"
oOpenDialog:SetFilter ({"*.zip"}, {"Zip Files"})
oOpenDialog:InitialDirectory := "C:\"
oOpenDialog:Show()
uFileName := oOpenDialog:FileName
Jamal
"Martin" wrote in message news:U6VVq.1314$cl.401@newsfe21.ams2...
OK I have been caught out and need to write a select the drive screen,
for reading archived data off a CD.
Only 1 site use this and they have just asked us to do it. (Went Clipper
to VO in December).
Used to be a simple GET with 1 character for the drive letter then ':\'
added on.
What dialogue is best to use for this in VO?
Thanks
Martin
[toc] | [prev] | [next] | [standalone]
| From | Mathias <mathias.hakansson@consultec.se> |
|---|---|
| Date | 2012-02-01 00:13 -0800 |
| Message-ID | <33242182.213.1328084032149.JavaMail.geo-discussion-forums@yqgi18> |
| In reply to | #2881 |
You can also use the StandardFolderDialog to let the user select a folder.
/Mathias
method BPBrowse( ) class ROTApplications_TabNotSent
local oSFD as StandardFolderDialog
oSFD := StandardFolderDialog{self,"Select folder for xml-file",self:oDCSLEFolder:currenttext}
if oSFD:Show()
self:oDCSLEFolder:currenttext := oSFD:result
endif
return nil
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web