topic
stringlengths
1
63
text
stringlengths
1
577k
Burn files to CD/DVD
Stephan Haupt Made something of it many years a go Perhaps someone have this class because Stephan is dead
Burn files to CD/DVD
I found a copy : [b:27a9eods]XPBurn[/b:27a9eods] this use XPBurnObj.dll you can found here :https://bayden.com/Other/ [code=fw:27a9eods]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">FUNCTION</span> BurnCDInXP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">LOCAL</span> cBurnPath<br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> oCD := XPBurnObj<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />   oFSO := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Scripting.FileSystemObject"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// If we get here we're in XP and this shouldn't fail...</span><br />   <span style="color: #B900B9;">//</span><br />   WITH OBJECT <span style="color: #000000;">&#40;</span> oCD <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">ClearFiles</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                                     <span style="color: #B900B9;">// Erases ALL files from burning area...</span><br />      <span style="color: #B900B9;">//</span><br />      MakeDir<span style="color: #000000;">&#40;</span> cBurnPath := <span style="color: #000000;">&#40;</span> :<span style="color: #000000;">BurnArea</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\B</span>ackup"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Build your directory structure...</span><br />      MakeDir<span style="color: #000000;">&#40;</span> cBurnPath += <span style="color: #ff0000;">"<span style="color: #000000;">\c</span>ompanyname"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">AddFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\y</span>ourfile.ext"</span> <span style="color: #000000;">&#41;</span>                     <span style="color: #B900B9;">// This method add the file to the root of the CD..</span><br />      oFSO:<span style="color: #000000;">CopyFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"u:<span style="color: #000000;">\y</span>ourfile.zip"</span>, cBurnPath + <span style="color: #ff0000;">"<span style="color: #000000;">\b</span>ackup.ext"</span> <span style="color: #000000;">&#41;</span><br />                                                        <span style="color: #B900B9;">// Copy to the directory you just created...</span><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">StartBurn</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                                      <span style="color: #B900B9;">// Invokes the XP Burning wizard...</span><br />   END<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//***</span><br /><span style="color: #00C800;">FUNCTION</span> XPBurnObj<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//***</span><br />   <span style="color: #00C800;">LOCAL</span> oBurn<br />   <span style="color: #B900B9;">//</span><br />   <span style="color: #00C800;">IF</span> Os_IsWinXP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">TRY</span><br />         oBurn := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"BaydenBurn.XPBurn"</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">IF</span> !<span style="color: #000000;">&#40;</span> oBurn:<span style="color: #000000;">Equipped</span> <span style="color: #000000;">&#41;</span><br />            oBurn := <span style="color: #00C800;">NIL</span><br />         <span style="color: #00C800;">ENDIF</span><br />      CATCH<br />      END<br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #B900B9;">//</span><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> oBurn <span style="color: #000000;">&#41;</span></div>[/code:27a9eods] If you have application Nero you can use another this class but never I tried it [code=fw:27a9eods]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbclass.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"classex.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> NERO_MEDIA_CD                     <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> NERO_MEDIA_CDRW                 <span style="color: #000000;">129</span><br /><span style="color: #00D7D7;">#define</span> NERO_MEDIA_CDR                  <span style="color: #000000;">257</span><br /><span style="color: #00D7D7;">#define</span> NERO_MEDIA_DVD_ANY           <span style="color: #000000;">262172</span><br /><br /><span style="color: #00D7D7;">#define</span> NERO_AUDIO_TRACK_FILE_MP3         <span style="color: #000000;">2</span><br /><br /><span style="color: #00D7D7;">#define</span> NERO_BURN_OPTION_USE_JOLIET       <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> NERO_BURN_OPTION_CREATE_ISO_FS    <span style="color: #000000;">8</span><br /><br /><span style="color: #00D7D7;">#define</span> NERO_BURN_FLAG_SIMULATE           <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> NERO_BURN_FLAG_WRITE              <span style="color: #000000;">4</span><br /><br /><span style="color: #00C800;">CLASS</span> NeroBurnCD<br /><span style="color: #B900B9;">//****</span><br />   CLASSDATA  nInstance <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br /><br />   <span style="color: #00C800;">DATA</span> oNero         <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> lNero         <span style="color: #0000ff;">INIT</span> .F.<br />   <span style="color: #00C800;">DATA</span> oNeroDrives   <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> oNeroISOTrack <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> aDrives       <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">DATA</span> oNeroBurn     <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> oNeroFolder   <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> nDriveActive  <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">DATA</span> cType         <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">DATA</span> aFiles        <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">DATA</span> aNeroFiles    <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">DATA</span> oLastError   <span style="color: #0000ff;">INIT</span> <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">DATA</span> aErrors      <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   ACCESS lBurnersOK           <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aDrives</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   ACCESS lNeroOK              <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oLastError</span> = <span style="color: #00C800;">NIL</span> .AND. EMPTY<span style="color: #000000;">&#40;</span><br />::<span style="color: #000000;">aErrors</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   ACCESS EnableOverBurn       <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span>, ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">EnableOverBurn</span>,<br />.F. <span style="color: #000000;">&#41;</span><br />   ASSIGN EnableOverBurn<span style="color: #000000;">&#40;</span> l <span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span>, ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">EnableOverBurn</span> :=<br />l, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />   ACCESS DVDOverburnSize      <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span>, ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">DVDOverburnSize</span>,<br /><span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   ASSIGN DVDOverburnSize<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span>, ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">DVDOverburnSize</span><br />:= n, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                                CONSTRUCTOR<br /><br />   <span style="color: #00C800;">METHOD</span> CreateAlbum<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                        <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">CreateNeroObj</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> AddMP3<span style="color: #000000;">&#40;</span> cFileName, cArtist, cTitle <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">AddNewFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A"</span>,<br />cFileName, cArtist, cTitle <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> CreateISOTrack<span style="color: #000000;">&#40;</span> cTitle, rootFolder <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> SetCDLabel<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span>                 <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">CreateISOTrack</span><span style="color: #000000;">&#40;</span><br />cTitle <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> SetRootFolder<span style="color: #000000;">&#40;</span> rootFolder <span style="color: #000000;">&#41;</span>          <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">CreateISOTrack</span><span style="color: #000000;">&#40;</span>,<br />rootFolder <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> CreateFolder<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                       <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">CreateNeroObj</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"F"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span>                 <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">AddNewFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"F"</span>,<br />cFileName <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> BurnCD<span style="color: #000000;">&#40;</span> nSpeed, cArtist, cTitle <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> GetFolder<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                          <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oNeroFolder</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> NeroInstalled<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                      <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> GetDrives<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> GetErrors<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                          <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aErrors</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> IsDeviceReady<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                      <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oNeroBurn</span> = <span style="color: #00C800;">NIL</span>,<br />.F., ::<span style="color: #000000;">oNeroBurn</span>:<span style="color: #000000;">DeviceReady</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> SetDriveToBurn<span style="color: #000000;">&#40;</span> nDrive <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   HIDDEN:<br /><br />   <span style="color: #00C800;">METHOD</span> CreateNeroObj<span style="color: #000000;">&#40;</span> cObj <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> AddNewFile<span style="color: #000000;">&#40;</span> cObj, cFileName, cArtist, cTitle <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> NeroBurnCD<br /><span style="color: #B900B9;">//****</span><br />   <span style="color: #00C800;">LOCAL</span> i<br />   <span style="color: #B900B9;">//</span><br />   ::<span style="color: #000000;">lNero</span> := .F.<br />   <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> ++ ::<span style="color: #000000;">nInstance</span> > <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oNero</span> := GetActiveObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nero.Nero"</span> <span style="color: #000000;">&#41;</span><br />   CATCH<br />      <span style="color: #00C800;">TRY</span><br />         ::<span style="color: #000000;">oNero</span> := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nero.Nero"</span> <span style="color: #000000;">&#41;</span><br />      CATCH<br />         ::<span style="color: #000000;">oNero</span> := <span style="color: #00C800;">NIL</span><br />      END<br />   END<br />   <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lNero</span> := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oNero</span> != <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">EnableOverburn</span> := .F.<br />      ::<span style="color: #000000;">DVDOverburnSize</span> := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">METHOD</span> GetDrives<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//****</span><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oNeroDrives</span> := ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">GetDrives</span><span style="color: #000000;">&#40;</span> NERO_MEDIA_CDRW +<br />NERO_MEDIA_DVD_ANY <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> ::<span style="color: #000000;">oNeroDrives</span>:<span style="color: #0000ff;">Count</span> - <span style="color: #000000;">1</span><br />         AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aDrives</span>, ::<span style="color: #000000;">oNeroDrives</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">DeviceName</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">NEXT</span><br />      ::<span style="color: #000000;">nDriveActive</span> := <span style="color: #000000;">0</span><br />   CATCH oError<br />      ::<span style="color: #000000;">oLastError</span> := oError<br />      AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aErrors</span>, oError:<span style="color: #000000;">Description</span> + <span style="color: #ff0000;">" ("</span> + ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">LastError</span> + <span style="color: #ff0000;">")"</span> <span style="color: #000000;">&#41;</span><br />   END<br />   <span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">METHOD</span> SetDriveToBurn<span style="color: #000000;">&#40;</span> nDrive <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//****</span><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">nDriveActive</span> := nDrive - <span style="color: #000000;">1</span><br />      ::<span style="color: #000000;">oNeroBurn</span> := ::<span style="color: #000000;">oNeroDrives</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nDriveActive</span> <span style="color: #000000;">&#41;</span><br />      ALERT<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oNeroBurn</span>:<span style="color: #000000;">DeviceName</span> + <span style="color: #ff0000;">" activado !!!"</span> <span style="color: #000000;">&#41;</span><br />   CATCH oError<br />      ::<span style="color: #000000;">oLastError</span> := oError<br />      AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aErrors</span>, oError:<span style="color: #000000;">Description</span> + <span style="color: #ff0000;">" ("</span> + ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">LastError</span> + <span style="color: #ff0000;">")"</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">nDriveActive</span> := <span style="color: #000000;">0</span><br />      ::<span style="color: #000000;">oNeroBurn</span> := <span style="color: #00C800;">NIL</span><br />   END<br />   <span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">METHOD</span> CreateNeroObj<span style="color: #000000;">&#40;</span> cObj <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//****</span><br />   <span style="color: #00C800;">TRY</span><br />      <span style="color: #00C800;">SWITCH</span> cObj<br />      <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">"F"</span><br />         ::<span style="color: #000000;">oNeroFolder</span> := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nero.NeroFolder"</span> <span style="color: #000000;">&#41;</span><br />         EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">"A"</span><br />         ::<span style="color: #000000;">oNeroFolder</span> := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nero.NeroAudioTracks"</span> <span style="color: #000000;">&#41;</span><br />         EXIT<br />      END<br />      ::<span style="color: #000000;">cType</span> := cObj<br />   CATCH oError<br />      ::<span style="color: #000000;">oLastError</span> := oError<br />      AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aErrors</span>, oError:<span style="color: #000000;">Description</span> + <span style="color: #ff0000;">" ("</span> + ::<span style="color: #000000;">oNero</span>:<span style="color: #000000;">LastError</span> + <span style="color: #ff0000;">")"</span> <span style="color: #000000;">&#41;</span><br />   END<br />   <span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//****</span><br /><span style="color: #00C800;">METHOD</span> AddNewFile<span style="color: #000000;">&#40;</span> cObj, cFileName, cArtist, cTitle <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//****</span><br />   <span style="color: #00C800;">LOCAL</span> oFile<br />   <span style="color: #B900B9;">//</span><br />   <span style="color: #00C800;">TRY</span><br />      <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oNeroFolder</span> = <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />         ALERT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cree el 'RootFolder' antes de añadir archivos !!!"</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">BREAK</span><br />      <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> cFileName IN ::<span style="color: #000000;">aFiles</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">BREAK</span><br />      <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">SWITCH</span> cObj<br />         <span style="color: #00C800;">CASE</span> <span style="color: #ff0000;">"F"</span><br />            oFile := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Nero.NeroFile"</span> <span style="color: #000000;">&#41;</span><br />            oFile:<span style="color: #0000ff;">Name</span> := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cFileName, RAT<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\"</span>,cFileName)+1 )<br />            oFile:SourceFilePath := cFileName<br />            EXIT<br />         CASE "</span>A<span style="color: #ff0000;">"<br />            oFile := TOleAuto():new( "</span>Nero.NeroAudioTrack<span style="color: #ff0000;">" )<br />            oFile:Artist := IF( cArtist = NIL, "</span><span style="color: #ff0000;">", cArtist )<br />            oFile:Title := IF( cTitle = NIL, "</span><span style="color: #ff0000;">", cTitle )<br />            oFile:TrackType = NERO_AUDIO_TRACK_FILE_MP3<br />            oFile:FileName := cFileName<br />            EXIT<br />         END<br />         //<br />         AADD( ::aFiles, cFileName )<br />         AADD( ::aNeroFiles, oFile )<br />         SWITCH cObj<br />         CASE "</span>F<span style="color: #ff0000;">"<br />            ::oNeroFolder:Files:Add( oFile )<br />            EXIT<br />         CASE "</span>F<span style="color: #ff0000;">"<br />            ::oNeroFolder:Add( oFile )<br />            EXIT<br />         END<br />      ELSE<br />         ALERT( "</span>El archivo <span style="color: #ff0000;">'" + cFileName + "'</span> no existe !!!<span style="color: #ff0000;">" )<br />      ENDIF<br />   CATCH oError<br />      ::oLastError := oError<br />      AADD( ::aErrors, oError:Description + "</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" + ::oNero:LastError + "</span><span style="color: #000000;">&#41;</span><span style="color: #ff0000;">" )<br />   END<br />   //<br />RETURN Self<br /><br />//****<br />METHOD CreateISOTrack( cTitle, rootFolder )<br />//****<br />   TRY<br />      IF ( ::oNeroISOTrack = NIL )<br />         ::oNeroISOTrack := TOleAuto():new( "</span>Nero.NeroISOTrack<span style="color: #ff0000;">" )<br />         ::oNeroISOTrack:BurnOptions := ;<br />                    NERO_BURN_OPTION_CREATE_ISO_FS +<br />NERO_BURN_OPTION_USE_JOLIET<br />      ENDIF<br />      IF ( cTitle != NIL )<br />         ::oNeroISOTrack:name := cTitle<br />      ENDIF<br />      IF ( rootFolder != NIL )                   // Has to be a Nero.Folder<br />object...<br />         ::oNeroISOTrack:RootFolder := rootFolder<br />      ENDIF<br />   CATCH oError<br />      ::oLastError := oError<br />      AADD( ::aErrors, oError:Description + "</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">" + ::oNero:LastError + "</span><span style="color: #000000;">&#41;</span><span style="color: #ff0000;">" )<br />   END<br />   //<br />RETURN Self<br /><br />//****<br />METHOD BurnCD( nSpeed, cArtist, cTitle )<br />//****<br />   TRY<br />     ::oNeroBurn:WaitForMedia( NERO_MEDIA_CD, ;<br />                          NERO_BURN_FLAG_SIMULATE + NERO_BURN_FLAG_WRITE,<br />NIL )<br />     ALERT( "</span>WaitForMedia<span style="color: #ff0000;">" )<br />   END<br />   /*::oNeroBurn:UpdateDeviceInfo( NERO_MEDIA_CD )<br />   ALERT( ::oNeroBurn:DeviceName )<br />   ALERT( ::oNeroBurn:DeviceReady )<br />   ALERT( ::oNeroBurn:DriveLetter )<br />   ALERT( ::oNeroBurn:HostAdapterName ) */<br />   //IF ::IsDeviceReady()<br />      SWITCH ::cType<br />      CASE "</span>F<span style="color: #ff0000;">"<br />         ::oNeroBurn:BurnIsoAudioCD( cArtist, cTitle, .F., ::oNeroISOTrack,<br />NIL, NIL, ;<br />                     NERO_BURN_FLAG_SIMULATE + NERO_BURN_FLAG_WRITE, nSpeed,<br />NERO_MEDIA_CD )<br />         EXIT<br />      CASE "</span>A<span style="color: #ff0000;">"<br />         ::oNeroBurn:BurnIsoAudioCD( cArtist, cTitle, .F., NIL,<br />::oNeroFolder, NIL, ;<br />                   NERO_BURN_FLAG_SIMULATE + NERO_BURN_FLAG_WRITE, nSpeed,<br />NERO_MEDIA_CD )<br />         EXIT<br />      END<br />   //ELSE<br />   //   ALERT( "</span>Falta configurar algo o la unidad no esta lista !!!<span style="color: #ff0000;">" )<br />   //ENDIF<br />   ::oNeroBurn:EjectCD()<br />   ::oNeroBurn:LoadCD()<br />   //<br />RETURN Self<br /><br />//****<br />METHOD Destroy()<br />//****<br />   ::lNero         := .F.<br />   ::oNeroDrives   := NIL<br />   ::oNeroISOTrack := NIL<br />   ::aDrives       := {}<br />   ::oNeroBurn     := NIL<br />   ::oNeroFolder   := NIL<br />   ::aErrors   := {}<br />   ::oNero         := NIL<br />   //<br />RETURN Self<br /></span></div>[/code:27a9eods]
Burn files to CD/DVD
Another test with Imapi this first sample is working, but you have to install the Imapi2 support. from MSDN: Run-Time Requirements IMAPI 2.0 is supported natively in Windows Vista and Windows Server 2008. Enabling IMAPI 2.0 functionality for Windows XP and Windows Server 2003 requires the installation of the KB932716 update package. FUNCTION IMapi () LOCAL oMaster,oRecorder, nID, nIndex := 1, oDisc // LOCAL cCLSID := "20CCA62-51A5-11D3-9144-00104BA11C5E" // oMaster := CreateOleObject ("IMAPI.MsDiscMasterObj") // Imapi V1 // oDisc:= oMaster:IDiscMaster // ? oDisc:Open() oMaster := CreateObject("IMAPI2.MsftDiscMaster2") oRecorder := CreateObject ("IMAPI2.MsftDiscRecorder2") nID := oMaster:Item (nIndex) oRecorder:InitializeDiscRecorder( nId ) ? oRecorder:VolumeName RETURN (nil)
Burn files to CD/DVD
Silvio, thank you for your help !
Burn files to CD/DVD
I think the samples I publish are good only until windows xp professional but if someone have or found a solution for win7/8/10 can pubblish it here
Burn files to CD/DVD
Natter, You can use <!-- m --><a class="postlink" href="http://commandburner.com/">http://commandburner.com/</a><!-- m --> ( very small : the exe is only 172 KB ) Includes everything You might need. Just copy the files to Your progam-directory includes : CmdBurn.exe ( 172 KB ) CmdBurn.cmh ( 176 KB ) MCDB.ocx ( 370 KB ) Small.gif ( 2 KB ) [color=#FF0000:18uoilkw][b:18uoilkw]CommandBurner[/b:18uoilkw][/color:18uoilkw] is a [color=#0000FF:18uoilkw][b:18uoilkw]free CD/DVD burning software utility [/b:18uoilkw][/color:18uoilkw]that can be executed from the [color=#0000FF:18uoilkw][b:18uoilkw]command line[/b:18uoilkw][/color:18uoilkw], as well as through a simple interface. CommandBurner can be executed from the command line, or through any method that passes command line arguments. Simple options allow you to burn, erase, load and eject [color=#0000FF:18uoilkw][b:18uoilkw]CDs and DVDs[/b:18uoilkw]. [/color:18uoilkw] This makes CommandBurner suitable for [color=#0000FF:18uoilkw][b:18uoilkw]integration with programs, scripts and batch files[/b:18uoilkw][/color:18uoilkw]. We imagine that CommandBurner would be useful for tasks such as scripting backups to CD/DVD, but feel free to find other reasons to use it! For added convenience, CommandBurner can also be opened in console mode, allowing the user to perform the same CD/DVD burning operations using a simple point-and-click interface. [color=#0000FF:18uoilkw][b:18uoilkw]Media Support[/b:18uoilkw][/color:18uoilkw] CommandBurner supports [color=#0000FF:18uoilkw][b:18uoilkw]ALL[/b:18uoilkw][/color:18uoilkw] writable media including [color=#0000FF:18uoilkw][b:18uoilkw]CD-R, DVD-R, CD-RW, DVD-RW, DVD+R, DVD+R DL[/b:18uoilkw].[/color:18uoilkw] [color=#0000FF:18uoilkw][b:18uoilkw]The command![/b:18uoilkw][/color:18uoilkw] cmdburn [command] <options> Where command is one of: burn, eject, load, erase or fullerase and <options> is one or more of: /f [filepath], /d [dirpath], /l [label], /erase, /eject, /fullerase or /noexit where: /f [filepath] is the name of the file you wish to burn /d [dirpath] is the name of the directory you wish to burn /l [label] is the new label for the CD / DVD /erase if you want to erase before burn /eject if you want to eject after burn /fullerase if you want to perform a full erase before burn (warning: this could take a long time depending on the size of the disk) /noexit if you want to return to interactive mode when the batch process is completed /hide if you want hide the user interface during operation /prompterase (use with burn command) if you want to prompt the user when erasing a disc that already contains data - --do not use with /hide /popuperror (use with burn command) if you wish to display a popup if an error occurs - do not use with /hide /? if you want to see this usage information [b:18uoilkw]Command line examples[/b:18uoilkw] >cmdburn burn /f c:\potato\tomato.doc This will burn the file c:\potato\tomato.doc to cd. >cmdburn burn /f c:\potato\tomato.doc /l BCKUP /eject This will burn the file c:\potato\tomato.doc to cd, label the CD "BCKUP" and eject the CD when burning has finished. >cmdburn burn /d c:\backup /l BCK_CD /eject will burn the contents of C:\backup to a CD, label the CD as "BCK_CD" and will eject the disc when finished. >cmdburn burn /d c:\backup /l CmdBn /erase /eject will first erase the CD, then burn the contents of C:\backup, label the CD as "CmdBn" and will eject the disc when finished. regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Burn files to CD/DVD
I thinked natter need something ton insert on fwh application no extern.... if you download Nero you can use the class or Nero ....
Burn files to CD/DVD
Uwe, thank ! I was interested to write on CD media FW. If not, use an external application
Burn files to CD/DVD
I found this Mister Antonio's sample. May be help you. [code=fw:139cuw9h]<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> &nbsp;HKEY_CURRENT_USER &nbsp;0x80000001<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCDRec := TCDRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oReg32, cValue<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oCDRec:<span style="color: #000000;">IsAvailable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oCDRec:<span style="color: #000000;">GetDrive</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oReg32 = TReg32<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> HKEY_CURRENT_USER,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Software<span style="color: #000000;">\M</span>icrosoft<span style="color: #000000;">\W</span>indows<span style="color: #000000;">\C</span>urrentVersion<span style="color: #000000;">\E</span>xplorer<span style="color: #000000;">\S</span>hell Folders"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oReg32:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CD Burning"</span>, @cValue <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oReg32:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// MsgInfo( oCDRec:GetPath() )</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// aqui llamar al método addfile por cada fichero</span><br /><br />&nbsp; &nbsp;oCDRec:<span style="color: #000000;">Burn</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;oCDRec:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">CLASS</span> TCDRec<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; hCD<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; aFiles<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GetSize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> VIRTUAL<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> IsAvailable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> CDAvailable<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hCD</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GetDrive<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> CDDrive<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hCD</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> GetPath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> CDGetPath<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Burn<span style="color: #000000;">&#40;</span> hWnd <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> CDBurn<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hCD</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> CoUninitialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">ENDCLASS</span> &nbsp;<br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCDRec<br /><br />&nbsp; &nbsp;CoInitialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">hCD</span> = CDInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">aFiles</span> := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span> &nbsp;</div>[/code:139cuw9h]
Burn files to CD/DVD
Perhaps we need some functions ? ( or are on fwh libs ?)
Burn files to CD/DVD
Great Uwe !!! Works perfectly. Thanks a lot.
Burncd
i found on xharbour.com an utility for burn a cd but when i try to run it not run ok Some one can trying it please !! N.B. i not want cdburner of manchera because he not give me all the sources codes.
Burncd
Hola al foro Una pena, ese codigo lo deje para que todos usen sin costo. silvio solo lo compilo en 16bit y luego con el decompilador de clipper obtubo en codigo de la clase me entero que ahora tiene costo entre otras cosas la pensare para donar otros trabajos al foro
Burncd
Arturo No te preocupes del accionar de algún miembro del foro. Sabes que "en todas partes se cuecen habas" y el foro no es una excepción. Los que estamos retroalimentando el foro lo hacemos por simple vocación de compartir nuestros pocos conocimientos, aunque habrá algunos que tomen ventaja de eso. No he visto tu clase, ni tu codigo si lo liberaste, pero si estuviera en tu lugar no prestaría atención a las actitudes personales de los concurrentes. Un fuerte abrazo compañero [quote="Arturo Tamayo Daza":px08dtcb]Hola al foro Una pena, ese codigo lo deje para que todos usen sin costo. silvio solo lo compilo en 16bit y luego con el decompilador de clipper obtubo en codigo de la clase me entero que ahora tiene costo entre otras cosas la pensare para donar otros trabajos al foro[/quote:px08dtcb]
Busar en un array y que devuelva la posicion
compañeros, Buenas: ¿Existe algún comando que busca una palabra en un array y que devuelva la posición donde lo encontró? Ejemplo: Tengo el siguiente array: {'CADIZ','MALAGA','SEVILLA','HUELVA','CORDOBA'} y necesito que al buscar 'SEVILLA' me devuelva 3 (que es la posición dentro del array). Gracias. Un saludo. LORENZO. Desde Cádiz, ESpaña.
Busar en un array y que devuelva la posicion
Se me ocurre lo siguiente: [code=fw:2xndbutd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> BuscaArray<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> array:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'CADIZ'</span>,<span style="color: #ff0000;">'MALAGA'</span>,<span style="color: #ff0000;">'SEVILLA'</span>,<span style="color: #ff0000;">'HUELVA'</span>,<span style="color: #ff0000;">'CORDOBA'</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> variable:=<span style="color: #ff0000;">'SEVILLA'</span><br /><span style="color: #00C800;">Local</span> posicion:=<span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">for</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>array<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">if</span> variable=array<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br />     posicion:=i<br />  <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">next</span><br /><span style="color: #00C800;">Return</span> posicion<br /> </div>[/code:2xndbutd] Saludos
Busar en un array y que devuelva la posicion
Quizás esta funcion te sirva AScan(<aTargets>, <expSearch>, [<nStart>], [<nCount>],[<lExact>], [<lASCII>]) -> nStoppedAt
Busar en un array y que devuelva la posicion
Otro ejemplo sencillo: Ascan devuelve la posicion del elemento, si lo encuentra. Caso contrario devuelve 0. Local array:={'CADIZ','MALAGA','SEVILLA','HUELVA','CORDOBA'}, cVariable:="SEVILLA" nPos := Ascan(array,cVariable)
Busca combobox em 7.05 não funciona mais
Já não me funciona mais busca em combobox, antes quando se digitava uma letra o combo já posicionava na primeira letra encontrada, agora não busca mais. Gracias Mário FWH 7.05 ( Ultimo Build ) xHB ( 99.70 ) Ultimo RC.
Busca combobox em 7.05 não funciona mais
Mario, fwh\samples\combos.prg is working fine (see pressing T): [url=http&#58;//imageshack&#46;us:nzljxaqr][img:nzljxaqr]http&#58;//img408&#46;imageshack&#46;us/img408/4453/combosbv4&#46;png[/img:nzljxaqr][/url:nzljxaqr]
Busca combobox em 7.05 não funciona mais
Es verdad, no funciona mas... Antes, aunque estuvieran desordenados los elementos del combobox, bastaba presionar la letra varias veces, hasta encontrar el elemento justo, ahora no funciona mas, busca solo el primero. Saludos.
Busca combobox em 7.05 não funciona mais
Pero ahora en vez, funciona la busqueda incremental, al presionar la segunda letra... Mucho mejor. Saludos.
Buscador de puntos de acceso WiFi
Saludos Gracias a Otto por compartir el codigo original, fue adaptadoa FWPPC Descargar desde aqui: [url:15hjlocn]http&#58;//www&#46;sitasoft&#46;net/fivewin/samples/fwppc/wifi&#46;zip[/url:15hjlocn] sample [code=fw:15hjlocn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FWCE.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oWnd<br />   <span style="color: #00C800;">LOCAL</span> oWifi<br />   <span style="color: #00C800;">LOCAL</span> aAdapters, cAdapter<br />   <span style="color: #00C800;">LOCAL</span> n<br />   <span style="color: #00C800;">LOCAL</span> aInfo<br />   <span style="color: #00C800;">LOCAL</span> ctext<br />   <span style="color: #00C800;">LOCAL</span> oBrw<br />   <br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Wifi Search"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">220</span>, <span style="color: #000000;">210</span><br />   <br />   oWifi = TWifiScan<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   aInfo = GetInfo<span style="color: #000000;">&#40;</span> oWifi <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #B900B9;">/*<br />   MacAddress ( string )               <br />   Ssid       ( string )        <br />   Channel    ( numeric )        <br />   Auth       ( string )        <br />   InfrastructureMode  ( string )<br />   Signal( numeric )   */</span><br /><br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">LISTBOX</span> oBrw ;<br />      FIELDS aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, Transform<span style="color: #000000;">&#40;</span>aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>, <span style="color: #ff0000;">"9999"</span> <span style="color: #000000;">&#41;</span>,;<br />             Transform<span style="color: #000000;">&#40;</span> aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, <span style="color: #ff0000;">"999"</span> <span style="color: #000000;">&#41;</span>, aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, ;<br />             aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, aInfo<span style="color: #000000;">&#91;</span> oBrw:<span style="color: #000000;">nAt</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> ;<br />      HEADERS <span style="color: #ff0000;">"Name"</span>, <span style="color: #ff0000;">"Sig"</span>, <span style="color: #ff0000;">"Ch"</span>, <span style="color: #ff0000;">"Type"</span>, <span style="color: #ff0000;">"Sec"</span>, <span style="color: #ff0000;">"Mac"</span>;<br />      COLSIZES  <span style="color: #000000;">100</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">150</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">82</span> <br />   <br />   oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br />    <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">CENTERED</span>;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> aInfo := GetInfo<span style="color: #000000;">&#40;</span> oWifi, cAdapter <span style="color: #000000;">&#41;</span>,;<br />                      oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span>,;<br />                      oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   oWifi:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> GetInfo<span style="color: #000000;">&#40;</span> oWifi <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aInfo <br />   <span style="color: #00C800;">local</span> cAdapter<br />   <br />   cAdapter = GetAdapter<span style="color: #000000;">&#40;</span> oWifi <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cAdapter <span style="color: #000000;">&#41;</span><br />      oWifi:<span style="color: #000000;">RefreshBSSIDs</span><span style="color: #000000;">&#40;</span> cAdapter <span style="color: #000000;">&#41;</span><br />      aInfo = oWifi:<span style="color: #000000;">GetBBSIDs</span><span style="color: #000000;">&#40;</span> cAdapter <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <br />      aInfo := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> , , <span style="color: #000000;">0</span>, , , <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aInfo<br /><br /><span style="color: #00C800;">FUNCTION</span> GetAdapter<span style="color: #000000;">&#40;</span> oWifi <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aAdapters := oWifi:<span style="color: #000000;">GetAdapters</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cAdapter := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aAdapters <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />      cAdapter = aAdapters<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />   <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> cAdapter   <br /><br /> </div>[/code:15hjlocn] CLASS [code=fw:15hjlocn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">CLASS</span> TWifiScan<br /><br />   <span style="color: #00C800;">DATA</span> hHandle<br />   <br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> GetAdapters  <span style="color: #00C800;">INLINE</span> GetAdapters<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hHandle</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> GetBBSIDs<span style="color: #000000;">&#40;</span> cAdapter <span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">INLINE</span> GetBBSIDs<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hHandle</span>, cAdapter <span style="color: #000000;">&#41;</span><br />                                 <span style="color: #B900B9;">/*Return Array 6 position<br />                                   MacAddress ( string )               <br />                                   Ssid       ( string )        <br />                                   Channel    ( numeric )        <br />                                   Auth       ( string )        <br />                                   InfrastructureMode  ( string )<br />                                   Signal( numeric ) */</span><br /><br />   <br />   <span style="color: #00C800;">METHOD</span> RefreshBSSIDs<span style="color: #000000;">&#40;</span> cAdapter <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> RefreshBSSIDs<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hHandle</span>, cAdapter <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <span style="color: #00C800;">INLINE</span> EndWifi<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hHandle</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TWifiScan<br /><br />   ::<span style="color: #000000;">hHandle</span> = InitWifi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /> </div>[/code:15hjlocn] C code [code=fw:15hjlocn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><span style="color: #00D7D7;">#include</span> <ntddndis.h><br /><span style="color: #00D7D7;">#include</span> <nuiouser.h><br /><span style="color: #00D7D7;">#include</span> <winioctl.h><br /><br />typedef struct tagWifiPeek<span style="color: #000000;">&#123;</span><br />    CRITICAL_SECTION m_Lock;<br />    HANDLE m_hNDUIO;<br /><span style="color: #000000;">&#125;</span> WIFIPEEK;<br />typedef WIFIPEEK  *PFWIFIPEEK;<br /><br />void CloseWifi<span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span>;<br />BOOL OpenWifi<span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span>;<br />LPWSTR AnsiToWide<span style="color: #000000;">&#40;</span> LPSTR <span style="color: #000000;">&#41;</span>;<br />LPSTR WideToAnsi<span style="color: #000000;">&#40;</span> LPWSTR <span style="color: #000000;">&#41;</span>;<br />const char cSep = <span style="color: #ff0000;">'-'</span>;<br /><span style="color: #00C800;">static</span> char * sAuth_Mode<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Open System"</span>,<br />                              <span style="color: #ff0000;">"Wep"</span> <span style="color: #000000;">&#125;</span>;<br />                              <br /><span style="color: #00C800;">static</span> char * sInfra_Mode<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Ad Hoc"</span>,<br />                                <span style="color: #ff0000;">"Access Point"</span>,<br />                                <span style="color: #ff0000;">"Auto or unknown"</span> <span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #B900B9;">//----------------------------------</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> ENDWIFI <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />  PFWIFIPEEK pWifi = <span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />  <br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> pWifi->m_hNDUIO != <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        CloseWifi<span style="color: #000000;">&#40;</span> pWifi <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    DeleteCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />    hb_xfree<span style="color: #000000;">&#40;</span> pWifi <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> INITWIFI <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />  PFWIFIPEEK pWifi = hb_xgrab<span style="color: #000000;">&#40;</span> sizeof<span style="color: #000000;">&#40;</span> WIFIPEEK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <br />    pWifi->m_hNDUIO=<span style="color: #00C800;">NULL</span>;<br />    InitializeCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> OpenWifi<span style="color: #000000;">&#40;</span> pWifi <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />       hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LONG <span style="color: #000000;">&#41;</span> pWifi <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">else</span><br />    <span style="color: #000000;">&#123;</span><br />       hb_xfree<span style="color: #000000;">&#40;</span> pWifi <span style="color: #000000;">&#41;</span>;<br />       hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------</span><br /><br /><br />void CloseWifi<span style="color: #000000;">&#40;</span> PFWIFIPEEK pWifi <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    CloseHandle<span style="color: #000000;">&#40;</span> pWifi->m_hNDUIO <span style="color: #000000;">&#41;</span>;<br />    pWifi->m_hNDUIO=<span style="color: #00C800;">NULL</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------</span><br /><br />BOOL OpenWifi<span style="color: #000000;">&#40;</span> PFWIFIPEEK pWifi <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />HANDLE hDev;<br /><br />    <span style="color: #B900B9;">//already opened?</span><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> pWifi->m_hNDUIO != <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br />    <span style="color: #000000;">&#125;</span><br /><br />    hDev=CreateFile<span style="color: #000000;">&#40;</span>NDISUIO_DEVICE_NAME, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, <span style="color: #00C800;">NULL</span>, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, INVALID_HANDLE_VALUE<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>hDev == INVALID_HANDLE_VALUE<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">else</span><br />    <span style="color: #000000;">&#123;</span><br />        pWifi->m_hNDUIO=hDev;<br />        <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GETADAPTERS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />HANDLE hFile;<br />BYTE Buffer<span style="color: #000000;">&#91;</span><span style="color: #000000;">2048</span><span style="color: #000000;">&#93;</span>;<br />VOID *pvBuf;<br />DWORD dwRet;<br />PFWIFIPEEK pWifi = <span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />PHB_ITEM  pAdapters = hb_itemArrayNew<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>pWifi == <span style="color: #00C800;">NULL</span> || pWifi->m_hNDUIO == <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        hb_retnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    EnterCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #B900B9;">//open NDIS driver</span><br />    hFile=CreateFile<span style="color: #000000;">&#40;</span>L<span style="color: #ff0000;">"NDS0:"</span>, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, <span style="color: #00C800;">NULL</span>, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, INVALID_HANDLE_VALUE<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>hFile != INVALID_HANDLE_VALUE<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        pvBuf=<span style="color: #000000;">&#40;</span>void *<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>&Buffer<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />        dwRet=sizeof<span style="color: #000000;">&#40;</span>Buffer<span style="color: #000000;">&#41;</span>;<br />        <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>DeviceIoControl<span style="color: #000000;">&#40;</span>hFile, IOCTL_NDIS_GET_ADAPTER_NAMES, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, pvBuf, sizeof<span style="color: #000000;">&#40;</span>Buffer<span style="color: #000000;">&#41;</span>, &dwRet, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #000000;">&#123;</span><br />            <span style="color: #B900B9;">//adapter list ok.</span><br />            LPWSTR pszStr;<br />            dwRet=<span style="color: #000000;">0</span>;<br /><br />            <span style="color: #B900B9;">//no string classes used, so no MFC or ATL dependency.</span><br />            <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>pszStr=<span style="color: #000000;">&#40;</span>LPWSTR<span style="color: #000000;">&#41;</span>pvBuf; *pszStr; pszStr+=wcslen<span style="color: #000000;">&#40;</span>pszStr<span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#123;</span><br />                <span style="color: #B900B9;">//check if adapter name is ok, skip infrared, gprs, ActiveSync etc.</span><br />                <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"ASYNCMAC1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"IRSIR1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"L2TP1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"PPTP1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"RNDISFN1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"WWAN1"</span><span style="color: #000000;">&#41;</span> && \<br />                    wcsicmp<span style="color: #000000;">&#40;</span>pszStr, L<span style="color: #ff0000;">"XSC1_IRDA1"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                    <span style="color: #000000;">&#123;</span>               <br />                  LPSTR psStr;<br />                  PHB_ITEM pSubarray;<br />                psStr = WideToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LPWSTR <span style="color: #000000;">&#41;</span> pszStr <span style="color: #000000;">&#41;</span>;<br />                pSubarray = hb_itemPutC<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, psStr <span style="color: #000000;">&#41;</span>;<br />                hb_arrayAddForward<span style="color: #000000;">&#40;</span> pAdapters, pSubarray <span style="color: #000000;">&#41;</span>;<br />                hb_itemRelease<span style="color: #000000;">&#40;</span> pSubarray <span style="color: #000000;">&#41;</span>;<br />             <span style="color: #000000;">&#125;</span><br /><br />            <span style="color: #000000;">&#125;</span><br />        <span style="color: #000000;">&#125;</span><br />        CloseHandle<span style="color: #000000;">&#40;</span>hFile<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    LeaveCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />  hb_itemReturnRelease<span style="color: #000000;">&#40;</span> pAdapters <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><br />BOOL RefreshBSSIDs<span style="color: #000000;">&#40;</span> PFWIFIPEEK pWifi, LPWSTR pAdapter <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />NDISUIO_SET_OID nso;<br />DWORD dwBytesRet;<br />BOOL retval;<br /><br />    EnterCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />    nso.ptcDeviceName = pAdapter;<br />    nso.Oid = OID_802_11_BSSID_LIST_SCAN;<br /><br />    dwBytesRet=<span style="color: #000000;">0</span>;<br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>!DeviceIoControl<span style="color: #000000;">&#40;</span>pWifi->m_hNDUIO, IOCTL_NDISUIO_SET_OID_VALUE, <span style="color: #000000;">&#40;</span>void *<span style="color: #000000;">&#41;</span>&nso, sizeof<span style="color: #000000;">&#40;</span>NDISUIO_SET_OID<span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, &dwBytesRet, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />        retval=<span style="color: #00C800;">FALSE</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">else</span><br />    <span style="color: #000000;">&#123;</span><br />        retval=<span style="color: #00C800;">TRUE</span>;<br />    <span style="color: #000000;">&#125;</span><br />    LeaveCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">return</span> retval;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> REFRESHBSSIDS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PFWIFIPEEK pWifi = <span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   LPSTR psStr = hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />   LPWSTR pAdapter = AnsiToWide<span style="color: #000000;">&#40;</span> psStr <span style="color: #000000;">&#41;</span>;<br />   <br />   hb_retl<span style="color: #000000;">&#40;</span> RefreshBSSIDs<span style="color: #000000;">&#40;</span> pWifi, pAdapter <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <br />   hb_xfree<span style="color: #000000;">&#40;</span> pAdapter <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span>   <br />   <br /><br /><span style="color: #B900B9;">//----------------------------------------------</span><br /><br /><br /><br />char *MacToChar<span style="color: #000000;">&#40;</span>char *pszMACAddress, <br />                unsigned char *pbyMacAddressInBytes<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    sprintf<span style="color: #000000;">&#40;</span>pszMACAddress, <span style="color: #ff0000;">"%02x%c%02x%c%02x%c%02x%c%02x%c%02x"</span>, <br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span> & 0xff,<br />                        cSep,<br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>& 0xff, <br />                        cSep,<br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>& 0xff, <br />                        cSep,<br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>& 0xff, <br />                        cSep,<br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>& 0xff, <br />                        cSep,<br />                        pbyMacAddressInBytes<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>& 0xff<span style="color: #000000;">&#41;</span>;<br /><br />    <span style="color: #00C800;">return</span> pszMACAddress;<br /><span style="color: #000000;">&#125;</span>   <br /><br /><br />CHAR * Get_Auth_Mode<span style="color: #000000;">&#40;</span> int <span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> GETBBSIDS <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   PNDISUIO_QUERY_OID pNQO;<br />   DWORD dwBytesRet;<br />   BYTE Buffer<span style="color: #000000;">&#91;</span><span style="color: #000000;">8192</span><span style="color: #000000;">&#93;</span>, *pByte;<br />   PNDIS_802_11_BSSID_LIST pList;<br />   PNDIS_WLAN_BSSID pItem;<br />   int i, iChannel;<br />   PHB_ITEM pItemDest;<br />     PHB_ITEM pitemField = hb_itemNew<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />     ULONG dwReturnedItems;<br />     CHAR BSSID<span style="color: #000000;">&#91;</span><span style="color: #000000;">64</span><span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">""</span>;<br />     PFWIFIPEEK pWifi = <span style="color: #000000;">&#40;</span> PFWIFIPEEK <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>; <br />     LPWSTR pAdapter  = AnsiToWide<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> LPSTR <span style="color: #000000;">&#41;</span> hb_parc<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />   <br />     EnterCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;  <br />     pNQO=<span style="color: #000000;">&#40;</span>PNDISUIO_QUERY_OID<span style="color: #000000;">&#41;</span>Buffer;<br />   <br />     pNQO->ptcDeviceName = pAdapter;<br />     pNQO->Oid=OID_802_11_BSSID_LIST;<br />   <br />     <span style="color: #B900B9;">// Run query</span><br />     dwBytesRet = <span style="color: #000000;">0</span>;<br />     <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>!DeviceIoControl<span style="color: #000000;">&#40;</span>pWifi->m_hNDUIO, IOCTL_NDISUIO_QUERY_OID_VALUE, <span style="color: #000000;">&#40;</span>void *<span style="color: #000000;">&#41;</span>pNQO, <span style="color: #000000;">8192</span>, <span style="color: #000000;">&#40;</span>void *<span style="color: #000000;">&#41;</span>pNQO, <span style="color: #000000;">8192</span>, &dwBytesRet, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #000000;">&#123;</span><br />        LeaveCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />        hb_retl<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>;<br />     <span style="color: #000000;">&#125;</span><br />   <br />     pList=<span style="color: #000000;">&#40;</span>PNDIS_802_11_BSSID_LIST<span style="color: #000000;">&#41;</span>&pNQO->Data;<br />     dwReturnedItems = pList->NumberOfItems;<br />   <br />    pItemDest = hb_itemArrayNew<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br />   <br />     <span style="color: #B900B9;">//first item in array</span><br />     pItem=pList->Bssid;<br />    <br />     <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>i=<span style="color: #000000;">0</span>; i<<span style="color: #000000;">&#40;</span> INT <span style="color: #000000;">&#41;</span>dwReturnedItems; i++<span style="color: #000000;">&#41;</span><br />     <span style="color: #000000;">&#123;</span><br />        MacToChar<span style="color: #000000;">&#40;</span> BSSID,  pItem->MacAddress <span style="color: #000000;">&#41;</span>;<br />   <br />         <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>pItem->Configuration.DSConfig > <span style="color: #000000;">14</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #000000;">&#123;</span><br />              iChannel=<span style="color: #000000;">&#40;</span>pItem->Configuration.DSConfig - <span style="color: #000000;">2407000</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">5000</span>;<br />        <span style="color: #000000;">&#125;</span><span style="color: #00C800;">else</span><br />         <span style="color: #000000;">&#123;</span><br />            iChannel=pItem->Configuration.DSConfig;<br />         <span style="color: #000000;">&#125;</span>     <br />   <br />         hb_arrayNew<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>;<br />       hb_arraySetC<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">1</span>, BSSID <span style="color: #000000;">&#41;</span>;            <span style="color: #B900B9;">//MacAddress</span><br />       hb_arraySetC<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">2</span>, pItem->Ssid.Ssid <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">// Ssid</span><br />       hb_arraySetNI<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">3</span>, iChannel <span style="color: #000000;">&#41;</span>;        <span style="color: #B900B9;">// Channel</span><br />       hb_arraySetC<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">4</span>, sAuth_Mode<span style="color: #000000;">&#91;</span> pItem->Privacy <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>;  <span style="color: #B900B9;">// Auth </span><br />       hb_arraySetC<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">5</span>, sInfra_Mode<span style="color: #000000;">&#91;</span> pItem->InfrastructureMode <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>; <span style="color: #B900B9;">//InfrastructureMode</span><br />       hb_arraySetNI<span style="color: #000000;">&#40;</span> pitemField, <span style="color: #000000;">6</span>, pItem->Rssi <span style="color: #000000;">&#41;</span>;     <span style="color: #B900B9;">//Signal</span><br />       hb_arrayAddForward<span style="color: #000000;">&#40;</span> pItemDest, pitemField <span style="color: #000000;">&#41;</span>;<br />        <br />        <span style="color: #B900B9;">//some pointer magic...actually pItem->Length was not sizeof(NDIS_WLAN_BSSID)</span><br />        <span style="color: #B900B9;">//so use returned length</span><br />        pByte=<span style="color: #000000;">&#40;</span>BYTE *<span style="color: #000000;">&#41;</span>pItem;<br />        pByte+=pItem->Length;<br />        pItem=<span style="color: #000000;">&#40;</span>PNDIS_WLAN_BSSID<span style="color: #000000;">&#41;</span>pByte;<br />     <span style="color: #000000;">&#125;</span><span style="color: #B900B9;">//for</span><br />   <br />     LeaveCriticalSection<span style="color: #000000;">&#40;</span>&pWifi->m_Lock<span style="color: #000000;">&#41;</span>;<br />     <br />   hb_itemRelease<span style="color: #000000;">&#40;</span> pitemField <span style="color: #000000;">&#41;</span>;<br />   hb_itemReturnRelease<span style="color: #000000;">&#40;</span> pItemDest <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:15hjlocn]
Buscador del foro
Hola a todos, Estoy buscando simplemente: google google map google API google map API y nada ! Está mal el buscador del foro ? O me perdí algo ? (estaba conco días en Haití trabajando, y regresé hoy) Abrazos,
Buscador del foro
Al parecer el sistema de busqueda esta funcionando mal otra vez.....
Buscador del foro
Funcionaba bien esta mañana, pero al parecer, se ha marchado de fin de semana.
Buscador del foro
... los tragos... siempre los tragos... <!-- s:| --><img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral" /><!-- s:| --> Buen Fin de Semana ! <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
Buscador del foro
Sip Julio. El tequila no es bueno, pero me ha mantenido activo por 52 años, algún día se cobrará (pero no me asusta).
Buscador del foro
Como diría un mensajito que me mandaron no hace mucho: Me levanté el Lunes muy tenprano Para ir a trabajar el Martes Pero como el Miercoles me dijeron Que iba a llover el Jueves, Dije yo el Viernes Para que P..... voy a trabajar el Sabado Si el Domingo es Dia de Fiesta....
Buscador del foro
Acabo de reindexarlo, hasta MySQL falla... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Buscador del foro
Antonio... sigue igual ! Lo siento <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Abrazos,
Buscador del foro
Julio, Los foros usan dos índices principales. Ayer reindexé el primero de ellos. Ahora mismo estoy reindexando el segundo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Buscador del foro
Yupi ! ya funciona <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
Buscador del foro
Tarda una barbaridad de tiempo en reindexar... Va por el post 38700 (desde que comenté que estaba reindexando el segundo), por eso resultados ya aparecen, pero no estará completo hasta indexar los 97873 mensajes
Buscador del foro
Uf esta enorme <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> espero no tarde mucho
Buscador del foro
40800...
Buscador del foro
ups para cuando termine ya salio el sol <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> aquí en Tlaxcala
Buscador del foro
48000... Supongo que es tan lento porque analiza cada una de las palabras de cada mensaje
Buscador del foro
Buenos días <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ya terminaste espero que no te desvelaras Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Buscador no funciona con FWH 6.12 y xHarbour .99.61
Hola, Este ejemplo de buscador que se compartió en su oportunidad en el foro, me ha dado muchas satisfacciones <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> . Resulta que ahora al cambiar la versión de FWH (usaba Marzo 2006), no realiza correctamente la búsqueda incremental <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> . Que es lo que ha cambiado en FWH o en xHarbour <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/0251be1978/Buscador.PRG.html">http://hyperupload.com/download/0251be1 ... r.PRG.html</a><!-- m -->
Buscador no funciona con FWH 6.12 y xHarbour .99.61
[quote="jose_murugosa":23fmmvdp]Hola, Este ejemplo de buscador que se compartió en su oportunidad en el foro, me ha dado muchas satisfacciones <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> . Resulta que ahora al cambiar la versión de FWH (usaba Marzo 2006), no realiza correctamente la búsqueda incremental <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> . Que es lo que ha cambiado en FWH o en xHarbour <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/0251be1978/Buscador.PRG.html">http://hyperupload.com/download/0251be1 ... r.PRG.html</a><!-- m -->[/quote:23fmmvdp] Hola Jose, actualizaste tu compilador xHarbour 0.99.70?, probablemente debes actualizar si ya tienes fivewin superior, te dejo el Link <!-- m --><a class="postlink" href="http://www.xharbour.org/index.asp?page=download/windows/binaries_win">http://www.xharbour.org/index.asp?page= ... naries_win</a><!-- m -->
Buscamos un Programador de Fivewin para Madrid España
Enviar su CV a <!-- e --><a href="mailto:paul@pes-systems.net">paul@pes-systems.net</a><!-- e -->
Buscando Editor de Recursos
Hola amigos! Desde hace tiempo comencé usando el RcWorkshop. Luego pasé al PellesC que es el que uso ahora. Pero se me queda corto ya no sé si por ignorancia del propio editor o porque necesito otro mas potente. Me refiero a que no veo como darle color a los dialogos y controles. Tampoco veo que permita implementar visualmente SPlitters y hacer llamadas a dialogos desde cada split. ¿saben si es limitación de pellesc? y en ese caso, ¿conocen algún editor de recursos que ofrezcan esas posibilidades? Aunque sean de pago..... Grácias.
Buscando Editor de Recursos
Javier, Aqui tienes algunas opciones que puedes revisar: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=12773">viewtopic.php?f=17&t=12773</a><!-- l -->
Buscando archivo en RED Local
Compañero: ¿ Se puede, desde un terminal conectado al PC-Servidor mediante "unidad de red", buscar un fichero que esté en otra carpeta distinta a la del aplicativo? Intento crear un archivo inventado por mí en carpetas del sistema que siempre existen y de nombre parecido a algún otro del propio widows y que mi aplicativo lo busque al ejecutarse y...: si existe DEMO=.F., en otro caso DEMO=.T. Este fichero solo debe estar en el PC-Servidor, y el problema lo tengo cuando el aplicativo se ejecuta desde los terminales. ¿Como hago para localizar el archivo? Mil gracias. LORENZO
Buscando archivo en RED Local
[code=fw:33xg79i6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Directry.ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"SSay.Ch"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// SAY'S Transparentes &nbsp; precisa desta .ch</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_LGRAY &nbsp; &nbsp;RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">230</span>,<span style="color: #000000;">230</span>,<span style="color: #000000;">230</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#Define</span> CLR_LGREEN &nbsp; RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">190</span>,<span style="color: #000000;">215</span>,<span style="color: #000000;">190</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#Define</span> CLR_VERMELHO nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">000</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//--> Vermelho Para a Letra</span><br /><span style="color: #00D7D7;">#Define</span> CLR_AMARELO &nbsp;nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//--> Amarelo Para o Fundo</span><br /><br /><span style="color: #00C800;">STATIC</span> oMeter &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//-> O Objeto do METER</span><br /><span style="color: #00C800;">STATIC</span> nTotalMt := <span style="color: #000000;">0</span> &nbsp;<span style="color: #B900B9;">//-> Totalizador do METER</span><br /><br />*-----------------------------------------------------------------------------*<br /><br /><br /><br /><span style="color: #B900B9;">//-> Busca os Arquivos no Servidor de Arquivos-------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> BUSCA_ARQUIVOS<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; FIELD COR2<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> Nome_Arq, nRegistro<br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> oDlgAtu, oFont, iDcor, oIco, oFnt, oBrush, oGroup, oSaida<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">PUBLIC</span> xAtual<br /><br />&nbsp; &nbsp; nTotalMt := <span style="color: #000000;">0</span> ; oMeter:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; MSGRUN<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Desconectando o Servidor de Arquivos..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Aguarde Um Momento, Por Favor! &nbsp; &nbsp; &nbsp; &nbsp; "</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> || DESCONECTA_SERVIDOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; MSGRUN<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Conectando ao Servidor de Arquivos... &nbsp;"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Aguarde Um Momento, Por Favor! &nbsp; &nbsp; &nbsp; &nbsp; "</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> || CONECTA_SERVIDOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//-> Para Caso NÆo Consiga Se Conectar a Primeira Vez, Tenta de Novo</span><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>STOQUE.DBF"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//-> Passa Batido... Conectou</span><br />&nbsp; &nbsp; ELSEIF !FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>STOQUE.DBF"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//-> Tenta Conectar a Rede ao Servidor de Arquivos de Novo</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; MSGRUN<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Conectando ao Servidor de Arquivos..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"Aguarde Um Momento, Por Favor! &nbsp; &nbsp; &nbsp; "</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> || CONECTA_SERVIDOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NÆo Consegui Conectar a REDE &nbsp;"</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"na Primeira Vez, Tecle <Enter>"</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Para Tentar Mais Uma Vez. &nbsp; &nbsp; "</span> <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Erro ao Conectar a REDE! &nbsp; &nbsp; &nbsp;"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//-> Se NÆo Conseguiu Conectar Mesmo... Ap¢s duas tentativas...</span><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>STOQUE.DBF"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Aten‡Æo, Servidor de Arquivos &nbsp;"</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Desligado, Por Favor Ligue o &nbsp; "</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Computador Principal(Servidor) "</span> <span style="color: #000000;">&#41;</span> + CRLF + &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"e Tente Novamente! &nbsp; &nbsp; &nbsp; ERRO! "</span> <span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OemToAnsi<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Erro ao Conectar Com o Servidor"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">BEEP</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; SndPlaySound<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\I</span>nit.Wav"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> &nbsp;.NOT. NETUSE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Z:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>MPRESA"</span>,.T.<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Não Localizado Arquivo Z:<span style="color: #000000;">\s</span>istemas<span style="color: #000000;">\b</span>alcao<span style="color: #000000;">\E</span>MPRESA.DBF "</span> + &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Necess rio ao Sistema"</span>, <span style="color: #ff0000;">"AVISO"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; TRAVEREG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; REPLACE COR2 WITH <span style="color: #ff0000;">"I"</span>+SUBS<span style="color: #000000;">&#40;</span>COR2,<span style="color: #000000;">2</span>,<span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; DESTRAVA<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; DBCLOSEALL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; nTotalMt := <span style="color: #000000;">05</span> ; oMeter:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//-> Faz Uma C¢pia dos Arquivos Anteriores, Antes de Copiar.</span><br />&nbsp; &nbsp; COPYFILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"C:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>STOQUE.DBF"</span>, <span style="color: #ff0000;">"C:<span style="color: #000000;">\S</span>ISTEMAS<span style="color: #000000;">\B</span>ALCAO<span style="color: #000000;">\E</span>STV.DBF"</span>, .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; nTotalMt := <span style="color: #000000;">10</span> ; oMeter:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ; SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//-> Conecta a Rede</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CONECTA_SERVIDOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//->Memory(-1)</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">/*limpia arreglo y llama al colecor de basura de xharbour*/</span><br />&nbsp; &nbsp; hb_gcAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; WNetAddCon<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000000;">\\</span>MICRO0<span style="color: #000000;">\C</span>"</span>,,<span style="color: #ff0000;">"Z:"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SysWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//-> Desconecta a Rede</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> DESCONECTA_SERVIDOR<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//->Memory(-1)</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">/*limpia arreglo y llama al colecor de basura de xharbour*/</span><br />&nbsp; &nbsp; hb_gcAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; wNetDelConnection<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Z:"</span>, .T. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SysWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// ---------------------- FIM DO PROGRAMA -----------------------------------//</span><br />&nbsp;</div>[/code:33xg79i6]
Buscando archivo en RED Local
Karina, estuve haciendo pruebas y adaptando tus sugerencias a mis necesidades, pero solo funciona correctamente si la carpeta en el servidor está compartida. Yo necesito verificar si un determinado archivo existe en el PC-Servidor, independientemente si está compartida la carpeta o no. Despues de varios intentos, creo que no se puede. No obstante, Mil gracias. LORENZO
Buscando archivo en RED Local
Lorenzo Para poder ver archivos necesitas cuenta de administrador del servidor y hacer asi: WinExec("Net use \\192.10.1.3\C$ clave /user:ctaadmin",0) //192.10.1.3 es la direccion de tu server //Con esto no necesitas compartir la carpeta If File("\\192.10.1.3\C$\WINDOWS\ARCHIVO.XYZ") ?"Existe" Esle ?"No Existe" Endif Espero te sirva Saludos Adhemar
Buscando clase tdsay.ch y prg
Amigos del foro buenas alguien tiene esta clase arreglada para Windows 8.1. De donde la puedo descargar, los link que aparecen en el foro están rotos. Saludos
Buscando clase tdsay.ch y prg
Mira, se sirve: [code=fw:g1n232xp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Constant.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> SS_CENTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> SS_RIGHT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> SS_GRAYRECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">5</span> <span style="color: #B900B9;">// BOXRECT</span><br /><br /><span style="color: #00D7D7;">#define</span> TA_LEFT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> TA_RIGHT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> TA_CENTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">6</span><br /><span style="color: #00D7D7;">#define</span> TA_TOP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> TA_BOTTOM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">8</span><br /><br /><span style="color: #00D7D7;">#define</span> COLOR_WINDOW &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">5</span><br /><span style="color: #00D7D7;">#define</span> COLOR_WINDOWTEXT &nbsp; &nbsp; &nbsp;<span style="color: #000000;">8</span><br /><br /><span style="color: #00D7D7;">#define</span> COLOR_BTNSHADOW &nbsp; &nbsp; &nbsp;<span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> COLOR_BTNHIGHLIGHT &nbsp; <span style="color: #000000;">20</span><br /><br /><span style="color: #00D7D7;">#define</span> WM_NCHITTEST &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">132</span> &nbsp;<span style="color: #B900B9;">// 0x84</span><br /><br /><span style="color: #00D7D7;">#define</span> GWL_STYLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">-16</span><br /><span style="color: #00D7D7;">#define</span> GWL_EXSTYLE &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">-20</span><br /><br />#ifdef __XPP__<br />&nbsp; &nbsp;<span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">Super</span> ::<span style="color: #000000;">TControl</span><br />&nbsp; &nbsp;<span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">New</span> &nbsp; _New<br />#endif<br /><br /><span style="color: #00C800;">static</span> oTimer, aTimer := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> TDSay <span style="color: #0000ff;">FROM</span> TControl<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered AS LOGICAL<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; l3D<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; cPicture<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; aCaption<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; bGet<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lShaded, lBox, lRaised<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nDTop, nDLeft<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nTTop, nTLeft<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; aRect, nLong<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nTxtWidth, nTxtHeight<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; nAlign<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; oTimer<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lScroll, lHorizontal, nSpeed, lWrap &nbsp; &nbsp;<span style="color: #B900B9;">// nSpeed: 0 to 100</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; lBlink, lView<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nRow, nCol, bText, oWnd, cPicture, oFont,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lCentered, lRight, lBottom, lBorder, lPixels, nClrText, nClrBack,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nWidth, nHeight, cScroll, nSpeed, lWrap, lBlink,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lDesign, lUpdate, lShaded, lBox, lRaised <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bText, oWnd, cPicture, lCentered, lRight, lBottom,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrText, nClrBack, cScroll, nSpeed, lWrap, lBlink,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lUpdate, oFont, lShaded, lBox, lRaised <span style="color: #000000;">&#41;</span> &nbsp;CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span>, ::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Display</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">BeginPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">EndPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Dynamic<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bGet</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bGet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ReSize<span style="color: #000000;">&#40;</span> nType, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">Super</span>:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span> nType, nWidth, nHeight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetText<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCaption</span> := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cPicture</span> != <span style="color: #00C800;">nil</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Transform<span style="color: #000000;">&#40;</span> cText, ::<span style="color: #000000;">cPicture</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cValToChar<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> VarPut<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nRow, nCol, bText, oWnd, cPicture, oFont,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lCentered, lRight, lBottom, lBorder, lPixels, nClrText, nClrBack,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nWidth, nHeight, cScroll, nSpeed, lWrap, lBlink,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lDesign, lUpdate, lShaded, lBox, lRaised <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nRow &nbsp; &nbsp; := <span style="color: #000000;">0</span>, nCol := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lBorder &nbsp;:= .f., lCentered := .f., lRight := .f., lBottom := .f., lPixels := .f.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd &nbsp; &nbsp; := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrText := oWnd:<span style="color: #000000;">nClrText</span>, nClrBack := oWnd:<span style="color: #000000;">nClrPane</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nHeight &nbsp;:= <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oFont != <span style="color: #00C800;">nil</span>, <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> oFont:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span>, SAY_CHARPIX_H <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lDesign &nbsp;:= .f., bText := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lUpdate &nbsp;:= .f., lShaded := .f., lBox := .f., lRaised := .f.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">l3D</span> &nbsp; &nbsp; &nbsp; = lShaded .or. lBox .or. lRaised<br />&nbsp; &nbsp;::<span style="color: #000000;">nAlign</span> &nbsp; &nbsp;= nOr<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBottom, TA_BOTTOM, TA_TOP <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lCentered, TA_CENTER, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lRight, TA_RIGHT, TA_LEFT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">bGet</span> &nbsp; &nbsp; &nbsp;= bText<br />&nbsp; &nbsp;::<span style="color: #000000;">bSetGet</span> &nbsp; = bText<br />&nbsp; &nbsp;::<span style="color: #000000;">cPicture</span> &nbsp;= cPicture<br />&nbsp; &nbsp;::<span style="color: #000000;">cCaption</span> &nbsp;= <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Empty<span style="color: #000000;">&#40;</span> cPicture <span style="color: #000000;">&#41;</span>, cValToChar<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> bText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> bText <span style="color: #000000;">&#41;</span>, cPicture <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nWidth := <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oFont != <span style="color: #00C800;">nil</span>, <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> oFont:<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#41;</span>, SAY_CHARPIX_W <span style="color: #000000;">&#41;</span> * Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">4</span> &nbsp;<span style="color: #B900B9;">// 8</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! lPixels<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nTop</span> &nbsp;= nRow * <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oFont != <span style="color: #00C800;">nil</span>, <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> oFont:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span>, SAY_CHARPIX_H <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 13</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nLeft</span> = nCol * <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oFont != <span style="color: #00C800;">nil</span>, <span style="color: #0000ff;">Abs</span><span style="color: #000000;">&#40;</span> oFont:<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#41;</span>, SAY_CHARPIX_W <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 8</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nTop</span> &nbsp;= nRow<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nLeft</span> = nCol<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nBottom</span> &nbsp; = ::<span style="color: #000000;">nTop</span> + nHeight - <span style="color: #000000;">1</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nRight</span> &nbsp; &nbsp;= ::<span style="color: #000000;">nLeft</span> + nWidth - <span style="color: #000000;">1</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nSpeed := <span style="color: #000000;">55</span>, lWrap := .f., lBlink := .f.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lScroll</span> &nbsp; &nbsp; = <span style="color: #000000;">&#40;</span> cScroll != <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lHorizontal</span> = <span style="color: #000000;">&#40;</span> cScroll == <span style="color: #ff0000;">"HORIZONTAL"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nSpeed</span> &nbsp; &nbsp; &nbsp;= <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nSpeed < <span style="color: #000000;">50</span>, <span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span> - nSpeed <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span> - nSpeed <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lWrap</span> &nbsp; &nbsp; &nbsp; = lWrap<br />&nbsp; &nbsp;::<span style="color: #000000;">lBlink</span> &nbsp; &nbsp; &nbsp;= lBlink<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span> &nbsp; &nbsp; &nbsp;= oWnd<br />&nbsp; &nbsp;::<span style="color: #000000;">oFont</span> &nbsp; &nbsp; = oFont<br />&nbsp; &nbsp;::<span style="color: #000000;">nId</span> &nbsp; &nbsp; &nbsp; = ::<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nStyle</span> &nbsp; &nbsp;= nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_VISIBLE,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDesign, nOr<span style="color: #000000;">&#40;</span> WS_CLIPSIBLINGS, WS_TABSTOP <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>,; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBorder, WS_BORDER, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lShaded</span> &nbsp;= lShaded <br />&nbsp; &nbsp;::<span style="color: #000000;">lBox</span> &nbsp; &nbsp; = lBox <br />&nbsp; &nbsp;::<span style="color: #000000;">lRaised</span> &nbsp;= lRaised<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lDrag</span> &nbsp; &nbsp; = lDesign<br />&nbsp; &nbsp;::<span style="color: #000000;">lCaptured</span> = .f.<br />&nbsp; &nbsp;::<span style="color: #000000;">lUpdate</span> &nbsp; = lUpdate<br />&nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nClrText, nClrBack <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l3D</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Set3DLook</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">AddControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">CheckDots</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bText, oWnd, cPicture, lCentered, lRight, lBottom,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrText, nClrBack, cScroll, nSpeed, lWrap, lBlink,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lUpdate, oFont, lShaded, lBox, lRaised <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lCentered := .f., lRight := .f., lBottom := .f.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrText := oWnd:<span style="color: #000000;">nClrText</span>, nClrBack := oWnd:<span style="color: #000000;">nClrPane</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lUpdate := .f., lShaded := .f., lBox := .f., lRaised := .f.<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">l3D</span> &nbsp; &nbsp; &nbsp; = lShaded .or. lBox .or. lRaised<br />&nbsp; &nbsp;::<span style="color: #000000;">nId</span> &nbsp; &nbsp; &nbsp; = nId<br />&nbsp; &nbsp;::<span style="color: #000000;">nAlign</span> &nbsp; &nbsp;= nOr<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lBottom, TA_BOTTOM, TA_TOP <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lCentered, TA_CENTER, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lRight, TA_RIGHT, TA_LEFT <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">bGet</span> &nbsp; &nbsp; &nbsp;= bText<br />&nbsp; &nbsp;::<span style="color: #000000;">bSetGet</span> &nbsp; = bText<br />&nbsp; &nbsp;::<span style="color: #000000;">cPicture</span> &nbsp;= cPicture<br />&nbsp; &nbsp;::<span style="color: #000000;">oFont</span> &nbsp; &nbsp; = oFont<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> bText != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCaption</span> = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Empty<span style="color: #000000;">&#40;</span> cPicture <span style="color: #000000;">&#41;</span>, cValToChar<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> bText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Transform<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> bText <span style="color: #000000;">&#41;</span>, cPicture <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nSpeed := <span style="color: #000000;">55</span>, lWrap := .f., lBlink := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">lScroll</span> &nbsp; &nbsp; = <span style="color: #000000;">&#40;</span> cScroll != <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lHorizontal</span> = <span style="color: #000000;">&#40;</span> cScroll == <span style="color: #ff0000;">"HORIZONTAL"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nSpeed</span> &nbsp; &nbsp; &nbsp;= <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nSpeed < <span style="color: #000000;">50</span>, <span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span> - nSpeed <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span> - nSpeed <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lWrap</span> &nbsp; &nbsp; &nbsp; = lWrap<br />&nbsp; &nbsp;::<span style="color: #000000;">lBlink</span> &nbsp; &nbsp; &nbsp;= lBlink &nbsp; <br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oWnd</span> &nbsp; &nbsp; &nbsp;= oWnd<br />&nbsp; &nbsp;::<span style="color: #000000;">hWnd</span> &nbsp; &nbsp; &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lShaded</span> &nbsp; = lShaded<br />&nbsp; &nbsp;::<span style="color: #000000;">lBox</span> &nbsp; &nbsp; &nbsp;= lBox<br />&nbsp; &nbsp;::<span style="color: #000000;">lRaised</span> &nbsp; = lRaised<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lDrag</span> &nbsp; &nbsp; = .f.<br />&nbsp; &nbsp;::<span style="color: #000000;">lCaptured</span> = .f.<br />&nbsp; &nbsp;::<span style="color: #000000;">lUpdate</span> &nbsp; = lUpdate<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nClrText, nClrBack <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oWnd != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">DefControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span> .and. nMsg == WM_NCHITTEST &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> DefWindowProc<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Default</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lCentered := nAnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nAlign</span>, TA_CENTER <span style="color: #000000;">&#41;</span> == TA_CENTER &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lRight &nbsp; &nbsp;:= nAnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nAlign</span>, TA_RIGHT <span style="color: #000000;">&#41;</span> &nbsp;== TA_RIGHT<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lBottom &nbsp; := nAnd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nAlign</span>, TA_BOTTOM <span style="color: #000000;">&#41;</span> == TA_BOTTOM &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nTxtWidth</span> &nbsp;= <span style="color: #000000;">0</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nTxtHeight</span> = GetTextHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aCaption</span> &nbsp; = Array<span style="color: #000000;">&#40;</span> MLCount<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">254</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span>, <span style="color: #000000;">&#123;</span>|c, n| ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := Trim<span style="color: #000000;">&#40;</span> MemoLine<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cCaption</span>, <span style="color: #000000;">252</span>, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nTxtWidth</span> := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTxtWidth</span>, GetTextWidth<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">aRect</span> := GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;::<span style="color: #000000;">nDTop</span> &nbsp;:= ::<span style="color: #000000;">nTTop</span> &nbsp;:= <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lBottom, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nDLeft</span> := ::<span style="color: #000000;">nTLeft</span> := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lCentered, int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lRight, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBox</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aRect</span> := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">2</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;elseif ::<span style="color: #000000;">lShaded</span> .or. ::<span style="color: #000000;">lRaised</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aRect</span> := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">1</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lScroll</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lHorizontal</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nLong</span> := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTxtWidth</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nLong</span> := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTxtHeight</span> * len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">aRect</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;InvalidateRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">aRect</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lView</span> := .t.<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Call dynamic and blinking</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !::<span style="color: #000000;">lDrag</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lScroll</span> .and. ::<span style="color: #000000;">oTimer</span> = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> ::<span style="color: #000000;">oTimer</span> <span style="color: #0000ff;">INTERVAL</span> ::<span style="color: #000000;">nSpeed</span> <span style="color: #0000ff;">ACTION</span> ::<span style="color: #000000;">Dynamic</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> ::<span style="color: #000000;">oTimer</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBlink</span> .and. AScan<span style="color: #000000;">&#40;</span> aTimer, <span style="color: #000000;">&#123;</span> | oCtrl | oCtrl == <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aTimer, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oTimer = <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oTimer <span style="color: #0000ff;">INTERVAL</span> <span style="color: #000000;">300</span> <span style="color: #0000ff;">ACTION</span> Blink<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oWnd</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTimer<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br />&nbsp;<br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBlink</span><br /><br />&nbsp; &nbsp; &nbsp;ADel<span style="color: #000000;">&#40;</span> aTimer, AScan<span style="color: #000000;">&#40;</span> aTimer, <span style="color: #000000;">&#123;</span> |o| o == <span style="color: #00C800;">Self</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;ASize<span style="color: #000000;">&#40;</span> aTimer, len<span style="color: #000000;">&#40;</span> aTimer<span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span> aTimer <span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oTimer := <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nColorShadow, nColorLight<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lActive</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lView</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WSay<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nDTop</span> + <span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nTxtHeight</span>, ::<span style="color: #000000;">nDLeft</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">nClrText</span>,,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, .T., .T., ::<span style="color: #000000;">nAlign</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lScroll</span> .and. ::<span style="color: #000000;">lWrap</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lHorizontal</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WSay<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nDTop</span> + <span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nTxtHeight</span>, ::<span style="color: #000000;">nDLeft</span> + ::<span style="color: #000000;">nLong</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">nClrText</span>,,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, .T., .T., ::<span style="color: #000000;">nAlign</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WSay<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nDTop</span> + <span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nTxtHeight</span> + ::<span style="color: #000000;">nLong</span>, ::<span style="color: #000000;">nDLeft</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">nClrText</span>,,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, .T., .T., ::<span style="color: #000000;">nAlign</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* //-> Para que o BLINKING nao trave no WINDOWS XP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //-> Modificado em 01/01/2008<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hay que hacer esta modificación en la clase TDSay:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Código:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;METHOD Paint() CLASS TDSay<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// InvalidateRect( ::hWnd, ::aRect, .t. )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FillRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;El intervalo del timer lo he pasado de 300 a 600, pero eso será según las preferencias de cada uno<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;regards, saludos<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Antonio Linares<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;www.fivetechsoft.com<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br /><br />&nbsp; &nbsp; &nbsp; nColorShadow := GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNSHADOW <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nColorLight &nbsp;:= GetSysColor<span style="color: #000000;">&#40;</span> COLOR_BTNHIGHLIGHT <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aCaption</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WSay<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nDTop</span> + <span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nTxtHeight</span> + <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nDLeft</span> + <span style="color: #000000;">1</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, nColorLight,,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, .T., .T., ::<span style="color: #000000;">nAlign</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WSay<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nDTop</span> + <span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * ::<span style="color: #000000;">nTxtHeight</span>, ::<span style="color: #000000;">nDLeft</span>, ::<span style="color: #000000;">aCaption</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, nColorShadow,,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oFont</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, .T., .T., ::<span style="color: #000000;">nAlign</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// 3D</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lShaded</span><br />&nbsp; &nbsp; &nbsp; WndInset<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// SHADED, SHADOW</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lRaised</span><br />&nbsp; &nbsp; &nbsp; WndRaised<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, ::<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// RAISED</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lBox</span><br />&nbsp; &nbsp; &nbsp; WndBoxIn<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nBottom</span>-::<span style="color: #000000;">nTop</span>, ::<span style="color: #000000;">nRight</span>-::<span style="color: #000000;">nLeft</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WndBoxRaised<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nBottom</span>-::<span style="color: #000000;">nTop</span><span style="color: #000000;">-1</span>, ::<span style="color: #000000;">nRight</span>-::<span style="color: #000000;">nLeft</span><span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> Dynamic<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; <span style="color: #00C800;">local</span> nSpeed := <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nSpeed</span> < <span style="color: #000000;">50</span>, int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span> - ::<span style="color: #000000;">nSpeed</span> + <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> !::<span style="color: #000000;">lActive</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lHorizontal</span><br /><br />&nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nDLeft</span> -= nSpeed<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">nDLeft</span> + ::<span style="color: #000000;">nLong</span> < ::<span style="color: #000000;">nTLeft</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lWrap</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nDLeft</span> := ::<span style="color: #000000;">nDLeft</span> + ::<span style="color: #000000;">nLong</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oTimer</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;ScrollWindow<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, -nSpeed, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">aRect</span>, ::<span style="color: #000000;">aRect</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">else</span><br /><br />&nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nDTop</span> -= nSpeed<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">nDTop</span> + ::<span style="color: #000000;">nLong</span> < <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTTop</span> = <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nTxtHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lWrap</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nDTop</span> := ::<span style="color: #000000;">nDTop</span> + ::<span style="color: #000000;">nLong</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oTimer</span>:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;ScrollWindow<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">0</span>, -nSpeed, ::<span style="color: #000000;">aRect</span>, ::<span style="color: #000000;">aRect</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; <span style="color: #B900B9;">/* &nbsp;It is not necessary to use the method 'Paint()' because<br />&nbsp; &nbsp; &nbsp; 'ScrollWindow()' he calls directly to the method 'Paint()' &nbsp;*/</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> VarPut<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TDSay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cPicture</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cValue = Transform<span style="color: #000000;">&#40;</span> cValue, ::<span style="color: #000000;">cPicture</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cValue = cValToChar<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">bGet</span> = <span style="color: #000000;">&#123;</span> || cValue <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">// &nbsp;Static functions</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">Function</span> Blink<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; AEval<span style="color: #000000;">&#40;</span> aTimer, <span style="color: #000000;">&#123;</span>| oCtrl | oCtrl:<span style="color: #000000;">lView</span> := !oCtrl:<span style="color: #000000;">lView</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oCtrl:<span style="color: #000000;">lActive</span>, oCtrl:<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:g1n232xp] saludos.
Buscando clase tdsay.ch y prg
[code=fw:ux0oveio]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifndef _DSAY_CH<br /><span style="color: #00D7D7;">#define</span> _DSAY_CH<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------//<br />!short: DYNAMIC SAY &nbsp;*/</span><br /><br /><span style="color: #B900B9;">// The SPEED tints that to go from 0 to 100</span><br /><br />#xcommand <span style="color: #0000ff;">REDEFINE</span> DYNAMIC <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">&#91;</span><oDSay><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <label: <span style="color: #0000ff;">PROMPT</span>, VAR> <cText> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PICTURE</span> <cPict> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lRight: &nbsp;<span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBottom: <span style="color: #000000;">BOTTOM</span> > <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">&#91;</span>,<nClrBack> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <scroll: <span style="color: #0000ff;">VERTICAL</span>, <span style="color: #0000ff;">HORIZONTAL</span> > <span style="color: #0000ff;">SCROLL</span> <span style="color: #000000;">&#91;</span> SPEED <nSpeed> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> <lWrap: <span style="color: #000000;">WRAP</span> > <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBlink: <span style="color: #000000;">BLINKING</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <update: <span style="color: #0000ff;">UPDATE</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBox: &nbsp; &nbsp;<span style="color: #000000;">BOX</span> &nbsp; > &nbsp;<span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;=> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <oDSay> := <span style="color: #000000;">&#93;</span> TDSay<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> <nId>, <<span style="color: #000000;">&#123;</span>cText<span style="color: #000000;">&#125;</span>>, <oWnd>, <cPict>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.lCenter.>, <.lRight.>, <.lBottom.>, <nClrText>, <nClrBack>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>Upper<span style="color: #000000;">&#40;</span><<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">scroll</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>, <nSpeed>, <.lWrap.>, <.lBlink.>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.<span style="color: #0000ff;">update</span>.>, <oFont>, <.lShaded.>, <.lBox.>, <.lRaised.> <span style="color: #000000;">&#41;</span><br /><br />#xcommand @ <nRow>, <nCol> DYNAMIC <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">&#91;</span> <oDSay> <label: <span style="color: #0000ff;">PROMPT</span>,<span style="color: #0000ff;">VAR</span> > <span style="color: #000000;">&#93;</span> <cText> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">PICTURE</span> <cPict> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">&#93;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lRight: &nbsp;<span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBottom: <span style="color: #000000;">BOTTOM</span> > <span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBorder: <span style="color: #000000;">BORDER</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lPixel: <span style="color: #0000ff;">PIXEL</span>, PIXELS > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">&#91;</span>,<nClrBack> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <scroll: <span style="color: #0000ff;">VERTICAL</span>, <span style="color: #0000ff;">HORIZONTAL</span> > <span style="color: #0000ff;">SCROLL</span> <span style="color: #000000;">&#91;</span> SPEED <nSpeed> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span> <lWrap: <span style="color: #000000;">WRAP</span> > <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBlink: <span style="color: #000000;">BLINKING</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <design: <span style="color: #000000;">DESIGN</span> > &nbsp;<span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <update: <span style="color: #0000ff;">UPDATE</span> > &nbsp;<span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lBox: &nbsp; &nbsp;<span style="color: #000000;">BOX</span> &nbsp; > &nbsp;<span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span> <oDSay> := <span style="color: #000000;">&#93;</span> TDSay<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <nRow>, <nCol>, <<span style="color: #000000;">&#123;</span>cText<span style="color: #000000;">&#125;</span>>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span><oWnd><span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#91;</span><cPict><span style="color: #000000;">&#93;</span>, <oFont>, <.lCenter.>, <.lRight.>, <.lBottom.>, <.lBorder.>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<.lPixel.>, <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span>Upper<span style="color: #000000;">&#40;</span><<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">scroll</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>, <nSpeed>, <.lWrap.>, <.lBlink.>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<.design.>, <.<span style="color: #0000ff;">update</span>.>, <.lShaded.>, <.lBox.>, <.lRaised.> <span style="color: #000000;">&#41;</span><br />#endif<br />&nbsp;</div>[/code:ux0oveio]
Buscando clase tdsay.ch y prg
Estoy teniendo problemas al enlazar la clase. xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 9445) Copyright 1999-2012, <!-- m --><a class="postlink" href="http://www.xharbour.org">http://www.xharbour.org</a><!-- m --> <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --> Compiling 'D:\DSAY\SAMPLES\main.prg'... Lines 39, Functions/Procedures 1 Generating C source output to 'D:\DSAY\OBJ\main.hrb'... Done. Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland d:\dsay\obj\main.hrb: Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland Error: Unresolved external '_hb_parvnl' referenced from C:\FWH\LIB\FIVEHC.LIB|HARBOURC Error: Unresolved external '_HB_FUN_TACTIVEX' referenced from D:\DSAY\OBJ\MAIN.OBJ Error: Unresolved external '_HB_FUN_TFONT' referenced from D:\DSAY\OBJ\MAIN.OBJ Error: Unresolved external '_HB_FUN_TDIALOG' referenced from D:\DSAY\OBJ\MAIN.OBJ Error: Unresolved external '_HB_FUN_TBITMAP' referenced from D:\DSAY\OBJ\MAIN.OBJ Error: Unresolved external '_HB_FUN_TSAY' referenced from C:\FWH\LIB\VARIOSLIB.LIB|SAYREF Error: Unresolved external '_hb_storvni' referenced from C:\FWH\LIB\FIVEHC.LIB|CURSORS Error: Unresolved external '_hb_storvnl' referenced from C:\FWH\LIB\FIVEHC.LIB|WNDIS Error: Unresolved external '_hb_storvc' referenced from C:\FWH\LIB\FIVEHC.LIB|WNDIS Error: Unresolved external '_HB_FUN_TCONTROL' referenced from C:\FWH\LIB\VARIOSLIB.LIB|DSAY Error: Unresolved external '_HB_FUN_CVALTOCHAR' referenced from C:\FWH\LIB\VARIOSLIB.LIB|DSAY Error: Unresolved external '_HB_FUN_GETWNDDEFAULT' referenced from C:\FWH\LIB\VARIOSLIB.LIB|DSAY Error: Unresolved external '_hb_parvni' referenced from C:\FWH\LIB\FIVEHC.LIB|RECTS Error: Unresolved external '_HB_FUN_TTIMER' referenced from C:\FWH\LIB\VARIOSLIB.LIB|DSAY Agradezco me puedan ayudar para saber que pasa <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> antes esta clase me funcionaba Adjunto todos los archivos que estoy utilizando aqui: [url:2vwv8b2c]https&#58;//app&#46;box&#46;com/s/xdd4iiaih4fzoc626usr0k5ypf1igim9[/url:2vwv8b2c]
Buscando clase tdsay.ch y prg
Has probado a poner en el proyecto tu libreria antes de las de FWH?
Buscando clase tdsay.ch y prg
Gracias por tu respuesta Cristóbal, Pruebo y te comento <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Buscando clase tdsay.ch y prg
Gracias!! Funciono bien ahora <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Buscando en Listbox con indices CDX
Compañeros: Tengo un indice CDX construido así: [code:8calo008]index on nombre tag nomabona for !deleted() [/code:8calo008] donde el campo nombre es C,40 Y en el listbox tengo lo siguiente: [code:8calo008] select 3 ; abonados->(OrdSetFocus('nomabona')) ; abonados->(DBGOTOP()) define dialog&#46;&#46;&#46; redefine listbox olistbox fields dtoc(abonados->f_alta), abonados->nombre&#46;&#46;&#46; olistbox&#58;bSeek &#58;= {|| olistbox&#58;DbfSeek(&#46;T&#46;) } redefine SAY oSay VAR olitbox&#58;cBuffer id 355 OF ocama COLOR CLR_HBLUE FONT OLETRA olistbox&#58;bUpdateBuffer&#58;= {|| oSay&#58;Refresh() } activate dialog&#46;&#46;&#46; [/code:8calo008] El problema que tengo es que el puntero del listbox no se mueve conforme tecleo un nombre (busqueda incremental). Si creo indices NTX funciona perfectamente. ¿ Cual es el problema ? Mil gracias LORENZO
Buscando en Listbox con indices CDX
Hola, Mira se ayuda: <!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=708">http://www.fivewin.com.br/exibedicas.asp?id=708</a><!-- m --> Saludos.
Buscando funciones/propiedades...
Estoy buscando alguna función/propiedad... Si bien oWnd:nWidth da el ancho de una ventana, saber el ancho de la zona (ya que los bordes son distintos para segun SO W98, XP, 2003, W10...) ClientWidth() //Ancho Tambien el alto de la zona de una ventana/diálogo ClientHeight() //Alto Pues una WINDOW o DIALOG :SetSize( 800, 600 ) Su ancho/alto disponible para uso (para entendernos) no serà de 800 para ancho, ni el alto de 600... hay que descontar los anchos de los bordes, y en el caso el alto de la barra de titulo... y si hay un menu, el alto del menu. ¿Como "anclar" controles a una WINDOW, y que esos mismos canvien de alto por ejemplo.? Quiero que una ExplBar ocupe TODO el alt de la WINDOW principal, y que esta, si se redimensiona, se ajuste automáticamente a su alto. Tengo que controlar yo el RESIZE de la WINDOW y decirle que cambie el alto o hay alguna manera de "anclar" ese control TExploreBar a la WINDOW en su medida alto??? Gracias.
Buscando funciones/propiedades...
Saludos, talves te sirva la función GETSYSMETRICS(N) [quote:3uuwb18b]GetSysMetrics() Retrieves the system metrics Syntax: GetSysMetrics( <nIndex> ) --> nValue Parameters: <nIndex> System measurement to retrieve. Puede ser uno de los siguientes valores. SM_CXBORDER 5 Width of window frame that cannot be sized. SM_CXCURSOR 13 Width of cursor. SM_CXDLGFRAME 7 Width of frame when window has the WS_DLGFRAME style. SM_CXDOUBLECLK 36 Width of the rectangle around the location of the first click in a double-click sequence. SM_CXFRAME 32 Width of window frame that can be sized. SM_CXFULLSCREEN 16 Width of window client area for a full-screen window. SM_CXHSCROLL 21 Width of arrow bitmap on a horizontal scroll bar. SM_CXHTHUMB 10 Width of scroll box (thumb) on horizontal scroll bar. SM_CXICON 11 Width of icon. SM_CXICONSPACING 38 Width of rectangles the system uses to position tiled icons. SM_CXMIN 28 Minimum width of window. SM_CXMINTRACK 34 Minimum tracking width of window. SM_CXSCREEN 0 Width of screen. SM_CXSIZE 30 Width of bitmaps contained in the title bar. SM_CXVSCROLL 2 Width of arrow bitmap on a vertical scroll bar. SM_CYBORDER 6 Height of window frame that cannot be sized. SM_CYCAPTION 4 Height of window title. This is the title height plus the height of the window frame that cannot be sized (SM_CYBORDER). SM_CYCURSOR 14 Height of cursor. SM_CYDLGFRAME 8 Height of frame when window has the WS_DLGFRAME style. SM_CYDOUBLECLK 37 Height of the rectangle around the location of the first click in a double-click sequence. SM_CYFRAME 33 Height of window frame that can be sized. SM_CYFULLSCREEN 17 Height of window client area for a full-screen window (equivalent to the height of the screen minus the height of the window title). SM_CYHSCROLL 3 Height of arrow bitmap on a horizontal scroll bar. SM_CYICON 12 Height of icon. SM_CYICONSPACING 39 Height of rectangles the system uses to position tiled icons. SM_CYKANJIWINDOW 18 Height of Kanji window. SM_CYMENU 15 Height of single-line menu bar. This is the menu height minus the height of the window frame that cannot be sized (SM_CYBORDER SM_CYMIN 29 Minimum height of window. SM_CYMINTRACK 35 Minimum tracking height of window. SM_CYSCREEN 1 Height of screen. SM_CYSIZE 31 Height of bitmaps contained in the title bar. SM_CYVSCROLL 20 Height of arrow bitmap on a vertical scroll bar. SM_CYVTHUMB 9 Height of scroll box on vertical scroll bar. SM_DBCSENABLED 42 Nonzero if current version of Windows uses double-byte characters; otherwise, this value returns zero. SM_DEBUG 22 Nonzero if the Windows version is a debugging version. SM_MENUDROPALIGNMENT 40 Alignment of pop-up menus. If this value is zero, the left side of a pop-up menu is aligned with the left side of the corresponding menu-bar item. If this value is nonzero, the left side of a pop-up menu is aligned with the righ side of the corresponding menu-bar item. SM_MOUSEPRESENT 19 Nonzero if the mouse hardware is installed. SM_PENWINDOWS 41 Handle of the Pen Windows dynamic-link library (DLL) if Pen Windows is installed. SM_SWAPBUTTON 23 Nonzero if the left and right mouse buttons are swapped. Returns: <nValue> The required value if the function is usually executed [/quote:3uuwb18b] Ojala por ahi sea..
Buscando funciones/propiedades...
oWnd:oLeft = oExplBar <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=35041&p=208508#p208508">viewtopic.php?f=6&t=35041&p=208508#p208508</a><!-- l -->
Buscando registro rápidamente
Compañeros (otra vez yo...)Tengo un DBF con más de 150.000 registros. Uno de los campos es IMPRESO , L , 1 . ¿ Como puedo buscar rápidamente el primer registro de la BD que IMPRESO=.t. ? Algo así como utilizar SEEK o FIND para buscar de una tacada. Lo puedo hacer con LOCATE pero se ralentiza el sistema.Mil gracias.LORENZO
Buscando registro rápidamente
Loren.. Si no puedes crear un indice para ese campo o incluirlo en un indice existente y que no altere el orden de busqueda que deseas... puedes probar lo siguiente.Compara el Locate con DBEVAL(), o con un ciclo DO WHILE, o con un SET FILTER y ve con cual de ellos obtienes mejor velocidad. Yo tengo mi opcion, pero es mejor que tu pruebes esas opciones.Desde ChileAdolfo
Buscando registro rápidamente
Hola prueba Asi[code:3airucqx]procedure p&#40;&#41; local ckey, ctag, ccdx dbcreate&#40; "paso", &#123;&#123; "hola", "c", 10, 0 &#125;,; &#123; "logic", "l", 01,0 &#125;&#125;, "dbfcdx"&#41; sele 0 ; use paso new exclusive via "dbfcdx" cKey &#58;= 'iif&#40; logic, "t", "f" &#41;' cTag &#58;= "lcampo" cCdx &#58;= "paso" INDEX ON &cKey ; TAG &cTag ; TO &cCdx set index to &#40;cCdx&#41; dbappend&#40;&#41; field->hola &#58;= "falso" dbappend&#40;&#41; field->hola &#58;= "true" field->logic&#58;= &#46;t&#46; dbcommitall&#40;&#41; wbrowse&#40;&#41; ordsetfocus&#40; "lcampo" &#41; OrdScope&#40; 0, "t" &#41; OrdScope&#40; 1, "t" &#41; wbrowse&#40;&#41; OrdScope&#40; 0, "f" &#41; OrdScope&#40; 1, "f" &#41; wbrowse&#40;&#41; close all return [/code:3airucqx]
Buscando registro rápidamente
Loren,Crea tu indice usando la funcion cVal2Char()INDEX ON cVal2Char( campologico ) TO AZULY listo, ya puedes usar el DbSeek()Saludos
Buscando trabajo
Estimados: Quisiera postularme para los paises limítrofes o no de Argentina como programador en FiveWin y xHarbour, quien tenga esta posibilidad agradecería que se contactaran conmigo. Muchas Gracias Velazquez, Gustavo Argentina.
Buscando trabajo...
Hola. Busco trabajo como programador, ya sea bajo fw o .net Si alguien necesita por favor, le agradezco desde ya que se comuniquen conmigo. les dejo mi email: gusmavf arroba gmail punto com gracias.
Buscar *algo* en 30 caracteres ?
Amigos: Tengo un campo de 30 caracteres, que es la descripción de un artículo. Deseo buscar por cualquier parte de el y hacer un filtro de esos registros que contengan esa parte. Ej: Descripcion: "Ruleman de empuje VW Logus 1994 motor 2000" > quiero que si pongo VW me filtre toso los registros que tengan las letras VW en su descipcion. Hay algo en DBF/CDX, en Ads hay (FTS),pero no quiero usar Ads. Muchas gracias Saludos Ruben Dario Fernandez.
Buscar *algo* en 30 caracteres ?
Ruben. Haz una búsqueda en este foro, por WildSeek, y encontrarás muchos ejemplos. Saludos.
Buscar *algo* en 30 caracteres ?
Aqui tienes uno. [code=fw:1g9w7e6v]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> XBrwWildSeek<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oBrw<br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED VIA <span style="color: #ff0000;">"DBFCDX"</span><br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG STREET<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBRPWSE : INCREMENTAL FILTERS "</span> + FWVERSION<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">30</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"CUST"</span> <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lIncrFilter</span> &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lSeekWild</span> &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">150</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1g9w7e6v]
Buscar *algo* en 30 caracteres ?
Gracias Francisco. Probando.... Saludos Ruben Dario Fernandez
Buscar *algo* en 30 caracteres ?
Excelente Francisco: Muchas gracias. Saludos. Ruben Dario Fernandez
Buscar *algo* en 30 caracteres ?
Funcionó correctamente. Muchas gracias. Saludos Ruben Dario Fernandez.
Buscar Palabra en archivo .txt o prg
Después de mucha ausencia por este foro, muy buen día a todos Solicito a algún colega una función de búsqueda de palabras en un archivo plano, perdí una función que ponía el cursor en la palabra y la resaltaba en un color De antemano expreso mi agradecimiento Jairo Barbosa
Buscar cadenas dentro de archivos
Hola amigos y amigas del foro pues, alguien sabe si conoce algun software, para hacer busquedas de palabras dentro de un archivo. ejemplo. ARCHIVO : MAIN.PRG FUNCTION SUSANA() Que yo encuentre la palabra "susana" dentro del archivo main.prg o todos los archivos...espero haverme explicado, porque con el asistente de busqueda de windows XP, no lo encuentra <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Su amiga Susy <!-- e --><a href="mailto:susan_mx@hotmail.com">susan_mx@hotmail.com</a><!-- e -->
Buscar cadenas dentro de archivos
Si deseas buscar las cadenas en PRGs debe permitirlo tu editor de programas, en mi caso uso ConTEXT abro todos los programas en donde deseo buscar y/o reemplazar presiono Ctrl+R y listo. Para buscar cadenas en cualquier archivo sin importar el tipo, tamaño, etc.; sigo usando mi viejo XTree Gold en DOS y funciona!.
Buscar cadenas dentro de archivos
Susy, Nosotros usamos "Total Commander" desde hace muchos años (y antes usábamos Norton Commander en MsDos) para controlar el ordenador. Te permite hacer eso y muchísimas más cosas. De hecho siempre trabajamos desde el "Total Commander" y no podríamos trabajar profesionalmente sin él <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Es un producto shareware que puedes probar libremente
Buscar cadenas dentro de archivos
Susana: Te recomiendo usar el editor MED <!-- w --><a class="postlink" href="http://www.med-editor.com">www.med-editor.com</a><!-- w --> Hace lo que necesitas y muchas cosas más, ah y es free. Saludos, Armando
Buscar cadenas dentro de archivos
Susy: Yo uso desde la epoca DOS xTreeGold, ahora existe eXtreme que es algo parecido y es free. Este es el link <!-- m --><a class="postlink" href="http://www.homepages.paradise.net.nz/link/">http://www.homepages.paradise.net.nz/link/</a><!-- m --> Espero te sirva. Saludos Ruben Fernandez.
Buscar cadenas dentro de archivos
Para mi, como dice Antonio el mejor Total Comander, que entre otras cosas, te puede comparar ficheros por contenido, y buscar cadenas dentro de él, y otra clase de virguerías. Además de manejar FTP de la forma mas sencilla que he visto y multiples cosas mas Saludos Jose Luis
Buscar cadenas dentro de archivos
Te recomiendo PsPad, hace eso y muchisimo mas, tambien es free. <!-- m --><a class="postlink" href="http://www.pspad.com/">http://www.pspad.com/</a><!-- m --> La comparacion de versiones del mismo prg es muy buena... Saludos [url=http&#58;//img113&#46;imageshack&#46;us/my&#46;php?image=catturaricerca2ek5&#46;jpg:1tq3h96k][img:1tq3h96k]http&#58;//img113&#46;imageshack&#46;us/img113/9606/catturaricerca2ek5&#46;th&#46;jpg[/img:1tq3h96k][/url:1tq3h96k] [url=http&#58;//img214&#46;imageshack&#46;us/my&#46;php?image=catturaricercaia8&#46;jpg:1tq3h96k][img:1tq3h96k]http&#58;//img214&#46;imageshack&#46;us/img214/1369/catturaricercaia8&#46;th&#46;jpg[/img:1tq3h96k][/url:1tq3h96k]
Buscar cadenas dentro de archivos
Acabo de bajarme el pspad, y veo que es un editor de codigo, y muy bueno, por cierto. Lo que pasa es que nos referíamos a un explorador de archivos. Con referencia a editor de textos, yo utilizo el Editplus, que tiene configuración para trabajar con fivewin, por lo tanto tiene cliptext para Fivewin. Esto tiene la ventaja de que si no te acuerdas como se construye un comando, por ejemplo "Redefine Checkbox", con todos sus parámetros, pues bien , trae una listas con todos los comandos de Fivewin, y con doble click, él te lo construye, a excepción de la variables, y si te equivocas, te lo muestra. Saludos Jose Luis
Buscar cadenas dentro de archivos
Dentro de los emuladores de Norton Commander, me gusta y es FREEWARE "Free Commander", este no tiene versión de prueba limitada, es todo el poder de un Commander FREE.
Buscar cadenas dentro de archivos
[quote="Antonio Linares":3r9wgf3k]Susy, Nosotros usamos "Total Commander" desde hace muchos años (y antes usábamos Norton Commander en MsDos) para controlar el ordenador. Te permite hacer eso y muchísimas más cosas. De hecho siempre trabajamos desde el "Total Commander" y no podríamos trabajar profesionalmente sin él <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Es un producto shareware que puedes probar libremente[/quote:3r9wgf3k] Hola don Antonio , gracias me sirvio de mucha utilidad Total commander, eso era lo que queria encontrar en todas mis carpetas, porque no era solamente buscar dentro de un archivo .prg, eso lo puse de ejemplo, queria encontrar dentro de cualquier archivo la palabra a buscar que tengo perdido, y ya lo encontre es bastante practico solo que no es free. Gracias a todos los que me ayudaron, les estoy agradecida Susy les mando saludos corazones ....mmuuuaaacckkkkk <!-- e --><a href="mailto:susan_mx@hotmail.com">susan_mx@hotmail.com</a><!-- e -->
Buscar cadenas dentro de archivos
Josè, acabo de probar Free Commander y no está nada mal... lástima que no se pueden buscar los archivos presionando la tecla Alt y los primeros caràcteres del nombre del archivo como se hacia con NC o CN (o Ctrl+Alt + los primeros carácteres del nombre del archivo en Total Commander), y la otra cosa que le falta (a primer golpe de vista) es acceder a los archivos del POCKET como Total Commander. Saludos
Buscar cadenas dentro de archivos
José, rectifico, veo que no hay que presionar Alt o Ctrl + Alt para buscar archivos en la carpeta actual... basta digitar el nombre... MUY BUENO!!!! faltaría que acceda al POCKET y sería un lujo. Saludos
Buscar cadenas dentro de archivos
Pedro, Total Commander accede al Pocket PC y también hay una versión de Total Commander para Pocket PC
Buscar cadenas dentro de archivos
Antonio, en su época instalé el plug-in para acceder al pocket pc de Total Commander y andaba muy bien, también probé la versión para POCKET que hace un tiempo era free, no se ahora. Ambos se parecen muchisimo al viejo Norton Commander. La ventaja del free si funcionara tambien el acceso a pocket, es que podría tambien instalarlo en algún cliente, sin tener que pagar la licencia. Saludos
Buscar cadenas dentro de archivos
Saludos Cordiales Colegas!! Jose Luis me puedes pasar los stx o lo que utilices en EditPlus yo estoy muy famirializado con ese programa y me gustaria usarlo para FiveWin Para los demas! bueno yo utilizo algo parecido al Total Commander que ustedes llaman !! pero se llama Text Search y es del Norton Utilities 6.0 de 1991! Trabaja bajo consola! pero es lo mejor!!!
Buscar cadenas dentro de archivos
Hola Daniel, He intentado enviarte lo que me pides, pero si intento utilizar mensajes privados, pone que estan desactivados en éste foro, y no se tu dirección de correo. Pon tu direccion de correo y te los envío Saludos Jose Luis
Buscar cadenas dentro de archivos
Muchas Gracias Jose Luis Si mi correo es <!-- e --><a href="mailto:Danielr.venezuela@gmail.com">Danielr.venezuela@gmail.com</a><!-- e --> Te lo agradesco de verdad!! Ya vi a total commander! jejeje lo de Text Search solo busca texto en Ficheros, unidades de disco o espacio de ficheros borrados!! Total commader es igualito a Norton Commander! jeje!! Gracias por todo!!
Buscar cadenas dentro de archivos
Jose Luis!! Cuando puedas me lo mandas! no te vayas a olvidad de mi! jejeje!! <!-- e --><a href="mailto:danielr.venezuela@gmail.com">danielr.venezuela@gmail.com</a><!-- e --> Gracias!!
Buscar cadenas dentro de archivos
Hola Daniel, Te los he enviado, si necesitas saber como instalarlos, me lo comentas Saludos Jose Luis
Buscar cadenas dentro de archivos
Como el Total Comander, para mi gusto, ninguno... Para programar, para copiar, comparar, comprimir, acceso a redes, etc, etc, etc... El mejón
Buscar en archivo txt
La Dirección General de Rentas de Provincia de Buenos Aires de nuestro país no tuvo mejor idea que hacer un padrón con lo que hay que cobrar a cada contribuyente de percepciones ó retenciones, siendo nosotros agente recaudador de ellos (Sí Argentina bendito país), antes eran alícuotas fijas, pero a algún genio se le ocurrió hacerla más complicada (no tenemos nada que hacer) y lo hizo que cada contribuyente pague distinto. Para ello o se baja el padrón o bien cada vez que cobras a un cliente o pagás a un proveedor entras a internet buscas el nro de Cuit (1) buscas los porcentajes a aplicar y podés facturar ó cobrar... (chino mandarin!!! es mas fácil de aprender que ejecutar esto para una empresa que hade 60 facturas por día) ó bien bajas el padrón de internet, y hacés un prg que lea y encuentre las alícuotas. Necesito buscar del padron los clientes que pertenezcan a mi empresa los cuales identifico con los números posteriores al 3º punto y coma (1) y de ahí extraer los datos de que necesito, pensaba utilizar memoread, etc pero tengo la limitación de 64k. Pensé en utilizar la clase txt, pero no probé todavía, ya que no lo veo claro. Quizás con Fread? Me pueden orientar que puedo utilizar. son en total 1323270 renglones 82megabytes una bicoca Los primeros renglones son los siguientes 21112007;01122007;31122007;20000000028;D;S;N;6,00;1,75;15;10 21112007;01122007;31122007;20000013677;D;S;N;6,00;1,75;15;10 21112007;01122007;31122007;20000091635;D;S;N;6,00;1,75;15;10 21112007;01122007;31122007;20000125327;C;S;N;6,00;1,75;15;10 21112007;01122007;31122007;20000188426;C;S;N;6,00;1,75;15;10 21112007;01122007;31122007;20000282465;D;S;N;0,00;0,00;01;01 Disculpen lo largo de la explicación. Luis
Buscar en archivo txt
Luis, Puedes usar perfectamente MemoRead() y luego At(), ya que en 32 bits no existe la limitación de los 64 Ks y los ordenadores 32 bits de hoy en dia tienen memoria de sobra para cargar ficheros grandes (hasta 4 GB) en memoria
Buscar en archivo txt
Gracias Antonio, cuando venía hacia la oficina se me ocurrió que podía ser como con los array, pero nada mejor que me lo confirmen. Luis
Buscar en archivo txt
Bueno pude leer archivos txt y utilizando la función StrToken estraer lo necesario, pero en archivos pequeños. El que necesitaba es de 82 megas, no pude. Utilizando mlcount, me lee los renglones y eso me dio falsas expectativas porque al querer leerlo se queda sin hacer nada, permitiendo entrar a otras áreas del programa como si nada ocurriese, pero al cerrar el programa lo hace pero quedando en memoria una copia del mismo. La solución que hallé fue pasar el txt a acces y de ahí a dbf. Lo que implicó tener que quitar campos no imprescindibles pero sí buenos complementos de información, luego modificar la anchura de campos (demoraba casi 10 minutos), ya que el archivo original que venía de acces a dbf era de 450 megas!!!. La cuestión es que esto hay que hacerlo todos los meses y necesitaría saber si alguien tiene idea de como puedo leer el archivo usando mi programa , o en su defecto hacer un externo. Quise con fread pero no se como buscar y extraer. Y si es esta la solución. Espero sus comentarios EJ de como lee archivos txt Esto funcionó perfecto hasta 28000 bytes, luego de eso lo comentado do cLinea := memoline(cTexto,60,z) cCuit := STRTRAN(odbf:cuit, "-", "") if substr(cLinea,28,11 ) = cCuit ? "HOLA" MsgInfo( StrToken( cTexto, 9, ";" ) ) odbf:skip() ? odbf:cuit return endif sysrefresh() z := z +1 until z = nCuento .or. odbf:eof()
Buscar en archivo txt
MemoLine() es una función muy lenta ya que busca la línea desde el principio del texto, una y otra vez. Hazlo de esta manera: [code:3hctjgyn] // nFrom hay que pasarlo por referencia "@" y empieza valiendo 1 function ExtractLine&#40; cText, nFrom &#41; local cLine, nAt nAt &#58;= At&#40; CRLF, SubStr&#40; cText, nFrom &#41; &#41; if nAt > 0 cLine &#58;= Substr&#40; cText, nFrom, nAt - 1 &#41; nFrom += nAt + 1 else cLine &#58;= Substr&#40; cText, nFrom &#41; nFrom &#58;= Len&#40; cText &#41; + 1 endif return cLine [/code:3hctjgyn]
Buscar en archivo txt
ESTE ES UN FUENTE PARA LEER ARCHIVOS DE TEXTO, ESPERO QUE TE SIRVA DE ALGO PARAM ARCH_DIC MAXLINE=512 HANDLE=FOPEN(ARCH_DIC) DO WHILE .T. BUFFER=SPACE(MAXLINE) NUM_BYTES=FREAD(HANDLE,@BUFFER ,MAXLINE) LINE_END=AT(CHR(13)+CHR(10),BUFFER) IF LINE_END#0 ? SUBSTR(BUFFER,1,LINE_END) FSEEK(HANDLE,LINE_END+1-NUM_BYTES,1) ELSE FSEEK(HANDLE,0) EXIT ENDIF ENDDO FCLOSE(ARCH_DIC)
Buscar en archivo txt
Antonio con el código que me enviaste probé con un archivo de 7 megas y lo lee perfecto, lo único es que demora unos 12 minutos. Lo que noté que a medida que avanza la lectura, más rápido resuelve. El archivo completo tiene 82 megas, es decir intratable. no sólo para el programa de fwh sino que también para editplus2, ya que quise cambiar los ; por comas y quitar las comas en los numéricos, para poder exportarlo a dbf y tambíen se satura y cuelga???. Lo que quisiera saber si hay algún idioma ya sea c++, delphi, visualbasic ,etc , que lo pueda leer y trabajar en el mismo sin salir del código de programa. Voy a probar con la solución que me envió ADBLANCO a ver que pasa. Me interesaría saber lo de otros idiomas por curiosidad Gracias Espero sus comentarios