topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
doubleclick | How to check for a doubleclick ?
Thanks in advance
Otto |
doubleclick | Otto,
oWnd:bLDblClick := { | nRow, nCol, nFlags | ... } |
dove reperire Sample batch x Xharbour | Ciao a tutti,
Ho tirato giu' da xharbour.org xharbour x bcc ma non ci ono ne sample .prg ne .bat di compilazione.
Ho provato a chiederli alle news di xharbour e mi hanno detto che devo comprarmi xharbour.......
Ma non era possibile usarlo gratis?
Dove trovo un po di sample e bacth di compilazione?
Ma Xharbour free ha anche le GUI o e' solo carattere ?
Io comunque ho le fwh 24
Ciao tutti Bon Natale e Felice 2006
Piscicelli/Zingoni |
dove reperire Sample batch x Xharbour | [quote="Piscicelli Zingoni":2f924002]Ciao a tutti,
Ho tirato giu' da xharbour.org xharbour x bcc ma non ci ono ne sample .prg ne .bat di compilazione.
Ho provato a chiederli alle news di xharbour e mi hanno detto che devo comprarmi xharbour.......
Ma non era possibile usarlo gratis?[/quote:2f924002]
Forse non hai capito bene la risposta. Quello era solo un consiglio non un obbligo. Se si trova difficoltà ad organizzarsi lo strumento da soli allora c'è la possibilità di avere tutto già pronto per l'uso.
Ad ogni modo, eccoti un batch di compilazione per un singolo PRG (controlla i percorsi):
[code:2f924002]@ ECHO OFF
SET HARBOURCMD=/a /es2 /gc0 /m /n /q /w2
SET INCLUDE=c:\xharbour\include;c:\bcc55\include
IF EXIST %1.prg c:\xharbour\harbour %1
SET HARBOURCMD=
SET INCLUDE=
IF EXIST %1.c c:\bcc55\bin\bcc32 +c:\xharbour\xharbour.cfg -c %1.c
IF EXIST %1.obj c:\bcc55\bin\ilink32 c0x32 %1.obj, %1.EXE @c:\xharbour\xharbour.rsp
IF ERRORLEVEL 1 PAUSE
IF NOT ERRORLEVEL 1 IF EXIST %1.exe %1
IF EXIST %1.c DEL %1.c
IF EXIST %1.obj DEL %1.obj
IF EXIST %1.tds DEL %1.tds[/code:2f924002]
dove XHARBOUR.CFG è
-5
-DHB_FM_STATISTICS_OFF
-DHB_GUI
-DHB_NO_PROFILER
-DHB_NO_TRACE
-DHB_WIN32_IO
-g50
-Ic:\xharbour\include;c:\bcc55\include
-j5
-k-
-O1
-O2
-OS
-Ov
-v-
-WC
-w
-w-inl-
e XHARBOUR.RSP è
/ap +
/Gn +
/Lc:\xharbour\lib;c:\bcc55\lib;c:\bcc55\lib\psdk +
/x
rtl.lib +
vm.lib +
common.lib +
lang.lib +
gtwin.lib +
rdd.lib +
dbffpt.lib +
dbfntx.lib +
dbfcdx.lib +
hbsix.lib +
macro.lib +
pcrepos.lib +
hbodbc.lib +
hbzip.lib +
ct.lib +
import32.lib +
cw32.lib +
odbc32.lib +
debug.lib
[quote:2f924002]Ma Xharbour free ha anche le GUI o e' solo carattere ?[/quote:2f924002]
Solo console. Ma ci sono delle librerie GUI gratuite tipo la MiniGUI.
[quote:2f924002]Io comunque ho le fwh 24[/quote:2f924002]
Non credo tu la potrai utilizzare con l'ultima release ufficiale di xHarbour a causa di variazioni interne di quest'ultimo.
EMG |
dove reperire Sample batch x Xharbour | Ciao,
alla risposta di Enrico potrei aggiungerti che se hai scaricato dal cvs l'ultima versione devi anche compilare xHarbour e, nella cartella xHarbour, oltre tutti i sorgenti trovi anche la cartella tests con i vari esempi tipo samples di FWH!
per compilare xHarbour potresti usare:
[code:1p7tpyq8]@ ECHO OFF
SET PATH=C:\Borland\BCC55\bin;c:\WORK\djgpp\bin;%PATH%
SET DJGPP=c:\DJGPP\DJGPP.ENV
SET HB_LEX=SIMPLEX
CALL C:\BCC55\Bin\setb55
CALL make_b32 clean
CALL make_b32
Rem COMPILA HELP
cd \WORK\xharbour\doc
..\bin\hbdoc /chm xharbour.lnk xharbour.rsp
[/code:1p7tpyq8]
Devi però aver installato DJGPP e Borland.
La seconda parte prevede anche la compilazione della documentazione.
Ciao,
Ugo |
dove reperire Sample batch x Xharbour | [quote:8dj9tfyg]CALL C:\BCC55\Bin\setb55[/quote:8dj9tfyg]
Questo setb55 non fa parte del Borland.
EMG |
dove reperire Sample batch x Xharbour | Io attualmente uso Harbour con FWH24
Mi apre di capire che XHARBOUR e' meglio o comunque piu' aperto.
Domando a chi lo usa gia':
E' anche piu stabile?
Ha anche un suo IDE o e' solo interfaccia carattere?
Posso contiunuare ad usarlo con le FWH24o posso anche farne a meno (!?)
Dove posso reperire Xharbour (free) completo con i test/batch o e' meglio prelevarlo dal CVS ? (non so niente del CSV!!)
Buon Natale e grazie
Piscicelli/Zingoni |
dove reperire Sample batch x Xharbour | [quote="Piscicelli Zingoni":17ww0ds1]Io attualmente uso Harbour con FWH24
Mi apre di capire che XHARBOUR e' meglio o comunque piu' aperto.[/quote:17ww0ds1]
Meglio forse, nel senso che è più seguito e più esteso. Poi non ho capito cosa intendi esattamente con "aperto". La licenza credo sia la stessa.
[quote:17ww0ds1]Domando a chi lo usa gia':
E' anche piu stabile?[/quote:17ww0ds1]
Sicuramente è più testato.
[quote:17ww0ds1]Ha anche un suo IDE o e' solo interfaccia carattere?[/quote:17ww0ds1]
Esattamente come Harbour.
[quote:17ww0ds1]Posso contiunuare ad usarlo con le FWH24o posso anche farne a meno (!?)[/quote:17ww0ds1]
Ammesso che la versione di FWH in tuo possesso sia compatibile con la versione di xHarbour che ti procurerai, sì, puoi continuare ad usare le FWH. Per farne a meno devi orientarti verso un'altra libreria GUI come la MiniGUI.
[quote:17ww0ds1]Dove posso reperire Xharbour (free) completo con i test/batch o e' meglio prelevarlo dal CVS ? (non so niente del CSV!!)[/quote:17ww0ds1]
Conviene che usi quella fornita con le FWH in tuo possesso oppure l'ultima release ufficiale che trovi su <!-- w --><a class="postlink" href="http://www.xharbour.org">www.xharbour.org</a><!-- w -->. I batch di compilazione dovresti trovarli nella directory di installazione delle FWH. Oppure usi quelli che ho riportato io.
EMG |
dove reperire Sample batch x Xharbour | Grazie Mille |
dove reperire Sample batch x Xharbour | Scusate mancava la risposta al setb55! <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Questo è il batch:
[code:3latczcr]
IF EXIST \DJGPP\DJGPP.ENV
SET DJGPP=\DJGPP\DJGPP.ENV
IF NOT EXIST \DJGPP\DJGPP.ENV SET Bison_Simple=\DJGPP\share\bison\bison.simple
SET HB_ARCHITECTURE=w32
SET HB_COMPILER=bcc32
SET C_USR=
SET L_USR=
REM SET ECHO=cmd /c echo
REM SET DEL=cmd /c del
SET PATH=\BCC55\BIN;\DJGPP\BIN;%PATH%
[/code:3latczcr] |
downgrade Windows 8 Pro to 7 or Vista | Good news,
best regards,
Otto
[quote:14c32hzh]Computerworld - Microsoft will allow users of Windows 8 Pro to downgrade their new PCs to Windows 7 or even Vista, according to the operating system's licensing agreement.[/quote:14c32hzh]
[url:14c32hzh]http://www.computerworld.com/s/article/9230815/Microsoft_will_allow_downgrades_from_Windows_8_to_Windows_7_Vista[/url:14c32hzh] |
downgrade Windows 8 Pro to 7 or Vista | Why are they good news ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Are they scared about a possible disaster ? |
downgrade Windows 8 Pro to 7 or Vista | Possible ? Sure ... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Maybe they are delaying the release, to test all the way to restart the computer <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
downgrade Windows 8 Pro to 7 or Vista | Antonio,
Why you consider Windows 8 a dissater?.
Many people claimed about the Ribbon in Office, and it is consolidated without a discussion.
Or in the past, when Windows 95 was launched, many voices claimed about that, suggesting to say in DOS and saying that DOS applications were much faster.... |
downgrade Windows 8 Pro to 7 or Vista | I said maybe, as many others have commented too (John Dvorak, Valve, etc.) mainly because it is a very disruptive change.
More over, Windows 8 it is not Windows. It is a different operating system. In fact Microsoft could have named it in a different way, as it is not Windows. Not the Windows that we known and have used for so many years.
And Microsoft is aware of this. In fact Steve Ballmer said that it was the most risky desition that Microsoft has taken in many years...
I am not against Windows 8. I think it is a new OS and not what we call Windows. |
downgrade Windows 8 Pro to 7 or Vista | I did install Windows 8 but I had to uninstall it.
In my opinion Windows 8, as said Antonio Linares, is not Windows, it is a different OS that is not intuitive and is not helping us as Windows 8 is not keeping the previous Windows legacy.
George |
downgrade Windows 8 Pro to 7 or Vista | Wow ! I now have Windows 8 RTM installed on my desktop, notebook, laptop ... and soon a slate tablet. I am TOTALLY satisfied with it. Yes, the Win 8 ( formerly Metro ) apps have a lot of work to do, but they are stable with what they do, and time will bring refinement. The OS is fast, and VERY EASY to use. I have dual monitors, and essentially have the desktop running all day on both monitors. My apps run great in WIn 8, the speed is the best ever, the new themes are sharp and clean, and I don't need external security software.
Having worked every version of OS Microsoft has put out there ( even IBM DOS ), this is the best OS I have ever encountered.
I realize people don't like new things, but then they want features and innovation. Sometimes you have to branch out in a new direction to get there. Unlike other deviations ( ME, Vista ), this transition was effortless and had absolutely no errors. People will initially be a little confused by the new stuff, but that won't last long.
If you "put it on and took it off" then try it again ... but be sure you are using RTM. Earlier versions were clearly beta test releases that were receiving heavy modifications based on user input.
One sidelight. Often people post in this forum in Spanish, and I had to go find a utility to translate it. Now, I just highlight it, right click the mouse, and select Translate with Bing. Wow ... now I can understand every post here, and that gives me more resources to explore ( the Spanish forums ).
Seriously, technology really advances with this Windows 8. I don't know why Antonio says its not Windows because Desktop mode is a faster version of what I used in Win 7.
Tim |
downgrade Windows 8 Pro to 7 or Vista | To All
I do not see much change in Microsoft's license policy .. when I worked for the State ( under the microsoft advantage plan ) .. if you had a license for any MS OS .. you were allowed to install any OS of lesser vintage... meaning if we ordered new machines with Windows 7 we could re-format the OS and put XP on them with our Corporate Key.
Rick Lipkin |
downgrade Windows 8 Pro to 7 or Vista | Tim,
Windows 8 Desktop is not Windows 8, it is just the legacy support part for previous Windows 7, etc.
Windows 8 is the new main menu, the absence of title bars, corner buttons, popup dialogs, full screen apps, etc. Are you using any app with the new interface ? If so, they are totally different from previous Windows versions apps. In fact, they are NOT compatible at all. As I said, it is a new OS <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
downgrade Windows 8 Pro to 7 or Vista | Antonio,
This is where we disagree. Windows Office 2013 has also been modified, but it runs on the Desktop in Windows 8. Microsoft has clearly acknowledged that there will be both Form based software ( what we create now ), and the RT style apps. Both will extend far into the future. All Windows primary applications run on the Desktop. In fact, if you use a dual monitor, the desktop is always on the second monitor, and the primary can be either the start page or a desktop.
I don't know if you have seen Server 2012, but I did install it and worked with it a bit. It is essentially a Windows 8 Desktop interface.
I'm using Microsoft Lightswitch, their newest development technology, to build new Windows apps. These are Windows 8 apps and will run in the cloud, or on the Desktop. Clearly Microsoft is not moving away from desktop apps. The tiles interface Windows 8 RT apps ) will gain popularity, but Microsoft does not see this happening quickly. They have projected a 3 year window for this to rise in prominence. They do encourage people, however, to do the upgrade, and they have made the price very inexpensive, because overall Windows 8 is a great new direction.
Tim |
downgrade Windows 8 Pro to 7 or Vista | Dear Tim,
I don't see a new direction. I see a fork (a bifurcation). If "Metro" succeeds, in a matter of x years, the Windows desktop will be at its end, and only the Metro way will continue. This try is very risky for Microsoft. They know it.
If you take a Windows desktop app, it does _not_ work on Windows 8 "Modern" interface. More over, you have to learn a complete new way to develop applications for this new "modern" interface (Metro name has been deprecated due to license issues).
Your desktop app will never run on an Microsoft ARM tablet. It will never run on a Windows Phone. It will never run on a Xbox.
Microsoft had to react to Apple iPhone/iPad and Google Android. Tablets are here to stay. The iPhone is extremely popular. The question that many analysts do is: was really needed this rupture ? Couldn't the new "Modern" interface run on top of the desktop ? Was it really needed to stop backwards compatibility ? i.e.: see the Microsoft Media center: it runs on top of Windows.
Remember what happened to Visual Objects when it tried a rupture with Clipper. See what we keep using... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
downgrade Windows 8 Pro to 7 or Vista | Win 8 desktop clearly modifies the theme of my apps. They have the more modern look ( what Microsoft has titled Cosmopolitan ). It also offers cleaner screens,supports touch screen, and much more.
RT is the one side of the development platform that is on Across all platforms. Yes, some tablets will only run RT apps ( ARM ). Others will run both. To be supportive across all platforms there does need to be a common system.
I think it was a wise move. CA was never "all in" on the Clipper language. Microsoft has bet everything on this new system and having spent a lot of time in their training sessions, I see the beauty of it. |
downgrade Windows 8 Pro to 7 or Vista | Dear Tim,
Besides our endless arguments, the facts will be seen in several years from now.
So lets wait and we all will see what happens... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
downgrade Windows 8 Pro to 7 or Vista | I agree. And as most of us belong to what is today called “best ager”, “50plus”, “over 50”, “silver hair“ standard windows is sufficient for the rest of our business lifetime.
Best regards,
Otto |
downgrade Windows 8 Pro to 7 or Vista | Otto:
I'm not silver haired. I'm a silver fox. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
What about our dark haired users? |
downgrade Windows 8 Pro to 7 or Vista | No hair here! <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D --> |
downgrade Windows 8 Pro to 7 or Vista | Here too.
I'm thinking if we lost them due to our age or to our work... |
downgrade Windows 8 Pro to 7 or Vista | I'm using Windows 8 RTM on my main computer and on my work notebook makes 3 weeks, 2 first days was a chaos ...
but now I see how much is easier, faster, even older programs such as photoshop 7 worked perfectly, compiling my programs with fwh works perfectly. my appl make with FWH+harbour looks better and modern in Windows 8 and run fast.
it synchronizes my favorites, documents on 2 computers, have hyper-v included, IE 10 is fast.
to me, would not return to Windows 7, the 8 proved to be faster, stable, everything I did in my Windows 7, do in 8 better.
with respect touch screens, have certain keyboard shortcuts that dispenses the touch, and has new mice designed for Windows 8 that supplies everything without a touch monitor.
about "WINDOWS 8 RT" ? i agree, RT is not Windows, RT is something new, but RT only pre instaled in Tablets for OEM. we cant install RT in own computer or notebook.
best regards |
downgrade Windows 8 Pro to 7 or Vista | Antonio,
These are discussions because we keep them friendly and positive ( even with different views ). Arguments are when people are mad and aggressive. I like this forum because we discuss issues with different viewpoints and keep it friendly.
You are correct that we will see in a few years. Of course time will tell, but sadly the success of a product is often dictated by who sells what rather than what is the best quality. My cell phone provider pushes Droids because that's where they make the most profit. Their sales people have no clue what you can do with a Windows 7 or 8 phone. They have never been trained. On the few times I actually showed them, they replied "I had no idea ..."
Now, for those who consider the senior generation to be those in their 50's, than what about us well into our 60's ? I laugh when I hear that programmers are of little value past age 35 ! ( which was stated in a recently published study of people employing IT staff ).
Tim |
downgrade Windows 8 Pro to 7 or Vista | Dear Tim,
It was mistake on my english, of course I meant discussions and not arguments. Sorry <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Those who sale phones, computers, etc. are also a very important factor in the success of a product. If Android based devices are cheaper than others, thats makes an extra added value for Android, etc. |
downgrade Windows 8 Pro to 7 or Vista | Tim, I am very impressed with you, at your age (at least what you say), and his enthusiasm for technology, open to innovations, without prejudices, continue this way... and my congrats and respect to you and stay shine.
on the other hand, I see people like dvorak, a dinosaur technology, which should not have used Windows 8 for more than 5 days, so afraid of having to learn new, or programmers with fear of having to adapt to Windows RT.
well, we really need to be worried, because we cannot have an IDE, a complete DBU, a design resource, a way of programming for web, imagine if Windows RT is a success? We would have to adapt everything and neither managed to do the items up.
Note: this is not a criticism to Antonio or fivetech, but to the xbase community in General, including me.
Android? If apple make the instances of processes, already paid for Microsoft by copyright per phone, will have to pay for apple too, cheap phone/tablets will become more expensive, and people will wonder: in the same price level, will prefer an apple or a Microsoft device. |
downgrade Windows 8 Pro to 7 or Vista | I am trying to install current Visual Studio 2012 on Windows 8 (not RTM) and I get this error:
If I try to install the .NET RTM, then I get the error that it is already installed.
Any hints ?
[img:2j0t2i0q]http://img593.imageshack.us/img593/3858/capturerj.png[/img:2j0t2i0q]
[img:2j0t2i0q]http://img443.imageshack.us/img443/4076/captureban.png[/img:2j0t2i0q] |
downgrade Windows 8 Pro to 7 or Vista | Hello Antonio,
[quote:1nvo1zeg]Visual Studio 2012 RTM is not supported on pre-release versions of Windows 8 or Windows Server 2012.[/quote:1nvo1zeg]
<!-- m --><a class="postlink" href="http://blogs.msdn.com/b/heaths/archive/2012/08/23/visual-studio-2012-rtm-will-not-install-on-pre-release-versions-of-windows-8.aspx">http://blogs.msdn.com/b/heaths/archive/ ... ows-8.aspx</a><!-- m -->
Best regards,
Otto |
downgrade Windows 8 Pro to 7 or Vista | Otto,
Thanks, thats what I thought. I will try to apply this:
[url:oy6p4m8f]http://forums.fivetechsupport.com/viewtopic.php?f=19&t=24720[/url:oy6p4m8f]
so I can upgrade from the one that I am using |
downgrade Windows 8 Pro to 7 or Vista | I have installed RTM on all my computers, and the final release of the full Visual Studio. Some of the features in VS2012 are for Win 8 RT development. I suppose it required the final release of .NET 4.5, which only ships with RTM, to run.
Tim |
downgrade Windows 8 Pro to 7 or Vista | Hi.
I too would like to start testing my apps against win8 and learn more about it, but I don't want to have to purchase windows 8 just for testing. How is everyone else getting it? Please help.
Thank you,
Reinaldo. |
downgrade Windows 8 Pro to 7 or Vista | I have a few Microsoft memberships on which it is available, ie. a Microsoft Partnership Action Pack subscription, and also a Website Spark membership. Also if you have a MSDN, or Tech Net subscription, it is available. There are also other licenses available, ie. Office, Server 2012, SQL Server 2012, Expression Suite, Visual Studio 2012, etc.
Essentially, any of the developer programs provide access to download RTM versions. The number of licenses depends on the programs. In my case I have it installed on a Desktop box, All In One, large Notebook, smaller laptop, and soon a slate. This allows me to test on multiple devices and configurations that are likely to appear on location at my customers' businesses.
Microsoft has also extensively upgraded support services under these programs. I usually have answers very quickly when questions arise. Further, they have been very responsive to input from developers, and that is why there were so many changes across the past year on all of these products. In addition, team leaders have been out in the developer community extensively, teaching what is, and listening to what should be.
Finally, there are a lot of blogs, training videos, seminars, and demo materials available to developers.
Therefore, these programs have been a worthwhile investment.
Tim |
downgrade Windows 8 Pro to 7 or Vista | Reinaldo, Windows 8 have an trial version (90 days) free and RTM (not beta).
<!-- m --><a class="postlink" href="http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_install/windows-8-enterprise-rtm-trial-available/ef7ee848-35c9-48c0-8c81-a070ce0dafef">http://answers.microsoft.com/en-us/wind ... 70ce0dafef</a><!-- m -->
<!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
downgrade Windows 8 Pro to 7 or Vista | I was hoping for a better solution. That trial version will auto-erase after 90 days and you would lose everything. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> |
downgrade Windows 8 Pro to 7 or Vista | That is true but if you don't want to pay anything, that is the only option at this time.
On October 26th you will be able to purchase updates for $ 40 each. |
downgrade Windows 8 Pro to 7 or Vista | Ok, I'll wait then. I would think they have some sort of special deal for developers... guess not. |
download a file | How I can download a file txt from a site ?
is there a small sample please ? |
download a file | Look,
<!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/21683-busca-ibge/?hl=busca">http://fivewin.com.br/index.php?/topic/ ... /?hl=busca</a><!-- m -->
<!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/21677-busca-de-cep/?hl=busca">http://fivewin.com.br/index.php?/topic/ ... /?hl=busca</a><!-- m -->
Regards, |
download a file | I use this code :[code=fw:2u7n1481]<div class="fw" id="{CB}" style="font-family: monospace;">MsgRun<span style="color: #000000;">(</span><span style="color: #ff0000;">"Downloading ..."</span>,<span style="color: #ff0000;">"A moment please ..."</span>,<span style="color: #000000;">{</span>||IF<span style="color: #000000;">(</span>URLDownloadToFile<span style="color: #000000;">(</span><span style="color: #000000;">0</span>,<span style="color: #ff0000;">"http://www.maconsult.be/download/report.txt.txt"</span>,<span style="color: #ff0000;">"C:<span style="color: #000000;">\r</span>eport.txt"</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #000000;">)</span> == <span style="color: #000000;">0</span>,UpdDown:=.T.,UpdDown:=.F.<span style="color: #000000;">)</span><span style="color: #000000;">}</span><span style="color: #000000;">)</span></div>[/code:2u7n1481]
It works very well.
Good luck. |
download a file | Error: Unresolved external '_HB_FUN_URLDOWNLOADTOFILE' referenced from ... |
download a file | You have to add this to your prg.
[code=fw:1olhbuwy]<div class="fw" id="{CB}" style="font-family: monospace;">DLL <span style="color: #00C800;">Function</span> URLDownloadToFile<span style="color: #000000;">(</span>pCaller AS LONG, szURL AS STRING, szFileName AS STRING, dwReserved AS LONG, lpfnCB AS LONG<span style="color: #000000;">)</span> AS LONG PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"URLDownloadToFileA"</span> LIB hLib</div>[/code:1olhbuwy] |
download a file | Error description: Error BASE/1003 Variable does not exist: HLIB |
download a file | You have to load lib before calling URLDownloadToFile
[code=fw:56gzkpf6]<div class="fw" id="{CB}" style="font-family: monospace;">hLib = LOADLIBRARY<span style="color: #000000;">(</span> <span style="color: #ff0000;">"urlmon.dll"</span><span style="color: #000000;">)</span></div>[/code:56gzkpf6] |
download a file | but not run also I cannot download a txt file |
download a file from a https server | Hello,
Has anyone donwloaded a file from an https, not http, such as <!-- m --><a class="postlink" href="https://www.myserver.com/da.txt?">https://www.myserver.com/da.txt?</a><!-- m -->.
Thanks. |
download a file from a https server | Yes, and it works very nicely. I'm consuming https webservices using TIpClientHttp that inherits from tIpClient class from xharbour. You will need to download libeay32.dll, ssleay32.dll from OpenSSL. Then create the .lib from .dll and link to your app. You will also need to distribute these two dlls with your apps. I got all the information from the xharbour ng.
Reinaldo. |
download a file from a https server | can I see a test sample please ? |
download a file from a https server | Sure, here is sample code:
The snippet below creates an object of the class InmediataWs to send a message to a web service and receive a response from it. SendRealTimeMessage() does the sending. Right after sending, it waits for a response that gets saved into property cResponse of the class.
[code=fw:15xejqeu]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br /> oImWs := InmediataWs<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">InitRealTime</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">IF</span> oImWs == <span style="color: #00C800;">NIL</span> ;RETURN <span style="color: #00C800;">NIL</span> ;ENDIF<br /> <br /> oImWs:<span style="color: #000000;">isSilent</span> := isSilent <br /> oImWs:<span style="color: #000000;">cMessage</span> := MemoRead<span style="color: #000000;">(</span> cFileName <span style="color: #000000;">)</span><br /> oImWs:<span style="color: #000000;">SendRealTimeMessage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> cRet := oImWs:<span style="color: #000000;">cResponse</span><br /> oImWs:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:15xejqeu]
The class itself may send/receive files or send/receive realtime messages. In the code below I show the methods of interest to you (only sending and receiving messages on realtime):
[code=fw:15xejqeu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">CLASS</span> InmediataWs<br /><br /> <span style="color: #00C800;">DATA</span> aFiles AS ARRAY <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">DATA</span> aRoutedFiles AS ARRAY <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">DATA</span> aResponse AS ARRAY <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">DATA</span> aRespPages AS ARRAY <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">DATA</span> cUserName, cPassword<br /> <span style="color: #00C800;">DATA</span> cMessage, cResponse<br /><br /> <span style="color: #00C800;">DATA</span> lShowProgress <span style="color: #0000ff;">INIT</span> .F. <br /> <span style="color: #00C800;">DATA</span> lShowConnected <span style="color: #0000ff;">INIT</span> .F.<br /> <span style="color: #00C800;">DATA</span> isSilent <span style="color: #0000ff;">INIT</span> .F.<br /> <br /> <span style="color: #00C800;">DATA</span> oHttp, oXml, oMeter<br /><br /> <span style="color: #00C800;">METHOD</span> InitRealTime<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> InitFileTransfer<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> <br /> <span style="color: #00C800;">METHOD</span> SendFiles<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> GetResponse<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> GetRoutedFiles<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">METHOD</span> SendRealTimeMessage<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> GetRealTimeMessage<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br />END <span style="color: #00C800;">CLASS</span><br /><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> InitRealTime<span style="color: #000000;">(</span> oMeter <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> InmediataWs<br /> <span style="color: #00C800;">LOCAL</span> isLogHttpProgress := GetValFromRepository<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X12WebService"</span>, <span style="color: #ff0000;">"LogProgress"</span>, <span style="color: #ff0000;">"NO"</span> <span style="color: #000000;">)</span> $ <span style="color: #ff0000;">"YES,.T., TRUE,Y"</span><br /> <span style="color: #00C800;">LOCAL</span> nTimeOut := VAL<span style="color: #000000;">(</span> GetValFromRepository<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X12WebService"</span>, <span style="color: #ff0000;">"TimeOut"</span>, <span style="color: #ff0000;">"30000"</span>, <span style="color: #ff0000;">"Timeout in milliseconds"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cUserName:= GetValFromRepository<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X12WebService"</span>, <span style="color: #ff0000;">"UserName"</span>, <span style="color: #ff0000;">"UserName"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cPassword:= GetValFromRepository<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X12WebService"</span>, <span style="color: #ff0000;">"Password"</span>, <span style="color: #ff0000;">"Pass"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> cUrl := GetValFromRepository<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X12WebService"</span>, <span style="color: #ff0000;">"RealTime_Eligibility_Url"</span>, ;<br /> <span style="color: #ff0000;">'https://www.inmediata.com/webservices/editransfer/edirealtime.asmx'</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">TRY</span><br /> ::<span style="color: #000000;">oHttp</span> := tIPClientHTTP<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">(</span> cUrl, isLogHttpProgress <span style="color: #000000;">)</span><br /> CATCH<br /> MsgStop<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Missing SSL libs or no access to https was found."</span>, <span style="color: #ff0000;">"Check Installation"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /> END<br /> <br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span> == <span style="color: #00C800;">NIL</span> ;RETURN <span style="color: #00C800;">NIL</span> ;ENDIF<br /><br /> ::<span style="color: #000000;">ohttp</span>:<span style="color: #000000;">cConnetion</span>:=<span style="color: #ff0000;">'Keep-Alive'</span> <span style="color: #B900B9;">// set to keep alive</span><br /> ::<span style="color: #000000;">ohttp</span>:<span style="color: #000000;">bChunked</span> := .T. <br /> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">nConnTimeOut</span> := nTimeOut<br /> ::<span style="color: #000000;">cUserName</span> := cUserName<br /> ::<span style="color: #000000;">cPassword</span> := cPassword<br /><br /> ::<span style="color: #000000;">oMeter</span> := oMeter <br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oMeter</span> != <span style="color: #00C800;">NIL</span> <br /> ::<span style="color: #000000;">oMeter</span>:<span style="color: #000000;">nTotal</span> := <span style="color: #000000;">100</span> <br /> ::<span style="color: #000000;">oMeter</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oHTTP</span>:<span style="color: #000000;">exGauge</span> := <span style="color: #000000;">{</span> | nAt, nTotal, oSelf| ::<span style="color: #000000;">oMeter</span>:<span style="color: #000000;">Set</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nAt, <span style="color: #000000;">0.00001</span> <span style="color: #000000;">)</span> / <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nTotal, <span style="color: #000000;">0.00001</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> * <span style="color: #000000;">100</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">hFields</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">'Content-Type'</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">'application/soap+xml; charset=utf-8'</span><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">SELF</span> <br /><br /> <span style="color: #00C800;">ENDIF</span> <br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> InmediataWs<br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oMeter</span> != <span style="color: #00C800;">NIL</span> ; ::<span style="color: #000000;">oMeter</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ; <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span> != <span style="color: #00C800;">NIL</span> <br /> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">oHttp</span> := <span style="color: #00C800;">NIL</span> <br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> ::<span style="color: #000000;">oXml</span> := <span style="color: #00C800;">NIL</span> <br /><br /> hb_gcAll<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> SendRealTimeMessage<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> InmediataWs<br /> <span style="color: #00C800;">LOCAL</span> cPost <br /> <br /> cPost := ;<br /> <span style="color: #ff0000;">'<?xml version="1.0" encoding="utf-8"?>'</span>+;<br /> <span style="color: #ff0000;">'<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">'</span>+;<br /> <span style="color: #ff0000;">' <soap12:Header>'</span>+;<br /> <span style="color: #ff0000;">' <AuthenticationHeader xmlns="https://www.inmediata.com/ws/EdiRealTime/">'</span>+;<br /> <span style="color: #ff0000;">' <Username>'</span> + ::<span style="color: #000000;">cUserName</span> + <span style="color: #ff0000;">'</Username>'</span>+;<br /> <span style="color: #ff0000;">' <Password>'</span> + ::<span style="color: #000000;">cPassword</span> + <span style="color: #ff0000;">'</Password>'</span>+;<br /> <span style="color: #ff0000;">' </AuthenticationHeader>'</span>+;<br /> <span style="color: #ff0000;">' </soap12:Header>'</span>+;<br /> <span style="color: #ff0000;">' <soap12:Body>'</span>+;<br /> <span style="color: #ff0000;">' <SendRealTime xmlns="https://www.inmediata.com/ws/EdiRealTime/">'</span>+;<br /> <span style="color: #ff0000;">' <X12Data>'</span> + ::<span style="color: #000000;">cMessage</span> + <span style="color: #ff0000;">'</X12Data>'</span>+;<br /> <span style="color: #ff0000;">' </SendRealTime>'</span>+;<br /> <span style="color: #ff0000;">' </soap12:Body>'</span>+;<br /> <span style="color: #ff0000;">'</soap12:Envelope>'</span><br /><br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Post</span><span style="color: #000000;">(</span> cPost <span style="color: #000000;">)</span> ;::<span style="color: #000000;">GetRealTimeMessage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;ENDIF <br /><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> <br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------</span><br /><span style="color: #00C800;">METHOD</span> GetRealTimeMessage<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> InmediataWs<br /> <span style="color: #00C800;">LOCAL</span> oXmlDoc := TXmlDocument<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #B900B9;">// HBXML_STYLE_NOESCAPE )</span><br /> <span style="color: #00C800;">LOCAL</span> cResponse<br /> <span style="color: #00C800;">LOCAL</span> oXmlNode, cRet<br /><br /><br /> <span style="color: #B900B9;">//::oHttp:bChunked := .T. </span><br /> <span style="color: #B900B9;">//::oHttp:nLength := 32000</span><br /> cResponse := ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ReadAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//logfile( "trace.log", { cResponse, ::oHttp:bChunked, ::oHttp:nConnTimeout, ::oHttp:cConnetion } ) </span><br /><br /><br /> oXmlDoc:<span style="color: #000000;">Read</span><span style="color: #000000;">(</span> cResponse <span style="color: #000000;">)</span><br /><br /> oXmlNode := oXmlDoc:<span style="color: #000000;">FindFirst</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"RealTimeResponse"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> oXmlNode != <span style="color: #00C800;">NIL</span> ;cRet := oXmlNode:<span style="color: #000000;">cData</span> ;ENDIF <br /><br /> oXmlNode := <span style="color: #00C800;">NIL</span> <br /> oXmlDoc := <span style="color: #00C800;">NIL</span> <br /><br /> ::<span style="color: #000000;">cResponse</span> := cRet<br /><br /><span style="color: #00C800;">RETURN</span> cRet<br /><br /> </div>[/code:15xejqeu]
Hope that helps,
Reinaldo. |
download a file from a https server | Hi Reinaldo,
please, could you publish a sample downloading a file from https server ? I need to download files from googledrive.
Thanks in advance !
Best regards, |
download a file from a https server | [quote:2l5bochz]Hi Reinaldo,
please, could you publish a sample downloading a file from https server ? I need to download files from googledrive.
Thanks in advance ![/quote:2l5bochz]
Maybe with a included [color=#0000FF:2l5bochz][b:2l5bochz]login[/b:2l5bochz][/color:2l5bochz] to download from my [color=#0000FF:2l5bochz]homepage [/color:2l5bochz]?
[color=#FF0000:2l5bochz]With all tested solutions I got problems !!![/color:2l5bochz]
regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
download a file from a https server | Reinaldo,
thank You very much for the infos
with the solution from < Stephan Haupt >
I can connect to my homepage
but a given ZIp-file to download returns NIL from the server ( NOT found )
the rest is working fine.
Maybe I can detect inside the class where the problem comes from.
The connection works !
[color=#0000FF:35pvyld7]METHOD New (cIP, cUser, cPW, cFTPFolder, cZIPFile, cLocalDir, nFlags) CLASS TUpdate
DEFAULT cIP := "localhost",;
cUser := "anonymous",;
cPW := "anonymous@localhost",;
cFtpFolder := "/",;
cZipFile := "",;
cLocalDir := cFilePath( GetModuleFileName( GetInstance() ) ) + "Updates\" ,;
nFlags := 0[/color:35pvyld7]
regards
Uwe <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> |
download a file from a https server | Hello Uwe;
I think you are asking if I can write sample code to download a file from your webpage. If that is the case, please send username and password to gain access to the service. Also, is this a SOAP 1.1 or 1.2 web service? If it is a Web Service then you should have a .WSDL or service description for the service. Please notice my class consumes Web Services. A web service makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response. Login information is sent in XML following your .WSDL specifications. Likewise a file request is sent using XML formatted according to WSDL for the request, and so on.
If your server does not provide web services then it is a totally different solution. I'm pretty sure I've seen plenty of other successful (may I dare say also "trivial") samples on this forum to send and capture http output.
If the problem is only connecting to https pages versus http, then it is probably related to the lack of linking SSL libs to you app. I'm using ssleay32.lib + libeay32.lib open source libraries on my link script. Please also notice I'm using xharbour tIpClientHttp() class.
Does this help?
Best regards,
Reinaldo. |
download file from url | Hi. all !
Is it possible to download a file from a URL (not via FTP) |
download file from url | Here it is:
[code=fw:mh0kjgpd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> GETURLTOFILE<span style="color: #000000;">(</span> cUrl, cFile, cUsr, cPsw <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br /> <span style="color: #00C800;">LOCAL</span> oHtp, oStr<br /><br /> <span style="color: #00C800;">DEFAULT</span> cFile := FILENAME<span style="color: #000000;">(</span> STRTRAN<span style="color: #000000;">(</span> cUrl, <span style="color: #ff0000;">"/"</span>, <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> ) )<br /><br /> TRY<br /> oHtp = CREATEOBJECT( "</span>MSXML2.XMLHTTP<span style="color: #ff0000;">" )<br /><br /> oHtp:Open( "</span>POST<span style="color: #ff0000;">", cUrl, .F., cUsr, cPsw )<br /><br /> oHtp:Send()<br /><br /> IF oHtp:Status != 200 THEN BREAK<br /><br /> oStr = CREATEOBJECT( "</span>ADODB.Stream<span style="color: #ff0000;">" )<br /><br /> oStr:Open()<br /><br /> oStr:Type = 1<br /><br /> oStr:Write( oHtp:ResponseBody )<br /><br /> oStr:SaveToFile( cFile, 2 )<br /><br /> oStr:Close()<br /><br /> lOk = .T.<br /> CATCH<br /> END<br /><br /> RETURN lOk</span></div>[/code:mh0kjgpd]
EMG |
download file from url | Hi Natter,
please, review [url]viewtopic.php?f=6&t=32803&p=193189&hilit=URLDownloadToFile#p193189[/url]
Best regards, |
download file from url | Enrico, Baxajaun thanks !
Used the function UrlDownLoadToFile. Everything works fine |
download files with IE | Hello,
With IE 9, when I download a .exe made with Harbour, I get this error:
[img:1z6klhp8]http://ieblog.members.winisp.net/images/ryancol_Unknown-notificationbar.PNG[/img:1z6klhp8]
It has to do with the new Smart screen feature. Does anybody know how to solve it?.
I have tried to sign the exe with a Code Signing certificate, but the problem persists.
Thank you. |
download harbour completo | Sr. Antonio,
onde baixar HARBOUR 3.2 com todas as CONTRIBS? |
download harbour completo | SVN tool (Subversion for Windows) can be downloaded from: <!-- m --><a class="postlink" href="http://sourceforge.net/projects/win32svn">http://sourceforge.net/projects/win32svn</a><!-- m -->. You can use also Tortoise SVN.
<!-- m --><a class="postlink" href="http://github.com/harbour/core.git">http://github.com/harbour/core.git</a><!-- m -->
Regards,
Mauricio |
download harbour completo | SGS,
Aqui <!-- m --><a class="postlink" href="http://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/">http://sourceforge.net/projects/harbour ... s/nightly/</a><!-- m --> puedes bajar los binarios, es decir, los exes y libs. Se actualiza diariamente. No incluye el codigo fuente.
Saludos |
download harbour completo | Muito obrigado Mauricio e hmpaquito. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
download iPhone Photo connect to PC | hi,
when connect iPhone to PC it does not get a Drive-Letter.
you will "see" in Explorer a Icon so you can go to Folder
does some CODE already exist in Fivewin <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
---
this CODE i use under HMG
[code=fw:811tr0t7]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE SearchDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cName, oItems<br /><span style="color: #00C800;">LOCAL</span> i, iMax<br /><span style="color: #00C800;">LOCAL</span> xParent<br /><br /> nLevel := <span style="color: #000000;">1</span><br /> xParent := nLevel<br /><br /> oShell := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"shell.application"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oShell<br /> oFolder := oShell:<span style="color: #000000;">NameSpace</span><span style="color: #000000;">(</span> CSIDL_DRIVES <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 0x0011 // My Computer</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oFolder<br /> oItems := oFolder:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := oItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> oFolderItem := oItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> i - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> cName := UPPER<span style="color: #000000;">(</span> oFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> cName = <span style="color: #ff0000;">"DESKTOP"</span><br /> LOOP<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = cName .AND. e<span style="color: #000000;">[</span> ID_Level <span style="color: #000000;">]</span> = nLevel <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ELSE</span><br /> nElement ++<br /> IPHONE.Tree_1.AddItem<span style="color: #000000;">(</span> cName, nLevel, nElement <span style="color: #000000;">)</span> <span style="color: #B900B9;">// nLevel := 1</span><br /> IPHONE.Tree_1.CARGO<span style="color: #000000;">(</span> nElement <span style="color: #000000;">)</span> := <span style="color: #000000;">{</span> cName, nLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// next Level Action</span><br /> IPHONE.Tree_1.NodeFlag<span style="color: #000000;">(</span> nElement <span style="color: #000000;">)</span> := .T.<br /> <span style="color: #B900B9;">// IPHONE.Tree_1.ImageIndex ( nElement ) := { IMAGE_FOLDER_UNCHECKED, IMAGE_FOLDER_UNCHECKED }</span><br /> IPHONE.Tree_1.ImageIndex<span style="color: #000000;">(</span> nElement <span style="color: #000000;">)</span> := IsRealDrive<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> oFolderItem, cName, nLevel + <span style="color: #000000;">1</span>, xParent, nElement <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aDevices, oFolderItem <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> .NOT. oFolderItem:<span style="color: #000000;">isFileSystem</span><br /> AADD<span style="color: #000000;">(</span> aFileSys, i <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">DO</span> EVENTS<br /><br /><span style="color: #00C800;">RETURN</span></div>[/code:811tr0t7]
[img:811tr0t7]https://i.postimg.cc/3NKzcS46/IPHONE-DEVICE.png[/img:811tr0t7]
i need to build a TREE using Fivewin
how to start using Fivewin, need Idea <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> |
download iPhone Photo connect to PC | Dear Jimmy,
You can use the same code with almost no changes
Please review FWH\samples\testtree.prg
Also look for TTreeView in FWH\samples\*.prg there are many examples of its use |
download iPhone Photo connect to PC | hi Antonio,
[quote="Antonio Linares":1i0v79x4]You can use the same code with almost no changes
Please review FWH\samples\testtree.prg
Also look for TTreeView in FWH\samples\*.prg there are many examples of its use[/quote:1i0v79x4]
OK, thx
btw. when press 4th Button it crash
[quote:1i0v79x4]Application
===========
Path and name: C:\fwh\samples\testtree.exe (32 bits)
Size: 4,807,680 bytes
Compiler version: Harbour 3.2.0dev (r1801051438)
FiveWin version: FWH 22.03
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 26 secs
Error occurred at: 11/25/22, 10:38:57
Error description: Error BASE/1004 Message not found: TTREEVIEW:COLAPSEALL
Args:
[ 1] = O TTREEVIEW[/quote:1i0v79x4] |
download iPhone Photo connect to PC | Dear Jimmy,
many thanks for pointing it out
It is a typo in the code, it should use CollapseAll instead of ColapseAll
We have fixed it already |
download iPhone Photo connect to PC | Dear Jimmy,
FWH\samples\pim.prg is much more complete example to explore the capabilities of the trees <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Right click on the tree to see the options |
download iPhone Photo connect to PC | Dear Antonio,
it this program only working with harbour?
Best regards,
Otto
[code=fw:h5gawk1v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />C:\FWH\samples\pim.prg<span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span> Error F0029 Can<span style="color: #ff0000;">'t open #include file: '</span>c:\harbour\contrib\xhb\hbxml.ch<span style="color: #ff0000;">'</span></div>[/code:h5gawk1v] |
download iPhone Photo connect to PC | hi Antonio,
i have found simple Sample \fwh\samples\elixir.prg which work as i need for CSIDL_DRIVES
now in Sample it use "recursiv" ReadFiles( cPath, oTreeView ) and got "Node-Flag" when have Sub-Folder
but when use CSIDL_DRIVES i do not want to "scan" all Drive and Sub-Folder ...
i want to DblClick on "Node" and than "build" Sub-Folder
---
i have begin to re-write HMG CODE for Fivewin and reach "Level 3" which mean ROOT -> FOLDER -> NEXT
[img:ax0sd1rz]https://i.postimg.cc/zDS8Y2WN/Tree-Root-small.png[/img:ax0sd1rz]
but i have to re-write also Concept of HMG to OOP of Fivewin
[code=fw:ax0sd1rz]<div class="fw" id="{CB}" style="font-family: monospace;">#IFDEF __HMG__<br /> IPHONE.Tree_1.DeleteAllItems<br /> IPHONE.Tree_1.AddItem<span style="color: #000000;">(</span> <span style="color: #ff0000;">"This PC"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> IPHONE.Tree_1.CARGO<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ROOT"</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">}</span><br />#ELSE<br /> Tree_1:<span style="color: #000000;">DeleteAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTreeItem := Tree_1:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"This PC"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ROOT"</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">}</span><br />#ENDIF</div>[/code:ax0sd1rz]
so it is a big Difference and a lot of CODE to "translate" for Fivewin
---
still not sure about Concept of Fivewin
in Sample elixir.prg "Cargo" use only String while HMG use Array with {String,nLevel}
these HMG Function are based on nLevel which seem missing under Fivewin
[code=fw:ax0sd1rz]<div class="fw" id="{CB}" style="font-family: monospace;">HMG Tree_1.ParentValue<span style="color: #000000;">(</span> nValue <span style="color: #000000;">)</span> --> nValue | <span style="color: #00C800;">NIL</span> <br />HMG Tree_1.GetPathValue<span style="color: #000000;">(</span> nValue <span style="color: #000000;">)</span> --> anPathValue | <span style="color: #00C800;">NIL</span> </div>[/code:ax0sd1rz]
so how is the OOP Way to find "Parent" or "Sub-Node" of a TreeItem under Fivewin <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
p.s. i was told that most Android Smartphone also have no Drive-Letter and use Device like iPhone |
download iPhone Photo connect to PC | Dear Jimmy,
oItem:oParent
oItem:aItems |
download iPhone Photo connect to PC | hi Antonio
[quote:3pbaiywz]oItem:oParent
oItem:aItems[/quote:3pbaiywz]
thx for Answer
i got to Step 3 and must use a Workaround which i don´t want.
[img:3pbaiywz]https://i.postimg.cc/15qKYbtL/FW-DEVICE.png[/img:3pbaiywz]
Problem : when click on Node it open Sub-Folder but click on Node in Sub-Folder fail ...
Workaround : open "all" Sub-Folder and navigate to "last"
my Workaround is Ok when have "just" 1 x Sub-Folder but it can be "more"
---
[code=fw:3pbaiywz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FIVEWIN.CH"</span><br /><br />* <span style="color: #00D7D7;">#define</span> use_TGrid <span style="color: #B900B9;">// do NOT enable for Standalone !</span><br /><br /><span style="color: #00D7D7;">#define</span> CSIDL_DRIVES 0x0011<br /><span style="color: #00D7D7;">#define</span> cDevice <span style="color: #ff0000;">"APPLE IPHONE"</span> <span style="color: #B900B9;">// change for Android</span><br /><br /><span style="color: #00D7D7;">#define</span> ID_Folder <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> ID_Name <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> ID_Level <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> ID_Parent <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> ID_Element <span style="color: #000000;">5</span><br /><br /><span style="color: #00C800;">STATIC</span> oIPHONE<br /><span style="color: #00C800;">STATIC</span> oTree_1<br /><span style="color: #00C800;">STATIC</span> oButton_Target<br /><span style="color: #00C800;">STATIC</span> oTargetDir<br /><span style="color: #00C800;">STATIC</span> oButton_CopyHere<br /><span style="color: #00C800;">STATIC</span> oButton_MoveHere<br /><span style="color: #00C800;">STATIC</span> oFontDefault<br /><span style="color: #00C800;">STATIC</span> oImageList<br /><span style="color: #00C800;">STATIC</span> oShell, oFolder<br /><span style="color: #00C800;">STATIC</span> oBrwCP<br /><span style="color: #00C800;">STATIC</span> oGrid<br /><span style="color: #00C800;">STATIC</span> oTreeLast<br /><br /><span style="color: #00C800;">STATIC</span> nLevel := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">STATIC</span> nElement := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">STATIC</span> aFileSys := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> aGridfiles := <span style="color: #000000;">{</span><span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> aFolder := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> lRecursiv := .F.<br /><br />PROCEDURE MAIN<span style="color: #000000;">(</span>cPara<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nFontSize := <span style="color: #000000;">20</span><br /><span style="color: #00C800;">LOCAL</span> cTarget := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">250</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nClrFore, nClrBack, lPixel := .T., lDesign := .F., nWidth := <span style="color: #000000;">200</span>, nHeight := <span style="color: #000000;">600</span>, cMsg := <span style="color: #ff0000;">""</span>, lCheckBoxes := .F., bChange, lEditable := .F.<br /><span style="color: #00C800;">LOCAL</span> BFcolor, BGcolor<br /><span style="color: #00C800;">LOCAL</span> aHeader := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> bAction := <span style="color: #000000;">{</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> nIcoLarge := <span style="color: #000000;">32</span><br /><span style="color: #00C800;">LOCAL</span> nIcoSmall := <span style="color: #000000;">32</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span>cPara<span style="color: #000000;">)</span><br /> lRecursiv := .T.<br /> <span style="color: #00C800;">ENDIF</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - nFontSize<br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">FONT</span> oFontDefault<br />#IFDEF __HMG__<br /> END <span style="color: #0000ff;">FONT</span><br />#ENDIF<br /><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Name"</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Size"</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"N"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Date"</span>, <span style="color: #000000;">110</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Time"</span>, <span style="color: #000000;">090</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Note"</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> aGridfiles := DIRECTORY<span style="color: #000000;">(</span><span style="color: #ff0000;">"*.*"</span>,<span style="color: #ff0000;">"DHS"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oIPHONE <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">768</span>, <span style="color: #000000;">1024</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Device "</span> <span style="color: #0000ff;">ICON</span> <span style="color: #ff0000;">"A1MAIN"</span><br /><br />#ifdef use_TGrid<br /> oGrid := TGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">220</span>, bAction, oIPHONE, BFcolor, BGcolor, ;<br /> lPixel, lDesign, <span style="color: #000000;">780</span>, <span style="color: #000000;">600</span>, cMsg, nIcoLarge, nIcoSmall <span style="color: #000000;">)</span><br /> oGrid:<span style="color: #000000;">aHeader</span> := aHeader<br /> oGrid:<span style="color: #000000;">aSource</span> := aGridfiles<br />#endif<br /><br /> oTree_1 := TTreeView<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">10</span>, oIPHONE, nClrFore, nClrBack, lPixel, lDesign, nWidth, nHeight, cMsg, lCheckBoxes, bChange, lEditable <span style="color: #000000;">)</span><br /><br /> oImageList := TImageList<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"folder"</span>,, oIPHONE <span style="color: #000000;">)</span>, ;<br /> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"fldmask"</span>,, oIPHONE <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">SetImageList</span><span style="color: #000000;">(</span> oImageList <span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> || DoTreeAction<span style="color: #000000;">(</span> oTree_1:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">624</span>, <span style="color: #000000;">010</span> <span style="color: #0000ff;">BUTTON</span> oButton_Target <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Target Folder"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">OF</span> oIPHONE<br /> @ <span style="color: #000000;">624</span>, <span style="color: #000000;">220</span> <span style="color: #0000ff;">GET</span> oTargetDir <span style="color: #0000ff;">VAR</span> cTarget <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">780</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">OF</span> oIPHONE<br /><br /> @ <span style="color: #000000;">660</span>, <span style="color: #000000;">010</span> <span style="color: #0000ff;">BUTTON</span> oButton_CopyHere <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&CopyHere"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">OF</span> oIPHONE<br /> @ <span style="color: #000000;">660</span>, <span style="color: #000000;">110</span> <span style="color: #0000ff;">BUTTON</span> oButton_MoveHere <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&MoveHere"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">OF</span> oIPHONE<br /><br />#IFDEF __HMG__<br /> END <span style="color: #0000ff;">WINDOW</span><br />#ENDIF<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oIPHONE <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">VALID</span> OnEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">FUNCTION</span> OnEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><br /> oTree_1:<span style="color: #000000;">DeleteAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTreeItem := oTree_1:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"This PC"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ROOT"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /><br /> nLevel := <span style="color: #000000;">1</span><br /> aFileSys := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// now include at Start</span><br /> SearchDevice<span style="color: #000000;">(</span>oTreeItem<span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />#ifdef use_TGrid<br /> oGrid:<span style="color: #000000;">InitTheListView</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />#endif<br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE SearchDevice<span style="color: #000000;">(</span>oTreeRoot<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cName, oItems<br /><span style="color: #00C800;">LOCAL</span> i, iMax<br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><span style="color: #00C800;">LOCAL</span> oFolderItem<br /><br /> nLevel := <span style="color: #000000;">2</span><br /><br /> oShell := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"shell.application"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oShell<br /> oFolder := oShell:<span style="color: #000000;">NameSpace</span><span style="color: #000000;">(</span> CSIDL_DRIVES <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 0x0011 // My Computer</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oFolder<br /> oItems := oFolder:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := oItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> oFolderItem := oItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> i - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> cName := UPPER<span style="color: #000000;">(</span> oFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> cName = <span style="color: #ff0000;">"DESKTOP"</span><br /> LOOP<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = cName <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ELSE</span><br /> nElement ++<br /><br /> oTreeItem := oTreeRoot:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> cName, <span style="color: #000000;">0</span>, nElement <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> cName, nLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// next Level Action</span><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> oTreeItem, cName, nLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oTreeLast := oTreeItem<br /><br /> <span style="color: #00C800;">IF</span> .NOT. oFolderItem:<span style="color: #000000;">isFileSystem</span><br /> AADD<span style="color: #000000;">(</span> aFileSys, i <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> Sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE DoTreeAction<span style="color: #000000;">(</span>oTreeNext<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> xThis := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /><span style="color: #00C800;">LOCAL</span> cThis, oItems<br /><span style="color: #00C800;">LOCAL</span> i, iMax<br /><span style="color: #00C800;">LOCAL</span> oFolderItem<br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><span style="color: #00C800;">LOCAL</span> nItem := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /><span style="color: #00C800;">LOCAL</span> cPhone := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /><br /><span style="color: #00C800;">STATIC</span> lIsExpand := .F.<br /><br /> aGridfiles := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">IF</span> xThis = cDevice<br /> <span style="color: #00C800;">IF</span> oTreeNext:<span style="color: #000000;">IsExpanded</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTreeNext:<span style="color: #000000;">Collapse</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> lIsExpand := .F.<br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oFolder<br /> oItems := oFolder:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := oItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> oFolderItem := oItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> i - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> cThis := UPPER<span style="color: #000000;">(</span> oFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> cThis = UPPER<span style="color: #000000;">(</span> cPhone <span style="color: #000000;">)</span><br /> DoTreeRecursiv<span style="color: #000000;">(</span> oFolderItem, nLevel + <span style="color: #000000;">1</span>, lRecursiv, oFolderItem:<span style="color: #000000;">isFileSystem</span> , oTreeNext <span style="color: #000000;">)</span><br /><br /> oTreeNext:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> lIsExpand := .T.<br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> GoNext<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// get "last" Sub-Folder of TreeItem</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// EXIT here</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #00C800;">IF</span> lIsExpand = .T.<br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span>xThis<span style="color: #000000;">)</span><br /> ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span>xThis +<span style="color: #ff0000;">" is not a Device"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> Sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE DoTreeRecursiv<span style="color: #000000;">(</span> xFolder, xLevel, xRecursiv, lisFileSys, oTreeNext<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> xThis, xItems<br /><span style="color: #00C800;">LOCAL</span> ii , iMax, xFolderItem<br /><span style="color: #00C800;">LOCAL</span> c_Name, c_Size, c_Date, c_Attr, c_Type<br /><span style="color: #00C800;">LOCAL</span> cTarget<br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><span style="color: #00C800;">LOCAL</span> oItemParent<br /><br /> <span style="color: #00C800;">DEFAULT</span> lisFileSys := .T.<br /><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> xFolder<br /> nLevel := xLevel<br /> xItems := xFolder:<span style="color: #000000;">GetFolder</span>:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := xItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> xFolderItem := xItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> ii - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> xFolderItem <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> xFolderItem:<span style="color: #000000;">IsLink</span><br /> LOOP<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> xFolderItem:<span style="color: #000000;">IsFolder</span> <span style="color: #B900B9;">// is it a folder</span><br /> xThis := UPPER<span style="color: #000000;">(</span> xFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = xThis <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ELSE</span><br /><br /> <span style="color: #B900B9;">// search for Child and its Parent</span><br /> nElement ++<br /><br /> oTreeItem := oTreeNext:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> xThis, <span style="color: #000000;">0</span>, xLevel <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> xThis, xLevel <span style="color: #000000;">}</span> <span style="color: #B900B9;">// next Level Action</span><br /> oTreeNext:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> oTreeItem, xThis, nLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// do NOT want to use it recursiv</span><br /> <span style="color: #00C800;">IF</span> xRecursiv = .T.<br /> oTreeLast := oTreeItem<br /> DoTreeRecursiv<span style="color: #000000;">(</span> xFolderItem, xLevel + <span style="color: #000000;">1</span>, xRecursiv, lisFileSys, oTreeItem <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> c_Name := xFolderItem:<span style="color: #0000ff;">name</span><br /> c_Size := xFolderItem:<span style="color: #0000ff;">Size</span><br /> c_Date := xFolderItem:<span style="color: #000000;">ModifyDate</span><br /> c_Type := xFolderItem:<span style="color: #000000;">Type</span><br /> c_Attr := <span style="color: #ff0000;">""</span><br /> AADD<span style="color: #000000;">(</span> aGridfiles, <span style="color: #000000;">{</span> c_Name, c_Size, c_Date, c_Attr, c_Type, LTRIM<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> xLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GoNext<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oSelItem := oTree_1:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, lStop := .F., oNextItem<br /><span style="color: #00C800;">local</span> lRet := .T.<br /><br /> oTree_1:<span style="color: #000000;">Scan</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | oItem | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oItem:<span style="color: #000000;">hItem</span> == oSelItem:<span style="color: #000000;">hItem</span>, lStop := .T.,<span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lStop .and. oItem:<span style="color: #000000;">hItem</span> != oSelItem:<span style="color: #000000;">hItem</span>, <span style="color: #000000;">(</span> oNextItem := oItem, .T. <span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> oNextItem != <span style="color: #00C800;">nil</span><br /> oTree_1:<span style="color: #0000ff;">Select</span><span style="color: #000000;">(</span> oNextItem <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oNextItem:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> = oTreeLast:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> lRet := .F.<br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> lRet := .F.<br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> lRet<br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />#ifdef use_TGrid<br /> oGrid:<span style="color: #000000;">aSource</span> := aGridfiles<br /> oGrid:<span style="color: #000000;">ClearAndFill</span><span style="color: #000000;">(</span> oIPHONE <span style="color: #000000;">)</span><br />#endif<br /><span style="color: #00C800;">RETURN</span><br /><br />************************** include in DUALGRID.PRG **************************<br /><br /><br />#ifdef use_TGrid<br /><span style="color: #00C800;">FUNCTION</span> EndwithSlash<span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nPosi<br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /> nPosi := RAT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cString )<br /> IF nPosi = LEN( cString )<br /> ELSE<br /> cString += "</span>\<span style="color: #ff0000;">"<br /> ENDIF<br /> cString := STRTRAN( cString, "</span>\\<span style="color: #ff0000;">", "</span>\<span style="color: #ff0000;">", 3 )<br /> ENDIF<br /><br />RETURN cString<br /><br />FUNCTION CompareFile( aX, aY, lUp )<br />LOCAL cName1, cName2<br />LOCAL lRet<br /><br /> DEFAULT lUp := .T.<br /><br /> cName1 := LOWER( FindExt( aX ) + FindName( aX ) )<br /> cName2 := LOWER( FindExt( aY ) + FindName( aY ) )<br /><br /> IF lUp = .T.<br /> lRet := cName1 < cName2<br /> ELSE<br /> lRet := cName1 > cName2<br /> ENDIF<br /><br />RETURN ( lRet )<br /><br />FUNCTION FindName( filename )<br />LOCAL nPosi := RAT( "</span>.<span style="color: #ff0000;">", filename )<br />RETURN SUBSTR( filename, 1, nPosi - 1 )<br /><br />FUNCTION FindExt( filename )<br />LOCAL nPosi := RAT( "</span>.<span style="color: #ff0000;">", filename )<br />RETURN UPPER( SUBSTR( filename, nPosi + 1, LEN( filename ) ) )<br /><br />PROCEDURE SayBar( cText, nPart )<br />RETURN<br /><br />#include "</span>TGRID.PRG<span style="color: #ff0000;">"<br />#include "</span><span style="color: #00C800;">HB_FUNC</span>.PRG<span style="color: #ff0000;">"<br /><br />#endif<br />*</span></div>[/code:3pbaiywz]
Sample does not include CLASS TGrid or HB_FUNC but work as Standalone to show my Problem
i made it for my iPhone so so might change it for Android (if you can see it in Windows Explorer)
compile / run Sample
only Folder "APPLE IPHONE" is valid to open (see about Android)
when click on "APPLE IPHONE" it will open next Sub-Folder
but when click on Sub-Folder nothing happens <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
start again with "any Parameter"
click on "APPLE IPHONE"
now hole Sub-Folder Tree will open |
download iPhone Photo connect to PC | Dear Jimmy,
Could you reproduce it using FWH\samples\testtree.prg or pim.prg ?
I have built your example and it seems to work fine but I get no subnodes |
download iPhone Photo connect to PC | hi Antonio,
have change Concept and now it work <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
my "Problem" was to handle 2 x 2 Object : Fivewin TTreeView/TTVItem and Windows Folder/Folderitem
when work with TTreeView/TTVItemto build "static" Tree all work
but when add Child "dynamic" i have to use Folder/Folderitem when work with Device
now i "store" FolderItem in CARGO of TreeItem so i got right Relation of TREE and (virtual) Folder Structure
so here now working Sample to open Sub-Folder "on fly"
[code=fw:1o0n369n]<div class="fw" id="{CB}" style="font-family: monospace;">*<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FIVEWIN.CH"</span><br /><br />* <span style="color: #00D7D7;">#define</span> use_TGrid <span style="color: #B900B9;">// do NOT enable for Standalone !</span><br /><span style="color: #00D7D7;">#define</span> CSIDL_DRIVES 0x0011<br /><span style="color: #00D7D7;">#define</span> cDevice <span style="color: #ff0000;">"APPLE IPHONE"</span> <span style="color: #B900B9;">// change for Android</span><br /><br /><span style="color: #00D7D7;">#define</span> FOF_SIMPLEPROGRESS 0x0100<br /><span style="color: #00D7D7;">#define</span> LVIS_FOCUSED 0x01<br /><span style="color: #00D7D7;">#define</span> LVIS_SELECTED 0x02<br /><br /><span style="color: #00D7D7;">#define</span> ID_Folder <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> ID_Name <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> ID_Level <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> ID_Parent <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> ID_Element <span style="color: #000000;">5</span><br /><br /><span style="color: #00C800;">STATIC</span> oIPHONE<br /><span style="color: #00C800;">STATIC</span> oTree_1<br /><span style="color: #00C800;">STATIC</span> oButton_Target<br /><span style="color: #00C800;">STATIC</span> oTargetDir<br /><span style="color: #00C800;">STATIC</span> oButton_CopyHere<br /><span style="color: #00C800;">STATIC</span> oButton_MoveHere<br /><span style="color: #00C800;">STATIC</span> oFontDefault<br /><span style="color: #00C800;">STATIC</span> oImageList<br /><span style="color: #00C800;">STATIC</span> oShell, oFolder<br /><span style="color: #00C800;">STATIC</span> oBrwCP<br /><span style="color: #00C800;">STATIC</span> oGrid<br /><span style="color: #00C800;">STATIC</span> oTreeLast<br /><br /><span style="color: #00C800;">STATIC</span> nLevel := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">STATIC</span> nElement := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">STATIC</span> aFileSys := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> aGridfiles := <span style="color: #000000;">{</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> aFolder := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">STATIC</span> lRecursiv := .F.<br /><span style="color: #00C800;">STATIC</span> c_Target<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Procedure MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br />PROCEDURE MAIN<span style="color: #000000;">(</span> cPara <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> nFontSize := <span style="color: #000000;">20</span><br /><span style="color: #00C800;">LOCAL</span> nClrFore, nClrBack, lPixel := .T., lDesign := .F., nWidth := <span style="color: #000000;">200</span>, nHeight := <span style="color: #000000;">600</span>, cMsg := <span style="color: #ff0000;">""</span>, lCheckBoxes := .F., bChange, lEditable := .F.<br /><span style="color: #00C800;">LOCAL</span> BFcolor, BGcolor<br /><span style="color: #00C800;">LOCAL</span> aHeader := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> bAction := <span style="color: #000000;">{</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> nIcoLarge := <span style="color: #000000;">32</span><br /><span style="color: #00C800;">LOCAL</span> nIcoSmall := <span style="color: #000000;">32</span><br /><span style="color: #00C800;">LOCAL</span> lCheckbox := .T.<br /><br /> c_Target := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">250</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cPara <span style="color: #000000;">)</span><br /> lRecursiv := .T.<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - nFontSize<br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">FONT</span> oFontDefault<br />#IFDEF __HMG__<br /> END <span style="color: #0000ff;">FONT</span><br />#ENDIF<br /><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Name"</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Size"</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"N"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Date"</span>, <span style="color: #000000;">110</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"D"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Time"</span>, <span style="color: #000000;">090</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> AADD<span style="color: #000000;">(</span> aHeader, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Note"</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"C"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> aGridfiles := DIRECTORY<span style="color: #000000;">(</span> <span style="color: #ff0000;">"*.*"</span>, <span style="color: #ff0000;">"DHS"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oIPHONE <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">768</span>, <span style="color: #000000;">1024</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Device "</span> <span style="color: #0000ff;">ICON</span> <span style="color: #ff0000;">"A1MAIN"</span><br /><br />#ifdef use_TGrid<br /> oGrid := TGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">220</span>, bAction, oIPHONE, BFcolor, BGcolor, ;<br /> lPixel, lDesign, <span style="color: #000000;">780</span>, <span style="color: #000000;">600</span>, cMsg, nIcoLarge, nIcoSmall, lCheckbox <span style="color: #000000;">)</span><br /> oGrid:<span style="color: #000000;">aHeader</span> := aHeader<br /> oGrid:<span style="color: #000000;">aSource</span> := aGridfiles<br />#endif<br /><br /> oTree_1 := TTreeView<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">10</span>, oIPHONE, nClrFore, nClrBack, lPixel, lDesign, nWidth, nHeight, cMsg, lCheckBoxes, bChange, lEditable <span style="color: #000000;">)</span><br /><br /> oImageList := TImageList<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oImageList:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"folder"</span>,, oIPHONE <span style="color: #000000;">)</span>, ;<br /> TBitmap<span style="color: #000000;">(</span><span style="color: #000000;">)</span> :<span style="color: #0000ff;">Define</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"fldmask"</span>,, oIPHONE <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">SetImageList</span><span style="color: #000000;">(</span> oImageList <span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">{</span> || DoTreeAction<span style="color: #000000;">(</span> oTree_1:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oTree_1:<span style="color: #000000;">bChanged</span> := <span style="color: #000000;">{</span> || ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">624</span>, <span style="color: #000000;">010</span> <span style="color: #0000ff;">BUTTON</span> oButton_Target <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Target Folder"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">ACTION</span> GetTargetFolder<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oIPHONE<br /> @ <span style="color: #000000;">624</span>, <span style="color: #000000;">220</span> <span style="color: #0000ff;">GET</span> oTargetDir <span style="color: #0000ff;">VAR</span> c_Target <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">780</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">OF</span> oIPHONE<br /><br /> @ <span style="color: #000000;">660</span>, <span style="color: #000000;">010</span> <span style="color: #0000ff;">BUTTON</span> oButton_CopyHere <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&CopyHere"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">ACTION</span> Start_CopyHere<span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oIPHONE<br /> @ <span style="color: #000000;">660</span>, <span style="color: #000000;">110</span> <span style="color: #0000ff;">BUTTON</span> oButton_MoveHere <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&MoveHere"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontDefault <span style="color: #0000ff;">ACTION</span> Start_CopyHere<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oIPHONE<br /><br /> oButton_CopyHere:<span style="color: #000000;">hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oButton_MoveHere:<span style="color: #000000;">hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />#IFDEF __HMG__<br /> END <span style="color: #0000ff;">WINDOW</span><br />#ENDIF<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oIPHONE <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">VALID</span> OnEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">CENTER</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Function</span> OnEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> iphone.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure iphonewin<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">FUNCTION</span> OnEnd<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure DoTreeAction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE DoTreeAction<span style="color: #000000;">(</span> oTreeNext <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cThis := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /><span style="color: #00C800;">LOCAL</span> nItem := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /><span style="color: #00C800;">LOCAL</span> oFolderItem := oTreeNext:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span><br /><span style="color: #00C800;">LOCAL</span> aSelect, xFolder, xName, xLevel, xParent, xElement<br /><span style="color: #00C800;">LOCAL</span> nPosi, oError<br /><span style="color: #00C800;">LOCAL</span> bSaveError := ERRORBLOCK<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | oErr | <span style="color: #00C800;">BREAK</span><span style="color: #000000;">(</span> oErr <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> aGridfiles := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> nLevel = <span style="color: #000000;">0</span><br /> BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">CASE</span> nLevel = <span style="color: #000000;">1</span><br /> SearchDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">CASE</span> nLevel = <span style="color: #000000;">2</span><br /> SelectDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">OTHERWISE</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> aFolder <span style="color: #000000;">)</span> .AND. !EMPTY<span style="color: #000000;">(</span> cThis <span style="color: #000000;">)</span><br /> nPosi := ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = UPPER<span style="color: #000000;">(</span> cThis <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// .AND. e[ ID_Parent ] = nParent</span><br /> <span style="color: #00C800;">IF</span> nPosi > <span style="color: #000000;">0</span><br /> aSelect := aFolder<span style="color: #000000;">[</span> nPosi <span style="color: #000000;">]</span><br /><br /> xFolder := aSelect<span style="color: #000000;">[</span> ID_Folder <span style="color: #000000;">]</span><br /> xName := aSelect<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span><br /> xLevel := aSelect<span style="color: #000000;">[</span> ID_Level <span style="color: #000000;">]</span><br /><br /> DoTreeRecursiv<span style="color: #000000;">(</span> oFolderItem, xLevel + <span style="color: #000000;">1</span>, .F., .F., .F., .F., oTreeNext <span style="color: #000000;">)</span><br /><br /> ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDCASE</span><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreeaction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE BuildRoot<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><br /> oTree_1:<span style="color: #000000;">DeleteAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oTreeItem := oTree_1:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"This PC"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ROOT"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /><br /> nLevel := <span style="color: #000000;">1</span><br /> aFileSys := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> aFolder := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"This PC"</span>, <span style="color: #000000;">1</span>, nElement <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// now include at Start</span><br /> SearchDevice<span style="color: #000000;">(</span> oTreeItem <span style="color: #000000;">)</span><br /><br /> oTree_1:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />#ifdef use_TGrid<br /> oGrid:<span style="color: #000000;">InitTheListView</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />#endif<br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure SearchDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreeaction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure buildroot<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE SearchDevice<span style="color: #000000;">(</span> oTreeRoot <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cName, oItems<br /><span style="color: #00C800;">LOCAL</span> i, iMax<br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><span style="color: #00C800;">LOCAL</span> oFolderItem<br /><br /> nLevel := <span style="color: #000000;">2</span><br /><br /> oShell := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"shell.application"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oShell<br /> oFolder := oShell:<span style="color: #000000;">NameSpace</span><span style="color: #000000;">(</span> CSIDL_DRIVES <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 0x0011 // My Computer</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oFolder<br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folder-items">https://learn.microsoft.com/de-de/windo ... lder-items</a><!-- m --></span><br /> oItems := oFolder:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> iMax := oItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem">https://learn.microsoft.com/de-de/windo ... folderitem</a><!-- m --></span><br /> oFolderItem := oItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> i - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> cName := UPPER<span style="color: #000000;">(</span> oFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> cName = <span style="color: #ff0000;">"DESKTOP"</span><br /> LOOP<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = cName <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ELSE</span><br /> nElement ++<br /><br /> oTreeItem := oTreeRoot:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> cName, <span style="color: #000000;">0</span>, nElement <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> cName, nLevel, oFolderItem <span style="color: #000000;">}</span> <span style="color: #B900B9;">// next Level Action</span><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> oTreeItem, cName, nLevel, oFolder <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oTreeLast := oTreeItem<br /><br /> <span style="color: #00C800;">IF</span> .NOT. oFolderItem:<span style="color: #000000;">isFileSystem</span><br /> AADD<span style="color: #000000;">(</span> aFileSys, i <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> Sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure SelectDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreeaction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE SelectDevice<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cThis, oItems<br /><span style="color: #00C800;">LOCAL</span> i, iMax, xParent := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nItem<br /><span style="color: #00C800;">LOCAL</span> oFolderItem<br /><br /> nLevel := <span style="color: #000000;">3</span><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> oFolder<br /> oItems := oFolder:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> iMax := oItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> oFolderItem := oItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> i - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> oFolderItem <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem-name">https://learn.microsoft.com/de-de/windo ... ritem-name</a><!-- m --></span><br /> cThis := UPPER<span style="color: #000000;">(</span> oFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">(</span> cThis <span style="color: #000000;">)</span> = cDevice<br /> <span style="color: #B900B9;">// EXIT here</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> Sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure DoTreeRecursiv<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreeaction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreerecursiv<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure start_copyhere<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE DoTreeRecursiv<span style="color: #000000;">(</span> xFolder, xLevel, xRecursiv, lTransfer, lMove, lisFileSys, oTreeNext <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> xThis, xItems<br /><span style="color: #00C800;">LOCAL</span> ii, iMax, xFolderItem<br /><span style="color: #00C800;">LOCAL</span> c_Name, c_Size, c_Date, c_Attr, c_Type<br /><span style="color: #00C800;">LOCAL</span> cTarget := c_Target<br /><span style="color: #00C800;">LOCAL</span> oTreeItem<br /><span style="color: #00C800;">LOCAL</span> oItemParent<br /><br /> <span style="color: #00C800;">DEFAULT</span> lTransfer := .F.<br /> <span style="color: #00C800;">DEFAULT</span> lisFileSys := .T.<br /><br /> <span style="color: #00C800;">IF</span> <span style="color: #00C800;">NIL</span> <> xFolder<br /><br /> nLevel := xLevel<br /><br /> <span style="color: #B900B9;">// https://learn.microsoft.com/en-us/windows/win32/shell/folderitem-getfolder</span><br /> xItems := xFolder:<span style="color: #000000;">GetFolder</span>:<span style="color: #0000ff;">Items</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> lTransfer = .T.<br />#ifdef use_TGrid<br /> DoCopySingle<span style="color: #000000;">(</span> xItems, cTarget, lMove <span style="color: #000000;">)</span><br />#endif<br /> <span style="color: #00C800;">ELSE</span><br /><br /> iMax := xItems:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> ii := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> iMax<br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem">https://learn.microsoft.com/de-de/windo ... folderitem</a><!-- m --></span><br /> xFolderItem := xItems:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> ii - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> xFolderItem <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem-islink">https://learn.microsoft.com/de-de/windo ... tem-islink</a><!-- m --></span><br /> <span style="color: #00C800;">IF</span> xFolderItem:<span style="color: #000000;">IsLink</span><br /> LOOP<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem-isfolder">https://learn.microsoft.com/de-de/windo ... m-isfolder</a><!-- m --></span><br /> <span style="color: #00C800;">IF</span> xFolderItem:<span style="color: #000000;">IsFolder</span> <span style="color: #B900B9;">// is it a folder</span><br /> <span style="color: #B900B9;">// <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folderitem-name">https://learn.microsoft.com/de-de/windo ... ritem-name</a><!-- m --></span><br /> xThis := UPPER<span style="color: #000000;">(</span> xFolderItem:<span style="color: #0000ff;">name</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> | e | e<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span> = xThis <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">ELSE</span><br /><br /> nElement ++<br /><br /> oTreeItem := oTreeNext:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> xThis, <span style="color: #000000;">0</span>, xLevel <span style="color: #000000;">)</span><br /> oTreeItem:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> xThis, xLevel, xFolderItem <span style="color: #000000;">}</span> <span style="color: #B900B9;">// next Level Action</span><br /> oTreeNext:<span style="color: #000000;">Expand</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> AADD<span style="color: #000000;">(</span> aFolder, <span style="color: #000000;">{</span> oTreeItem, xThis, nLevel + <span style="color: #000000;">1</span>, xFolder <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// not used here</span><br /> <span style="color: #00C800;">IF</span> xRecursiv = .T.<br /> oTreeLast := oTreeItem<br /> DoTreeRecursiv<span style="color: #000000;">(</span> xFolderItem, xLevel + <span style="color: #000000;">1</span>, xRecursiv, .F., .F., lisFileSys, oTreeNext <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> c_Name := xFolderItem:<span style="color: #0000ff;">name</span><br /> c_Size := xFolderItem:<span style="color: #0000ff;">Size</span><br /> c_Date := xFolderItem:<span style="color: #000000;">ModifyDate</span><br /> c_Type := xFolderItem:<span style="color: #000000;">Type</span><br /> c_Attr := <span style="color: #ff0000;">""</span><br /> AADD<span style="color: #000000;">(</span> aGridfiles, <span style="color: #000000;">{</span> c_Name, c_Size, c_Date, c_Attr, c_Type, LTRIM<span style="color: #000000;">(</span> STR<span style="color: #000000;">(</span> xLevel + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure GetTargetFolder<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE GetTargetFolder<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> cFolder := cGETFOLDER<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Get Target Folder"</span>, c_Target <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cFolder <span style="color: #000000;">)</span><br /> c_Target := EndwithSlash<span style="color: #000000;">(</span> cFolder <span style="color: #000000;">)</span><br /> oTargetDir:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+ <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure dotreeaction<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE ShowGrid<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oButton_CopyHere:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oButton_MoveHere:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />#ifdef use_TGrid<br /> oGrid:<span style="color: #000000;">aSource</span> := aGridfiles<br /> oGrid:<span style="color: #000000;">ClearAndFill</span><span style="color: #000000;">(</span> oIPHONE <span style="color: #000000;">)</span><br />#endif<br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> Procedure Start_CopyHere<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">2</span> - procedure main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> PROCEDURE Start_CopyHere<span style="color: #000000;">(</span> lMove <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> nPosi<br /><span style="color: #00C800;">LOCAL</span> nItem := oTreeLast:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #B900B9;">// IPHONE.Tree_1.Value</span><br /><span style="color: #00C800;">LOCAL</span> cThis := oTreeLast:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #B900B9;">// TRIM( IPHONE.Tree_1.Item( nItem ) )</span><br /><span style="color: #00C800;">LOCAL</span> oFItem := oTreeLast:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span><br /><br /><span style="color: #00C800;">LOCAL</span> lTransfer := .T.<br /><span style="color: #00C800;">LOCAL</span> aSelect, xFolder, xName, xLevel, xParent, xElement, xOther<br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> aGridfiles <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nItem > <span style="color: #000000;">0</span><br /> aSelect := aFolder<span style="color: #000000;">[</span> nItem <span style="color: #000000;">]</span><br /><br /> xFolder := aSelect<span style="color: #000000;">[</span> ID_Folder <span style="color: #000000;">]</span><br /> xName := aSelect<span style="color: #000000;">[</span> ID_Name <span style="color: #000000;">]</span><br /> xLevel := aSelect<span style="color: #000000;">[</span> ID_Level <span style="color: #000000;">]</span><br /> xOther := aSelect<span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span><br /><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> xFolder <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Folder-Object</span><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> xName <span style="color: #000000;">)</span> <span style="color: #B900B9;">// OK String</span><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> xLevel <span style="color: #000000;">)</span> <span style="color: #B900B9;">// OK Number</span><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> xOther <span style="color: #000000;">)</span> <span style="color: #B900B9;">// OLE</span><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> oTreeLast <span style="color: #000000;">)</span> <span style="color: #B900B9;">// TTVITEM</span><br /> fwlog hb_valToExp<span style="color: #000000;">(</span> oFItem <span style="color: #000000;">)</span> <span style="color: #B900B9;">// TOLEAUTO</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> xFolder:<span style="color: #000000;">IsDerivedFrom</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TTreeItem"</span> <span style="color: #000000;">)</span><br /> FWLOG <span style="color: #ff0000;">"TTreeItem"</span><br /> <span style="color: #00C800;">CASE</span> xFolder:<span style="color: #000000;">IsDerivedFrom</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TTreeView"</span> <span style="color: #000000;">)</span><br /> FWLOG <span style="color: #ff0000;">"TTreeView"</span><br /> <span style="color: #00C800;">CASE</span> xFolder:<span style="color: #000000;">IsDerivedFrom</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"TTVItem"</span> <span style="color: #000000;">)</span><br /> FWLOG <span style="color: #ff0000;">"TTVItem"</span><br /> <span style="color: #00C800;">OTHERWISE</span><br /> <span style="color: #00C800;">ENDCASE</span><br /><br /> DoTreeRecursiv<span style="color: #000000;">(</span> oFItem, xLevel, .F., lTransfer, lMove <span style="color: #000000;">)</span> <span style="color: #B900B9;">// "TOLEAUTO"</span><br /> * DoTreeRecursiv<span style="color: #000000;">(</span> xFolder, xLevel, .F., lTransfer, lMove <span style="color: #000000;">)</span> <span style="color: #B900B9;">// "TTVItem"</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> GoNext<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GoNext<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> oSelItem := oTree_1:<span style="color: #000000;">GetSelected</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, lStop := .F., oNextItem<br /><span style="color: #00C800;">LOCAL</span> lRet := .T.<br /><br /> oTree_1:<span style="color: #000000;">Scan</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | oItem | <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> oItem:<span style="color: #000000;">hItem</span> == oSelItem:<span style="color: #000000;">hItem</span>, lStop := .T., <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> lStop .AND. oItem:<span style="color: #000000;">hItem</span> != oSelItem:<span style="color: #000000;">hItem</span>, <span style="color: #000000;">(</span> oNextItem := oItem, .T. <span style="color: #000000;">)</span>, .F. <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> oNextItem != <span style="color: #00C800;">nil</span><br /> oTree_1:<span style="color: #0000ff;">Select</span><span style="color: #000000;">(</span> oNextItem <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> oNextItem:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> = oTreeLast:<span style="color: #000000;">Cargo</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /> lRet := .F.<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> lRet := .F.<br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> lRet<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ <span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> EndwithSlash<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+ Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">(</span> phone3.prg <span style="color: #000000;">)</span> <span style="color: #000000;">1</span> - <span style="color: #00C800;">static</span> procedure gettargetfolder<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />*+<br />*+--------------------------------------------------------------------<br />*+<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> EndwithSlash<span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">LOCAL</span> nPosi<br /><br /> <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">(</span> cString <span style="color: #000000;">)</span><br /> nPosi := RAT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>, cString )<br /> IF nPosi = LEN( cString )<br /> ELSE<br /> cString += "</span>\<span style="color: #ff0000;">"<br /> ENDIF<br /> cString := STRTRAN( cString, "</span>\\<span style="color: #ff0000;">", "</span>\<span style="color: #ff0000;">", 3 )<br /> ENDIF<br /><br />RETURN cString<br /><br />// ************************* include in DUALGRID.PRG **************************<br /><br />#ifdef use_TGrid<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Static Procedure DoCopySingle()<br />*+<br />*+ Called from ( phone3.prg ) 1 - static procedure dotreerecursiv()<br />*+<br />*+--------------------------------------------------------------------<br />*+<br />STATIC PROCEDURE DoCopySingle( oDirFolder, cTarget, lMove )<br /><br />LOCAL hGrid := oGrid:hwnd // GetControlHandle( "</span>Grid_1<span style="color: #ff0000;">", "</span>IPHONE<span style="color: #ff0000;">" )<br />LOCAL oNewSH := CreateObject( "</span>Shell.Application<span style="color: #ff0000;">" )<br />LOCAL oTarget := oNewSH:NameSpace( cTarget )<br />LOCAL xFlag := FOF_SIMPLEPROGRESS<br />LOCAL nState := hb_BitOr( LVIS_SELECTED, LVIS_FOCUSED )<br />LOCAL nMask := hb_BitOr( LVIS_SELECTED, LVIS_FOCUSED )<br />LOCAL aFiles := {}<br />LOCAL oFile, cFile, xCount, nCount<br />LOCAL i, iMax, nSkip := 0<br /><br /> DEFAULT lMove := .F.<br /><br /> iMax := oDirFolder:Count<br /> FOR i := 1 TO iMax<br /><br /> SYSrefresh()<br /><br /> // if Checkbox is marked<br /> // IF IPHONE.Grid_1.CheckBoxItem( i ) = .T.<br /><br /> // get Item Object<br /> oFile := oDirFolder:Item( i - 1 )<br /><br /> IF lMove = .T.<br /> // move single Object file<br /> // <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folder-movehere">https://learn.microsoft.com/de-de/windo ... r-movehere</a><!-- m --><br /> oTarget:MoveHere( oFile, xFlag )<br /> ELSE<br /> // copy single Object file<br /> // <!-- m --><a class="postlink" href="https://learn.microsoft.com/de-de/windows/win32/shell/folder-copyhere">https://learn.microsoft.com/de-de/windo ... r-copyhere</a><!-- m --><br /> oTarget:CopyHere( oFile, xFlag )<br /> ENDIF<br /><br /> // wait until all files are written<br /> xCount := 0<br /> DO WHILE .T.<br /> // compare if file is written<br /> nCount := oTarget:items() :Count()<br /> IF nCount + nSkip >= i<br /> EXIT<br /> ENDIF<br /> hb_idleSleep( 0.1 )<br /> xCount ++<br /> IF xCount > 50<br /> EXIT<br /> ENDIF<br /> ENDDO<br /><br /> // scroll GRID if need<br /> LV_SETITEMSTATE( hGrid, i, nState, nMask )<br /> LV_EnsureVisible( hGrid, i )<br /><br /> // ELSE<br /> // // Skip un-maked<br /> // nSkip ++<br /> // ENDIF<br /> NEXT<br /> // clean up<br /> hb_idleSleep( 0.5 )<br /><br /> oTarget := NIL<br /> oNewSH := NIL<br /><br /> SYSrefresh()<br /><br />RETURN<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Static Function CompareFile()<br />*+<br />*+<br />*+--------------------------------------------------------------------<br />*+<br />STATIC FUNCTION CompareFile( aX, aY, lUp )<br /><br />LOCAL cName1, cName2<br />LOCAL lRet<br /><br /> DEFAULT lUp := .T.<br /><br /> cName1 := LOWER( FindExt( aX ) + FindName( aX ) )<br /> cName2 := LOWER( FindExt( aY ) + FindName( aY ) )<br /><br /> IF lUp = .T.<br /> lRet := cName1 < cName2<br /> ELSE<br /> lRet := cName1 > cName2<br /> ENDIF<br /><br />RETURN ( lRet )<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Static Function FindName()<br />*+<br />*+ Called from ( phone3.prg ) 2 - static function comparefile()<br />*+<br />*+--------------------------------------------------------------------<br />*+<br />STATIC FUNCTION FindName( filename )<br /><br />LOCAL nPosi := RAT( "</span>.<span style="color: #ff0000;">", filename )<br />RETURN SUBSTR( filename, 1, nPosi - 1 )<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Static Function FindExt()<br />*+<br />*+ Called from ( phone3.prg ) 2 - static function comparefile()<br />*+<br />*+--------------------------------------------------------------------<br />*+<br />STATIC FUNCTION FindExt( filename )<br /><br />LOCAL nPosi := RAT( "</span>.<span style="color: #ff0000;">", filename )<br />RETURN UPPER( SUBSTR( filename, nPosi + 1, LEN( filename ) ) )<br /><br />*+--------------------------------------------------------------------<br />*+<br />*+ Static Procedure SayBar()<br />*+<br />*+<br />*+--------------------------------------------------------------------<br />*+<br />STATIC PROCEDURE SayBar( cText, nPart )<br /><br />RETURN<br /><br />#include "</span>TGRID.PRG<span style="color: #ff0000;">"<br />#include "</span><span style="color: #00C800;">HB_FUNC</span>.PRG<span style="color: #ff0000;">"<br /><br />#endif<br /><br />*+ EOF: PHONE3.PRG</span></div>[/code:1o0n369n]
... but still need to "optimize" (DblCkick/Click to expand) |
download iPhone Photo connect to PC | Dear Jimmy,
Your example seems to work fine here
What do you need to enhance ? How to test it ?
many thanks |
download iPhone Photo connect to PC | hi Antonio,
CODE seems to work but there are some "small" Thing like Dblclick which did not "expand" so i need another Dblclick
full Sample need CLASS TGrid() (or XBROWSE) to work which still is "under construction"
but Sample can "show" Device "Path"
[img:2pnhj19p]https://i.postimg.cc/FzPS4RbB/Show-Device-Path.png[/img:2pnhj19p]
not sure about Android
try to change this line for Android
[code=fw:2pnhj19p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> cDevice <span style="color: #ff0000;">"APPLE IPHONE"</span> <span style="color: #B900B9;">// change for Android</span></div>[/code:2pnhj19p] |
download iPhone Photo connect to PC | Dear Jimmy,
In FWH\samples\testtree.prg double click works fine
so it may be something you are doing in your code... |
download iPhone Photo connect to PC | hi Antonio,
[quote="Antonio Linares":ou3m1emo]so it may be something you are doing in your code...[/quote:ou3m1emo]
Yes, 2nd Dblclick work as expect
i have to figure out why my 1st Dblclick is not working as expect |
download link SLACK mod harbour | Hello,
I can't remember the link to download all SLACK posts. Can someone help me out.
Thank you in advance
Otto |
download link SLACK mod harbour | Look your mail |
download link SLACK mod harbour | Dear Cristobal,
thank you very much.
Best regards
Otto |
downloading a specific file | On windows Seven I have difficulty downloading a specific file directly from a remote url and therefore I have to use this command
[code=fw:s8xr5bed]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> IsWinNT<span style="color: #000000;">(</span><span style="color: #000000;">)</span> .OR. isWin2000<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// XP/2000/NT</span><br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">"rundll32.exe url.dll, FileProtocolHandler "</span> + cUrl, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Start "</span> + cUrl, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> </div>[/code:s8xr5bed]
Now I would have the problem of locating the downloaded file presumably in the download folder of the window
since I can't force my folder where to download the file
how do i calculate the exact route in windows seven? |
downloading a specific file | Dear Silvio,
[url:3eaziqnd]https://answers.microsoft.com/en-us/windows/forum/all/where-are-downloaded-files-stored-with-windows-7/d4a0c9c3-af1a-46c8-9287-19681f525956[/url:3eaziqnd] |
downloading a specific file | [quote="Antonio Linares":zz34masi]Dear Silvio,
[url:zz34masi]https://answers.microsoft.com/en-us/windows/forum/all/where-are-downloaded-files-stored-with-windows-7/d4a0c9c3-af1a-46c8-9287-19681f525956[/url:zz34masi][/quote:zz34masi]
I allready Kow it <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
[b:zz34masi]C:\Users\Username\Downloads[/b:zz34masi]
but that's not always the case sometimes "Users" and sometimes "Users" even if the windows is in Italian language
and if at the moment of saving the user changes folder ????
the comand
WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )
ELSE
WinExec( "Start " + cUrl, 0 )
it doesn't give me the folder where the file was saved
causing problems for the other function that has to load the file to process it
this is because in window seven I cannot use this function [b:zz34masi]GETURLTOFILE(cUrl,cZipFile)[/b:zz34masi] because the function gives problems
[code=fw:zz34masi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GETURLTOFILE<span style="color: #000000;">(</span> cUrl, cFile, cUsr, cPsw <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br /> <span style="color: #00C800;">LOCAL</span> oHtp, oStr, ex<br /><br /> <span style="color: #00C800;">DEFAULT</span> cFile := CFILENAME<span style="color: #000000;">(</span> STRTRAN<span style="color: #000000;">(</span> cUrl, <span style="color: #ff0000;">"/"</span>, <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> ) )<br /><br /> //TRY<br /> oHtp = CREATEOBJECT( "</span>Msxml2.XMLHTTP<span style="color: #000000;">.6</span><span style="color: #000000;">.0</span><span style="color: #ff0000;">" )<br /> oHtp:Open( "</span>POST<span style="color: #ff0000;">", cUrl, .F., cUsr, cPsw )<br /> oHtp:Send()<br /><br /> IF oHtp:Status != 200 THEN BREAK<br /> MemoWrit(cFile,oHtp:ResponseBody)<br /> //oStr = CREATEOBJECT( "</span>ADODB.Stream<span style="color: #ff0000;">" )<br /> //oStr:Open()<br /> //oStr:Type = 1<br /> //oStr:Write( oHtp:ResponseBody )<br /> //oStr:SaveToFile( cFile, 2 )<br /> //oStr:Close()<br /><br /> lOk = .T.<br /> //CATCH ex<br /> // ? ex:message<br /> //END<br /><br /> RETURN lOk<br /></span></div>[/code:zz34masi]
on windows 10 run perfectly, on windows Seven No |
downloading a specific file | hi Silvio,
[quote="Silvio.Falconi":21j6soac]
but that's not always the case sometimes "Users" and sometimes "Users" even if the windows is in Italian language
[/quote:21j6soac]
you can use
[code=fw:21j6soac]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">LOCAL</span> cUser := Getenv<span style="color: #000000;">(</span><span style="color: #ff0000;">"USERPROFILE"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> cDownload := cUser +<span style="color: #ff0000;">"<span style="color: #000000;">\D</span>OWNLOADS"</span></div>[/code:21j6soac] |
downloading files from internet | Hi
I need to download files from internet.Can anyone pls suggest a method how it can be done ?
Thanks |
downloading files from internet | If the files are located on a FTP server you may use samples\gallery\icopyfil\icopyfil.prg |
downloading files from internet | Hi
Thanks Antonio.I am not sure whether they are on ftp server.I have to paste the complete path in URL address bar and the file gets downloaded.I have to provide the date for which the file is required and the file should be downloaded.Pls advice how this can be done
Thanks |
downloading files from internet | Rajeev,
Please show a URL sample like the ones that you are using. |
downloading files from internet | Hi Antonio
The URL below will download EOD prices of shares
<!-- m --><a class="postlink" href="http://www.nseindia.com/content/historical/EQUITIES/2006/APR/cm24APR2006bhav.csv">http://www.nseindia.com/content/histori ... 06bhav.csv</a><!-- m --> |
downloading files from internet | Rajeev,
Because IE recognizes the CSV extension, it displays the data in the browser rather than prompting the user for a download filename, then saving the data to a file.
Assuming you are not the one putting the data up on the net, then you have to find another way to collect the data. FW had a web client class you can use to read a web page. Below is the code to read the data into a varialble (cHTML). The data will come in with some header lines which you will then have to strip off, then you can just save cHTML to a file.
This code was tested with Harbour. I don't know if it will work with Clipper.
Regards,
James
[code:hlxn1tev]/*
Purpose: Example of how to get the HTML code for a web page
Date : 01/04/05
Notes : You must create a main window to use a socket.
I had to fix a bug in the TWebClient class, new method. It was returning nil
instead of self. TWEBCLIE.PRG was dated 11/11/1999 (came with FWH 2.4 July 2003).
The function ProcessPage does not return the code since it is collected in a socket
which may still be running when the function exits. You have to process the code
by assigning a function call to oWeb:oSocket:bClose
James Bott, jbott@compuserve.com
*/
#include "fivewin.ch"
#define FALSE .F.
#define TRUE .T.
function main()
local oWnd
define window oWnd
activate window oWnd ;
on init ProcessPage("http://www.nseindia.com/content/historical/EQUITIES/2006/APR/cm24APR2006bhav.csv")
return nil
function ProcessPage(cURL)
local oWeb
local cHTML:="" // contains HTML code
local cSite:=""
local cPage:=""
if left(upper(cURL),7) = "HTTP://"
cURL:= right(cURL,len(cURL)-7)
endif
cSite:= left(cURL, at("/",cURL)-1 )
cPage:= right(cURL,len(cURL)-at("/",cURL))
//msgInfo(cSite,"cSite")
//msgInfo(cPage,"cPage")
oWeb := TWebClient():New()
oWeb:oSocket:Cargo := FALSE
oWeb:bOnConnect = {|oWClient| oWClient:oSocket:Cargo := TRUE}
oWeb:bOnRead = {|cData| if(valtype(cData) == "C", cHTML += cData, )}
oWeb:Connect(cSite)
//msgInfo(cHTML)
// Keep trying to connect
while ! oWeb:oSocket:Cargo
WaitMessage()
SysRefresh()
enddo
// msgInfo("Connected to site")
oWeb:GetPage( cPage )
// Assign function to process code
oWeb:oSocket:bClose = {|self| ::end(), self:=Nil, Process(cHTML) }
//oWeb:oSocket:close()
sysrefresh()
//msgInfo("page collected")
//msgInfo(cHTML)
return nil
// Process the HTML code
function Process(cHTML)
msgInfo(cHTML,"HTML code") // for testing only
// Process the code here--save to file, extract data, etc.
return nil
// eof
//----------------------------------------------------------------------------//[/code:hlxn1tev] |
downloading files from internet | Hi James
Thanks for the program supplied for downloading the info from web page.When I ran that program I got the info displayed in a window.When I clicked the close button of the window I got following error message "Error BASE/1209 String Overflow: + from Errorsys,line:0".Pls advice how to overcome this problem.Is it occuring because info is more than 65K . I have noticed the CSV file size is between 65K-68K.If this is the case pls advice how to overcome this.
Digressing from the subject.A few years back when I had posted my first query on fivewin newsgroup you had answered it and introduced me to the concept of "Paying it forward".Eventhough I have not contributed anything to fivewin I try to reply to posts on other forums which I visit.It does give mental satisfaction when you help other people.
With Best Wishes
Rajeev Chavan |
downloading files from internet | Rajeev,
You need to migrate your application to FiveWin for Harbour (32 bits) where you can manage files as large as needed. In a week or less you may have it working with FWH. |
downloading files from internet | Rajeev,
[quote:1d1luiwn]Thanks for the program supplied for downloading the info from web page.When I ran that program I got the info displayed in a window.When I clicked the close button of the window I got following error message "Error BASE/1209 String Overflow: + from Errorsys,line:0".Pls advice how to overcome this problem.Is it occuring because info is more than 65K . I have noticed the CSV file size is between 65K-68K.If this is the case pls advice how to overcome this. [/quote:1d1luiwn]
Well, the best answer is like Antonio says, upgrade to 32bit. You are going to have to do this sooner or later.
Otherwise, you can try processing the data one line at a time and saving it to a file, instead of pasting it all together into one large string. Oh, and you don't need to display the data, I just put that in there for testing.
Take a look at the TTxtFile class for ideas how to write the data to a file as it is being read.
I'm glad you have been paying it forward.
James |
downloading files from internet | Hi Jeff
Will do as suggested by you.I am really getting confused should I go for Harbor or xHarbor ? Pls advice
Thanks
Rajeev Chavan |
downloading files from internet | Rajeev,
xharbour is more popular, but both Harbour and xharbour work very well.
If you don't use xharbour extensions, then you may be able to build your application with both compilers and decide for yourself which one to use. |
downloading files from internet | Hi Jeff
Thanks for the guidance.The problem I am getting is the variable would'nt hold more than 65K.Does TTxtFile class contain a way to overcome the 65K limit ? Pls advice.
Thanks
Hi antonio
Thanks for the info.I will try it
Rajeev Chavan |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.