tag:blogger.com,1999:blog-58026998481648204812024-03-21T23:18:06.001+10:00Sandstorm's Blog (Home of ssUltimate Library)This is dedicated in assisting others on developing and non-developing matters. It is also the official home of ssUltimate Library. Anonymoushttp://www.blogger.com/profile/05183671726723067216noreply@blogger.comBlogger200125tag:blogger.com,1999:blog-5802699848164820481.post-65476013685168429042022-03-16T15:00:00.003+10:002022-03-16T15:00:52.523+10:00Backup Progress, How?<p> I have been wondering how to do this as we need to allow users to perform backup and give them a good estimate on when said backup will be completed; as in my end where the database is external (MariaDB), then I need to run an external MySQLDump.exe. The beauty of this is while backup is in progress running on a separate thread, they can continue working on their app without waiting for the backup completion.</p><p>Why is it important for me to show a progress bar as an indicator that the backup process has been completed? Well it is because if they quit the app ahead of the backup completion, it will also quit the backup process and the backup will most probably be incomplete as harddisk writing is done gradually by the backup process. So we need something like this that shows them when the backup process is still in progress:</p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiEtILcANJmOqPRrUQOl1VFyXSZ5_XfaG80UqwLBFhO1SognAQLejAkePoZFZh3XsvsFDLMe9Yh0tPh3Uewmtmi2rUF1w88OoExyB9S_rr8x1szOFZpy9zKxJyq9fNAIs-KRWll_uwu8586QrzS1UQ_xNuaosAI3j-BIgc0PPGW-QDboMnmWgxFWgkMJA=s864" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="864" height="461" src="https://blogger.googleusercontent.com/img/a/AVvXsEiEtILcANJmOqPRrUQOl1VFyXSZ5_XfaG80UqwLBFhO1SognAQLejAkePoZFZh3XsvsFDLMe9Yh0tPh3Uewmtmi2rUF1w88OoExyB9S_rr8x1szOFZpy9zKxJyq9fNAIs-KRWll_uwu8586QrzS1UQ_xNuaosAI3j-BIgc0PPGW-QDboMnmWgxFWgkMJA=w762-h461" width="762" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: left;">But again how? The backup completion is affected by file size and whether said database is local or on a remote location. So originally, we perform guesstimates of how long it normally takes but that is not good enough. And we definitely cannot use:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">DO WHILE </span><span style="font-family: "Courier New"; font-size: 10pt;">.T.<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;">
</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">IF FSIZE</span><span style="font-family: "Courier New"; font-size: 10pt;">(</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lcBackup</span><span style="font-family: "Courier New"; font-size: 10pt;">) > 0<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Exit<br /><o:p></o:p></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">
ENDIF<br /></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">ENDDO</span></div>
<p class="MsoNormal"><o:p></o:p></p></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both;">As depending on your RAM and free memory, a diskwrite for the backup may happen several times gradually increasing its size; and when the first HDD write happens, your app with the approach above will deem it already complete. </div><span><a name='more'></a></span><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">This morning, an idea suddenly hit me and so I tried this trick now and it is working good, so I am sharing the trick here now. </div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">For a backup progress and its possible completion to be determined, we have to at least know how much MB the backup will consume. So here is how:</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">1. Check your archive folder and get all the backup files there via ADIR().</div><div class="separator" style="clear: both;">2. Get the latest backup via checking its date and time stamps</div><div class="separator" style="clear: both;">3. Get the filesize of that latest backup. </div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">Now, we have a basis of a possible size of the next backup. Either it will be of the same size but most probably it will be a bit bigger. And that will be your basis for your progress bar indicator as well as possible completion. I have a timer on my main form which checks the users that remain online every 5 seconds so I put this there too:</div><div><br /></div><div style="text-align: left;"><div style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">gomyapp</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">isbackup </span><span style="font-family: "Courier New"; font-size: 10pt;">= 1<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* Check if
previous max backup bytes is not zero<br /><o:p></o:p></span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">_bytes </span><span style="font-family: "Courier New"; font-size: 10pt;">> 0<br /> <o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* Compare new
size written vs last backup size<br /><o:p></o:p></span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Set Compatible On<br /><o:p></o:p></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Local
</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnWidth</span><span style="font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnSize<br /><o:p></o:p></span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> lnSize
</span><span style="font-family: "Courier New"; font-size: 10pt;">= </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Fsize</span><span style="font-family: "Courier New"; font-size: 10pt;">(</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">gomyapp</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">archive</span><span style="font-family: "Courier New"; font-size: 10pt;">)<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnWidth </span><span style="font-family: "Courier New"; font-size: 10pt;">= </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Int</span><span style="font-family: "Courier New"; font-size: 10pt;">((</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnSize</span><span style="font-family: "Courier New"; font-size: 10pt;">/</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">_bytes</span><span style="font-family: "Courier New"; font-size: 10pt;">)*133)<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">coBackup</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">shpProgress</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><span style="font-family: "Courier New"; font-size: 10pt;">= </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnWidth<br /><o:p></o:p></span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnWidth </span><span style="font-family: "Courier New"; font-size: 10pt;">>= 133<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">coBackup</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Visible </span><span style="font-family: "Courier New"; font-size: 10pt;">= .F.<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">gomyapp</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">isbackup </span><span style="font-family: "Courier New"; font-size: 10pt;">= 0<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endif<br /><o:p></o:p></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Set
Compatible Off<br /></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Else<br /></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* 6 minutes<br /><o:p></o:p></span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">coBackup</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">shpProgress</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><span style="font-family: "Courier New"; font-size: 10pt;">= </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Int</span><span style="font-family: "Courier New"; font-size: 10pt;">((</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">_backctr</span><span style="font-family: "Courier New"; font-size: 10pt;">/360)*133)<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">lnWidth </span><span style="font-family: "Courier New"; font-size: 10pt;">>= 133<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">coBackup</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Visible </span><span style="font-family: "Courier New"; font-size: 10pt;">= .F.<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">gomyapp</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">isbackup </span><span style="font-family: "Courier New"; font-size: 10pt;">= 0<br /><o:p></o:p></span><span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endif<br /><o:p></o:p></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endif<br /></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">Endif</span></div><p class="MsoNoSpacing">
</p><p class="MsoNormal"><o:p></o:p></p></div><div><div><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10pt;">_bytes</span> holds the bytes of the latest backup file. That is what I use now for comparison with the new backup as bytes are written down to the file in batches. So it is slowly getting bigger, and with it the progress bar is increasing too.</div><div><br /></div><div><br /></div><div>Now if you notice, I took the possibility that <span style="color: blue; font-family: "Courier New"; font-size: 10pt;">Thisform</span><span style="font-family: "Courier New"; font-size: 10pt;">.</span><span style="color: red; font-family: "Courier New"; font-size: 10pt;">_bytes</span> will have zero value. That will happen if there is no backup file yet; meaning they will perform the very first backup process. In that case I have that ELSE which is geared for 6 minutes, just to ensure it will be completed. You can increase or decrease the number of minutes by doing an initial backup test, check how long the backup took to complete and use the number of minutes on the above instead of that 360 value. I did the 6 minutes because our server is on the cloud and the speed of completion is dependent on the connection speed plus the size of the database. Truth is it is just taking a few minutes on my end for a 126MB backup file but I am just playing safe on that initial backup run. After that, the system will no longer switch onto that as there are now files for comparison.</div><div><br /></div><div>So there it is. A way to give a user a good estimate of a backup completion. HTH!</div></div></div><div><br /></div></div><br /><p><br /></p><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-42943753670603323652021-03-31T21:47:00.004+10:002021-03-31T21:55:39.777+10:00VFPA, the way forward for VFP Lovers!<p>Some of us (including yours truly) finds it very hard to move away from VFP. Not because I can’t learn a new language but the moment I started trying to learn a new one, my mind always compares the syntax with VFP which seems to be embedded already in my being. So I always ended up with thoughts like “<span style="color: #990000;">if it is done in VFP9, there are only fewer lines to do such!</span>” or “<span style="color: #990000;">Heck, why did they made it like this when in VFP9…</span>”. In the end I lose interest in the new language. Not to mention that there really is no demand for me on said language.</p><p>Still, learning and knowing more than VFP is really beneficial to us as developers. Anyway, finally I tried VFPA by <b><span style="color: #351c75;">Chuanbing Chen</span></b>, basically because I want its protection against decompilation; of course at first with some inhibitions. So I decided to try and use that for a new client.</p><p>The moment I realized that it actually does not overwrite the copy of my VFP9 SP2 and instead creates its own folder, I said to myself <span style="color: #990000;">“Hey, this is great! I can run both VFP9 and VFPA in a single machine and in case something goes wrong, I can simply reopen the project back to VFP9 and recompile there!</span>”. </p><p>So that was the plan! A plan that never happened because I observed VFPA to be more stable than VFP9. And that is not a surprise considering Chen has fixed a lot of bugs that remain with VFP9. So since I started using VFPA, I never went back to VFP9 anymore. And when my other client requested new enhancements on my existing app, I moved them as well to VFPA.</p><p>Right now, I am still using just VFPA-32 bit. But Chen offers more than that such as VFPA-64 bit and VFPCompiler.</p><p>If you are interested in checking Chuanbing Chen’s VFPA in its original language, please click this <span style="color: #cfe2f3;"><a href="http://baiyujia.com" target="_blank">link</a>. </span></p><p>If you want to read his site in English, you can use this<span style="color: #2b00fe;"> <a href="https://translate.google.com/translate?hl=en&sl=zh-CN&tl=en&u=http%3A%2F%2Fbaiyujia.com%2F" target="_blank">link</a> </span></p><p>Also the list of<a href="http://baiyujia.com/vfpdocuments/default.asp" target="_blank"> <span style="color: #2b00fe;">Fixed VFP9 Bugs</span></a> in VFPA: </p><p>If you want to learn further about VFPA, you can view this <a href="https://www.youtube.com/watch?v=iQqoLBOCTrI" target="_blank"><span style="color: #2b00fe;">video</span> </a></p><p>Anyway, the purpose of this entry here is to introduce <b><span style="color: #990000;">VFP Advanced</span> </b>to my readers, if you still are not aware of it. Personally? Though I have just recently used VFPA, and by recently I mean since December 2020 only, I am very much satisfied with it. As a parting words, move to VFPA.</p><div><br /></div><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com2tag:blogger.com,1999:blog-5802699848164820481.post-13112016555043610702020-06-06T02:41:00.001+10:002020-06-06T02:41:48.676+10:00Drag, Drop and RestrictI have just read a problem inside foxite where when a user accidentally moves the mouse beyond the form boundaries, then drag and drop fails because the objects disappear on the areas beyond the form. <br />
<br />
The solution to that is to restrict the drag and drop movements within your form, or dimension within objects in your form. Here are two samples showing how to achieve that:<br />
<br />
Sample 1:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* Restricting drag and drop
within the form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Local </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Createobject</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">('TestForm')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Show</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(1)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Return<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">TestForm </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>AutoCenter
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
.T.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 900<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 440<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Caption </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 'Drag, Drop
& Restrict Inside Form'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Add Object </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">container1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">Mycontainer </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">With Top </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 30, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Left </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 50<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">Mycontainer </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Container<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Height
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
100<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 100<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Procedure
MouseMove<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Lparameters
</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nButton</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nShift</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nXCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nButton </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 1 And </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Between</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">,0,</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">-</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">) And ;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">BETWEEN</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nXCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">,0,</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">-</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Move</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nXCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p>Sample 2:</o:p></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* Restricing within objects on
form, in this case above or below the lines<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Local </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Createobject</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">('TestForm')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">oForm</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Show</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(1)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Return<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">TestForm </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>AutoCenter </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= .T.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 900<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 440<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Caption </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 'Drag, Drop & Restrict'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Add Object </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">Shape1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As shape With Top
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
30, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Left
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
0, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
900, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">height
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Add Object </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">Shape2 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As shape With Top
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
200, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Left
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
0, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">=
900, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">height
</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Add Object </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">Command1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">MyButton </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">With Caption</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">='Move Me
outside of the lines', </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Top </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 35, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Left </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 5, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">width </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 200, </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">height </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 30<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">MyButton </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As CommandButton<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Procedure MouseMove<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Lparameters </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nButton</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nShift</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nXCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nButton </span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">= 1 AND </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">BETWEEN</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">,30,171)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Move</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">(</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nXCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">, </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">WAIT WINDOW </span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">m</span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">.</span><span style="color: purple; font-family: "Courier New"; font-size: 10.0pt;">nYCoord </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">nowait<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
In case you need it. Cheers!<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-77974087070808650562019-11-22T09:26:00.000+10:002019-11-22T09:26:22.790+10:00IE inside the FormUnlike with placing internet explorer browser inside our form via Internet Explorer Shell, this is similar to my other blogs of opening the URL directly on a browser like Chrome and Firefox, capturing its window handle, adjusting window style and placing said browser inside of our form. This time though, it is by using Internet Explorer as the Browser as we have more handles on it. Not to mention that IE automatically comes with the OS unlike the other browsers which our clients may not choose to have.<br />
<br />
So why am I suggesting to do it this way when we can do the same via Shell.Explorer? Well, it is not quite the same actually. Shell.Explorer for one adjusts the site to the basic design without CSS applied. So the display you will see will not be entirely the same when you open it via a browser. Sometimes also, JavaScript hampers its execution especially with the new OS now in place. Now, opening the browser itself will ensure that it has the latest features, based on your browser version. <br />
<br />
The reason I created this entry is because there is a question inside Foxite forum that if we do it this way, then how to position IE inside our form at specific coordinates and not as a full screen filling the entire form? So I am showing here how we can achieve that, as a guide. Improve it further based on your needs. Codes follow:<br />
<br />
<a name='more'></a><br /><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">GetWindowLong </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">User32 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nIndex</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">SetWindowLong </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">user32 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nIndex</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">dwNewLong</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10pt;">Declare Integer </span><span style="color: maroon; font-family: "Courier New"; font-size: 10pt;">SetParent </span><span style="color: blue; font-family: "Courier New"; font-size: 10pt;">In </span><span style="color: maroon; font-family: "Courier New"; font-size: 10pt;">user32</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">;</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">hWndChild</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">hWndNewParent<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loTest </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">"Form1"</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loTest</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Show</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Read Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">Form1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Caption
</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">'IE inside a VFP
Form'</span></b><span style="font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">AutoCenter </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">500</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">1000</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">ShowWindow </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">2</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">oIE </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Procedure Init<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Local
</span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lcURL</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lnStyle</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loIE </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">internetexplorer</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Application</span></b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lcURL </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">'https://</span></b><u><span style="font-family: "Courier New"; font-size: 10pt;">www.mediwaresas.it/news'</span></u><span style="font-family: "Courier New"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loIE </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">"InternetExplorer.Application"</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">oIE </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loIE</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Wait Window </span><span style="font-family: "Courier New"; font-size: 10pt;">'Please wait,
loading site...' </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Nowait<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> With
</span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loIE<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Visible </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">Silent </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">AddressBar</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">MenuBar</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Toolbar</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">StatusBar</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Resizable</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">500</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: green; font-family: "Courier New"; font-size: 10.0pt;">* Load URL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">Navigate2</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lcURL</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Do While </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">ReadyState </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><> </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">4</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddo<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loHWnd </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">HWnd</span></b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lnStyle </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">GetWindowLong</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">16</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">SetWindowLong</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">16</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Bitxor</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">lnStyle</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">0x00400000</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">SetParent</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> <b>.</b></span><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">ClientToWindow</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">_Resize</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> <b>.</b></span><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Visible </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Wait Clear<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Bindevent</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">'Resize'</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "Courier New"; font-size: 10pt;">'_Resize'</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Procedure
</span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">_Resize<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">With Thisform</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">oIE</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">- </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">710</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">100</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">- </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">120</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Procedure
Destroy<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Clear
Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> This</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">oIE</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">Quit</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">oIE </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Null</span></b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Procedure
KeyPress<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Lparameters
</span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nKeyCode</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nShiftAltCtrl</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">If </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">27</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Release</span></b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com4tag:blogger.com,1999:blog-5802699848164820481.post-63157346362045494532019-09-12T14:04:00.002+10:002019-09-12T16:00:44.241+10:00Enumerating Path Links and Installed AppsA friend requested for my assistance as they were recently hit by a ransomware so he wants to reformat all machines. But before that, since there are around 60 machines to be reformatted, he wants to create a list of the path location of the shortcuts on its Desktop plus a list of all installed apps; so he can bring those back properly after reformatting and re-installation. <br />
<br />
Anyway, here is what I am able to come up with based on his request and desire, in a simplified way. I will add this here in my blogs as this may be useful for others too. You may adjust it further to suit your needs.<br />
<br />
<b><span style="color: purple;">Getting paths of shortcut items (.lnk) as well as enumerating installed Apps</span></b><br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loShell</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loReg</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFolder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFolder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUnit</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnLoop</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loLink</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcKey</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcApp</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Create Cursor </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">LinksNApps </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">xUnit c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">20</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">), </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">xType c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">), </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Link </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">40</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">), </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">xPath c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">200</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Get Links<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFolder </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Getenv</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"USERPROFILE"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'\Desktop\'</span></b><span style="font-family: "courier new"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loShell </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"Shell.Application"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFolder </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loShell</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Namespace</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFolder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUnit </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Getenv</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"COMPUTERNAME"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Set Default To </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFolder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">For </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnLoop </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1 </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Adir</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">aLink</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">m.lcFolder+'</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">*.lnk'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcLink </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">aLink</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">[m.lnLoop,1]</span></b><span style="font-family: "courier new"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFile </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFolder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">ParseName</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcLink</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loLink </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">GetLink</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Insert Into </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">LinksNApps </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Values </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUnit</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Link'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcLink</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loLink</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Path</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endfor<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Get installed apps<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">#</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Define </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">HKLM </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0x80000002</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Set Procedure To Locfile</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Home</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"classes\registry.prg"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Dimension </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">akeys</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loReg </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'REGISTRY'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcKey </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">='</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">SOFTWARE\WOW6432Node'</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10pt;">loReg</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">OpenKey</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcKey</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">HKLM</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loReg</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">EnumKeys</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(@</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">akeys</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">For </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnLoop </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1 </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Alen</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">akeys</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcApp </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">akeys</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnLoop</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">!</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Inlist</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcApp</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Classes'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Clients'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Policies'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'RegisteredApplications'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) And </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcApp</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) <> </span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'{'</span></b><span style="font-family: "courier new"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Insert Into </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">LinksNApps </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Values </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUnit</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'App'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">akeys</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnLoop</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">),</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">''</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Next<o:p></o:p></span><br />
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Go Top<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10pt;">Browse NORMAL</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br />
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-78320963833416811982018-08-17T09:15:00.003+10:002018-08-17T09:15:48.057+10:00CtrlBox on Left SideSince some are using Arabic/Urdu which deals with the right-to-left reading and data entry, then this trick might be useful to them. Which is to transpose too the position of the ControlBox of Titlebar.<br />
<br />
This trick is really quite simple requiring only 3 lines of codes involving <span style="color: blue;">GetWindowLong</span> and <span style="color: blue;">SetWindowLong</span>. I just added some codes to show how it looks like. See if this can come handy to you:<br />
<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loTest </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">"Form1"</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">loTest</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Show</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Read Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Define Class </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">form1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>AutoCenter
</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Caption </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">'ControlBox on Left side'</span></b><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">ShowWindow </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">2</span></b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Add Object </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">label1 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">As Label With </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">top </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">20</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">left </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">10</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">FontSize </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">16</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">width </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Width </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">20</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">height </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Height </span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">- </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">20</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">WordWrap </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">.T.</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Caption </span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">"This shows
how to reverse the title bar's OBJECT positions such as "</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">+;</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;">"controlbox,
icon and labels while leaving the inside of the form on normal left to right
positions"<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Procedure Load<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Declare
Integer </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">SetWindowLong </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">user32 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nIndex</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">dwNewLong</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">GetWindowLong </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">user32 </span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">nIndex</span></b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>SetWindowLong</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">20</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Bitor</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt;">GetWindowLong</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">16</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">), </span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt;">0x80000</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
Destroy<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Clear
Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDT0TePMjwL7x2gbgKPKUu2L1s9fduED0pWsFuYMjcrrolcvXz7spC52siJGrD1bOhPWtBvz61yoPoIr2nVZLI_k-D6CvAMnEg-VsjF0dKjV7FAdGjaD4GYzLtiHTq-Rbs8qx4kdZM45H-/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="379" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDT0TePMjwL7x2gbgKPKUu2L1s9fduED0pWsFuYMjcrrolcvXz7spC52siJGrD1bOhPWtBvz61yoPoIr2nVZLI_k-D6CvAMnEg-VsjF0dKjV7FAdGjaD4GYzLtiHTq-Rbs8qx4kdZM45H-/s320/b.jpg" width="320" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<br /></div>
Cheers!<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-88797760999779589232018-06-27T13:25:00.001+10:002018-06-27T13:30:52.608+10:00Grabbing UNC path from a Mapped DriveI am among those who stores only the fullpath() of the outside files into a field as I do not want to store the actual files inside the tables as that will make the tables huge as time goes by.<br />
<br />
I am also not an admirer of a mapped drive as that will lead to a lot of problems later such as giving users easy access to the folder for the app, issue of sleeping mapped drives, or workstations using different mapped drive letters.<br />
<br />
Anyway, this is so in case you have mapped drives in your workstations and you want to get a <span style="color: blue;">fullpath()</span> of a file using <span style="color: blue;">GETFILE()</span>, then you can always get the UNC path if file is coming from a network drive. For instance, if you have a mapped drive Z:\ and you point to a file there, instead of getting Z:\myFile.jpg you will get \\192.168.1.1\YourFolder\myFile.jpg or something like that instead; where drive Z: will be replaced by the actual UNC path.<br />
<br />
Here is a code for that:<br />
<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFile<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFile </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">GETUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Getfile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">())</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Messagebox</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">********<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Function </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">GETUNC</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">********<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFullPath</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnSize</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">!</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Empty</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Justdrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFullPath </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Fullpath</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If Drivetype</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) = </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnSize </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">600</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Space</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnSize</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">WNetGetConnection
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">WIN32API </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">String </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">@</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">String </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">@</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">@</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnSize</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>WNetGetConnection</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(@</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, @</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, @</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnSize</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFullPath </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Strtran</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFullPath</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDrive</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Len</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alltrim</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcUNC</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Clear Dlls </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">WNetGetConnection<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Return</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFullPath</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
What it will do is if you get a file that is stored on your local drive, then it will just show the normal fullpath(). If you get a file on a mapped drive, then it will replace the mapped drive with the actual UNC Path and combine that with the file to present you with a new fullpath using UNC path instead. The advantage of this is it won't be tied up to a mapped drive which may change from workstation to workstation. Even if on one workstation, it is mapped to z:\ and on another to x:\, inside your app since it will be stored using the UNC path, it will always point to the proper location.<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
Cheers!</div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-82439211794843131882018-05-03T15:02:00.001+10:002018-05-03T15:25:53.255+10:00Enhanced ImageCapture (an Imaging Capturing Tool)<br />
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">I am currently working on a new project where I needed to capture images again for the Sellers to be used on their ID and on forms, so I fished out <b style="mso-bidi-font-weight: normal;">ImageCapture.prg</b>
which <b style="mso-bidi-font-weight: normal;"><span style="color: #c00000;">Gelson
L. Bremm</span></b><span style="color: #c00000;"> </span>shared to us:<span style="mso-spacerun: yes;"> </span><a href="http://weblogs.foxite.com/vfpimaging/2006/03/20/capture-screen-portions/">http://weblogs.foxite.com/vfpimaging/2006/03/20/capture-screen-portions/</a><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">But this
time I decided to attempt to enhance it for my needs so I changed some
approaches and used GDIPlus-X for the saving of the image instead of the
original approach he has implemented.<span style="mso-spacerun: yes;">
</span>Doing so, I was able to cut around 60% of the original codes too. <span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Check
this for GDIPlus-X: <a href="https://github.com/VFPX/GDIPlusX">https://github.com/VFPX/GDIPlusX</a>
in case you needed to download it.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Likewise incorporated here is a simple trick on form nudging capability so you can use the keyboard arrows to
position the capture form which is easier than purely using mouse. Also, when you adjust the form width and height, there is no need for you to worry adjusting the capture coordinates as well as that will also auto-adjust based on both form height and width set.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Here is the enhanced version of that:<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Enhanced version of
ImageCapture.prg (May 3, 2018)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Original Developer:<span style="mso-spacerun: yes;"> </span>German L. Bremm<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* </span><u><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">http://weblogs.foxite.com/vfpimaging/2006/03/20/capture-screen-portions/</span></u><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Lparameters </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">toObject</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFileOutput</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Public </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gToObject</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gcFileOutput</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gToObject </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">toObject</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gcFileOutput </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cFileOutput</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Public </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oCapturaImg<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oCapturaImg </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"ImgCapture"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oCapturaImg</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Show</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Define Class </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">ImgCapture </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Name
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"ImgCapture"</span></b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">332</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">300</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">AutoCenter </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"Position over the Image you want to Capture"</span></b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">MaxButton </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">MinButton </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">AlwaysOnTop </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ShowWindow </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BorderStyle </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BackColor </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rgb</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">60</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">60</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">60</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sysmetric</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">10</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nTitleBarHeight
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sysmetric</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">9</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormWidth </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormHeight </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Add Object </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As CommandButton With</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">28</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">'\<Grab
Image'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">142</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">5</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">FontName </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">'Arial'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">FontSize </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">14</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">FontBold </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Procedure Init<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Declare
Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CombineRgn </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"GDI32" </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hDestRgn</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hRgn1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hRgn2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nMode</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CreateRectRgn </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"GDI32"
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">X1</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Y1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">X2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Y2</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowRgn </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"user32"
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer
HWnd</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nRedraw</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Resize</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
Resize<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>With
This<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">5</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Tag </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Allt</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Str</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span><b>.</b></span><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetTransparent</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetTransparent<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnInnerRgn</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnOuterRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnRgnHandle</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">With This<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormWidth </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ (.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">* </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span><b>.</b></span><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormHeight </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ .</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nTitleBarHeight
</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ .</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span>lnOuterRgn
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CreateRectRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormWidth</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormHeight</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnInnerRgn </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CreateRectRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">6</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nTitleBarHeight</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">8</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormWidth</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormHeight</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">34</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnRgnHandle</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CreateRectRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CombineRgn</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnRgnHandle</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnOuterRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnInnerRgn</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<span style="mso-spacerun: yes;"> </span></span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowRgn</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">HWnd </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnRgnHandle</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span><b>.</b></span><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BorderStyle </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CopyToFile<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Do Locfile</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"system.app"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">locapturebmp </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">xfcbitmap</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>lcImage
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gcFileOutput</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If Empty</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Getpict</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">"png"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Clear
Resources<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>With
_Screen</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">System</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">drawing</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Coordinates
are X, Y, Width and Height<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">locapturebmp </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Bitmap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">fromscreen</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">6</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nTitleBarHeight</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">8</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormWidth</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">10</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nFormHeight</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_nBorder</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">36</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">locapturebmp</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Save</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">imaging</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">imageformat</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">png</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">imaging</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">imageformat</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">png</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Update target
Image object<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gToObject</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Picture </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">CLEAR RESOURCES </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcImage</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
KeyPress<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Lparameters
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nShiftAltCtrl</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Use Keyboard
arrows to nudge frame<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Do Case<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Case
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">24<span style="mso-spacerun: yes;"> </span></span></b><b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">&& move down</span></b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Case </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">5<span style="mso-spacerun: yes;">
</span></span></b><b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">&& move up</span></b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">- </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Case </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">19<span style="mso-spacerun: yes;">
</span></span></b><b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">&& move left</span></b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">- </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Case </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4<span style="mso-spacerun: yes;">
</span></span></b><b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">&& move right</span></b><span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 3;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endcase<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cmdSnap</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Click</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BackColor </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rgb</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">255</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;">'Capturing...'</span></b><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CopyToFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Procedure
Destroy<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oCapturaImg </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Null</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gToObject </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Null</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gcFileOutput </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Null</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>Release
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oCapturaImg<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gToObject<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">gcFileOutput<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CombineRgn<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">CreateRectRgn<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowRgn<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">If you
notice, I am passing two parameters.<span style="mso-spacerun: yes;">
</span>First parameter is the image object to show the result of the capturing
and the second one is the fullpath and name of the file to be saved.<span style="mso-spacerun: yes;"> </span>Calling it is like this:<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">Do Form </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">snagface </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">With
thisform.Image1</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">csrGrid</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">sellerid<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"><br /></span></b></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">So I can call that from anywhere on my form and immediately after grabbing an image, it gets displayed on an Image object. And here is
how it looks like (using my favorite cat as the model):<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT5sbLMjuRJGnvniyPMiLc33yoLtvhbkZIHLbZvAn2OrXLeOxAiTfp9oeLSKeCBXzDMA7wAKZf3EFd9sU8gewl24w5ezqp3JxcIzuRY36QvlSIw3WIU__R68jYZQ2KbukCXlszP_qTb80W/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="404" data-original-width="655" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT5sbLMjuRJGnvniyPMiLc33yoLtvhbkZIHLbZvAn2OrXLeOxAiTfp9oeLSKeCBXzDMA7wAKZf3EFd9sU8gewl24w5ezqp3JxcIzuRY36QvlSIw3WIU__R68jYZQ2KbukCXlszP_qTb80W/s1600/a.jpg" /></a></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfk5ELOlgKrQ96PUe3LtF55K0U6DAn3eZp7b5iN-q6B4qTWlu82jmF5eDtM8ruMKf973JuBejDd5KAeV_WBfvHcM_1tdRxDOE005uRWdIbRZ43FW_XUwwJw3UFycaYBXVDqxt1Y7ZjaS9M/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="379" data-original-width="589" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfk5ELOlgKrQ96PUe3LtF55K0U6DAn3eZp7b5iN-q6B4qTWlu82jmF5eDtM8ruMKf973JuBejDd5KAeV_WBfvHcM_1tdRxDOE005uRWdIbRZ43FW_XUwwJw3UFycaYBXVDqxt1Y7ZjaS9M/s1600/b.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Darn, I really love that cat's expression. Always makes me smile. :)</div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p><br /></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US" style="mso-ansi-language: EN-US;">Special
thanks to both<b style="mso-bidi-font-weight: normal;"><span style="color: #c00000;">
Gelson L. Bremm</span></b> and <b style="mso-bidi-font-weight: normal;"><span style="color: #c00000;">Cesar Chalom </span></b>for this and other tools Cesar has shared to us.<o:p></o:p></span></div>
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-50981963221794531112018-05-01T09:57:00.000+10:002018-05-01T10:26:11.696+10:00ssUltimate May 1, 2018 release<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: red; font-size: 10.0pt;">DtPickerx. DtPeriod</span></b><span style="color: #222222; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">Per request of one subscriber (</span><span style="color: #cc0000; font-size: 10.0pt;">Patrick Bibro</span><span style="color: #222222; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">1. Added </span><span style="color: blue; font-size: 10.0pt;">_ShowNotes</span><span style="color: #222222; font-size: 10.0pt;"> property. When this is set to .F., the adding of notes will be
disabled as well as the colored shapes below the calendar will disappear<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">2. Added capability to change the time
portion by typing on the textbox itself when nLevel is 3. Now aside from
capability to scroll the time, you can type direct on the textbox and change
time without the need to show dropdown calendar section.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP3frviPhoDksuO_nZmQLlR3U2O8KpcsgJQzEtnNcHcWbpIJnwmRbiJwMQHAD54SoBqKDVEoQqJbjc-L_LhD1cbPS4hm4EfmSj50Wmc84tCQEGQkZhBIl1LmTfryY3bZPtDJpih-pfn41A/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="478" data-original-width="533" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP3frviPhoDksuO_nZmQLlR3U2O8KpcsgJQzEtnNcHcWbpIJnwmRbiJwMQHAD54SoBqKDVEoQqJbjc-L_LhD1cbPS4hm4EfmSj50Wmc84tCQEGQkZhBIl1LmTfryY3bZPtDJpih-pfn41A/s1600/b.jpg" /></a></div>
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: red; font-size: 10.0pt;">ExcelExport </span></b><span style="color: #222222; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">1. Fixed bug on lower versions of excel on
Header Styles (<i>works okay on Excel 2016 64-bit but have not checked on lower
versions</i>, as notified to me by Ugur Yilmaz) <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">2. Adjusted numeric formatting and decimal
precision to a better approach with the help of our friend </span><span style="color: #cc0000; font-size: 10.0pt;">Ugur Yilmaz</span><span style="color: #222222; font-size: 10.0pt;">.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">3. Added a new property </span><span style="color: blue; font-size: 10.0pt;">_isNegative</span><span style="color: #222222; font-size: 10.0pt;">:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"> - .F., default, negative numbers will be
enclosed with open and close parenthesis, e.g., (900.00)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"> - .T., negative will be shown instead, e.g.,
-900.00<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">4. Added </span><span style="color: blue; font-size: 10.0pt;">_RedNegative</span><span style="color: #222222; font-size: 10.0pt;">. Default is .T. so negative values will be colored in red.
Set it to .F. if you do not like this<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">5. </span><span style="color: #cc0000; font-size: 10.0pt;">MK Sharma</span><span style="color: #222222; font-size: 10.0pt;"> requested sub-totalling
capability so these properties:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>a. </span><span style="color: blue; font-size: 10.0pt;">_SubTotalGroup</span><span style="color: #222222; font-size: 10.0pt;"> = is the column number where you want for sub-total to be based on
(grouping by). E.g., 1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>b. </span><span style="color: blue; font-size: 10.0pt;">_SubTotalCols</span><span style="color: #222222; font-size: 10.0pt;"> = is the columns where sub-total will be performed with comma as
delimiter, e.g., 2,4 <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>c. </span><span style="color: blue; font-size: 10.0pt;">_SubTotalForeColor</span><span style="color: #222222; font-size: 10.0pt;"> = is the forecolor of the sub-totals<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>d. </span><span style="color: blue; font-size: 10.0pt;">_SubTotalBackColor</span><span style="color: #222222; font-size: 10.0pt;"> = is the backcolor of the sub-Totals<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">Special thanks to our friend </span><span style="color: #cc0000; font-size: 10.0pt;">Vilhem-Ion Praisach</span><span style="color: #222222; font-size: 10.0pt;"> as
I adopted his approach on tracing sub-totals via Formula value.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span>Note
that _subtotalgroup and _subtotalcols should not be empty. If any one of
those is empty, then sub-totalling will be ignored as sub-totals need both.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">For a lack of better sample (and I have no time to prepare one), I just tested this to a borrower's statement on one of my apps; just so you can see about the sub-total and the new properties for negative values</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222;"><span style="font-size: 13.3333px;"><br /></span></span><span style="color: #222222; font-size: 10.0pt;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4osSONJInqBn5xuM8P1xoB5QM9i_JMLJlQVLHKLZjXBA93DIMAbmrEeIknd3jBP9W8au9YIY8hNKpEgILo8NFp2aAUlQzIwdHlzID8pp0X2O-AVbCm95ZULt_za5PpR7oSRq3z26QSMBG/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4osSONJInqBn5xuM8P1xoB5QM9i_JMLJlQVLHKLZjXBA93DIMAbmrEeIknd3jBP9W8au9YIY8hNKpEgILo8NFp2aAUlQzIwdHlzID8pp0X2O-AVbCm95ZULt_za5PpR7oSRq3z26QSMBG/s1600/a.jpg" /></a></div>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3IVUPq98aqP9i8wjzfjwDzL6-8F-YVNBfoHQnAPEIVcfxuP9axDmhZk744_6kEu8Zxgow_sp3jbkHsNr7U1LdfiacUvCxe4RWgje3BUgcnsPyML6_F9U3BuZeAaV5GSvP3NTTgq5PaXYi/s1600/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3IVUPq98aqP9i8wjzfjwDzL6-8F-YVNBfoHQnAPEIVcfxuP9axDmhZk744_6kEu8Zxgow_sp3jbkHsNr7U1LdfiacUvCxe4RWgje3BUgcnsPyML6_F9U3BuZeAaV5GSvP3NTTgq5PaXYi/s1600/c.jpg" /></a></div>
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #222222; font-size: 10.0pt;">Cheers!<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-78939899062007382412018-04-25T17:11:00.001+10:002018-04-25T17:11:26.962+10:00ExcelExport New Enhancements<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<span style="font-size: 12.8px;">1. New property named </span><b style="font-size: 12.8px;"><span style="color: blue;">Automation</span></b><span style="font-size: 12.8px;">. </span></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<div style="font-size: 12.8px;">
If you set it up to .T., it will seed excel via pure automation on a cell per cell basis. This is so we do not need to perform CAST() anymore on memo fields. It will get its contents including CRLF <span style="font-size: 12.8px;">(paragraphing)</span><span style="font-size: 12.8px;">, if any. </span></div>
<div style="font-size: 12.8px;">
<span style="font-size: 12.8px;"><br /></span></div>
<div style="font-size: 12.8px;">
If you set it up to .F. (default), it will perform the legacy way which is via EXPORT TO. Here, you have to perform CAST() on memo fields like this:</div>
<div style="font-size: 12.8px;">
<span style="font-size: 12.8px;"><br /></span></div>
<div style="font-size: 12.8px;">
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">Select CAST</span><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">CHRTRAN</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">MyMemo</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">,</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">CHR</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">13</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">),</span></b><b><span style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">''</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">)
</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">as </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">C</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: magenta; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">240</span></b><b><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">))
</span></b><b><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">as </span></b><b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;">MyMemo</span></b><o:p></o:p></div>
<div class="MsoNormal">
<b><span style="color: maroon; font-family: "Courier New"; font-size: 10.0pt; line-height: 107%;"><br /></span></b></div>
</div>
<div style="font-size: 12.8px;">
Otherwise memo fields won't be recognized by Excel. One disadvantage of this legacy approach is the memo fields will be of contiguous nature as CRLF will be forced removed. Also, Excel truncates the date beyond 255,</div>
<div style="font-size: 12.8px;">
<br /></div>
<div style="font-size: 12.8px;">
2. Fixed bug on fields of currency format being ignored on decimal places. Now it will also show the currency symbol.</div>
<div style="font-size: 12.8px;">
<br /></div>
<div style="font-size: 12.8px;">
3. If it detects that Excel supports xlsx format, then its final output will be of xlsx nature</div>
<div style="font-size: 12.8px;">
<br /></div>
<div style="font-size: 12.8px;">
Here is the output when Automation is set to .T.</div>
<div style="font-size: 12.8px;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhTLi8LuUYD2XaWy3lhIj-WMwLuHTHPwsjtXrE7ddxUWvlZ8kKZnqGFYAlHHY1aI-lo1tGK0YtWxXJcHqQR5DNcU2oytOd7AYQ3VxPAUj4hn2ioj8ehsbyGHiEN3PsFzupG2jOdQY6B_jI/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="364" data-original-width="814" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhTLi8LuUYD2XaWy3lhIj-WMwLuHTHPwsjtXrE7ddxUWvlZ8kKZnqGFYAlHHY1aI-lo1tGK0YtWxXJcHqQR5DNcU2oytOd7AYQ3VxPAUj4hn2ioj8ehsbyGHiEN3PsFzupG2jOdQY6B_jI/s1600/a.jpg" /></a></div>
<div style="font-size: 12.8px;">
<br /></div>
<div style="font-size: 12.8px;">
<br /></div>
<div style="font-size: 12.8px;">
Cheers!</div>
</div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-31304820145460187812018-01-24T12:04:00.002+10:002021-04-09T05:38:31.217+10:00GridX ClassImagine yourself designing a grid and saying to yourself "<span style="color: #cc0000;"><i>it looks awesome, they will definitely love this!</i></span>", then installing it on your clients' units then instead of admiration receiving complaints from some users such as "<i><span style="color: #cc0000;">my eyes are weak, can't you make the font bigger?</span>"</i> or "<span style="color: #cc0000;"><i>the colors are hurting my eyes</i></span>" or "<span style="color: #cc0000;"><span style="color: red;"><i>can you change the order of the columns please? I want this one to come first, then this one, then...</i></span>.</span>"; and some more airing of dissatisfaction. Well, either you will go back to the drawing board and change the appearances of your grids and recompile to satisfy them or you will argue back saying "<span style="color: #cc0000;"><i>that is the way it is, live with it!</i></span>". And either one of those will dissatisfy either you or your client.<br />
<br />
Well worry no more, here now is my latest class on ssUltimate library that deals with Grid, i.e., <span style="color: blue;">GridX</span>. This combines all the power of all my other classes for grid object (<span style="color: blue;">AnchorSizer, AnchorX, GridSort, GridLock</span>, and <span style="color: blue;">GridSortLock</span>) into this one class, and more.<br />
<br />
With this class now, you are giving your users the power to manipulate further grid on <b><span style="color: #cc0000;">runtime</span> </b>based on their taste. This class retains their last selections that whatever have been set when they exit the form, the grid will be loaded back to the last arrangement and look; just the way they left it. And the good thing is, customization is per workstation. Different users, different tastes.<br />
<br />
So when they started complaining, you can casually tell them "<span style="color: red;"><i><span style="color: #cc0000;">Oh, you can adjust the appearance based on your taste</span><span style="color: red;">"</span></i></span>, with a smile.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<a name='more'></a><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFOrEMG7dRLS9kTWtQD6nIY8uYsZwE9FHi5Q61RuO_vPpndc3DSEme5F3pUiPme9f_RrQQoQ2u4CmI7wZoepLBCjQI2FREJ2xqoZJdgrFjUIDDIh92oIVZLLch6KaQMh0qWmN5B1k9ERwG/s1600/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="492" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFOrEMG7dRLS9kTWtQD6nIY8uYsZwE9FHi5Q61RuO_vPpndc3DSEme5F3pUiPme9f_RrQQoQ2u4CmI7wZoepLBCjQI2FREJ2xqoZJdgrFjUIDDIh92oIVZLLch6KaQMh0qWmN5B1k9ERwG/s1600/a.jpg" /></a></div>
<br />
<br />
<b><span style="color: #cc0000;">Features</span></b><br />
- Retains Column positions, so your users can rearrange columns via drag and drop based on how they like it<br />
- Retains Column Widths. So your users can adjust the widths of individual columns per their satisfaction<br />
- Hide/Unhide Columns<br />
- Retains the last order selection and which column was ordered<br />
- Retains which column is locked or if lock is removed<br />
<span style="color: #cc0000;"><br /></span>
<span style="color: #cc0000;"><b>Grid Appearance</b></span><br />
- Allows your user to toggle RecordMark and retain it<br />
- Allows your user to toggle Theme and retain it<br />
- Allows your user to toggle Grid Lines and retain it<br />
- Allows your user to toggle Scrollbars and retain it<br />
- Allows your user to toggle Highlight and retain it<br />
- Allows your user to change grid's FontName, FontSize, FontBold and FontItalic; and retain those<br />
- Allows your user to change grid's BackColor & ForeColor, and retain those<br />
- Allows your user to change grid's Highlight BackColor & ForeColor, and retain those<br />
- Allows your user to change gridlines' color and retain it<br />
- Allows your user to adjust Header Height, and retain it<br />
- Allows your user to adjust Row Height and retain it<br />
- Allows them to change the font of popup, and retain it<br />
<br />
<b><span style="color: #cc0000;">Miscellaneous</span></b><br />
- Gives user the ability to issue AutoFit (of all columns, if button for that is hidden)on-the-ply<br />
- Allows your user to reset it back the way you originally set it up during design time.<br />
<br />
<b><span style="color: #cc0000;">Anchoring</span></b><br />
Logical <span style="color: blue;">Anchor </span>property was set here. This is to either resize the inside columns of the grid or not. By default I set this as .F.. This one is not available during runtime so is beyond user control.<br />
<br />
Depending on the number of columns used on a grid, you may want to use this or not. For instance, if you have more columns than the grid can display and you plan to use the horizontal scrollbar for user to see those, then you leave this as .F.. If you have only few and you wanted that when the form (<i>and Grid if you set its Anchor property other than zero</i>) gets resized, to resize all columns as well, then set Anchor property of this class to .T..<br />
<b><span style="color: red;"><br /></span></b>
<b><span style="color: #cc0000;">Mouse Clicks</span></b><br />
- Left click on header to sort, click on the same header to toggle order<br />
- Right-click on header for some popup options such as locking and hiding of columns and unlocking and showing those back<br />
- Right-click on grid cells for the popup shown above<br />
<br />
Popups' appearance are controlled by FontName and FontSize of the class. Default is Calibri 10.<br />
<br />
<span style="color: #cc0000;"><b>How to Use it?</b></span><br />
- Drop the class on form<br />
- Double-click on target grid and on its Init event, type this: <span style="color: blue; font-family: "courier new"; font-size: 10pt; line-height: 107%;">thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10pt; line-height: 107%;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10pt; line-height: 107%;">gridx1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10pt; line-height: 107%;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10pt; line-height: 107%;">_bindgrid</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10pt; line-height: 107%;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10pt; line-height: 107%;">this</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10pt; line-height: 107%;">)</span></b><br />
<div class="MsoNormal">
<o:p></o:p></div>
<br />
You can additionally set the popup font via FontName and FontSize and as mentioned, if you want the columns to be resized, change Anchor property value; on the class itself. The rest will be handled by the class itself.<br />
<br />
One grid, one instance of the class. The class will latch onto which grid so it can restore it back to its last appearance.<br />
<br />
<b><span style="color: #cc0000;">User Satisfaction</span></b><br />
The goal of this class is to provide user satisfaction. Some of our users may have poor eyesight so they may want bigger fonts. Some may be color blind and this class will enable them to adjust our grids to something that is comfortable with their eyes. Some simply just have their own taste on fonts and colors. In other cases, they may be running your app on a wide screen that it can be better for them to increase the fonts and adjust the columns themselves so they can see better. There are lots of reason why giving them control over the grid appearance is better, than not.<br />
<br />
<b><span style="color: #cc0000;">Future Enhancements</span></b><br />
I may add some more features in the future. Since this has everything the aforementioned classes have, then all my future works for grids will now only be done on this one. So if you are a new subscriber and hasn't used yet any of those now legacy classes, then just use this and forget about the others mentioned above.<br />
<br /><br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com3tag:blogger.com,1999:blog-5802699848164820481.post-57206537662109732112018-01-03T09:30:00.000+10:002018-01-03T09:35:55.980+10:00Google Calendar on VFP FormWell, this comes from a request inside Foxite on how we can embed <span style="color: blue;">Google Calendar</span> on form. Being foxy, I originally pointed to the late <b><span style="color: #990000;">Guillermo Carrero</span></b>'s <b>FoxScheduler</b> instead:<span style="font-family: "arial"; font-size: 12px;"> </span><br />
<a href="https://sites.google.com/site/foxscheduler/" rel="nofollow" style="color: purple; font-family: Tahoma, Arial, sans-serif; font-size: 11px; font-weight: bold; margin: 0px; padding: 0px;" target="_blank">https://sites.google.com/site/foxscheduler/</a><br />
<br style="font-family: Arial; font-size: 12px; margin: 0px; padding: 0px;" />
<div>
However, while it looks okay, there is an exchange of thoughts about the advantage of using <span style="color: blue;">Google Calendar</span> instead of that which is the ability to share data not only within our app but also to our personal computers and mobile devices. That is a valid point but the thing I dislike is in order to do that, is to rely on Google's own APIs as they may change those now and then; for the betterment of google products.</div>
<div>
<br /></div>
<div>
And so with that in mind, and taking into consideration the argument about that sharing capability, here instead is my preferred way. Not using google API but to embed Google Calendar via Internet Explorer automation within our form:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoREgYeSErsIhmaqGvnLk7v3pDtHC6P_DuRoA2S951DYDzGLLS-lF4_4Y5cvU3J2AhwgszLC-L7Va0R3jKMxqhmjuPaOoTJtEdJTlT4Hxl4bHPBQupVaS7Zvz8WtYiDQvyDva6iwca4Hgx/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="683" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoREgYeSErsIhmaqGvnLk7v3pDtHC6P_DuRoA2S951DYDzGLLS-lF4_4Y5cvU3J2AhwgszLC-L7Va0R3jKMxqhmjuPaOoTJtEdJTlT4Hxl4bHPBQupVaS7Zvz8WtYiDQvyDva6iwca4Hgx/s640/a.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">GetWindowLong </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">User32 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nIndex</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowLong </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">user32 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer HWnd</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nIndex</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Integer </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">dwNewLong</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowPos </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">user32</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER HWnd</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hWndInsertAfter</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">x</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Y</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cx</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">cy</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">uFlags<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Declare Integer </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetParent </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">user32</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hWndChild</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">INTEGER </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">hWndNewParent<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loTest </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"Form1"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loTest</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Show</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Read Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Define Class Form1 As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Caption
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Google Calendar
on Form'</span></b><span style="font-family: "courier new"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">AutoCenter </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">700</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">900</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ShowWindow </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oIE </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Procedure Init<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Local
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcURL</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnStyle</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loIE </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">internetexplorer</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Application</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcURL </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'</span></b><u><span style="font-family: "courier new"; font-size: 10pt;">https://calendar.google.com/calendar/r'</span></u><span style="font-family: "courier new"; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loIE </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">"InternetExplorer.Application"</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oIE </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loIE</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">With </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loIE<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Visible </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.F.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Silent </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">FullScreen</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">=</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Navigate2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcURL</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> <b>.</b></span><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">ClientToWindow</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Do While </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">ReadyState </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><> </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Enddo<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loHWnd </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">HWnd</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnStyle </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">GetWindowLong</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">6</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowLong</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, -</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Bitxor</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lnStyle</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0x00400000</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetParent</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">loHWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_Resize</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> <b>.</b></span><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Visible </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">.T.</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Bindevent</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'_Resize'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="font-family: "courier new"; font-size: 10pt;">'Resize'</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Procedure
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">_Resize<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">With Thisform<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">SetWindowPos</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oIE</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">HWnd</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, .</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0x0001</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Procedure
Destroy<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Clear
Events<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oIE</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Quit</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">oIE </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Null</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Procedure
KeyPress<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Lparameters
</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nShiftAltCtrl</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">nKeyCode </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">27</span></b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Release</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If you haven't logged in at your google account yet when you first run this, it will require you to. After that, IE will remember it and the next runs will go straight to Google Calendar.</div>
<div class="MsoNormal">
<br /></div>
</div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-81696227046021614422018-01-02T10:25:00.000+10:002018-01-05T08:03:06.267+10:00Alter Table TrickOkay so it is now 2018 and I want to greet every one a more prosperous new year than before. I am now back at work and immediately I got a request from a Colleague to create a small app that can import data from an excel generated by another app, and later use my <a href="http://sandstorm36.blogspot.com/2015/07/excelpivot-ssultimate.html" target="_blank"><span style="color: blue;">ExcelPivot</span> </a>class to provide the needed reports. Instead of them doing those manually. So the raw data from excel looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF6i_Qq4pzTI55d6s2opv76or1VkCOanLV8pqupHN9SaV2u1dAJTr6Vtd-eKAvGvW8nSUb8Ku1HzxlDpOA1WwndPFl7mbiKrGLWZ6QIknx9jIrly4GB6NNKTkcFMdiUORcqEzHKZUmtg6_/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="675" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF6i_Qq4pzTI55d6s2opv76or1VkCOanLV8pqupHN9SaV2u1dAJTr6Vtd-eKAvGvW8nSUb8Ku1HzxlDpOA1WwndPFl7mbiKrGLWZ6QIknx9jIrly4GB6NNKTkcFMdiUORcqEzHKZUmtg6_/s1600/a.jpg" /></a></div>
<br />
Then of course the easiest way for me to do that is to import the file and then later adjust fields:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Import From </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcFile</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Type Xl5</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><br /></span></b></div>
That resulted to 8 columns bearing the field names a,b,c,d,e,f,g and h. So after that, we need to change the field names and types to proper ones like this:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">a c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">8</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">a </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">po</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">b </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">supplier</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">c D</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">c </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Date</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">d </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Status</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">e </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">workorder</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">F </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">location</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">g N</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">g </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">amount</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alter Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">h N</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<span style="color: blue; font-family: "courier new"; font-size: 10pt; line-height: 107%;">Alter Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">)
</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">Rename Column </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">h </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To
</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">UpdAmt</span></b><br />
<div class="MsoNormal">
<o:p></o:p></div>
<br />
As you can see above, some involves <span style="color: blue;">ALTER COLUMN</span> which changes the type of that column to a target one and all involves <span style="color: blue;">RENAME COLUMN</span> to give those fields proper names.<br />
<br />
<a name='more'></a>And that is how it is done. Correcting fields to proper names and types. <br />
<br />
However, there is a simpler way to do that which I remembered to share here just now as I know this can come handy to you guys plus VFP help itself is not clear about this usage too. Here is a counterpart of that, a single <span style="color: blue;">ALTER TABLE</span> command that will perform all of those changes in one go. Here goes:<br />
<br />
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ALTER Table </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">.</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">lcDBF</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">) </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">a c</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">8</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">) </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">a </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">po </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">b </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">supplier </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">c </span><span style="font-family: "courier new"; font-size: 10pt; line-height: 107%;"><span style="color: blue;">D</span></span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">c </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To Date RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">d </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To Status</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">e </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">workorder</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">F </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">location </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">g N</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">12</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">,</span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">2</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">) </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">g </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">amount </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">h N</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">12</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">,</span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">2</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">) </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">h </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">UpdAmt<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"><br /></span></b></div>
And as you can see, all you need to do is put a space inbetween each alteration syntax until you applied all. But that is a bit confusing to read so better break those up to several lines like this <i>(also adding extra space on ALTER so those will align better</i>):<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ALTER Table </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">lcDBF</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) ;</span></b><br />
<span style="color: blue; font-family: "courier new"; font-size: 10pt;"><b> </b>ALTER Column </span><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">a c</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">8</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) ;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">a </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">po </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">b </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">supplier</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">c </span><span style="color: #1f4e79; font-family: "courier new"; font-size: 10.0pt;">D</span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">c </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Date </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">d </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To Status</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">e </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">workorder</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">F </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">location</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">g N</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">);</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">g </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">amount</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">;</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ALTER Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">h N</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">);</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<span style="color: red; font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10pt;">RENAME Column </span><span style="color: maroon; font-family: "courier new"; font-size: 10pt;">h </span><span style="color: blue; font-family: "courier new"; font-size: 10pt;">To UpdAmt</span><br />
<br />
And there you go! I hope this comes useful to you when the time comes! Happy New Year!!!<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-40969749039199316852017-12-11T13:48:00.002+10:002017-12-11T13:53:54.533+10:00dtPickerX - December 2017 versionOkay, so I changed some things (again) inside, for the better. And aside from listing what those are here, I decided to make this post as the official guide post for dtPickerX class too. So what are these enhancements and what are the previous features which I may have not highlighted before?<br />
<br />
<br />
<b><span style="color: #cc0000;">Enhancements:</span></b><br />
<br />
1. <span style="color: #cc0000;">Better Year Spinner</span>. I have improved<span style="color: blue;"> SpinnerX</span> class so I can use it here and this, IMHO, gives a better look and faster reaction than the native Spinner object I have used on the earlier versions of this class.<br />
<br />
2.<span style="color: #cc0000;"> Better Time Picker.</span> I modified <span style="color: blue;">ScrollTime</span> class too to give it a better look and new attitude too, then used that for the time picking section here instead of the previous DropTime class.<br />
<br />
3. <span style="color: #cc0000;">Dates Color Explosion</span>. I added back the capability to put notes and holidays found in one older version, but this time in a much easier fashion plus with more color markings to choose from (<i>7 colors, the 8th box is for HotKey Tooltip</i>). Also now, the initial set of<span style="color: blue;"> holidays are all set to blue color </span>(first color). Nevertheless, users can choose to use any of the colors later for that but it would be better to leave the blue for holidays.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvbowuTkRTMzJYvR-c8NV7PbHkTNLCCp3lYZu4bLq0yw-xJGlrERXWXwib_fAVTl1umtfuKj4vBKDqvID_Chul40vbj7PycYZJ6OQsfuAIGkWsLC1Q_dkIn4qjptRbdEKxfug0MuSeDDW6/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="343" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvbowuTkRTMzJYvR-c8NV7PbHkTNLCCp3lYZu4bLq0yw-xJGlrERXWXwib_fAVTl1umtfuKj4vBKDqvID_Chul40vbj7PycYZJ6OQsfuAIGkWsLC1Q_dkIn4qjptRbdEKxfug0MuSeDDW6/s320/a.jpg" width="320" /></a></div>
<br />
<b>Why different colors?</b> Well, you may wish to use the colors to indicate the urgency of a note. Say for those you need to remember such as birthdays of your loved ones, then you can set those to a strong color like pink. So immediately when you see a date that is encased in a pink box, you know that that is a birthday occassion. Or for your wedding anniversary, you may want to set that to red as when you forgot such occassion, you are definitely in trouble.<br />
<br />
<a name='more'></a><br />
To mark dates, all you need to do is click on a target date then click on any of the color boxes. That will in turn open the notes section where you can enter the notes. To remove a marking, just do the same but this time make sure the notes is empty, as in addition to the dates it also detects whether the note is empty or not.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhewe0Kn9OA-ERpbysOPdyGIIZdvnq2LUwA2wXZOd_JXrhc10ciEv5oBRDZ1bFKga92qqfhOfRIBxeGSEHlxut12je-C8jWgwZqPKZRwTtHHjxbz3l1Wx-_N9yMeBMEIAeS8tGp3kG31Pv9/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="274" data-original-width="348" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhewe0Kn9OA-ERpbysOPdyGIIZdvnq2LUwA2wXZOd_JXrhc10ciEv5oBRDZ1bFKga92qqfhOfRIBxeGSEHlxut12je-C8jWgwZqPKZRwTtHHjxbz3l1Wx-_N9yMeBMEIAeS8tGp3kG31Pv9/s320/b.jpg" width="320" /></a></div>
<br />
<br />
Please be aware that the class ignores the year so all of those holidays and notes will be repeated each year. Deleting old notes anyway is very easy, just empty the previous note.<br />
<br />
4. <span style="color: #cc0000;">Notes Privacy</span>. Unlike with all previous versions of this class, this one no longer shares the holiday.dbf across the app. Each user/machine now gets its own holiday.dbf to ensure that user's personal notes won't be shared across to others using the app. <br />
<br />
5. <span style="color: #cc0000;">Developer Color Preference</span><br />
<br />
I got tired of the plain white look of the class so I decided to give subscribers the capability to now change several color of the class. But for backward compatibility reasons, I kept the old colors as the default. These new look is made possible by these new properties:<br />
<br />
<span style="color: blue;">MoYrBackColor</span> = as the name implies, it changes the backcolor of the months and year section<br />
<br />
<span style="color: blue;">MoYrForeColor</span> = changes the forecolor of months and year section<br />
<br />
<span style="color: blue;">MoYrHighlight</span> = controls the backcolor of the highlight for months. Pardon the Yr there if that confuses you since it won't affect the spinner year. But MoYr means the section for the months and year.<br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">nCalShade</span> = this is for the calendar face to give it a shade a bit different than the backcolor of the months and year (MoYrBackColor). Default is -.8. If you want it to be the same as the background color of months and year section, change this into 1.<br />
<br />
Here is how it looks with my test color schemes on my end:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">MoYrBackColor </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RGB</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">96</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">124</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">159</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">MoYrForeColor </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RGB</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">255</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">255</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">255</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">MoYrHighlight </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RGB</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">0</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">45</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">89</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10pt; line-height: 107%;">nCalShade </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">= -</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">0.8</span></b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeGFL9jBNvam0rf1RBtHop3A8VKCH1eaFAM2IzJqVOlWp_YEFgS4ISIDhdKjbfd3_Hl-o9BhcSvAhoqs8SLhUAX6MWW-0F_9TA0lbCmz5cdiJYWjMs-hcnDOO8hjiO3qN9dI2rVE-iXCn8/s1600/d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="353" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeGFL9jBNvam0rf1RBtHop3A8VKCH1eaFAM2IzJqVOlWp_YEFgS4ISIDhdKjbfd3_Hl-o9BhcSvAhoqs8SLhUAX6MWW-0F_9TA0lbCmz5cdiJYWjMs-hcnDOO8hjiO3qN9dI2rVE-iXCn8/s320/d.jpg" width="320" /></a></div>
<br />
<br />
<b><span style="color: #cc0000;">Other Features:</span></b><br />
<br />
For those who are not yet a subscriber of ssUltimate Library, be aware that this class has three (3) levels as follows:<br />
<br />
<ul>
<li>nLevel = 1 (Month Picker)</li>
<li>nLevel = 2 (Date Picker)</li>
<li>nLevel = 3 (DateTime Picker)</li>
</ul>
<br />
<br />
Shown above is nLevel 2 and 3. And here is how it is when set as plain Month Picker (nLevel = 1). Notice the class only shows the month and year both on the class and the dropdown section.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzWhKsjsK9I637g0lhs4rwq56_NWnc4o7l0WfpJ7-HVtX2eJxYZeNLAuDqq8kHGnWvUsHb7R-JxaMzOV7Ni3iJ64xLQgUOoGs7puwrpUYqj6BDcKe2sI6SvrpQGVIwrOiCvYhG9r-Q9IAa/s1600/e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="119" data-original-width="353" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzWhKsjsK9I637g0lhs4rwq56_NWnc4o7l0WfpJ7-HVtX2eJxYZeNLAuDqq8kHGnWvUsHb7R-JxaMzOV7Ni3iJ64xLQgUOoGs7puwrpUYqj6BDcKe2sI6SvrpQGVIwrOiCvYhG9r-Q9IAa/s320/e.jpg" width="320" /></a></div>
<br />
<span style="color: #cc0000;"><br /></span>
<b><span style="color: #cc0000;">Return Values</span></b><br />
<br />
Okay, maybe even some subscribers are not aware that the class can return a lot of values aside from <span style="color: blue;">.Value</span> property, so here are those:<br />
<br />
<span style="color: blue;">Value</span> = the date or datetime (depending on nLevel value)<br />
<br />
<span style="color: blue;">SQLDate</span> = is the date value fixed on YYYY/MM/DD format. So if you are after using this class to perform an SPT for other backends such as SQLServer, MySQL, MariaDB or others that rely on the aforementioned format, use .SQLDate instead of .Value property; so you do not need to convert anymore into that format.<br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">_BOM</span> = Always gives the beginning of the selected month, e.g., 1/12/2017<br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">_EOM</span> = Always gives the end of the selected month, e.g., 31/12/2017<br />
<br />
<i><span style="color: #38761d;">*Note: all return values follow your SET DATE settings, except that .SQLDate</span></i><br />
<br />
<span style="color: blue;">_DateTime</span> = always returns the datetime() value no matter what level it is in. For nLevel 1 or 2, it will pick up the OS clock value for the time portion. For nLevel = 3, just the same as .Value<br />
<br />
<span style="color: blue;">_cTime</span> = always return the time section of the class. This is useful too if you are on nLevel = 3 and you want to dictate the class' initial time value.<br />
<br />
<span style="color: blue;">nDay</span> = will always return the numeric day portion of the class<br />
<br />
<span style="color: blue;">nMonth</span> = will always return the numeric month portion of the class<br />
<br />
<span style="color: blue;">nYear</span> = will always return the numeric year of the class<br />
<br />
<span style="color: #cc0000;"><b>Limiting of the date scopes</b></span><br />
<br />
There are two (2) properties built for that as follows:<br />
<br />
<span style="color: blue;">ValueMax</span> = here is where you can set the maximum date a user can choose or enter, either by manually encoding the date or by choosing the picker. Leave this as .F. if you do not want to limit your user's picking option. Using this is something like this:<br />
<br />
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">this</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">.</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">ValueMax
</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">date</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">(</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">2017</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">12</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">,</span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">25</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">)<o:p></o:p></span></b></div>
<br />
And while the users can click on the dropdown section dates beyond 25, the returned value of those will only be still up to the ValueMax set.<br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">ValueMin</span> = well the opposite of the ValueMax. This is the minimum date a user can pick, again for limiting date scopes.<br />
<br />
<b><span style="color: #cc0000;">Miscellaneous:</span></b><br />
<br />
<span style="color: blue;">IdleTime</span> = is the number of seconds the popup section will remain open until it detects the number of seconds the class remains idle for any keyboard or mouse movements. By default it is 50 seconds, adjust it if you want.<br />
<br />
<span style="color: blue;">Language</span> = Currently the class supports 8 Languages as follows:<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10.0pt;"> <span style="color: magenta;">0 </span><b><span style="color: red;">= </span><span style="color: maroon;">Indonesian</span></b><span style="color: maroon;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">English</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">2 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Italian</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">3 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Spanish</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">4 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Turkish</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">5 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Romanian</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">6 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">German</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">7 </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Czech</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"> </span><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">8
</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">Slovak</span></b><o:p></o:p></div>
<br />
<span style="color: blue;">HotKeys</span> = This is to easily navigate within the class by means of keyboard. Here are the navigation keys:<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10.0pt;"> <b><span style="color: red;">+,=,</span><span style="color: blue;">Up </span><span style="color: maroon;">Arrow </span><span style="color: red;">= </span><span style="color: blue;">Next day</span></b><span style="color: blue;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">-,</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Down </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Arrow </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Previous </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">day</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">T</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">t </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Today</span></b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;"> M</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">m </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">First </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">day of month</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">then </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">back </span></b><b><span style="color: magenta; font-family: "courier new"; font-size: 10.0pt;">1 </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">month</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">H</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">h </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Last day of month</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">then to </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">end </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">of next month</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">Y</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">y </span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">First </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">day of year</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">then </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt;">back one </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">year</span></b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"> </span><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">R</span><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">/</span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">r
</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">= </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">Last day of year</span></b><b><span style="color: red; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">,
</span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">then to </span></b><b><span style="color: maroon; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">end </span></b><b><span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">of
next year</span></b><o:p></o:p></div>
<br />
There you go! I may have forgotten some more but as you can see, this class is full-packed with features which some subscribers may have not been even aware. So I hope this post will make them aware of all those features. Oh and yes, all of those features are also forwarded onto <span style="color: blue;">dtPeriod</span> and <span style="color: blue;">CalendarX </span>classes. Cheers!<br />
<br />
<br />
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com4tag:blogger.com,1999:blog-5802699848164820481.post-67184468863487766772017-11-08T15:37:00.000+10:002017-11-08T15:37:30.613+10:00SwitchX/OptionSwitchX Bold New ThemesSince I adjusted the library to make it more flexible, I decided to replace some themes with bolder new look to spice up further our app. And here are the latest themes for both classes<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy_lUqlSkz3-JzKEiJkEma1vEozeswd6S9RLhalKDHJz_DrAARQxzjRir49Jo94e1B6l9m8pQVOiacBHPgw4vq-3x874YeWD1aQPCGwR8banwJLQxdsIHubcF_35iDRturluzRNRqeSmQ0/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="271" data-original-width="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy_lUqlSkz3-JzKEiJkEma1vEozeswd6S9RLhalKDHJz_DrAARQxzjRir49Jo94e1B6l9m8pQVOiacBHPgw4vq-3x874YeWD1aQPCGwR8banwJLQxdsIHubcF_35iDRturluzRNRqeSmQ0/s1600/a.jpg" /></a></div>
<br />
This and other more classes are part of ssUltimate Library. Cheers!<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-24121874566201427612017-09-14T14:58:00.000+10:002017-09-14T15:46:22.566+10:00xBox via SQL Pass-Through and Stored ProceduresSince xBox was created while I am still working with pure VFP, the approach I did was designed to work only on VFP's native backend. So to have something like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbaqLLF-lxgfqjKWj_XomcmRzeaU7j0Qor9_tH-NLwriuw4k2FSNDv8RwV6zfoKbsargNuR9mxkLouQTqVQgFeGhZntJFcifPbTp6TpV51trrzZEhuflSAw5l0YhlBatwk476lESOA9O_y/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="273" data-original-width="404" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbaqLLF-lxgfqjKWj_XomcmRzeaU7j0Qor9_tH-NLwriuw4k2FSNDv8RwV6zfoKbsargNuR9mxkLouQTqVQgFeGhZntJFcifPbTp6TpV51trrzZEhuflSAw5l0YhlBatwk476lESOA9O_y/s1600/a.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
You have to put in its InteractiveChange Event codes like this:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TEXT TO </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOSHOW </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Select </span><span style="font-family: "courier new"; font-size: 10pt;">vesselname,vesselid
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">from
</span><span style="font-family: "courier new"; font-size: 10pt;">Vessels
<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">where </span><span style="font-family: "courier new"; font-size: 10pt;">[MySearch] $
vesselname <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">order By </span><span style="font-family: "courier new"; font-size: 10pt;">1 <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">into Cursor </span><span style="font-family: "courier new"; font-size: 10pt;">curVessel </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOFILTER <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ENDTEXT<o:p></o:p></span></div>
<span style="color: blue; font-family: "courier new"; font-size: 10pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">._searchgrid(m.lcSQL,<span style="background: yellow; mso-highlight: yellow;">'curVessel.VesselName</span>')</span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
Where <span style="color: #cc0000;">[MySearch]</span> will be automatically replaced by xBox class with whatever you have already typed. And <span style="background-color: yellow;">curvessel.VesselName</span> is the value it will return, the one that will be held by its .<span style="color: blue;">Value </span>property. There is secondary value it can return after that via .<span style="color: blue;">ExtraValue</span> property but that is another topic. If you are already a subscriber or user of <b>ssUltimate's </b>xBox, then you already know about this.</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
Lately, I decided to use <span style="color: blue;">MariaDB </span>and so to make xBox working there, I showed the way here: <a href="http://sandstorm36.blogspot.com/2017/04/xbox-on-mysql-backend.html" target="_blank">http://sandstorm36.blogspot.com/2017/04/xbox-on-mysql-backend.html</a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
But that requires two jumps as follows:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Get data from MariaDB/MySQL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQLExec</span><span style="font-family: "courier new"; font-size: 10pt;">(gomyapp.dbHandle,<span style="background: yellow; mso-highlight: yellow;">'Select vesselname,vesselid from
Vessels order by vesselname</span>','<span style="background: yellow; mso-highlight: yellow;">vessels</span>')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Use generated cursor on the
class<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TEXT TO </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOSHOW </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Select </span><span style="font-family: "courier new"; font-size: 10pt;">vesselname,vesselid
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">from
</span><span style="font-family: "courier new"; font-size: 10pt;">Vessels
<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">where </span><span style="font-family: "courier new"; font-size: 10pt;">[MySearch] $
vesselname <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">order By </span><span style="font-family: "courier new"; font-size: 10pt;">1 <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">into Cursor </span><span style="font-family: "courier new"; font-size: 10pt;">curVessel </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOFILTER <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ENDTEXT<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">._searchgrid(m.lcSQL,<span style="background: yellow; mso-highlight: yellow;">'curVessel.VesselName</span>')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
Or you can reverse the process limiting the number of records of the cursor generated from the other backend using WHERE clause on the SPT query instead of the one needed by xBox class. </div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
Today, I added two new <b><span style="color: red;">direct calls</span></b> to the other backend which will not require a 2nd jump anymore. Two new class methods, 1st is for<span style="color: blue;"> SQL Pass-Through</span> query approach and another for <span style="color: blue;">Stored Procedure</span> approach. Let us see how the call is made on those two:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b><br /></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #cc0000; font-weight: bold;">via _SPT() Method. </span>This expects parameters as follows:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Lparameters </span><span style="font-family: "courier new"; font-size: 10pt;">ndbHandle, cSQL,
cCursor, vValue, vExtraValue<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
</div>
<a name='more'></a><br />
<br />
<div>
<b>Where:</b></div>
<div>
<span style="color: #cc0000;">ndbHandle </span>- is the numeric handle for the database connection</div>
<div>
<span style="color: #cc0000;">cSQL </span>- is your SQL SELECT statement for the SPT</div>
<div>
<span style="color: #cc0000;">cCursor </span>- is the cursor that will be generated on VFP</div>
<div>
<span style="color: #cc0000;">vValue </span>= is the primary value you can get from the class</div>
<div>
<span style="color: #cc0000;">vExtraValue </span>- is the secondary value of the class</div>
<div>
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b>The standard way:</b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">PRIVATE </span><span style="font-family: "courier new"; font-size: 10pt;">lcSearch<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcSearch = '<span style="background: yellow; mso-highlight: yellow;">%</span>'+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">this</span><span style="font-family: "courier new"; font-size: 10pt;">._searchkeys+'<span style="background: yellow; mso-highlight: yellow;">%</span>'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">._SPT(gomyapp.dbHandle,;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> <span style="background: yellow; mso-highlight: yellow;">'Select vesselname, vesselid
from vessels WHERE inactive = 0 AND vesselname LIKE ?m.lcSearch</span>',;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> '<span style="background: yellow; mso-highlight: yellow;">curVessel</span>',<span style="background: yellow; mso-highlight: yellow;">'curVessel.vesselname</span>')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<b>Alternative way (which I prefer):</b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">._SPT(gomyapp.dbHandle,;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TEXTMERGE</span><span style="font-family: "courier new"; font-size: 10pt;">(<span style="background: yellow; mso-highlight: yellow;">'Select vesselname, vesselid
from vessels WHERE inactive = 0 AND vesselname LIKE
"%<<ALLTRIM(This._SearchKeys)>>%"'</span>),;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
</div>
<div class="MsoNormal">
<span style="font-family: "courier new"; font-size: 10pt; line-height: 107%;"> '<span style="background: yellow; mso-highlight: yellow;">curVessel</span>',<span style="background: yellow; mso-highlight: yellow;">'curVessel.vesselname</span>')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
And that is how xBox can directly interact with your other backend via SPT. Now, if you have a <span style="color: blue;">stored procedure</span>, then the call is more simple. </div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: #cc0000; font-weight: bold;">via _SPCALL() Method. </span>This expects parameters as follows:</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Lparameters </span><span style="font-family: "courier new"; font-size: 10pt;">ndbHandle,
cStoredProc, cCursor, vValue, vExtraValue<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div>
<b>Where:</b></div>
<div>
<span style="color: #cc0000;">ndbHandle </span>- is the numeric handle for the database connection</div>
<div>
<span style="color: #cc0000;">cStoredProc </span>- is the name of your stored procedure</div>
<div>
<span style="color: #cc0000;">cCursor </span>- is the cursor that will be generated on VFP</div>
<div>
<span style="color: #cc0000;">vValue </span>= is the primary value you can get from the class</div>
<div>
<span style="color: #cc0000;">vExtraValue </span>- is the secondary value of the class</div>
<div>
<br /></div>
<div>
Let us say you have a Stored Procedure named <span style="color: blue;"><b>GetVessel </b></span>with a parameter named <span style="color: blue;">SearchKeys</span> like this:</div>
<div>
<br /></div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">CREATE PROCEDURE </span><span style="font-family: "courier new"; font-size: 10pt;">`getvessel`(<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">IN </span><span style="font-family: "courier new"; font-size: 10pt;">`SearchKeys` </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">VARCHAR</span><span style="font-family: "courier new"; font-size: 10pt;">(50)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">LANGUAGE </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">NOT DETERMINISTIC<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">CONTAINS </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQL<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQL </span><span style="font-family: "courier new"; font-size: 10pt;">SECURITY DEFINER<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">COMMENT </span><span style="font-family: "courier new"; font-size: 10pt;">''<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BEGIN<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Select </span><span style="font-family: "courier new"; font-size: 10pt;">vesselname,
vesselid </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">from </span><span style="font-family: "courier new"; font-size: 10pt;">vessels </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">WHERE </span><span style="font-family: "courier new"; font-size: 10pt;">inactive = 0 AND vesselname </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">LIKE </span><span style="font-family: "courier new"; font-size: 10pt;">SearchKeys;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">END<o:p></o:p></span></div>
</div>
<div>
<br /></div>
<div>
Then you can take advantage of xBox' new _SPCALL() method instead of its _SPT() method. The call is much simpler like this:</div>
<div>
<br /></div>
<div>
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">this</span><span style="font-family: "courier new"; font-size: 10pt; line-height: 107%;">._SPCALL(gomyapp.dbHandle,'<span style="background: yellow; mso-highlight: yellow;">getvessel</span>','<span style="background: yellow; mso-highlight: yellow;">curvessel</span>',<span style="background: yellow; mso-highlight: yellow;">'curvessel.Vesselname'</span>)<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new"; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Have you noticed? There is no mention of the value of the class or what has been typed so far? Well, the class takes care already of that. All you need to do is pass the name of the handle, the stored procedure name, the resultant cursor, and its return value (plus secondary value if you want to use that too).<br />
<br />
And there you have it. <b><span style="color: blue;">Working with other backend with xBox is now faster and simpler than ever.!!!</span></b> Cheers!</div>
</div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com2tag:blogger.com,1999:blog-5802699848164820481.post-81864294488652883502017-09-12T10:38:00.000+10:002017-09-12T10:38:02.947+10:00CtrlBox New Features<b><span style="color: #cc0000;">Brief History</span></b><br />
<br />
Originally <span style="color: blue;">CtrlBox </span>is intended solely as a slave of my <span style="color: blue;">TitleBarX </span>class when I decided to experiment with shapes for the controls there (minimize, maximize/restore, and close). Later I decided to create it as a master of its own (while still being used by TitleBarX). So now, it can be dragged and dropped onto a form and that will replace your form's native titlebar.<br />
<b><span style="color: #cc0000;"><br /></span></b>
<span style="color: #cc0000;"><b>New Features</b></span><br />
<br />
<ol>
<li>Now it auto hides the form's native titlebar</li>
<li>Now it auto repositions itself onto top-right corner</li>
<li>New built-in titlebar of its own. I added this today as sometimes I wanted to make the form movable but still using this class. For this new titlebar to appear, you have to set <span style="color: blue;">_WithBar</span> = .T. (default is .F. or no titlebar). This is affected further by the following:</li>
<ul>
<li><span style="color: blue;">Caption </span>- the caption to be shown on the titlebar</li>
</ul>
</ol>
<br />
<br />
<b>Properties affecting Caption follow:</b><br />
<br />
<ul>
<li><span style="color: blue;">FontName </span>= default is Calibri</li>
<li><span style="color: blue;">FontSize </span>= default is 12</li>
<li><span style="color: blue;">FontBold </span>= default is .T.</li>
<li><span style="color: blue;">ForeColor </span>= default is RGB(255,255,255)</li>
<li><span style="color: blue;">Alignment </span>= default is 2 (center). <span style="color: red;">I know some of you will love to have a caption in the middle</span></li>
<li><span style="color: blue;">BarHeight </span>= Default is 20. The height of the titlebar. This also affects the caption height </li>
</ul>
<br />
<br />
<a name='more'></a><b>Properties affecting Titlebar</b><br />
<br />
<ul>
<li><span style="color: blue;">BackColor </span>= default is RGB(0,0,0)</li>
<li><span style="color: blue;">BarHeight </span>= Default is 20. </li>
</ul>
<br />
<br />
<b style="color: #cc0000;">Old Features</b><br />
<br />
<ul>
<li><span style="color: blue;">_NoMax</span> = default is .F., set to .T. to hide maximize/restore control</li>
<li><span style="color: blue;">_NoMin</span> = default is .F., set to .T. to hide minimize control</li>
</ul>
<div>
Here is the class showing its own titlebar (_WithBar = .T.):</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicu0gO1BlQw5GEIr7cRKiOhymuBOhiUYZ8IJ5f0PxJH7X6KMVq5TKeQlmSXVfa-GL0V7r6OoboYA190aVzEO2V54yPnPMryBk2P5gRp88fxiKsXd1YBxpQXJEwnJgLAUo7r51MFFvifa4p/s1600/ctrl.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="442" data-original-width="772" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicu0gO1BlQw5GEIr7cRKiOhymuBOhiUYZ8IJ5f0PxJH7X6KMVq5TKeQlmSXVfa-GL0V7r6OoboYA190aVzEO2V54yPnPMryBk2P5gRp88fxiKsXd1YBxpQXJEwnJgLAUo7r51MFFvifa4p/s640/ctrl.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
Cheers!</div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-56597600988454994542017-09-08T09:41:00.000+10:002017-09-12T10:39:02.276+10:00SpinnerX (New), FaderX (Enhancement) & OthersI was creating this before but got busy with simultaneous projects. But since I wanted to give some more feature for <span style="color: blue;">FaderX</span> as I need it, then I decided to utilize this now instead of VFP's Native Spinner object. Right now this <span style="color: blue;">SpinnerX</span> is very young that it has not much features yet but enough to be used as replacement for VFP Native Spinner class if you want something unique. Its current properties follow:<br />
<br />
- <b>Appearance </b>- Right now it has 3 different look as shown below:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglIIpcF8eJcIxmKjDRbWbzBYz0N814sfjFirjoXCCWUC-7Jeya_mg83Sn1DXYq1I74xhuf8K8VAEiNUp01fvY16lU0IezdSqSr-UUkvx05cMfmVG1bhz24EJM3cpjCz4vuugd42MnYtQjn/s1600/d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="320" data-original-width="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglIIpcF8eJcIxmKjDRbWbzBYz0N814sfjFirjoXCCWUC-7Jeya_mg83Sn1DXYq1I74xhuf8K8VAEiNUp01fvY16lU0IezdSqSr-UUkvx05cMfmVG1bhz24EJM3cpjCz4vuugd42MnYtQjn/s1600/d.jpg" /></a></div>
<br />
<br />
- <b>Value </b>= Is the initial value fo the spinner<br />
- <b>ValueLow </b>= Is the lowest value it can accept<br />
- <b>ValueHigh </b>= Is the highest value it can accept<br />
- <b>Interval </b>= Is the value to increase up or down<br />
<br />
As with the native spinners, you can hover your mouse on it and use the mouse scroll to scroll up or down, or click on the buttons, or enter on the textbox.<br />
<br />
<a name='more'></a><br /><br />
<br />
<b><span style="color: #cc0000;">FaderX Enhancements</span></b><br />
<b><span style="color: #cc0000;"><br /></span></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiis7i-7XznUJwrSKWpUYjw_Ci0fBbPWFRHM8OiNykuAWVV0dBD-rS7PeNJh7KjvdqpkqAW1by22nGfzwaTBCWZBdvZxPpVsZgAaY9AXJhHWwRZqdIemja9OM_z5Y6Rbf-nQlrpQIEtn1V0/s1600/e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="357" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiis7i-7XznUJwrSKWpUYjw_Ci0fBbPWFRHM8OiNykuAWVV0dBD-rS7PeNJh7KjvdqpkqAW1by22nGfzwaTBCWZBdvZxPpVsZgAaY9AXJhHWwRZqdIemja9OM_z5Y6Rbf-nQlrpQIEtn1V0/s320/e.jpg" width="320" /></a></div>
<b><span style="color: #cc0000;"><br /></span></b>
<br />
- <b>SpinnerX </b>instead of Native Spinner object for better look and feel (uniqueness)<br />
<br />
- Added <b>_isHollow </b>and <b>_RGBHollow </b>properties. <b>_isHollow </b>requires a logical value of either .T. or .F. (default) meaning if you set this property to .T. and you put an RGB color on the <b>_RGBHollow </b>property, then objects on form that are colored like that will be totally transparent (see-through). This actually can work better than <span style="color: blue;">TransparentX </span>as you can control now the color that will be made transparent here.<br />
<br />
- <span style="color: blue;">Hey, did you noticed the ControlBox is on the left and the Caption and Icon is on the right?</span> Well I added <b>_CtrlBoxLeft </b>property here so you guys can make your forms look like Mac or Linux where those are on the left. Changing its value to .T. will make the form's controlboxes on the left instead of the right. Be informed though that this works only on top-level forms or those with Desktop = .T.<br />
<br />
<b><span style="color: #cc0000;">Other Enhancements in ssUltimate Libarary</span></b><br />
<br />
I did made some more enhancements inside, plus minor bug fixes. For instance, <span style="color: blue;">ExcelPivot </span>I noticed sometimes do not follow the gap of 2 rows between the title and the column headers. Fixed that. I also had to change some themes and skins used by <span style="color: blue;">ButtonX</span>, <span style="color: blue;">ContainerX </span>and <span style="color: blue;">StickyX </span>to avoid flicker due to my usage of some .PNG formats on some of the themes. Replaced those themes with non-flickering images and actually with smoother and cooler ones. Here is new Theme 4 which I decided to be flat for my end's need too:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1YJWPOGKWJVMnJjusOP2vt59K7ExoLT6dSw7VOFjnTJkt3ddHOXWEKvbA_NK3D-e5b3Qts55mMTbnObZ2Zn_BRhjoQatofvRcmSyCOFHjBj7IlxuvcNNyw2d7vMoCFEbhkpxbgL_IlTGa/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="476" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1YJWPOGKWJVMnJjusOP2vt59K7ExoLT6dSw7VOFjnTJkt3ddHOXWEKvbA_NK3D-e5b3Qts55mMTbnObZ2Zn_BRhjoQatofvRcmSyCOFHjBj7IlxuvcNNyw2d7vMoCFEbhkpxbgL_IlTGa/s400/a.jpg" width="400" /></a></div>
<br />
Just a quick peek, here are the latest blue colors of 9 Themes:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8YpbQEgqtU67975wyRquRyhBoL2Rg5rLB-XXk6A8ocB9Clu1zw9dL28TJle12Mz1MD3VoGvV9rPFmjMjePdHxHg7lK2PYxRIxlGLrN3Uv6x0gw0aOYyLxqZEmq4cE7eDqdmg2RFY1INhw/s1600/h.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="554" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8YpbQEgqtU67975wyRquRyhBoL2Rg5rLB-XXk6A8ocB9Clu1zw9dL28TJle12Mz1MD3VoGvV9rPFmjMjePdHxHg7lK2PYxRIxlGLrN3Uv6x0gw0aOYyLxqZEmq4cE7eDqdmg2RFY1INhw/s400/h.jpg" width="396" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Heck, why leave your forms looking like the old VFP forms when you can make it awesome with the help of ssUltimate Library? <a href="http://sandstorm36.blogspot.com/2015/12/whats-on-ssultimate-library.html" target="_blank">http://sandstorm36.blogspot.com/2015/12/whats-on-ssultimate-library.html</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7DdcC9Qr2wMfwelYJCSTPT12vAXgcv2_em_LJNuMZykeECFfBHJq6WwYl4smNRVs2Lcph9AezCxYts9QgqFLrJ8rgFoo219z2D_3QjwX0q7ztYzdD62vKdEjv0U5B8JOY1xnNq343O9fM/s1600/g.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="419" data-original-width="777" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7DdcC9Qr2wMfwelYJCSTPT12vAXgcv2_em_LJNuMZykeECFfBHJq6WwYl4smNRVs2Lcph9AezCxYts9QgqFLrJ8rgFoo219z2D_3QjwX0q7ztYzdD62vKdEjv0U5B8JOY1xnNq343O9fM/s1600/g.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEielzCG17IJZXpMRc8t-80D_aUHfmX8DnDfEYlL2BbilPoWvpyOsxU765_7iq0hNLRRAep7eiDhj7y9FE-4KlYeuTr8wUDZ3eVyppUqBMarVVDjp_bEhaQZRmh2AzaYCyObtZIR1iZlMROS/s1600/j.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="232" data-original-width="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEielzCG17IJZXpMRc8t-80D_aUHfmX8DnDfEYlL2BbilPoWvpyOsxU765_7iq0hNLRRAep7eiDhj7y9FE-4KlYeuTr8wUDZ3eVyppUqBMarVVDjp_bEhaQZRmh2AzaYCyObtZIR1iZlMROS/s1600/j.jpg" /></a></div>
<br />
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-85934658308439031402017-06-27T15:10:00.002+10:002017-07-01T08:39:47.375+10:00DropTime ClassJune 30, 2017<br />
<br />
<b><span style="color: red;">When Fast is still not fast enough....</span></b><br />
<br />
I was supposed to update my subscribers this week but then I am thinking DropTime class is still not fast enough. I need to make it faster. And so I discarded the original concept of the class and turned this into a real time picker where user can also type if they want. So this is how it looks now:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivWqMpWL4HYdCx7PNCXbnISGypv8hOzBqNYB62OtJEgfkastr5DVS6z6e6fAAqjhi4jOAPaDEy1PM1ioryhzVgNkJjIIKB8ZGmv0h3pGZfNNqufUrNGEvyFt2xTF5HeDOH4FKaDGwOjw2h/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="40" data-original-width="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivWqMpWL4HYdCx7PNCXbnISGypv8hOzBqNYB62OtJEgfkastr5DVS6z6e6fAAqjhi4jOAPaDEy1PM1ioryhzVgNkJjIIKB8ZGmv0h3pGZfNNqufUrNGEvyFt2xTF5HeDOH4FKaDGwOjw2h/s1600/a.jpg" /></a></div>
<br />
This class now also respects SET HOUR and will adjust display based on that. What is more, the dropdown section now includes both hours and minutes into one so it involves only three (3) clicks now, first on the dropdown icon, 2nd on the hour and 3rd on the minute (that is if you don't want to type straight into the textbox for it):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5hSeSIkAHky511L9VQ87TVhfijV3E3blKRRqlIdr7qnTW1d_HUMyN4Vbga5slOU8wLdyOIOhtqE-H2-jHMbMYfc6RG2DuQ4J1Pyf4SdWG97jL4VMiimZIz7PIARAyQ9PFewq7OiEH_TR/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="196" data-original-width="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi5hSeSIkAHky511L9VQ87TVhfijV3E3blKRRqlIdr7qnTW1d_HUMyN4Vbga5slOU8wLdyOIOhtqE-H2-jHMbMYfc6RG2DuQ4J1Pyf4SdWG97jL4VMiimZIz7PIARAyQ9PFewq7OiEH_TR/s1600/b.jpg" /></a></div>
<br />
And again on dtPicker nLevel = 3<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0sdWheHZccCLanxhASbSKRO6sB4JdeEiUuq5cvUd-7-du7Xb4-5AphQ0B5ccINoc6azZiTk2AmtG-SVOUYQ2UMcUOWvZaJorWmLZ1LFOG8MsYWwGC5hBNDNMm7zCJPceff6MTboyhjwGQ/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="355" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0sdWheHZccCLanxhASbSKRO6sB4JdeEiUuq5cvUd-7-du7Xb4-5AphQ0B5ccINoc6azZiTk2AmtG-SVOUYQ2UMcUOWvZaJorWmLZ1LFOG8MsYWwGC5hBNDNMm7zCJPceff6MTboyhjwGQ/s320/a.jpg" width="320" /></a></div>
<br />
Well that is it for now! Next update will give it the capability to be used inside a grid. Cheers!<br />
<br />
========<br />
<br />
Over the years, I tried to find ways to speed up and provide a unique time picker for my users and subscribers. And I ended up working on different classes for this need:<br />
<br />
<b><span style="color: blue;">DropClock</span></b> - is a time picker based on combobox. It has <span style="color: blue;">Interval</span> property (default is 1) that allows faster picking of the hour and minute portion. If interval is say set to 5, then the values shown will be with interval of 5, i.e., 5,10,15,20.... But it still is not fast enough because user still has to scroll down on the combobox especially if Interval is on default 1.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdlrf6V-Zt-XTPF4o7DFiJB__nbj94o6e52atMerlFYHHtVvyhu45QI-ijecyQGwuBNWHI21SgKs1biHfYZ50zdFzy-5-IKqtyCHNCWZGpHkFn7H4S1dmfvuHKhPLndxb3KoiZh5nPTDB/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="219" data-original-width="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdlrf6V-Zt-XTPF4o7DFiJB__nbj94o6e52atMerlFYHHtVvyhu45QI-ijecyQGwuBNWHI21SgKs1biHfYZ50zdFzy-5-IKqtyCHNCWZGpHkFn7H4S1dmfvuHKhPLndxb3KoiZh5nPTDB/s1600/a.jpg" /></a></div>
<br />
<br />
Then I created <b><span style="color: blue;">ScrollTime</span></b> class which is like on Android. It works with mouse scroll where you position your mouse pointer above the hour and scroll up and down. The same on minute. But it still is not fast enough too, plus it eats space on form.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiusCGrSlNOq9wEyXcmbyOOAjPSLKrYpn9egR4bPncJB5Khx8KT0x0g63HwNdOZaqI6jzyMLZGxCP0NpqpGwcGvTlzpqRCc-pwS1TzTq7Y_Sk4-RRo1umr7-j3d702KjuRCKFfAL-xNlKPy/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="148" data-original-width="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiusCGrSlNOq9wEyXcmbyOOAjPSLKrYpn9egR4bPncJB5Khx8KT0x0g63HwNdOZaqI6jzyMLZGxCP0NpqpGwcGvTlzpqRCc-pwS1TzTq7Y_Sk4-RRo1umr7-j3d702KjuRCKFfAL-xNlKPy/s1600/b.jpg" /></a></div>
<br />
<br />
Finally I created <b><span style="color: blue;">TimerX </span></b>which is what I used in <span style="color: blue;">dtPickerX class </span>for its time needs. This is based on <span style="color: blue;">spinners </span>so user can either type or spin the values. But then it still is not fast enough. <br />
<br />
I need something that will really make my users and subscribers' lives easier.<br />
<br />
Finally I thought of a new idea this morning and I started working on it. And behold my latest class, <b><span style="color: blue;">DropTime </span></b>class. <br />
<br />
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJcf-N9rn0hCGybQn0zbXgCbiwAhHUN9inOY-4ehuMgG-j3tJ_hdWdIFVYQcnkojQGLfRO0_0FFkQyGMNQjFVMZxaOu3qMtBMSCrvYcG_qLV9sIC9PRII6se9wN0vGh0z0U5poNldeqkd/s1600/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="152" data-original-width="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJcf-N9rn0hCGybQn0zbXgCbiwAhHUN9inOY-4ehuMgG-j3tJ_hdWdIFVYQcnkojQGLfRO0_0FFkQyGMNQjFVMZxaOu3qMtBMSCrvYcG_qLV9sIC9PRII6se9wN0vGh0z0U5poNldeqkd/s1600/c.jpg" /></a></div>
<br />
<b>And using this is damn very fast. </b>Where the user will simply do this: click, click, click, click. Just like when you are reading it. Of course, nothing will beat a textbox with picture "99:99" as all we need to do is type 4 numbers there. But who wants a plain textbox for time these days?<br />
<br />
Anyway, finally I am very satisfied with this that I also replaced TimerX in dtPicker with this one.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT983VCxDbJM4PJYucHp0X5eJJQo8yerpuqiQ24nc-ulM_LOaNZjQensoeS2PYdlEI44lx3JzNyZ7xte3eWfgRg77gdEEo5xnlbMGTvqeMtihqsN8lFsMjpXzAW2swgw8lvi8MNKuQr3bz/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="399" data-original-width="366" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT983VCxDbJM4PJYucHp0X5eJJQo8yerpuqiQ24nc-ulM_LOaNZjQensoeS2PYdlEI44lx3JzNyZ7xte3eWfgRg77gdEEo5xnlbMGTvqeMtihqsN8lFsMjpXzAW2swgw8lvi8MNKuQr3bz/s320/a.jpg" width="293" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I am sure you will say, why not put the dropdown time going to the right as it looks better? Until I find why clicking outside the border of its parent form causes it to close the dropdown portion of dtPickerX, it will remain that way.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b>Additional Properties</b> for the dropdown section only<br />
<br />
<span style="color: blue;">Themes </span>= Default value is .F.. Turning this to .T. will remove the sunken effect of selection and will replace the appearance with a 3D effect<br />
<br />
<span style="color: blue;">Alignment </span>= 1 is Left (Default) and 2 is Right (Default on dtPickerX)<br />
<br />
<span style="color: blue;">BackColor </span>and <span style="color: blue;">ForeColor </span>= well, colors<br />
<br />
This will be part of the next update to my subscribers (including the enhancements on NavigatorX). Cheers!<br />
<br />
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-56525658291923074332017-06-19T11:35:00.001+10:002017-06-21T15:03:29.614+10:00NavigatorX class<b><span style="color: blue;">Updates June 21, 2017</span></b><br />
<br />
Added <span style="color: red;"><b>Options </b></span>button (red gear on the image below)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRcKzi1dB7U_2flj-NJBDP8GYBuInLizrU8UsBgBKUtH9ayHGZZG2YDiVCjeFXcdBStRV192ADTATmng-EBvA01W6Qq64lKqIKBwEbPACtsqZMMDDVhnK__Mpt-asBJf94gW54Qz-xfuCk/s1600/a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="420" data-original-width="499" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRcKzi1dB7U_2flj-NJBDP8GYBuInLizrU8UsBgBKUtH9ayHGZZG2YDiVCjeFXcdBStRV192ADTATmng-EBvA01W6Qq64lKqIKBwEbPACtsqZMMDDVhnK__Mpt-asBJf94gW54Qz-xfuCk/s320/a.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Default value is shown. You can turn it off via setting <span style="color: blue;">NoOption </span>property to .T. and this button will be hidden. Useful in some cases where we want to restrict users to specific things only. This Option button (right now) gives users on-the-ply capabilities to do any of these:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLlSfmJt3OxDnkAbRU6uCJOdRCKV2q8toptOEyjoBxQzQUOSFuF2-wP3TAjgJg-pjX7PzdFCPqLWTrtO4O0w0MZbbw3TYlEsIh3rHDZTvhuKVPH2LX0zgh1JrnuY7mrXnu5Gg_wEaDpDIz/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="148" data-original-width="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLlSfmJt3OxDnkAbRU6uCJOdRCKV2q8toptOEyjoBxQzQUOSFuF2-wP3TAjgJg-pjX7PzdFCPqLWTrtO4O0w0MZbbw3TYlEsIh3rHDZTvhuKVPH2LX0zgh1JrnuY7mrXnu5Gg_wEaDpDIz/s1600/a.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<ul>
<li><span style="color: blue;">Change Interval</span> - by default, the interval of skipping a record is one (1). It can be set on the PEM, Others tab into greater number but then you will be stuck up on that fixed interval. So I decided to give users the capability to change skipping of number of records at their whim, and so this.</li>
<li><span style="color: blue;">Jump To Record</span> - is requested by a subscriber after I updated them yesterday. This allows you to specify the record number to jump stright into that.</li>
<li><span style="color: blue;">Set Filter </span>(<i>available only when bound to Grid</i>) - allows you to filter grid records on-the-ply. </li>
<li><span style="color: blue;">Remove Filter</span> (<i>available only when bound to Grid</i>) - as the name implies, remove the filter that you set above.</li>
</ul>
<div>
After posting this, I continued on testing the class and I made further changes to the <b><span style="color: blue;">Filtering </span></b>Capability as follows:<br />
<br />
It now forces you to click on a target column first before it allows filtering. If you haven't, it will give you the message 'Click on a Column First' which cannot be selected too.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3tt036lE8hai7Wncn7mCQtRpxG3CYeM7brbf-DXDB7zPhVqXLkpYwezgYWG2mRSa18B3XpxyYZqvPPJJdwb1jTZy85BQJZEBS1Xf8rIaklg-iigBIbpsAAz1laEUN8SJfceyH42vSN3Q3/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="480" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3tt036lE8hai7Wncn7mCQtRpxG3CYeM7brbf-DXDB7zPhVqXLkpYwezgYWG2mRSa18B3XpxyYZqvPPJJdwb1jTZy85BQJZEBS1Xf8rIaklg-iigBIbpsAAz1laEUN8SJfceyH42vSN3Q3/s400/a.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That is because it has to know on which column of the grid it should perform the filtering. After clicking on a header, then that is the time it will show the filtering capability and mentioning as well the target field like this:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-YBMd1CwM20jLXDpHqWzSP4YfASX055u9e4T2tPZ5J4zvTARyP8kptdLS2jkWqBqbJYLKaN99iWhMax0c8wz539G7j-9pZ00Te9aA3kyPgpGN6kUesrHk8m5kWal2ZrLTsEiWT81sso7P/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="188" data-original-width="428" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-YBMd1CwM20jLXDpHqWzSP4YfASX055u9e4T2tPZ5J4zvTARyP8kptdLS2jkWqBqbJYLKaN99iWhMax0c8wz539G7j-9pZ00Te9aA3kyPgpGN6kUesrHk8m5kWal2ZrLTsEiWT81sso7P/s400/a.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In the above image, I clicked on the header of column for Company. Please note that when it says <span style="color: red;">Set Filter to <b>Company</b></span>, that company there is the underlying field used by that column and not the column header's caption. That allows the users to realize too where they are performing the filter.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
However, I remember that not in all cases, a filtering feature is good because there might be cases where there is already a filtering implemented in a grid and if we use this class filtering capability, then it can overwrite the filter condition which you guys set by codes. And so for cases like that, I added the <span style="color: blue;">NoFilter</span> property. Set this to .T. and it will not show that filtering capability anymore.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUda_ekfiT82sbRqvzF9wsxOKzI8pSwT4NrCEjKzb2OlRsh7SJMHGYJcmMgkJO6_GREP6cY-U_FW17-ntTvxKe7NXU5gmAdgfM3NdAxkQCTNTTNXr9BMkhOATKZ4e3wIsDSu7Y0Mkjc6gy/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="390" height="101" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUda_ekfiT82sbRqvzF9wsxOKzI8pSwT4NrCEjKzb2OlRsh7SJMHGYJcmMgkJO6_GREP6cY-U_FW17-ntTvxKe7NXU5gmAdgfM3NdAxkQCTNTTNXr9BMkhOATKZ4e3wIsDSu7Y0Mkjc6gy/s320/a.jpg" width="320" /></a></div>
<br />
<br />
Miscellaneous Effects<br />
<br />
Miscellaneous effects for GUI can be done via playing with these properties:<br />
<br />
1. BackColor, BackStyle, SpecialEffect, BorderColor, and BorderWidth.<br />
<br />
2. Hover Effect. Cousin Glen suggested an idea to show the border of the class on Mouse Enter. I like it so I added it here as well. To make the effect look better (at least to my taste), I changed SpecialEffect to zero as default. So now when you move your mouse on top of the class, it is suddenly raised and when you move away from it, it goes back flat and borderless.<br />
</div>
<div>
<br />
Some more ideas may come to me in the future about this class or some may be suggested by others. We will see.</div>
<div>
====</div>
<br />
<br />
<b><span style="color: blue;">NavigatorX </span></b>is a new control class that handles record navigation like going to <span style="color: blue;">top</span>, <span style="color: blue;">previous </span>record, <span style="color: blue;">next </span>record, and going to last record or <span style="color: blue;">bottom</span>. I was browsing for some things on the web when I saw again a <span style="color: #990000;">Paginator </span>(Page 4 of 24) and I said to myself, well this looks cool to be added to <a href="http://sandstorm36.blogspot.com/2015/12/whats-on-ssultimate-library.html" target="_blank">ssUltimate Library</a>? But since we are not dealing with pages inside VFP as we have <span style="color: blue;">grid</span>, then it is best known to us as a navigator.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2GtwKLoqnxjq6WblQwQaJ1A3XcTwCvaMOqCKhZEGeTho2Ce69oTk9pw7Et51bNEA4WCfjsR7yoQVIyyW1sGc1EqrXAOuihS1boFcmFIBa8Hz377Ah1hS8sLIFwzTD-phAe7Na4kkBdCW/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="342" data-original-width="388" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2GtwKLoqnxjq6WblQwQaJ1A3XcTwCvaMOqCKhZEGeTho2Ce69oTk9pw7Et51bNEA4WCfjsR7yoQVIyyW1sGc1EqrXAOuihS1boFcmFIBa8Hz377Ah1hS8sLIFwzTD-phAe7Na4kkBdCW/s320/a.jpg" width="320" /></a></div>
<a name='more'></a>Right now, I gave it these properties:<br />
<br />
1. <span style="color: blue;">Interval </span>(default is 1). Tells the class how many records it will attempt to skip<br />
<br />
2. <span style="color: blue;">NoIndicator </span>(default is .F.). Sometimes if you decide to use this class on a non-sequential record, then it looks ugly to see the record indicator jumping from record to record. Such as filtered results in a grid or a sorted one. In which case I deem it best not to show this indicator and so you can set this property to .T. for that need and the class will adjust position and hide that label indicator<br />
<br />
3. As for that Record Indicator, you can control its appearance by using any of these 3 properties, i.e., <span style="color: blue;">FontName</span>, <span style="color: blue;">FontSize </span>and <span style="color: blue;">FontTop</span>.<br />
<br />
4. Appearance of buttons and borders are affected by <span style="color: blue;">SpecialEffect </span>(default 2 or hot tracking/hover effect)<br />
<br />
Aside from its default actions where those are intended to, you can also add your other commands in its Click event. Just ensure that you will issue <span style="color: blue;">DODEFAULT</span>() first prior to your other codes like this:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">DODEFAULT</span><span style="font-family: "courier new"; font-size: 10pt;">()<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* Do other things<o:p></o:p></span></div>
<br />
For the appearance, you can further change <span style="color: blue;">Backstyle</span>, <span style="color: blue;">Borderstyle</span>, <span style="color: blue;">Bordercolor</span>, etc.<br />
<br />
If you bind this to a grid, clicking on grid will also update the navigator's <span style="color: #cc0000;">Record Indicator</span> bound to it<br />
<br />
<b>How to use this?</b><br />
<br />
1. Drag and drop onto your form<br />
2. On Form Init event (<i>I prefer this event to ensure everything is already instantiated such as the needed <span style="color: blue;">recordsource</span></i>), bind it to the controls you want refreshed. Said controls should be bound via <span style="color: blue;">ControlSource </span>or <span style="color: blue;">RecordSource </span>where a simple <span style="color: blue;">Refresh </span>is need to show the changes made.<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">.NavigatorX1._Bind(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">this</span><span style="font-family: "courier new"; font-size: 10pt;">.grid1,<span style="background: yellow; mso-highlight: yellow;">'myRecordSource'</span>)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"><br /></span></div>
And that is it! This is now officially part of ssUltimate Library.<br />
<div>
<br /></div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com2tag:blogger.com,1999:blog-5802699848164820481.post-79669365821308372052017-06-10T13:58:00.001+10:002017-06-14T13:21:13.720+10:00Breaking down Grid's Column objectA foxite member has sought assistance on how to make an active cell of a specific column change color, as additional visual highlight, upon receiving focus. Of course it means <span style="color: blue;">AllowCellSelection</span> is .T. to allow that specific cell focus. So I showed him how via a sample code whereby I manipulated both <span style="color: blue;">GotFocus()</span> and <span style="color: blue;">LostFocus()</span> of the text object for that column to change the backcolor when it receives focus and to return it back to white on LostFocus.<br />
<br />
I said new findings because a fellow respected member of Foxite, <span style="color: blue;">Tony Vignone</span>, has mentioned on a comment under mine that lostfocus is not needed on my sample codes as it achieves that switching of backcolor even without it (lostfocus codes I have shown) though he is not clear as to the whys. So he asked me if I have an idea as to the whys.<br />
<br />
And yes, having manipulated objects of VFP myself to create a single new object in form (control classes like xBox, PopCalc, DTPickerX, EditX, etc.) for my ssUltimate library, I do immediately got a "new perspective" of how a grid's column is composed of. And this is what I am sharing here now. How really is a column of a grid composed of?<br />
<br />
<b><span style="color: #cc0000;">Column's Composition</span></b><br />
<br />
Originally I think of a column consisting of 3 objects. A container, a header and a textbox (by default). His comments helped lift up the fog in my eyes which resulted to this new perspective of a grid's column's composition now.<br />
<br />
<a name='more'></a><br /><br />
Here is what I think now how a grid column is composed of:<br />
<br />
<ol>
<li>Container also known as the column</li>
<li>Commandbutton (for header)</li>
<li>Textbox (to show the values on top, what is merely shown on allowcellselection = .f.). We will term this as <b><span style="color: blue;">upper textbox</span></b>.</li>
<li>Another texbox that works as the activecell and CurrentControl, by default, when allowcellselection is .t., we will term this as <span style="color: blue;"><b>lower textbox</b>.</span></li>
</ol>
<br />
<br />
<span style="color: red;">What is new above?</span> That upper textbox has never occured to me and most probably to most of you as VFP do not show it on PEM. But that is not surprising as VFP's grid and other objects such as pageframes, listbox, combobox, etc.; are nothing but just skilfully manipulated combined objects turned into one; just like a control class.<br />
<br />
So like I said, a column actually consists of that extra upper textbox hidden in PEM. We will put this to a test in a short while here.<br />
<br />
Having said that about the upper textbox, then all we need to achieve changing backcolor of an active cell of a grid is to simply "change the backcolor of what is seen as text1 of a column", either by PEM or by code in its init event. Try it.<br />
<br />
Going back to Tony's question of how the grid was able to restore back the cell to default white when it looses focus without any codes on its lostfocus event, that is because that text1 or what we termed above as lower textbox (now colored diffirently) is the one used by grid (talking about default objects of a column) for its active cell. While on the rest of inactive cells, grid is switching to that upper textbox hidden in PEM (which has white color by default).<br />
<br />
To prove this theory further is simple. All you need to do is set Sparse propery of that column to .F. and presto, you will see that the whole column will now turn to that lower textbox' backcolor. Because what <span style="color: blue;">Sparse</span> = .F. does is it turns the upper textbox invisible.<br />
<br />
Again, activecell uses lower textbox, inactive cells uses upper textbox object hidden in PEM. Unless you set Sparse to .F. whereby VFP will now disregard the upper textbox (rendering it invisible) and will use instead the underlying currentcontrol of a column.<br />
<br />
Here is a sample code:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">loTest = </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Createobject</span><span style="font-family: "courier new"; font-size: 10pt;">("Sample")<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">loTest.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Show</span><span style="font-family: "courier new"; font-size: 10pt;">(1)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Define Class Sample As Form<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> AutoCenter
</span><span style="font-family: "courier new"; font-size: 10pt;">=
.T.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><span style="font-family: "courier new"; font-size: 10pt;">= 300<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><span style="font-family: "courier new"; font-size: 10pt;">= 340<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Add Object </span><span style="font-family: "courier new"; font-size: 10pt;">command1 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As CommandButton
With </span><span style="font-family: "courier new"; font-size: 10pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span><span style="font-family: "courier new"; font-size: 10pt;">= 'Turn Sparse
OFF', </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span><span style="font-family: "courier new"; font-size: 10pt;">= 5, </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span><span style="font-family: "courier new"; font-size: 10pt;">= 10,;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><span style="font-family: "courier new"; font-size: 10pt;">=30, </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><span style="font-family: "courier new"; font-size: 10pt;">= 120<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Add Object </span><span style="font-family: "courier new"; font-size: 10pt;">grid1 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As Grid With </span><span style="font-family: "courier new"; font-size: 10pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left </span><span style="font-family: "courier new"; font-size: 10pt;">= 10, </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Top </span><span style="font-family: "courier new"; font-size: 10pt;">= 50, </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Height </span><span style="font-family: "courier new"; font-size: 10pt;">= 280, </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Width </span><span style="font-family: "courier new"; font-size: 10pt;">= 270, ;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">DeleteMark</span><span style="font-family: "courier new"; font-size: 10pt;">=.F., </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RecordMark </span><span style="font-family: "courier new"; font-size: 10pt;">= .F.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Procedure Load<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Rand</span><span style="font-family: "courier new"; font-size: 10pt;">(-1)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Create Cursor </span><span style="font-family: "courier new"; font-size: 10pt;">junk (fld1 i,
fld2 i, fld3 i, fld4 i)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">For </span><span style="font-family: "courier new"; font-size: 10pt;">lnloop = 1 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">To </span><span style="font-family: "courier new"; font-size: 10pt;">40<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Insert Into </span><span style="font-family: "courier new"; font-size: 10pt;">junk </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Values </span><span style="font-family: "courier new"; font-size: 10pt;">(1+100* </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rand</span><span style="font-family: "courier new"; font-size: 10pt;">(),1+400* </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rand</span><span style="font-family: "courier new"; font-size: 10pt;">(),1+60* </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rand</span><span style="font-family: "courier new"; font-size: 10pt;">(),1+150* </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rand</span><span style="font-family: "courier new"; font-size: 10pt;">())<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Next<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Go
Top<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Procedure
</span><span style="font-family: "courier new"; font-size: 10pt;">grid1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Init<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> With
This<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RecordSourceType </span><span style="font-family: "courier new"; font-size: 10pt;">=1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> .</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RecordSource </span><span style="font-family: "courier new"; font-size: 10pt;">= 'junk'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">For Each </span><span style="font-family: "courier new"; font-size: 10pt;">loColumn </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">In </span><span style="font-family: "courier new"; font-size: 10pt;">.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Columns<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">loColumn.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">RemoveObject</span><span style="font-family: "courier new"; font-size: 10pt;">('Text1')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> loColumn.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">AddObject</span><span style="font-family: "courier new"; font-size: 10pt;">('Text1','MyText')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> loColumn.Text1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Visible </span><span style="font-family: "courier new"; font-size: 10pt;">= .T.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Next<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endwith<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Procedure
</span><span style="font-family: "courier new"; font-size: 10pt;">command1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Click<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Local
</span><span style="font-family: "courier new"; font-size: 10pt;">lnColumn,
llSparse<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.grid1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SetFocus</span><span style="font-family: "courier new"; font-size: 10pt;">()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> lnColumn
= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.grid1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ActiveColumn<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">llSparse = </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.grid1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Columns</span><span style="font-family: "courier new"; font-size: 10pt;">(m.lnColumn).</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sparse<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.grid1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Columns</span><span style="font-family: "courier new"; font-size: 10pt;">(m.lnColumn).</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sparse </span><span style="font-family: "courier new"; font-size: 10pt;">= !m.llSparse<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.command1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span><span style="font-family: "courier new"; font-size: 10pt;">= 'Turn Sparse
'+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Iif</span><span style="font-family: "courier new"; font-size: 10pt;">(m.llSparse,'ON','OFF')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Define Class </span><span style="font-family: "courier new"; font-size: 10pt;">myText </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">As TextBox<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* We will change
these properties for lower textbox<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: green; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BorderStyle </span><span style="font-family: "courier new"; font-size: 10pt;">= 0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">BackColor </span><span style="font-family: "courier new"; font-size: 10pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Rgb</span><span style="font-family: "courier new"; font-size: 10pt;">(0,255,255)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">FontBold </span><span style="font-family: "courier new"; font-size: 10pt;">= .T.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">FontSize </span><span style="font-family: "courier new"; font-size: 10pt;">= 12<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Procedure
GotFocus<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Thisform</span><span style="font-family: "courier new"; font-size: 10pt;">.command1.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Caption </span><span style="font-family: "courier new"; font-size: 10pt;">= 'Turn Sparse
'+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Iif</span><span style="font-family: "courier new"; font-size: 10pt;">(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="font-family: "courier new"; font-size: 10pt;">.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Parent</span><span style="font-family: "courier new"; font-size: 10pt;">.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sparse</span><span style="font-family: "courier new"; font-size: 10pt;">,'OFF','ON')<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endproc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Enddefine<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpbQU-m5R8tOaKxKdEa-XymW0HBK4CV_rnRrTWbRQLnZOymkhLJC3uk8Crgtn9EqRZCeQjPQX9ZWaunazWdwY3iWOKAJ0xJkK6MdayUYlBmtYHfU-l8cjIr7wwWh3Cf81dRjwpdGx2NrK8/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="377" data-original-width="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpbQU-m5R8tOaKxKdEa-XymW0HBK4CV_rnRrTWbRQLnZOymkhLJC3uk8Crgtn9EqRZCeQjPQX9ZWaunazWdwY3iWOKAJ0xJkK6MdayUYlBmtYHfU-l8cjIr7wwWh3Cf81dRjwpdGx2NrK8/s1600/a.jpg" /></a></div>
<br /></div>
<br />
<div class="MsoNormal">
<br /></div>
<br />
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-91585772245560555672017-06-02T09:33:00.000+10:002017-06-02T09:33:28.722+10:00grdSortLock - Some More...After adding the capability to hide and unhide column(s) yesterday, I decided to add some more features for this. I can edit yesterday's post but then those who read it already may not be aware of the additional changes I made after that as they may no longer revisit that other post so this new post. Here are what is new (again) on this class:<br />
<br />
1. Cleaner arrow icons representing sort order. Also I realized some plain users may get confused with the terms <span style="color: #cc0000;">Sort Ascending</span> or <span style="color: #cc0000;">Sort Descending</span> so those are replaced with simple terms which are <span style="color: blue;">Order Up</span> and <span style="color: blue;">Order Down</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh__MT2909X9LIEla8I3LkFnfkBV4nA4dkPBY7_TzbEJzI27cGdFZTulhTzJ6XPA7OPIxHCrHifLqHvASe32l4cLPmzjLywgK6Om_s1ringwyN9yCFFlgNsHHGKsLksBn1QcokT9QGGkfVy/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="113" data-original-width="397" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh__MT2909X9LIEla8I3LkFnfkBV4nA4dkPBY7_TzbEJzI27cGdFZTulhTzJ6XPA7OPIxHCrHifLqHvASe32l4cLPmzjLywgK6Om_s1ringwyN9yCFFlgNsHHGKsLksBn1QcokT9QGGkfVy/s320/b.jpg" width="320" /></a></div>
<br />
2. Added now the locked icons if a column is locked as additional visual guide. So here is how it will look like now with locks implemented<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3W0lwTQ2xry8XmrIaBEBEsngTgceRpCabQ3XSnNN19mNt8BzznYrDh6x1ay7JjHqCt6dHVIOCftcwd4eaRGrBcgQEdkM-Q6PzHsWkU2aRp6AZjH_HNwfIQhLwNAFdL38XaRGPKMxyLv94/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="156" data-original-width="490" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3W0lwTQ2xry8XmrIaBEBEsngTgceRpCabQ3XSnNN19mNt8BzznYrDh6x1ay7JjHqCt6dHVIOCftcwd4eaRGrBcgQEdkM-Q6PzHsWkU2aRp6AZjH_HNwfIQhLwNAFdL38XaRGPKMxyLv94/s400/b.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-TC6fMrUw_sqLVuwjeXgpeMtw31qXvbzmcrtP_wZ59VfSmvh2Kgql0hfEdSlxWL68DvcoQLe6jsxTCIqYcCvgq2tQRhrfCoIXUckjgmmdIix1w4mrTTvc8PuO8b53cQqKjklOey9dyF_R/s1600/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="139" data-original-width="627" height="87" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-TC6fMrUw_sqLVuwjeXgpeMtw31qXvbzmcrtP_wZ59VfSmvh2Kgql0hfEdSlxWL68DvcoQLe6jsxTCIqYcCvgq2tQRhrfCoIXUckjgmmdIix1w4mrTTvc8PuO8b53cQqKjklOey9dyF_R/s400/c.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3. Added other more visual Toggling for RecordMark, Theme, GridLines, ScrollBars and Views. It means your users now can change those on-the-ply based on their taste</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIM8qjgixH155AOOixNSgbj9rK6pbMD74loYaBlNF2H4bKQ1vcwpXXU9qDcXoaV63XDoqDHs7QFZsbHHDO6774RgTfSXlVmXWzlv3Lec_5ds7MoE8ASeRbPK2hiZG8ZNs227Wid4RrBTss/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIM8qjgixH155AOOixNSgbj9rK6pbMD74loYaBlNF2H4bKQ1vcwpXXU9qDcXoaV63XDoqDHs7QFZsbHHDO6774RgTfSXlVmXWzlv3Lec_5ds7MoE8ASeRbPK2hiZG8ZNs227Wid4RrBTss/s1600/b.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As for Views, this allows you to change something like this</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmI-mwbfpxZhhOLsYIKJxSeIPu4V9xt939kNY3eIZA1aWExlpm3H9kePc6OXq7gKLZlQ7szAcavS4bRAhRCr-NJ3J0WwmKwl-LT0_JdSaYP8LVOgGLyoSAkoU96kXjnMhFKdnveIa_gqO/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="100" data-original-width="602" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmI-mwbfpxZhhOLsYIKJxSeIPu4V9xt939kNY3eIZA1aWExlpm3H9kePc6OXq7gKLZlQ7szAcavS4bRAhRCr-NJ3J0WwmKwl-LT0_JdSaYP8LVOgGLyoSAkoU96kXjnMhFKdnveIa_gqO/s1600/b.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Into this:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEOrhczo1x0jI_tSy2w7f4wwoHz58LD1GO7UWtP6JAl21eNo-SPwft9UmFWLuh8Pl1Xuw_hHQxCbMvOC2195T0cKIQmmL_0SYH-7DmN6vqTf7O7dSRUPo5MLCv4BfiOzetStoNwKzlC79a/s1600/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="423" data-original-width="381" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEOrhczo1x0jI_tSy2w7f4wwoHz58LD1GO7UWtP6JAl21eNo-SPwft9UmFWLuh8Pl1Xuw_hHQxCbMvOC2195T0cKIQmmL_0SYH-7DmN6vqTf7O7dSRUPo5MLCv4BfiOzetStoNwKzlC79a/s320/c.jpg" width="288" /></a><br /></div>
<div class="separator" style="clear: both; text-align: left;">
But while those other toggling are cool to give users a chance to change the looks of the grid based on their taste, those are half-baked so to speak being those are not retained by the class right now. So when I have another more extra time, I will give this class that capability to remember a grid's last settings, per machine, so a user can personalize their grids and keep those preferences.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Well that is all for now! Cheers!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com2tag:blogger.com,1999:blog-5802699848164820481.post-57740514425086815502017-05-30T16:28:00.001+10:002017-06-01T15:28:23.004+10:00Hide/Unhide Grid ColumnsThis is actually per request of my very first subscriber MK Sharma. So he was looking for a tool to hide/unhide grid columns on-the-ply that he asked me if this can be incorporated on the ssUltimate library. I said okay I will look into it but I was busy with simultaneous projects these days that I kept shoving it at the back of my mind.<br />
<br />
Finally I became a bit free of my workload and so I decided to work on this one today. I did not realize adding this feature will not require a lot of my time that I kept unnecessarily putting this request on hold thinking I will do it later when I am free, which happens today; as it is hard to concentrate on extra things when you are already working on 3 projects simultaneously.<br />
<br />
Anyway, that feature now is part of <b><span style="color: blue;">GridSortLock</span></b> class. So this means said class can now Sort, Lock and Hide/Unhide columns of the grid. Here are some images of it:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0n90ZmD-DOhUitkmyDdsWjUyL8GMQ2NFxPXLo6zhi-mUZDfILTSum0ota8re9fJomQXTjKnYo2cR_rRmhIpVerYEi8oFmK4sc6GBYWv2ePGAW2c2IWqA5HFy5_Fz1oV4s5XG6PI0AWbPN/s1600/c.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq3YiHee9ZordJrk3JKubSzBeSVdXRvAvma2Lg7dgw5yaabpntp3tBDhrj6FyM1oq_vrpy-_DWICx8T2wA-FtimjOLcRqdk9uIJB6b4szBWx8kOJihH3Xc0n-X8JRaMFOjqbCUww-VBG-j/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="359" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq3YiHee9ZordJrk3JKubSzBeSVdXRvAvma2Lg7dgw5yaabpntp3tBDhrj6FyM1oq_vrpy-_DWICx8T2wA-FtimjOLcRqdk9uIJB6b4szBWx8kOJihH3Xc0n-X8JRaMFOjqbCUww-VBG-j/s1600/a.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ5Xq3IyYTvlerYktNINmhzLtp-yzaPM_lKR4H0SEJ4AicS_Cqa7QyA_aqhVrQ99GQT4ZnQ10eaw9YjFKA2nXhcvHf88yvsn1Gd8wFg3gwuTk0dZUY6_Pt2ewRBK18kRyQUBiDcScmN1-M/s1600/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="220" data-original-width="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ5Xq3IyYTvlerYktNINmhzLtp-yzaPM_lKR4H0SEJ4AicS_Cqa7QyA_aqhVrQ99GQT4ZnQ10eaw9YjFKA2nXhcvHf88yvsn1Gd8wFg3gwuTk0dZUY6_Pt2ewRBK18kRyQUBiDcScmN1-M/s1600/c.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHCHhF4DIAgS0O5w3qJeQn99eMmB2VGB5h9s0zA9qVheI9cYeqD0u4xYgloOupZgUmQ7W-wmb127M6-Rsbe24PWRTfbt8gDM0UeIUPBFMpOFGSupKAm646bouYWKoNIw1_y4uV9HClDSIm/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="311" data-original-width="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHCHhF4DIAgS0O5w3qJeQn99eMmB2VGB5h9s0zA9qVheI9cYeqD0u4xYgloOupZgUmQ7W-wmb127M6-Rsbe24PWRTfbt8gDM0UeIUPBFMpOFGSupKAm646bouYWKoNIw1_y4uV9HClDSIm/s1600/b.jpg" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;">If you notice, the Hide option becomes disabled the moment the class detects that there is only one remaining visible column in the grid. That is by design as the class fires at a header click/right-click so I need to retain one for the popup selection to be shown.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Moreover, I changed the sort icon to a simpler one again. In the end, I find the current sort order harder to distinguish in the previous icon I used so that blue one now.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One more reason to subscribe to ssUltimate library, don't you think? </div>
<br /><div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com0tag:blogger.com,1999:blog-5802699848164820481.post-14993884448010816062017-04-26T09:18:00.000+10:002017-04-26T15:17:20.766+10:00MariaDB - Speeding Up Records Migration<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hEkkEFIusnG9c0FA6CbyTju65Fe0_tuNp6TRAICtUibv2mwsZM6wQBfwYQihgUCVHj_NcxlouoqiUV_Djqml7jUDWKyKvgvNgLkEt50UGrwmbhU0wL1-eSoMoCGIT_YckXk2AtmpyXFf/s1600/a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hEkkEFIusnG9c0FA6CbyTju65Fe0_tuNp6TRAICtUibv2mwsZM6wQBfwYQihgUCVHj_NcxlouoqiUV_Djqml7jUDWKyKvgvNgLkEt50UGrwmbhU0wL1-eSoMoCGIT_YckXk2AtmpyXFf/s320/a.jpg" width="320" /></a></div>
I started testing MariaDB as my new backend and while it is simple enough to do the switch onto that, there are some things that I need to adjust on my VFP codes. Some of those are the field types, for logical fields I have to use TINYINT (for MySQL ODBC 5.1 or later) or BIT (for MySQL ODBC 3.51), for dates it does not accept {} for an empty date, etc.<br />
<br />
However, this post is not about that. It is more on the speed of migration approach. Bear in mind I am new with this, only less than a week but I think regardless of it, this can help some who might be using MariaDB or MySQL as backends. <br />
<br />
One way to connect from VFP to MariaDB is via SPT (SQL Pass-Through). With a code like this:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If SQLExec</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">gomyapp</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">DbBaseConn</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">'INSERT INTO
MyTable (MyField) VALUES (?m.lcMyValue)'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) <= </span><span style="font-family: "courier new"; font-size: 10pt;">0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Aerror</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">laError</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Messagebox</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">laError[2]</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;">Endif</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt; line-height: 107%;"></span></div>
<a name='more'></a><br />
<br />
So that will create a new record from VFP to MariaDB table.<br />
<br />
But as you can see it is done on a per record basis. And testing migrating one of my smaller tables in VFP to MariaDB containing only 589 records using SCAN...ENDSCAN approach took me .5333 seconds. It means that transfer speed on my end per record is at .000905 of a second. Take note that speed is affected as well by number of fields to transfer.<br />
<br />
Since I have to migrate as well another table which contains 1,237,000 records and has more fields than my first per-record SPT above, we can safely presume basing on that .000905 of a second transfer rate per record that it will take me an estimated 18 minutes and 67 seconds to completely migrate this bigger table. And damn, that is a very long time to wait.<br />
<br />
So I sought another way and found out about LOOP Statement of MariaDB. But we are in VFP so I would prefer to have something that we are already familiar with. Still using SCAN...ENSCAN, I decided to create a batch of records with the help of TEXT...ENDTEXT and I was satisfied with the result. However, there is one caveat, i.e., CONCATENATION. A variable can only hold so much characters that eventually it will fail. I tested transferring 80,0000 records in one go and it was comparably faster. But then per my test (and per number of characters on the text SQL INSERT INTO resultant), when I tried 100K of records, it failed due to concatenation.<br />
<br />
Solution, do it by batch. Here now is my preferred approach to transfer huge records. I decided to do a batch transfer of 5,000 records per SPT. Over-all result is from that calculated 18.67 minutes, it was slashed down to just 6.0167 minutes. Here is the migration codes I used:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="font-family: "courier new"; font-size: 10pt;">lcSetDate</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lcBatch</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lcValues</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lcTop</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">ldStart</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lnRecords<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Close Databases All<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Use </span><span style="font-family: "courier new"; font-size: 10pt;">vouchers </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Shared<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lnRecords </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Reccount</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">ldStart </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Datetime</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcSetDate </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Set</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">"Date"</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Set Date To </span><span style="font-family: "courier new"; font-size: 10pt;">YMD<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcTop </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">'Insert Into
vouchers (serialno, dsent,usersentfk,customerfk,userusedfk,storeredeemfk,'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">'dused,dtransfer,
denomfk, storagelocfk,minvfk, mtfk, qrcode) VALUES '<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcBatch </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">''<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">''<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Scan<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> TEXT
TO </span><span style="font-family: "courier new"; font-size: 10pt;">lcValues
</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOSHOW
TEXTMERGE PRETEXT </span><span style="font-family: "courier new"; font-size: 10pt;">12<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">'<<serialno>>'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">'<<IIF(dsent={},[0000-00-00],dsent)>>'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,<<</span><span style="font-family: "courier new"; font-size: 10pt;">sentfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>,<<</span><span style="font-family: "courier new"; font-size: 10pt;">storefk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>,<<</span><span style="font-family: "courier new"; font-size: 10pt;">redeemfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>,<<</span><span style="font-family: "courier new"; font-size: 10pt;">storeredfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>,<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">'<<IIF(dused={},[0000-00-00],dused)>>'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">'<<IIF(transfer={},[0000-00-00],transfer)>>'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> <<</span><span style="font-family: "courier new"; font-size: 10pt;">denomfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>, <<</span><span style="font-family: "courier new"; font-size: 10pt;">storagefk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>,<<</span><span style="font-family: "courier new"; font-size: 10pt;">minvfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>, <<</span><span style="font-family: "courier new"; font-size: 10pt;">mtfk</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">>>, </span><span style="font-family: "courier new"; font-size: 10pt;">'<<barcode>>'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">),<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ENDTEXT<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">lcBatch </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcBatch </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ </span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcValues<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If Mod</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Recno</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(),</span><span style="font-family: "courier new"; font-size: 10pt;">5000</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)= </span><span style="font-family: "courier new"; font-size: 10pt;">0 </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">Or </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Recno</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">() >= </span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lnRecords<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> lcSQL
</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">lcTop </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+ </span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcBatch<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> lcSQL
</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Left</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Len</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)-</span><span style="font-family: "courier new"; font-size: 10pt;">1</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="font-family: "courier new"; font-size: 10pt;">';'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If SQLExec</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">gomyapp</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">DbBaseConn</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">) > </span><span style="font-family: "courier new"; font-size: 10pt;">0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Wait Window </span><span style="font-family: "courier new"; font-size: 10pt;">'Writing up to '</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Transform</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Recno</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()) </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Nowait<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Else<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Aerror</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">laError</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Messagebox</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">laError[2]</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">''<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> lcBatch
</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">''<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endscan<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Set Date </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">&</span><span style="font-family: "courier new"; font-size: 10pt;">lcSetDate<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Close Databases All<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Messagebox</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">'Started: '</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Ttoc</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">ldStart</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">2</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Chr</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">13</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="font-family: "courier new"; font-size: 10pt;">'Ended: '</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TTOC</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Datetime</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(),</span><span style="font-family: "courier new"; font-size: 10pt;">2</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Chr</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">13</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="font-family: "courier new"; font-size: 10pt;">'Elapsed: '</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Transform</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">((</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Datetime</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()- </span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">ldStart</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)/</span><span style="font-family: "courier new"; font-size: 10pt;">60</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">))<o:p></o:p></span></div>
<br />
Well then, you can expect some more tricks here in the future on VFP to MariaDB.<br />
<div>
<br /></div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com1tag:blogger.com,1999:blog-5802699848164820481.post-40970131581310761782017-04-03T09:45:00.000+10:002017-04-24T13:20:48.855+10:00xBox on MySQL BackendOne of my subscribers is using MySQL as his backend so I requested him to provide a tutorial, as I do not use that backend myself, on how to use xBox on that one. This guide can be useful to others too who has a different backend aside from that of VFP. So here it is, it is quite simple actually:<br />
<br />
Author: <b><span style="color: red;">Glenn Palic</span></b><br />
Date: April 1, 2017<br />
<br />
<b>How to use xBox on MySQL Backend</b><br />
<br />
1. Make a connection with your mysql backend using ODBC in load event of your form<br />
<br />
Example:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Public </span><span style="font-family: "courier new"; font-size: 10pt;">pnConnectionHandle</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">oConn<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">oConn</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="font-family: "courier new"; font-size: 10pt;">"Driver={MySQL
ODBC 5.1
Driver};Server=localhost;Database=Yourdb;Port=3306;uid=username;pwd=password;Option=3;"<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQLSetprop</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">0</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">"DispLogin"</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">3</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">pnConnectionHandle </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">= </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Sqlstringconnect</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">oConn</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If </span><span style="font-family: "courier new"; font-size: 10pt;">pnConnectionHandle </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">> </span><span style="font-family: "courier new"; font-size: 10pt;">0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: green; font-family: "courier new"; font-size: 10.0pt;">* successs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Else<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> Messagebox</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">"Can't
connect to the Server please inform network administrator."</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">0</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span><span style="font-family: "courier new"; font-size: 10pt;">32</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">"Error"</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Quit<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
2. As xBox uses InteractiveChange event, then do it like this now:<br />
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Local </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">lcName<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;">lcName </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">=</span><span style="font-family: "courier new"; font-size: 10pt;">[%]</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">+</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Alltrim</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">This</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Value</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)+</span><span style="font-family: "courier new"; font-size: 10pt;">[%]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TEXT TO </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOSHOW <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">
Select </span><span style="font-family: "courier new"; font-size: 10pt;">LastName</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">FirstName</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">, </span><span style="font-family: "courier new"; font-size: 10pt;">CustomerID </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">From </span><span style="font-family: "courier new"; font-size: 10pt;">customer </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">WHERE </span><span style="font-family: "courier new"; font-size: 10pt;">LastName </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">like </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">?</span><span style="font-family: "courier new"; font-size: 10pt;">lcName<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ENDTEXT<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">SQLExec</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">pnconnectionhandle</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcstr</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">"junk"</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">If </span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">!</span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Eof</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: red; font-family: "courier new"; font-size: 10.0pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">TEXT TO </span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOSHOW </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Select *</span><span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">From </span><span style="font-family: "courier new"; font-size: 10pt;">junk </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">ORDER By </span><span style="font-family: "courier new"; font-size: 10pt;">1 </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">into Cursor </span><span style="font-family: "courier new"; font-size: 10pt;">junkemp </span><span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">NOFILTER<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> ENDTEXT<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;"> This</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">_searchgrid</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">(</span><span style="font-family: "courier new"; font-size: 10pt;">m</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">.</span><span style="font-family: "courier new"; font-size: 10pt;">lcSQL</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">'junkemp.LastName'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">,</span><span style="font-family: "courier new"; font-size: 10pt;">'junkemp.CustomerID'</span><span style="color: red; font-family: "courier new"; font-size: 10.0pt;">)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "courier new"; font-size: 10.0pt;">Endif<o:p></o:p></span></div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
And that is it!<br />
<br />
The only difference between using VFP table is it does not need that first transfer to junk above. The second transfer to junkemp is necessary for the _SearchGrid method to kick in. I guess there won't be too much difference too on another backend such as MSSQL. Cheers!<br />
<br />
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="blogger-post-footer">Interested subscribers can email me at ss.classes.jun@gmail.com</div>Junhttp://www.blogger.com/profile/14674488643424865407noreply@blogger.com2