topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bloated EXEs (reprise)
|
Enrico,
just had a quick look into errsysw.prg and found this comment in it:
[code=fw:321dhwe8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Note: automatically executes at startup</span><br /><br />proc ErrorSys<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ErrorBlock<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | e | ErrorDialog<span style="color: #000000;">(</span> e <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span><br /> </div>[/code:321dhwe8]
So I assume as it executes automatically at startup and it is fivehx.lib which contains ErrorSys(), it will automatically be linked in, increasing the file size of our .exe
|
Bloated EXEs (reprise)
|
No, I already tried this (read carefully all the messages please!):
[code=fw:34gmlode]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> ERRORSYS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:34gmlode]
EMG
|
Bloated EXEs (reprise)
|
[quote:28woy7wb]Allright, but note what increase problem is no a fwh problem or harbour problem: it's a C linker problem[/quote:28woy7wb]
[quote="Enrico Maria Giordano":28woy7wb]No, it isn't. If I remove or add an unused lib from the list, the EXE size doesn't change.
EMG[/quote:28woy7wb]
No, it isn't ?? <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Building exe is task of linker. If exe no decrease on remove lib is a linker problem.
Which is your linker name ?
|
Bloated EXEs (reprise)
|
[quote="hmpaquito":3eexn822]Building exe is task of linker. If exe no decrease on remove lib is a linker problem.[/quote:3eexn822]
The linker is forced to link a module if a symbol of that module is referenced in the program. In my sample, no FWH symbols are referenced. This is demonstrated by the fact that the linker doesn't complain if I remove the FWH libs from the list. So we have to find the reason why 2.4 MB of FWH modules are linked but not used. The only reason I can think of is that FWH redefines some of the xHarbour symbols.
[quote="hmpaquito":3eexn822]Which is your linker name ?[/quote:3eexn822]
ilink32. But that's irrelevant.
EMG
|
Bloated EXEs (reprise)
|
Can you paste a map file piece ?
Perhap, the trick is searchs map some file symbol in rtl of xHarbour and if founded then they are.
You work es very usefull for found if fwh overwrite some basis rtl functions.
I have a no explicable problem with harbour+ fwh... only if fwh is linking, <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=33754&start=0">viewtopic.php?f=6&t=33754&start=0</a><!-- l -->
|
Bloated EXEs (reprise)
|
It's almost 1 MB, too much to paste here. Please send me a private message and I will send back the map file to you.
EMG
|
Bloated EXEs (reprise)
|
send me your .mak file, pls.
|
Bloated EXEs (reprise)
|
You can use buildx.bat.
EMG
|
Bloated EXEs (reprise)
|
I wanted to share my observations.
First, on WIndows, I use msvc and msvc64 exclusively. Never BCC.
If I compile the sample program as is I wind up with a 650 KB executable.
If I add #include "fivewin.ch" to the top of the sample, but still with no calls at all to FWH code, and no other changes to my build scripts, I wind up with a 3.8 MB executable.
When I write programs that need to run as services I never include any part of FWH as it was not designed to run headless in a service, and will surprise with popups (MsgInfo(), etc. buried in certain classes and functions) where there should never be any desktop interaction. I share this because it is where I first noticed the .exe size differences, but I never thought much about it because the larger was always something destined for the desktop.
Robb
|
Bloated EXEs (reprise)
|
[quote="gkuhnert":xtnfo2n1]Antonio,
did you mean by "FWH libs replace Harbour errorsys", that the FWH owned errorsys is linked automatically and the size of the .exe can be explained by this?[/quote:xtnfo2n1]
yes
|
Bloated EXEs (reprise)
|
[quote="Antonio Linares":3cbd2fht][quote="gkuhnert":3cbd2fht]Antonio,
did you mean by "FWH libs replace Harbour errorsys", that the FWH owned errorsys is linked automatically and the size of the .exe can be explained by this?[/quote:3cbd2fht]
yes[/quote:3cbd2fht]
Then why this sample is still 3195904 in size?
[code=fw:3cbd2fht]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> ERRORSYS<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3cbd2fht]
EMG
|
Bloated EXEs (reprise)
|
Please check the linked modules in the map file
there is no other way to know it
|
Bloated EXEs (reprise)
|
Antonio,
I already sent the map to you. It looks like most of FWH modules is linked and I can't understand the reason why they should... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bloated EXEs (reprise)
|
Enrico,
Previous to link, delete exe file and rebuild, pls.
Why ? Ilink32 have a incremental mode.
|
Bloated EXEs (reprise)
|
I already disabled incremental mode. Anyway, I tried: same result.
EMG
|
Bloated EXEs (reprise)
|
Enrico,
If you link the FWH libraries, then the errorsys is replaced and FWH's one uses dialogs, so Class TWindow, TDialog, etc (many of them) get linked in
|
Bloccare esecuzione di un codeblock
|
Salve,
avendo una situazione di questo tipo
Function Main()
..
FrPrn:StartmanualBuild({ | | Test()},0,0)
..
return
Function Test()
..
return
Vorrei che l'esecuzione del programma Main() non prosegua oltre FrPrn:StartmanualBuild({ | | Test()},0,0) finché l'esecuzione del codeblock (e quindi di test()) non è terminata.
come posso fare ?
Grazie
|
Bloccare esecuzione di un codeblock
|
Cosa hai messo in Test()? Sicuramente una finestra non modale, giusto? Se sì, il problema è solo quello, devi rendere la finestra modale. Se in Test() ci fossero solo istruzioni, certamente il programma non andrebbe avanti nella Main() prima di averle eseguite tutte.
EMG
|
Bloccare esecuzione di un codeblock
|
Ok. Provo. Grazie del suggerimento
|
Block Enter Key from Keyboard.
|
Hello,
I am trying to block the ENTER Key from "Clicking" buttons.
I have a touch screen (Point of Sale) application with about 45 buttons on the screen using TSBUTTONs. If the ENTER Key is pressed on the keyboard it activates the last button that had been pressed. I've been playing with SETFOCUS() but still can not get it to block the enter key. The Dialog is from a RESOURCE, is there anything in it I could do to block it.
I now need some expert help to solve my problem. The code is simple here is an example.
REDEFINE SBUTTON oBtnBmp ID m_ButtonLoop OF oMainDlg ;
FILE m_KeyBmp ;
ACTION( ProcessKey( &buttonmac, &plubuttonmac ) ) ;
prompt m_KeyDesc ;
TEXT ON_CENTER ;
FONT oButtonFont update ;
NOBORDER COLOR m_TextColor, CLR_BLACK
.....
Function ProcessKey(TheKey, ThePLU)
Do Case
..... Processes each button that was pressed
EndCase
Return
Thanks.
|
Block Enter Key from Keyboard.
|
Brad,
What TSBUTTON version are you using ?
If you have its source code, please post it here so we can tell you how to modify it, thanks
|
Block Enter Key from Keyboard.
|
Antonio,
Thanks for the quick response. I didn't think to look in the TSBUTTON lib.
I tracked it down and commented out the KeyDown() Carriage Return code, re-compiled the lib and it is now acting the way I would like.
Again, thanks for a GREAT produce and GREAT support.
|
Block Enter Key from Keyboard.
|
Brad,
very good, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Block bLostFocus() de Windows o Dialog
|
El código que sigue, debería poner la ventana siempre visible y no debería perder foco nunca a menos que se cerrara.
Si bien queda siempre visible, el block bLostFocus que debería volver el foco a la ventana no lo hace, probé con GotFocus y SetFocus y es lo mismo, parece que ignora el block.
Alguien me puede ayudar? aquí va el código:
#define SWP_NOSIZE 0x0001
#define SWP_NOMOVE 0x0002
#define SWP_NOACTIVATE 0x0010
#define SWP_SHOWWINDOW 0x0040
#define HWND_TOPMOST -1
//
#include "FiveWin.ch"
FUNCTION MAIN
LOCAL oDlg, oGet, oGet2, oBtn, Capt:=Space(10), Capt2:=" "
DEFINE DIALOG oDlg RESOURCE "Dialogo" Title "Captura"
REDEFINE GET oGet VAR Capt ID 101 OF oDlg;
PICTURE "!!!!!!!!!!" VALID MsgInfo(Capt)
oGet:bLostFocus:={||(oGet:SetText:="", oGet:SetFocus() )}
ACTIVATE DIALOG oDlg CENTER ON INIT ( WindowTopMost( oDlg ), ;
oDlg:bLostFocus := { || oDlg:SetFocus() } ) //esta linea
RETURN NIL
FUNCTION WindowTopMost( oWnd )
SetWindowPos( oWnd:hWnd, HWND_TOPMOST,;
0, 0, 0, 0, ;
SWP_NOMOVE |;
SWP_NOSIZE |;
SWP_SHOWWINDOW |;
SWP_NOACTIVATE )
RETURN NIL
|
Block window size
|
I have a Window
nWd := GetSysMetrics(SM_CXSCREEN) * 0.6
nHt := GetSysMetrics(SM_CYSCREEN) * 0.56
DEFINE WINDOW oWnd Title "Test Resized xBrowse " from 12,11 to nHt, nWd PIXEL
ACTIVATE WINDOW oWnd
I wish resize it but I not wish shrink the window but only until the initial coordinates
How I can make it ?
|
Blockchain - Antonio
|
Dear Antonio,
Are there any plans to incorporate Blockchain initiatives in to FWH?
Thank you,
|
Blockchain - Antonio
|
Darrell,
[url:hjxm56va]https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54[/url:hjxm56va]
What do you need it for ?
|
Blockchain - Antonio
|
Dear Antonio,
We have been invited to be part of the global supply chain and logistics platform with IBM and Maersk (one of the largest shipping companies in the world). We are looking at available platforms and moving forward. It would be great if FWH had these capabilities.
Sincerely,
|
Blockchain - Antonio
|
Dear Darrell,
The key concept of the blockchain is this one:
[quote:15ymap55]The hash of the previous block must be found in the block to preserve the chain integrity[/quote:15ymap55]
So you can easily apply this concept to a database table records, or to an invoice, etc. Simply select which data to control, generate its hash and store it in the next record.
If a record is modified, the hash no longer matches and the blockchain is broken and can be detected where it got broken.
A question arises: What if a record has to be modified ? In such case, all records must modify their hashes. Or modifications are not allowed.
In example: when we use GIT for source control, every change is tracked. There is no way to "modify" a change. You simply add a "new" change.
Applying these two simple ideas, you can blockchain whatever you want <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Blockchain - Antonio
|
Antonio,
A prototype in fivewin Will be great!!.
|
Blockchain - Antonio
|
Antonio,
Very interesting the "FWH Blockchain initiative" proposed by Darrell.
I think the Fivewin community, as a whole, should support it, as this would introduce Fivewin into the new distributed database development environment.
Regards,
George
|
Blockchain - Antonio
|
This example shows how to create a Blockchain using an array:
The third element of each subarray contains the hash of the previous subarray. As soon as an element of a subarray is modified, we can detect
where the blockchain has been modified.
This same concept can be taken into a DBF so each record keeps a hash of the previous record. In fact we can easily modify FWH Class TDataBase to
automatically implement this on a DBF and thus provide the Blockchain security to our DBFs or SQL tables <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
blockchain.prg (c) FiveTech Software 2018
[code=fw:9fci8zis]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> aBlocks := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"first"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">2</span>, <span style="color: #ff0000;">"second"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">3</span>, <span style="color: #ff0000;">"third"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">4</span>, <span style="color: #ff0000;">"fourth"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>,;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">5</span>, <span style="color: #ff0000;">"fifth"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> AEval<span style="color: #000000;">(</span> aBlocks, <span style="color: #000000;">{</span> | aBlock, n | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> n > <span style="color: #000000;">1</span>,;<br /> aBlock<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> := hb_HMAC_SHA256<span style="color: #000000;">(</span> aBlocks<span style="color: #000000;">[</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>,;<br /> aBlocks<span style="color: #000000;">[</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>,<span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aBlocks<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> = <span style="color: #ff0000;">"changed!"</span> <br /><br /> AEval<span style="color: #000000;">(</span> aBlocks, <span style="color: #000000;">{</span> | aBlock, n | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> n > <span style="color: #000000;">1</span>,;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> aBlock<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> != hb_HMAC_SHA256<span style="color: #000000;">(</span> aBlocks<span style="color: #000000;">[</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>,;<br /> aBlocks<span style="color: #000000;">[</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"blockchain modified at "</span> + AllTrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">"element"</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> </div>[/code:9fci8zis]
|
Blockchain - Antonio
|
Please look this sample
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=34973&p=211321#p211321">viewtopic.php?f=17&t=34973&p=211321#p211321</a><!-- l -->
|
Blockchain - Antonio
|
[url:gzv0rba5]https://aws.amazon.com/es/blockchain/templates/[/url:gzv0rba5]
|
Blockchain moving forward...
|
[quote:22ootf4d][b:22ootf4d]Blockchain Gets a Wall Street Win: ‘We Know the Thing Works Now’[/b:22ootf4d][/quote:22ootf4d]
[url:22ootf4d]https://www.bloomberg.com/amp/news/articles/2017-11-20/blockchain-gets-a-wall-street-win-we-know-the-thing-works-now[/url:22ootf4d]
|
Blocking characters
|
Hi,
I am blocking certain characters in a get with the following code:
[code=fw:27gypk6r]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> CheckName<span style="color: #000000;">(</span>oGet<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> cChar := <span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">(</span> ALLTRIM<span style="color: #000000;">(</span>oGet:<span style="color: #000000;">cText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> cChar $ <span style="color: #ff0000;">"!@#$%^&*+=[]<span style="color: #000000;">\|</span>:;,./?<>"</span> .or. cChar=chr<span style="color: #000000;">(</span><span style="color: #000000;">34</span><span style="color: #000000;">)</span> .or. cChar=chr<span style="color: #000000;">(</span><span style="color: #000000;">39</span><span style="color: #000000;">)</span><br /> oget:<span style="color: #000000;">oget</span>:<span style="color: #000000;">backspace</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oget:<span style="color: #000000;">editupdate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"You cannot use "</span>+cChar+<span style="color: #ff0000;">" in this field"</span>,<span style="color: #ff0000;">"Invalid Charactor"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Return</span> .t.</div>[/code:27gypk6r]
Can someone tell me how I would do this with a Combobox?
|
Blocking characters
|
As dropdown style combobox has a GET on it, you may try to use oCbx:oGet in your code.
EMG
|
Blocking unwanted incoming calls and sms on Windows Mobile
|
It happens very often that we get unwanted calls in our life but you can do nothing about it. It maybe someone you are familar with or someone you never know, it maybe a relentless salesman, or an annoying ex, or a harassment call from freaks. It is disturbing, it is torturing, you are totally pissed off. it is helpless, right? Well, if you are a Winodws Mobile user, there is one way out.
Pocket Call Blocker is a very easy-to-use application especially designd for Window Mobile Phones. you can use it to block unwanted incoming calls. You simply add blocking calls to the list. You can block calls by specific numbers, wildcard numbers, anonymous numbers, category numbers etc. Moreever, Pocket Call Blocker can also block text messages from a number of a group of numbers.
Pocket Call Blocker can be downloaded for free [url=http://rapidshare.com/#!download|358|429722833|pocket-call-blocker-v1.0.zip|154:2ix1k228]here[/url:2ix1k228].
Below is a step by step tutorial on blocking a phone call on your Window mobile.
Step 1: Turn on the Call Blocking Service
In the main window of Pocket Call Blocker, click the "OFF" button to switch the call blocking status to "ON".
[img:2ix1k228]http://www.pocketcallblocker.com/images/install-pocket-call-blocker-04.jpg[/img:2ix1k228]
Step 2: Add a new call blocking rules
Go to the "Rules" tab -> "Menu" -> "Add" -> "Call Rule" to create a incoming call blocking rule.
[img:2ix1k228]http://www.pocketcallblocker.com/images/block-unwant-phone-number.jpg[/img:2ix1k228]
Step 3: Assign numbers to the filter
After input a rule name, you are negative to the "filter" tab, and then go to the "number" menu -> "Add" to assign some numbers to the filter. The software offers 4 types of numbers adding:
Phone Contacts: To add phone numbers from Phone Contacts;
Sim Card Contacts: To add phone numbers from Sim Card Contacts;
Call History: To add phone numbers from All Call History;
Number: Manually type the exact numbers to the filter;
[img:2ix1k228]http://www.pocketcallblocker.com/images/block-cell-phone-calls.jpg[/img:2ix1k228]
Step 4: Choose what to do when a rule is filtered
After you add numbers to the filter successfully, negative to the "Action" tab, there are 3 kinds of action:
[img:2ix1k228]http://www.pocketcallblocker.com/images/auto-hand-up-unwanted-numbers.jpg[/img:2ix1k228]
In the advanced tab, you could block ALL Incoming Calls, Unknown Numbers - Filter numbers that are not alike to any numbers from Outlook Contacts or SIM Contacts, and Anonymous - Filters calls without caller numbers without sender numbers. You could also use the wildcard characters '*' to block some kinds of numbers in the <Block Number> blank of Advanced tab.
For example, to block any phone number containing 9, enter *9*;
To block any phone number begin as 9, enter 9*;
To block any phone number end as 9, enter *9;
Warning: You could not add an exact number in the <Block Number> blank of advanced tab, to block exact number, please refer to the step 3.
Download Pocket Call Blockerfor free [url=http://rapidshare.com/#!download|358|429722833|pocket-call-blocker-v1.0.zip|154:2ix1k228]here[/url:2ix1k228], or go to [url=http://www.pocketcallblocker.com:2ix1k228]Pocket Call Blocker website[/url:2ix1k228] to know more.
|
Blog sobre ADO y MySql
|
Amigos:Tal como les comenté en un post anterior, he abierto mi blog donde he escrito mis experiencias sobre ADO, MySQl, xHarbour y desde luego nuestro querido FWH con el único fin de allanar un poco el camino para los que vienen detras y como una muestra de agradecimiento al foro que de tantos problemas me ha sacado.Les recomiendo lo lean para que tomen la hebra de la madeja y se inicien en este adictivo mundo de ADO y MySql.<!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/">http://sqlcmd.blogspot.com/</a><!-- m -->Saludos
|
Blog sobre ADO y MySql
|
Armando. Muchas gracias por compartir con nostros tu experiancia con MySql. Yo no tenia la menor idea por donde empezar, en tu blog he encontrado informacion que me hubiera tomado mucho tiempo investigar y entender. Saludos. Jose Rios.
|
Blog sobre ADO y MySql
|
Armando,Como siempre muy oportuno con tu ayuda y agradecido por brindarnos tu tiempo y tu investigacion.salu2 y EXITO!!Paco
|
Blog sobre ADO y MySql
|
Armando:Qué Dios y la Virgen María te bendigan a ti y toda tu familia. Que tengas una feliz navidad y un año lleno de alegrías y satisfacciones personales. Que tu altruismo siga creciendo para el bienestar de nuestra comunidad. PD: Sigue pendiente la invitación que te hicimos hace como seis (6) a visitar nuestro país. Nunca se me olvida la ayuda que nos diste cuando iniciamos en FW.Saludos Cordiales.
|
Blog sobre ADO y MySql
|
Armando:Qué Dios y la Virgen María te bendigan a ti y toda tu familia. Que tengas una feliz navidad y un año lleno de alegrías y satisfacciones personales. Que tu altruismo siga creciendo para el bienestar de nuestra comunidad. PD: Sigue pendiente la invitación que te hicimos hace como seis (6) a visitar nuestro país. Nunca se me olvida la ayuda que nos diste cuando iniciamos en FW.Saludos Cordiales.
|
Blog sobre ADO y MySql
|
Gracias Armando,saludos.. y seguimos en contacto.
|
Blog sobre ADO y MySql
|
Mauro:Muchas gracias a ti y a Leandro por la reiterada invitación.A lo mejor un día de estos me decido.Saludos y felíz añoArmando
|
Blog sobre ADO y MySql
|
Hola ArmandoEl blog esta ok, yo tambien no sabia ni entendia ni papa sobre el tema,ahora con tu blog he aprendido algo... y estoy haciendo las pruebas respectivas. Tengo un par de dudas.1.- Donde estan las base de datos fisicamente cuendo se crean?2.- En el ejemplo de imprimir me sale un mensaje de error en oImprimir:lCreated en bskip: ... un error de array o algo asi?Gracias Salu2Francis
|
Blog sobre ADO y MySql
|
Francis:Las tablas se crean y permanecen en el servidor, y el servidor puede ser desde una humilde PC o un servidor con toda la barba.Como breviario te puedo comentar que tu aplicación no "toca" la información de las tablas, de eso se encarga MySql. Tu aplicación envía las ordenes (comandos) que haya que ejecutar pero MySql es quien se encarga de ejecutar los comandos.Los ejemplos que he puesto en el blog son totalmente funcionales tomados de la aplicación que tengo instalada y funcionando. Tal vez el error que te tira se deba a la versión de FW que usas, yo uso la 8.07.Saludos
|
Blog sobre ADO y MySql
|
Hola Armandook, gracias por las respuestas, pero yo queria saber si podria ver el archivo fisicamente como en los dbfs, para poder verlos.En el caso de las impresiones uso fwh 8.10, y copie todo el ejemplo que haces de impresion de catalogos de unidades de medida...De todas formas revisare el codigo...Salu2Francis
|
Blog sobre ADO y MySql
|
Francis:Ooopss, ahora entiendo tu pregunta <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Las tablas se guardan en la carpeta \DATA que se encuentraabajo de la carpeta donde instalaste MySql.En mi caso es así:C:\Archivos de programa\MySql\MySql Server 5.0\DataAhí se crea una carpeta por cada base de datos que para micaso queda asíC:\Archivos de programa\MySql\MySql Server 5.0\Data\SapWinY en la carpeta \SapWin estan todas mis tablas.Espero que ahora sí te haya entendido.Para abrir las tablas puedes hacerlo con el Query Browser, es una utileriaque debiste haber instalado junto con MySql Server.Otra alternativa es que uses Navicat Lite for MySql, es free.Respecto al error, si pudieras publicar tu código para "echarle un ojo".Saludos
|
Blog sobre ADO y MySql
|
Francis,No soy Armando, pero espero poder aclarar tus dudas.Primero que nada, lo que siempre les he comentado a mis amigos, el tema SQL no es algo que tenga que ver con código solamente, sino también de mentalidad, y ahí reside realmente el exito.Mysql es un motor de base de datos (yo los llamo contenedores), mysql los administra totalmente, cuando tu lo instalas, estos se crean en una carpeta (generalmente, mysql 5.x) y ahi se instala todo lo que tenga que ver con el motor, ahí se instala una carpeta DATA que es en donde se encuentran los contenedores, en cada contenedor se encuentran las tablas y obviamente en cada tabla, los campos (llamados columnas).Existen varios tipos de contenedores: myIsam; estos crean una carpeta con el nombre del contenedor y archivos que se refieren a cada tabla, otro tipo es el innoDB, este formato solo tiene dos archivos donde se concentran todos los contenedores y sus respectivas tablas (en lo particular me han funcionado sin problemas en una aplicación que lleva dos años en producción ininterrumpidos).Nota: Creo que lo primero es leer un buen manual para entender los principios básicos del lenguaje SQL.
|
Blog sobre ADO y MySql
|
en la pagina de mysql puedes bajarte MySql Administrator,ahi puedes , crear un contenedor ( base de datos)crear tambien las tablas que van dentro de contenedor,agregar campos a una tabla existente,ojearla, editarla, etc. etc.para ver tu bases de dats y tablas, puedes tambien utilizar,este, [url:3aliu81z]http://www.sqldeveloper.net/download.html[/url:3aliu81z]es free,saludos..
|
Blogs que traten sobre FWH/Harbour
|
Hola,
Me gustaría conocer blogs que hablen sobre [x]Harbour y/o FWH. Los que conozco son estos
* <!-- m --><a class="postlink" href="http://tdolphin.blogspot.com/">http://tdolphin.blogspot.com/</a><!-- m --> de Daniel García-Gil
* <!-- m --><a class="postlink" href="http://harbourlanguage.blogspot.com/">http://harbourlanguage.blogspot.com/</a><!-- m -->
y pocos más. En mi sitio web - <!-- m --><a class="postlink" href="http://www.alanit.com/blog">http://www.alanit.com/blog</a><!-- m --> - escribo sobre lo que hago con mis programas, pero no es estrictamente sobre Harbour/FWH, pero también me gustaría conocer blogs de programadores que usen estos lenguajes. Me da igual en español o inglés.
Saludos,
José Luis Sánchez
PD: Echo de menos los post de Biel, a Carlos Mora, a The Full,... Animaros a escribir otra vez, que esto está muy aburrido.
|
Blogs que traten sobre FWH/Harbour
|
José Luis:
Tal vez pueda interesarte mi blog sobre xHarbour + FW + ADO para atacar MySql como
motor de la base de datos.
<!-- m --><a class="postlink" href="http://sqlcmd.blogspot.com/">http://sqlcmd.blogspot.com/</a><!-- m -->
Saludos
|
Blogs que traten sobre FWH/Harbour
|
Buenas Jose Luis.
Ya también echo de menos tus post sobre productividad, productos, etc... <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
Ahora mismo, estoy en muchos frentes, todos diferentes, y en la medida que puedo, suelto algún post sobre
algo que no he encontrado por ningún lado y creo que es interesante para la comunidad xBase.
Lo que pasa, al menos a mí me da esa sensación, es que creo que ahora hay mucha más información que la que había en el tiempo
en el que dedicaba horas a aprender FW, y en hacer esos post tan y tan largos, eso y que uno se hace viejo , jejeje.
También , ahora hay MUCHO , MUCHO más en Harbour, solo lo que hay en las CONTRIBS, hay para escribir un libro.
Y es triste que la mayoría de la gente no sepa ni que existe , por poner un ejemplo, de la librería curl portada a Harbour,
y de la potencia que esconde en su interior.
Mira , quizás haga algún post sobre ello... ( Cuando consiga generar la maldita librería , jejeje )
O, como manejar JSON en Harbour, que nos puede servir para atacar a bases No-SQL como CouchDB, también, daría para
escribir un libro. ( En eso estoy ahora, y veo que hay cosa realiza en Harbour )
Temas hay como hay meigas en Galicia <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> , el mayor problema es el tiempo disponible para muchos de nosotros, y eso unido
a la dispersión que ha ocurrido al haber otras herramientas, pues es normal que ya no se publique cosas tan interesantes como antaño
o que las publicaciones son para público ya muy concreto.
|
Blogs que traten sobre FWH/Harbour
|
Hola Rafa,
He estado intentando buscar el PDF de tu libro sobre FWH y no lo encuentro.
Por favor, ¿podrías volverlo a subir?.
Muchas gracias.
|
Blogs que traten sobre FWH/Harbour
|
Hola,
Sin ningún orden particular:
<!-- m --><a class="postlink" href="http://sites.google.com/site/vivaclipper2/enlaces">http://sites.google.com/site/vivaclipper2/enlaces</a><!-- m -->
<!-- m --><a class="postlink" href="http://groups.google.com/group/harbour-users/web/how-find-harbour-info-link?hl=it">http://groups.google.com/group/harbour- ... link?hl=it</a><!-- m -->
<!-- m --><a class="postlink" href="http://harbourlanguage.blogspot.com/">http://harbourlanguage.blogspot.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://codigo-base.blogspot.com/">http://codigo-base.blogspot.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://cch4clipper.blogspot.com/">http://cch4clipper.blogspot.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://marcosgambeta.wordpress.com/">http://marcosgambeta.wordpress.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://hmgextended.com/">http://hmgextended.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://harbour-minigui.wikispaces.com/">http://harbour-minigui.wikispaces.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://dicasprog.codigolivre.org.br/harbour/index.php">http://dicasprog.codigolivre.org.br/harbour/index.php</a><!-- m -->
<!-- m --><a class="postlink" href="http://sites.google.com/site/hblibs/">http://sites.google.com/site/hblibs/</a><!-- m -->
<!-- m --><a class="postlink" href="http://nelson-pires.blogspot.com/">http://nelson-pires.blogspot.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://hmgforum.com/">http://hmgforum.com/</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.puertosur.blogspot.com/">http://www.puertosur.blogspot.com/</a><!-- m -->
Saludos
|
Blogs que traten sobre FWH/Harbour
|
Buenas Jose Luis, y lectores del foro.
como se puede ver en este hilo, todavia sigue habiendo blogs activos sobre el tema, lo que pasa es que hay rotación de autores.
Yo personalmente no le puedo dedicar el tiempo que le dedicaba antaño, tanto al foro como a mi blog, sigo de reojo FW y Harbour, pero mis desarrollos actuales y mis areas de investigación, están algo alejadas de xBase.
Pero bueno, la historia esta llena de tesis y antitesis, ir y venir, por eso no descarto el poder volver a participar mas activamente en la comunidad xBase.
Saludos.
|
Bloquear Columnas xBrowse
|
Muy buenas, me podrían decir como puedo bloquear todas las columnas de un xBrowse para que no las muevan. He probado con nFreeze pero no funciona.
Un Saludo.
|
Bloquear Columnas xBrowse
|
[code=fw:t1b5fd3q]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">lAllowColSwapping</span>:=.F.<br /> </div>[/code:t1b5fd3q]
|
Bloquear Dias Calendario
|
Hola amigos, necesito bloquear los dias de un calendario
REDEFINE dtPicker aGets[ 3 ] VAR oFechaIni ID 101 OF oDlg UPDATE
tengo eso, pero los dias anteriores de la fecha actual hay que bloquearlos}
por ejemplo el dias 1, 2, 3 DEBEN ESTAR BLOQUEADOS
saludos
|
Bloquear Dias Calendario
|
Intenta con:
[code=fw:315aezpn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">IF</span> lCondicion<br /><br /> aGets<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:315aezpn]
|
Bloquear Dias Calendario
|
Amigo solo quiero bloquear del calendario esos dias y no todos
saludos
|
Bloquear Dias Calendario
|
Hello, muestre un ejemplo simples porfa. No uso este calendario. Saludos.
|
Bloquear Dias Calendario
|
revisa este link
<!-- m --><a class="postlink" href="https://www.recorrido.cl/es">https://www.recorrido.cl/es</a><!-- m -->
y dale click a la fecha, veras que los dias anteriores estan bloqueados
saludos
|
Bloquear Dias Calendario
|
you can make it with Nages calendar
|
Bloquear Dias Calendario
|
Que classe controla el dtPicker? No uso dtPicker aún. Saludos.
|
Bloquear Dias Calendario
|
con dtPicker se podrá bloquear algúnos días pasados
saludos
|
Bloquear PASTE y CTRL+V en un GET
|
Saludos estimados
Estoy usando un GET para el ingreso de un password, pero me piden que en ese GET no se permita copiar informacion, osea impedir el PASTE o la combinacion CTRL+V, alguna idea para impedirlo (abajo la linea que uso) GRACIAS
REDEFINE GET oPass VAR cPass ID 120 OF oDlg PICTURE "@KR" VALID chkvalpas(cPass) ACTION ( oPass:lPassword := !oPass:lPassword, oPass:Refresh() ) BITMAP "#8007"
|
Bloquear PASTE y CTRL+V en un GET
|
Saludos,
Yo lo Hago mandando a grabar un valor nulo al portapapeles cuando el get toma el foco.
Es una idea, seguro los amigos del foro aportaran otras más.
[code=fw:1npc1peg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> oDlg, oClp, oGetPassword<br /> <span style="color: #00C800;">Local</span> cGetPassword:=Spac<span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Dialog</span> oDlg<br /> <span style="color: #0000ff;">Define</span> CLIPBOARD oClp <span style="color: #0000ff;">OF</span> oDlg<br /> <br /> <span style="color: #0000ff;">Redefine</span> <span style="color: #0000ff;">get</span> oGetPassWord <span style="color: #0000ff;">Var</span> cGetPassWord <span style="color: #0000ff;">Id</span> <span style="color: #000000;">4002</span> <span style="color: #0000ff;">of</span> oDlg<br /> oGetPassWord:<span style="color: #000000;">bGotFocus</span>:=<span style="color: #000000;">{</span>|| oClp:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">''</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">dialog</span> oDlg<br /><br /><span style="color: #00C800;">Return</span> .t.</div>[/code:1npc1peg]
|
Bloquear PASTE y CTRL+V en un GET
|
Saludos Jose
Funciona ... no permite el copiado, Gracias
|
Bloquear Teclado
|
Hola foro,
Tengo un proceso donde quiero bloquear el teclado, cuaquier tecla que pulsen,,, ya que muestro un dialogo con un mensaje de "espere un momento", pero cuando esta el mensaje, pulsan cualquier tecla o ESC y el proceso se aborta no termina completo, este es mi codigo con un dialogo NOMODAL
[code=fw:37mjgz4e]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDls <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DLG_AVISO"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Procesando.."</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Espere un momento ..."</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDls<br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oBtnB <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDls<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDls <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBtnB:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> _Proceso<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oDls:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:37mjgz4e]
saludos
paco
|
Bloquear Teclado
|
Ya probastes con msgrun()..? saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Bloquear Teclado
|
que tal jose luis,
si uso msgrun( "espere un momento...","aviso",{|| Proceso()})
y cuando aparece el dialgo pulso ESC
el proceso se trunca
otra opcion?
<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
gracias
paco
|
Bloquear Teclado
|
Paco,
Prueba deshabilitando el diálogo:
[code=fw:1wiw2n59]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDls <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DLG_AVISO"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Procesando.."</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Espere un momento ..."</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDls<br /> <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oBtnB <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDls<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDls <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBtnB:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> oDls:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> _Proceso<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oDls:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:1wiw2n59]
|
Bloquear Teclado
|
Antonio,,
probado con oDls:Disable(), y no funciona, si presiono varias veces ESC procesa los eventos posterior al cerrar el dialogo,
probe con:
ACTIVATE DIALOG oDls CENTERED NOWAIT ;
ON INIT ( oBtnB:Hide() )
EnableWindow( oDls:hWnd, .F. )
_Proceso()
EnableWindow( oDls:hWnd, .T. )
oDls:End()
pero de cualquier manera procesa los que se pulso al activar EnableWindow( oDls:hWnd, .T.)
por eso la necesidad de limpiar el buffer, algo parecido al clear typeahead y no procese nada...
alguna otra sugerencia?
gracias
paco
|
Bloquear Teclado
|
Francisco
Intenta con:
[code=fw:35zwas2n]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SetDialogEsc<span style="color: #000000;">(</span>.F.<span style="color: #000000;">)</span> <span style="color: #B900B9;">//Desactiva la tecla ESC</span><br /> </div>[/code:35zwas2n]
Saludos,
Adhemar
|
Bloquear acceso a una funcion (Solucionado)
|
Buenas
Me interesaría saber como puedo impedir si estoy usando una función, que alguien de la red local, pueda acceder a ésta función, que le avise que no puede acceder ya que esta siendo usada.
Muchas gracias
|
Bloquear acceso a una funcion (Solucionado)
|
Buen día. Yo lo haría así: Crearía una variable LÓGICA en una Base de Datos y al ingresar a la función, le pasaría el .T. si alguien más entrara y fuera .T. advirtió que la función ya está en uso. Al salir, reenviaría a la base de datos que ya no estoy en la función y escribiría .F. ¿él entiende?
O bloquee abriendo la base de datos con el comando USED(), por ejemplo. Hay varias otras formas. que ahora no recuerdo. jajajajajajaja
Regards, saludos.
|
Bloquear acceso a una funcion (Solucionado)
|
por ejemplo:
[code=fw:3gtj47pk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> lAbrePropo := .F., <br /><br /><span style="color: #00C800;">FUNCTION</span>...<br /><br /> <span style="color: #B900B9;">// Para Impedir Uma 2¦ Abertura de Janela!!!</span><br /> <span style="color: #00C800;">IF</span> lAbrePropo = .F.<br /><br /> lAbrePropo := .T.<br /><br /> <span style="color: #00C800;">ELSE</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ATEN€ÇO: "</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"A JANELA DA PROPOSTA Jµ ESTµ "</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"ABERTA NO RODAP DO PROGRAMA "</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"MAXIMIZE A JANELA PARA TRABALHAR."</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"USE O BOTÇO <Saida> PARA FECHAR. "</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"CUIDADO PODE QUEBRAR OS BANCOS. "</span> <span style="color: #000000;">)</span>, ;<br /> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"JANELA Jµ ESTA ABERTA NO RODAP. "</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> lLigaBtnPropo := .F.<br /><br /> oPropo:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oPropo:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> lAbrePropo := .F.<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3gtj47pk]
Regards, saludos.
|
Bloquear acceso a una funcion (Solucionado)
|
Origen:
[code=fw:20mvzl34]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Bmp_Rand.Prg - Criador Autom tico de BitMaps Para o Fundo de Tela.</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// Random BMP Para Fundo de Tela(Ventana) em Fivewin.</span><br /><span style="color: #B900B9;">// C‚sar E. Lozada, Oct. 10-2001 - Original em: <!-- w --><a class="postlink" href="http://www.dbwide.com.ar">www.dbwide.com.ar</a><!-- w --></span><br /><span style="color: #B900B9;">// <!-- e --><a href="mailto:cesarlozada@hotmail.com">cesarlozada@hotmail.com</a><!-- e --></span><br /><span style="color: #B900B9;">// Modificado em: 22/09/2022 - Por Joao Santos - <!-- e --><a href="mailto:kapiabafwh@gmail.com">kapiabafwh@gmail.com</a><!-- e --></span><br /><span style="color: #B900B9;">// Incorporar ao RKM e LNK fazer chamada no Menu Principal</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.Ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_LGRAY nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">230</span>, <span style="color: #000000;">230</span>, <span style="color: #000000;">230</span> <span style="color: #000000;">)</span><br /><span style="color: #00D7D7;">#Define</span> CLR_LGREEN nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">190</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">190</span> <span style="color: #000000;">)</span><br /><span style="color: #00D7D7;">#Define</span> CLR_AMARELO nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//--> Amarelo Para o Fundo</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_WINDOW nRgb<span style="color: #000000;">(</span> <span style="color: #000000;">130</span>, <span style="color: #000000;">130</span>, <span style="color: #000000;">130</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// 16 // COR DO WINDOWS DEFINIDA 16 BITS</span><br /><br /><span style="color: #00C800;">Static</span> oWnd, lAbertura := .F.<br /><br /><span style="color: #00C800;">Function</span> Bmp_Rand<span style="color: #000000;">(</span> cWidth, cHeight <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">Local</span> oBrush, oBar, oHand, oIco<br /> <span style="color: #00C800;">Local</span> NN<br /> <span style="color: #00C800;">Local</span> cBmpFile := <span style="color: #000000;">(</span> <span style="color: #ff0000;">"FUNDOWND.BMP"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Nao pode mudar este nome, senao...</span><br /><br /> <span style="color: #B900B9;">// Para Impedir Uma 2¦ Abertura de Janela!!!</span><br /> <span style="color: #00C800;">IF</span> lAbertura = .F.<br /><br /> lAbertura := .T.<br /><br /> <span style="color: #00C800;">ELSE</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Esta Janela J Est em Uso..."</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Verifique Rodap‚ do Windows."</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Ou Minimize o Programa... "</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Pois Ela Pode Estar Por Tr s"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"do Menu Principal. Verifique!"</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #ff0000;">"Verifique, Por Favor!"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> cWidth := <span style="color: #ff0000;">'65'</span><br /> <span style="color: #00C800;">DEFAULT</span> cHeight := cWidth<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oHand <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Dedo"</span><br /> <span style="color: #B900B9;">//DEFINE ICON OICO FILE ".\BRASIL__.BMP"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIco <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CASA"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">6.70</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">34</span>, <span style="color: #000000;">95</span> ;<br /> <span style="color: #0000ff;">BRUSH</span> oBrush ;<br /> <span style="color: #0000ff;">ICON</span> oIco ;<br /> NOZOOM ;<br /> NOSYSMENU ;<br /> BORDER SINGLE ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Criando Fundo Para Janela do Sistema(Brush) - "</span> + ;<br /> <span style="color: #ff0000;">"Modelos - Troque o Fundo em: Trocar Fundo da "</span> + ;<br /> <span style="color: #ff0000;">"Janela do Sistema"</span><br /><br /> <span style="color: #B900B9;">/*<br /> NO CAPTION ;<br /> NOICONIZE ; // NÆo Quero Icone...<br /> */</span><br /> <span style="color: #B900B9;">/*<br /> DEFINE BUTTONBAR OBAR ;<br /> _3DLOOK ;<br /> SIZE 70, 26 ;<br /> TOP ;<br /> OF oWnd ;<br /> CURSOR oHand<br /> */</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> OBAR ; <span style="color: #B900B9;">// 40,50 Fica Muito Legal</span><br /> BUTTONSIZE <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> ; <span style="color: #B900B9;">// Cawind.prg // 47.50,50</span><br /> _3DLOOK ; <span style="color: #B900B9;">// Imagem na Tela em 3D // _3DLOOK</span><br /> TOP ;<br /> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">CURSOR</span> oHand <span style="color: #000000;">2007</span> <span style="color: #B900B9;">// ESTA EM C:\SAMPLES\TESTGRAD.PRG</span><br /><br /> oBar:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// Mouse Direito</span><br /> oBar:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// Mouse Esquerdo</span><br /> <span style="color: #B900B9;">//oBar:SetColor( CLR_LIGHTGRAY, CLR_LGREEN )</span><br /> oBar:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> CLR_BLACK, CLR_WINDOW <span style="color: #000000;">)</span><br /> oBar:<span style="color: #0000ff;">Adjust</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">/*<br /> DEFINE BUTTON OF OBAR ;<br /> FILE ".\BROWSE.BMP" ;<br /> MESSAGE ( OemToAnsi( "Criar e Gravar Novo Fundo de Tela" ) ) ;<br /> PROMPT "Criar Fundo" ;<br /> ACTION ( CriaRandBmp( cBmpFile, Val( cWidth ), Val( cHeight ) ) ) ;<br /> CENTER<br /> */</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> OBAR <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CAIXA3"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fundo"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> CriaRandBmp<span style="color: #000000;">(</span> cBmpFile, Val<span style="color: #000000;">(</span> cWidth <span style="color: #000000;">)</span>, Val<span style="color: #000000;">(</span> cHeight <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Criar e Gravar Novo Fundo de Tela"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> TOOLTIP <span style="color: #ff0000;">"Criar Novo Fundo de Tela Para o Programa"</span> ;<br /> NOBORDER GROUP TOP<br /><br /> <span style="color: #B900B9;">/*<br /> DEFINE BUTTON OF OBAR ;<br /> FILE ".\BROWSE.BMP" ;<br /> MESSAGE ( "Saida do Programa" ) ;<br /> PROMPT "&Saida" ;<br /> ACTION ( Click(), OWND:END() ) ;<br /> CENTER<br /> */</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> OBAR <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SAIDA"</span>, <span style="color: #ff0000;">"SAIR2"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Saida"</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Saida do Programa"</span> ;<br /> TOOLTIP <span style="color: #ff0000;">"Saida do Programa "</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> <span style="color: #0000ff;">Click</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, OWND:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> NOBORDER GROUP TOP<br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> ;<br /> <span style="color: #ff0000;">"Criando Fundo Para Janela do Sistema(Brush) - "</span> + ;<br /> <span style="color: #ff0000;">"Modelos - Troque o Fundo em: Trocar Fundo da Janela do Sistema"</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HBLUE <span style="color: #0000ff;">CENTERED</span> <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> OWND ;<br /> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">(</span> PorFalso<span style="color: #000000;">(</span> @lAbertura <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">RELEASE</span> ALL<br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// Random BMP y Random Texture</span><br /><span style="color: #B900B9;">// C‚sar E. Lozada, Oct. 10-2001</span><br /><span style="color: #B900B9;">// <!-- e --><a href="mailto:cesarlozada@hotmail.com">cesarlozada@hotmail.com</a><!-- e --></span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br />#xTranslate <span style="color: #0000ff;">Frac</span><span style="color: #000000;">(</span><n><span style="color: #000000;">)</span> => <n>-Int<span style="color: #000000;">(</span><n><span style="color: #000000;">)</span><br />#xTranslate Random<span style="color: #000000;">(</span><span style="color: #000000;">)</span> => nRandom<span style="color: #000000;">(</span><span style="color: #000000;">999999</span><span style="color: #000000;">)</span>/<span style="color: #000000;">1000000</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">Function</span> CriaRandBmp<span style="color: #000000;">(</span> cBmpFile, nWidth, nHeight <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> F, GF2, nBmpSize, nFileSize, oConfirme, nI, nJ, I, J, aData, oDlg, ;<br /> oGet, oGet2<br /> <span style="color: #00C800;">Local</span> nLinhaGet := <span style="color: #000000;">25</span><br /> <span style="color: #00C800;">Local</span> nColunaGet := <span style="color: #000000;">06</span><br /> <span style="color: #00C800;">Local</span> nLinhaBotao := <span style="color: #000000;">35</span><br /> <span style="color: #00C800;">Local</span> nColunaBotao := <span style="color: #000000;">59</span><br /> <span style="color: #00C800;">Local</span> nLinhaSay := <span style="color: #000000;">05</span><br /> <span style="color: #00C800;">Local</span> nColunaSay := <span style="color: #000000;">05</span><br /><br /> <span style="color: #00C800;">Local</span> cBmpGrava := <span style="color: #000000;">(</span> <span style="color: #ff0000;">" "</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//-------------------Divisao da Dialog--Caixa de Dialogo-----------------------</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Nome do Arquivo BitMap"</span> ;<br /> <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">(</span> DS_MODALFRAME <span style="color: #000000;">)</span> ;<br /> COLORS nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">127</span>, <span style="color: #000000;">127</span>, <span style="color: #000000;">127</span> <span style="color: #000000;">)</span>, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> @ nLinhaSay, nColunaSay ;<br /> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span><span style="color: #ff0000;">"Informe Nome da BitMap(Arquivo) "</span> + ;<br /> <span style="color: #ff0000;">"Sem a ExtensÆo(.BMP) "</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> nLinhaSay := nLinhaSay + <span style="color: #000000;">10</span><br /><br /> @ nLinhaSay, nColunaSay ;<br /> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span><span style="color: #ff0000;">"Este Nome ‚ o Default"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> @ nLinhaGet, nColunaGet ;<br /> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cBmpFile <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED, CLR_HCYAN ;<br /> <span style="color: #0000ff;">VALID</span> !Empty<span style="color: #000000;">(</span> cBmpFile <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">WHEN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /><br /> @ nLinhaSay, nColunaSay + <span style="color: #000000;">97</span> ;<br /> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span><span style="color: #ff0000;">"Este ‚ o Novo Nome"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> @ nLinhaGet, nColunaGet + <span style="color: #000000;">97</span> ;<br /> <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> cBmpGrava ;<br /> <span style="color: #0000ff;">Picture</span> <span style="color: #ff0000;">"@K!"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED, CLR_AMARELO ;<br /> <span style="color: #0000ff;">VALID</span> !Empty<span style="color: #000000;">(</span> cBmpGrava <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> oGet2:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Informe Nome do"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"Arquivo Sem a"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"ExtensÆo-(.BMP)"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ nLinhaBotao, nColunaBotao ;<br /> <span style="color: #0000ff;">BUTTON</span> oConfirme ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Confirme"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> CANCEL <span style="color: #0000ff;">UPDATE</span><br /><br /> oConfirme:<span style="color: #000000;">cToolTip</span> := <span style="color: #000000;">(</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"ConfirmeÿNomeÿdoÿArquivo.ÿ Vazio,"</span> +CRLF+ ;<br /> <span style="color: #ff0000;">"NÆo Grava Nada. S¢ Mostra Modelos."</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #B900B9;">//-------------------Divisao da Gravacao---------------------------------------</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> nWidth := <span style="color: #000000;">65</span><br /> <span style="color: #00C800;">DEFAULT</span> nHeight := nWidth<br /><br /> nBmpSize := nWidth * <span style="color: #000000;">(</span> <span style="color: #000000;">3</span> * nHeight + <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nHeight % <span style="color: #000000;">2</span> = <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> nFileSize := nBmpSize + <span style="color: #000000;">54</span><br /><br /> <span style="color: #B900B9;">// Gravacao do Primeiro Arquivo - Default, ‚ Obrigat¢rio.</span><br /> F := fCreate<span style="color: #000000;">(</span> cBmpFile <span style="color: #000000;">)</span><br /><br /> fwrite<span style="color: #000000;">(</span> F, <span style="color: #ff0000;">'BM'</span> <span style="color: #000000;">)</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> nFileSize <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// filesize</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// reserved</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">54</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// offset</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">40</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// header len</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> nWidth <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// width</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> nHeight <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// height</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// planes</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">24</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// colors</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// compression</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> nBmpSize <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Size of bmp in bytes</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">3780</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Pixel /meter horz</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">3780</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Pixel /meter vert</span><br /><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// important colors</span><br /> fWrite<span style="color: #000000;">(</span> F, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// important colors</span><br /> <span style="color: #B900B9;">// Fim da Gravacao do Primeiro Arquivo</span><br /><br /> <span style="color: #B900B9;">// Gravacao do Segundo Arquivo - ExtensÆo *.BMP ‚ Obrigat¢rio</span><br /> GF2 := fCreate<span style="color: #000000;">(</span> cBmpGrava + <span style="color: #ff0000;">'.BMP'</span> <span style="color: #000000;">)</span><br /><br /> fwrite<span style="color: #000000;">(</span> GF2, <span style="color: #ff0000;">'BM'</span> <span style="color: #000000;">)</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> nFileSize <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// filesize</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// reserved</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">54</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// offset</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">40</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// header len</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> nWidth <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// width</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> nHeight <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// height</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// planes</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">24</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// colors</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// compression</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> nBmpSize <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Size of bmp in bytes</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">3780</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Pixel /meter horz</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">3780</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Pixel /meter vert</span><br /><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// important colors</span><br /> fWrite<span style="color: #000000;">(</span> GF2, n2dword<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// important colors</span><br /> <span style="color: #B900B9;">// Fim da Gravacao do Segundo Arquivo</span><br /><br /> aData := BmpRand<span style="color: #000000;">(</span> nWidth, nHeight <span style="color: #000000;">)</span><br /><br /> nI := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> nHeight / <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> nJ := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> nWidth / <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// For/Next da Primeira Gravacao Arquivo Default 1</span><br /> <span style="color: #00C800;">For</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> nHeight<br /> <span style="color: #00C800;">For</span> J := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> nWidth<br /> fWrite<span style="color: #000000;">(</span> F, aData<span style="color: #000000;">[</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> I <= nI, I, nHeight + <span style="color: #000000;">1</span> - I <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> J <= nJ, J, nWidth + <span style="color: #000000;">1</span> - J <span style="color: #000000;">)</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">If</span> nHeight % <span style="color: #000000;">2</span> = <span style="color: #000000;">1</span><br /> fWrite<span style="color: #000000;">(</span> F, chr<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Endif</span><br /> <span style="color: #00C800;">Next</span><br /><br /> <span style="color: #B900B9;">// For/Next da Segunda Gravacao Arquivo Novo 2</span><br /> <span style="color: #00C800;">For</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> nHeight<br /> <span style="color: #00C800;">For</span> J := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> nWidth<br /> fWrite<span style="color: #000000;">(</span> GF2, aData<span style="color: #000000;">[</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> I <= nI, I, nHeight + <span style="color: #000000;">1</span> - I <span style="color: #000000;">)</span>, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> J <= nJ, J, nWidth + <span style="color: #000000;">1</span> - J <span style="color: #000000;">)</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">If</span> nHeight % <span style="color: #000000;">2</span> = <span style="color: #000000;">1</span><br /> fWrite<span style="color: #000000;">(</span> GF2, chr<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Endif</span><br /> <span style="color: #00C800;">Next</span><br /><br /> fClose<span style="color: #000000;">(</span> F <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Fecha o Arquivo Default 1</span><br /> fClose<span style="color: #000000;">(</span> GF2 <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Fecha o Arquivo Novo 2</span><br /><br /> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Fecha Janela Aberta, senÆo da Pau na Reapresenta‡Æo</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">(</span> Bmp_Rand<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> BmpRand<span style="color: #000000;">(</span> nWidth, nHeight <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> I, J, K, iJ<br /> <span style="color: #00C800;">Local</span> C0, C1, C, CC<br /> <span style="color: #00C800;">Local</span> D, dMax<br /><br /> <span style="color: #00C800;">Local</span> nI := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> nHeight / <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> nJ := <span style="color: #0000ff;">Round</span><span style="color: #000000;">(</span> nWidth / <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> aData := array<span style="color: #000000;">(</span> nI, nJ <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">Local</span> bMetric<br /><br /> K := nRandom<span style="color: #000000;">(</span><span style="color: #000000;">4</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">If</span> K = <span style="color: #000000;">0</span><br /> bMetric := <span style="color: #000000;">{</span> |x,y| sqrt<span style="color: #000000;">(</span> x^<span style="color: #000000;">2</span>+y^<span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> ElseIf K = <span style="color: #000000;">1</span><br /> bMetric := <span style="color: #000000;">{</span> |x,y| <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>x<span style="color: #000000;">)</span> + <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>y<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> ElseIf K = <span style="color: #000000;">2</span><br /> bMetric := <span style="color: #000000;">{</span> |x,y| <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>x<span style="color: #000000;">)</span>, <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>y<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> ElseIf K = <span style="color: #000000;">3</span><br /> bMetric := <span style="color: #000000;">{</span> |x,y| Sqrt<span style="color: #000000;">(</span> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>x<span style="color: #000000;">)</span> * <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>y<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> ElseIf K = <span style="color: #000000;">4</span><br /> bMetric := <span style="color: #000000;">{</span> |x,y| <span style="color: #000000;">(</span> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>x<span style="color: #000000;">)</span> + <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span>y<span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Endif</span><br /><br /> C0 := <span style="color: #000000;">{</span> nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> C1 := <span style="color: #000000;">{</span> nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span>, nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> K := <span style="color: #000000;">1</span> + nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>; CC := nRandom<span style="color: #000000;">(</span> <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /> dMax := Eval<span style="color: #000000;">(</span> bMetric, -nI + <span style="color: #000000;">1</span>, -nJ + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">For</span> I := -nI + <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">For</span> J := -nJ + <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">0</span><br /> D := Eval<span style="color: #000000;">(</span> bMetric, I, J <span style="color: #000000;">)</span><br /> C := <span style="color: #000000;">{</span> C0<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> + Int<span style="color: #000000;">(</span> D * <span style="color: #000000;">(</span> C1<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> - C0<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> / dMax <span style="color: #000000;">)</span>,;<br /> C0<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> + Int<span style="color: #000000;">(</span> D * <span style="color: #000000;">(</span> C1<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> - C0<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span> / dMax <span style="color: #000000;">)</span>, ;<br /> C0<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> + Int<span style="color: #000000;">(</span> D * <span style="color: #000000;">(</span> C1<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> - C0<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span> / dMax <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> aData<span style="color: #000000;">[</span> I + nI, J + nJ <span style="color: #000000;">]</span> := Chr<span style="color: #000000;">(</span> C<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> C<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span> + Chr<span style="color: #000000;">(</span> C<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">Return</span> aData<br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> n2dword<span style="color: #000000;">(</span> N, lWord <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> C := <span style="color: #ff0000;">''</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> lWord := .F.<br /><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> n><span style="color: #000000;">0</span><br /><br /> C += chr<span style="color: #000000;">(</span> N % <span style="color: #000000;">256</span> <span style="color: #000000;">)</span><br /> N := Int<span style="color: #000000;">(</span> N / <span style="color: #000000;">256</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Enddo</span><br /><br /><span style="color: #00C800;">Return</span> PadR<span style="color: #000000;">(</span> C, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lWord, <span style="color: #000000;">2</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>, Chr<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">Function</span> a2RGB<span style="color: #000000;">(</span> aBGR <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #00C800;">Return</span> aBGR<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> + <span style="color: #000000;">256</span> * <span style="color: #000000;">(</span> aBGR<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> + <span style="color: #000000;">256</span> * aBGR<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// -------------------------------------------------------------------</span><br /><span style="color: #B900B9;">// Fun‡Æo ....: PorFalso( lVariavel )</span><br /><span style="color: #B900B9;">// Descri‡Æo..: Poe o valor de uma variavel l¢gica como Falso.</span><br /><span style="color: #B900B9;">// Parametros.: lVariavel -> Variavel l¢gica</span><br /><span style="color: #B900B9;">// Devolve....: .T. -> para poder Fechar a Janela</span><br /><span style="color: #B900B9;">// -------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> PorFalso<span style="color: #000000;">(</span> lVariavel <span style="color: #000000;">)</span><br /><br /> lVariavel := .F.<br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br /><span style="color: #B900B9;">// -------------------------------------------------------------------</span><br /><br /><span style="color: #B900B9;">// FIM DE BMP_RAND.PRG</span><br /> </div>[/code:20mvzl34]
Regards, saludos.
|
Bloquear acceso a una funcion (Solucionado)
|
Muchas gracias Joao
|
Bloquear edicion por celdas en xbrowse
|
Hola amigos.,
Como puedo bloquear una o varias columnas para evitar la edición por celdas en un xbrowse?,
Salu2
|
Bloquear edicion por celdas en xbrowse
|
Hola Willi:
No se si es a esto lo que te refieres, pero si solo le indicas cuales son editables puedes hacerlo asi:
[code=fw:25kg9ill]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw DATASOURCE oQry;<br /> COLUMNS <span style="color: #ff0000;">"ticomp"</span>,<span style="color: #ff0000;">"numcomp"</span>,<span style="color: #ff0000;">"fecha"</span>,<span style="color: #ff0000;">"saldo"</span>,<span style="color: #ff0000;">"pagado"</span>,<span style="color: #ff0000;">"saldonue"</span>;<br /> HEADERS <span style="color: #ff0000;">"Tipo"</span>,<span style="color: #ff0000;">"Nro. Compr."</span>,<span style="color: #ff0000;">"Fecha"</span>,<span style="color: #ff0000;">"Saldo"</span>,<span style="color: #ff0000;">"Pagado"</span>,<span style="color: #ff0000;">"Nuevo Saldo"</span> FOOTERS;<br /> SIZES <span style="color: #000000;">63</span>,<span style="color: #000000;">165</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">105</span>,<span style="color: #000000;">95</span>,<span style="color: #000000;">95</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlg <br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">6</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">lAutoSave</span> := .t.<br /> oBrw:<span style="color: #000000;">nMoveType</span> := <span style="color: #000000;">4</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nEditType</span> := EDIT_GET <br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">{</span>|oGet, oCol| ControlSaldo<span style="color: #000000;">(</span>oGet:<span style="color: #000000;">value</span>,EVAL<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">4</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bEditValue</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #B900B9;">//Control saldo es una funcion que valida el dato ingresado</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">{</span>|oCol, xVal, nKey | CambiaSaldo<span style="color: #000000;">(</span>xval<span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #B900B9;">// Cambia saldo me cambia la columna 6 que tiene el nuevo saldo</span><br /> </div>[/code:25kg9ill]
Espero te sirva
|
Bloquear edicion por celdas en xbrowse
|
Gracias sr.
Salu2
|
Bloquear un registro en el xbrowse
|
Hola Amigo del forum.
Como hago para bloquear un registro en un browse, y enviar un mensaje que ese registro esta ocupado, para que otras terminales no las tomen este el codigo:
Estoy usando FWH MySQL
[code=fw:3w4rypnv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><br /><span style="color: #00C800;">static</span> norden1,oRsContribu,ordenarcontri,oCn,oError,oRsContribu_1<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> cServer := <span style="color: #ff0000;">"localhost"</span><br /><span style="color: #00C800;">local</span> cDataBase := <span style="color: #ff0000;">"indfundacion"</span><br /><span style="color: #00C800;">local</span> cUser := <span style="color: #ff0000;">"Adolfredo"</span><br /><span style="color: #00C800;">local</span> cPassWord := <span style="color: #ff0000;">"19585287amf"</span><br /><span style="color: #00C800;">local</span> nPort := <span style="color: #000000;">3307</span><br /><span style="color: #00C800;">local</span> nFlags := <span style="color: #000000;">0</span>,oProgFont,oBrwFont,oHeadFont,oFootFont<br /><span style="color: #00C800;">local</span> oDlg, oBrw,cText := <span style="color: #ff0000;">""</span>,oapp,aClrCol<br /><br /><br /> <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span> .or. oCn:<span style="color: #000000;">Ping</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> = .F. <br /> MsgRun<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Connecting to Server"</span>, <span style="color: #ff0000;">"CLOUD SERVER"</span>, ;<br /> <span style="color: #000000;">{</span> || oCn := maria_Connect<span style="color: #000000;">(</span> <span style="color: #000000;">{</span>cServer, cDataBase, cUser, cPassWord, nPort <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span><br /> ? <span style="color: #ff0000;">"Failed to connect"</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">else</span><br /> cText += <span style="color: #ff0000;">"Connection OK"</span> + CRLF<br /> cText += <span style="color: #ff0000;">"Host: "</span> + cServer +CRLF<br /> cText += <span style="color: #ff0000;">"Database: "</span> +cDataBase + CRLF<br /> cText += <span style="color: #ff0000;">""</span> + CRLF<br /> cText += <span style="color: #ff0000;">""</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> cText ,<span style="color: #ff0000;">"Conexion Exitosa"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> oCn:<span style="color: #000000;">lShowErrors</span> := .t.<br /> oRsContribu :=oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM contrib ORDER BY codigo"</span><span style="color: #000000;">)</span><br /><br /><br /> oProgFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"TAHOMA"</span>,,<span style="color: #000000;">-14</span>,.F.,.F. ,,,,.F. <span style="color: #000000;">)</span><br /> oBrwFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"TAHOMA"</span>,,<span style="color: #000000;">-12</span>,.F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /> oHeadFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"TAHOMA"</span>,,<span style="color: #000000;">-14</span>,.F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /> oFootFont := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"TAHOMA"</span>,,<span style="color: #000000;">-14</span>,.F.,.F.,,,,.F.<span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1000</span>,<span style="color: #000000;">600</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw OBJECT oRsContribu <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> COLUMNS <span style="color: #ff0000;">"NIT"</span>,<span style="color: #ff0000;">"RAZON"</span>,<span style="color: #ff0000;">"PROPIETA"</span>,<span style="color: #ff0000;">"DIRECC"</span>,<span style="color: #ff0000;">"INDENTIF"</span>,<span style="color: #ff0000;">"TELEFONO"</span>;<br /> HEADERS <span style="color: #ff0000;">"Nit"</span>, <span style="color: #ff0000;">"Razon Social"</span>, <span style="color: #ff0000;">"Representante Legal"</span>, <span style="color: #ff0000;">"Direccion"</span>, <span style="color: #ff0000;">"Identificacion"</span>, <span style="color: #ff0000;">"Telefono"</span> CELL LINES AUTOSORT<br /> <br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">bRecSeldata</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">KeyNo</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nRecSelWidth</span> := <span style="color: #ff0000;">"999,999"</span><br /> :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> :<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br /> :<span style="color: #000000;">lColDividerComplete</span> := <span style="color: #000000;">(</span>.F.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeaderHeight</span> := <span style="color: #000000;">25</span><br /> :<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">22</span><br /> :<span style="color: #000000;">nHeaderLines</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">nDataLines</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">nFooterHeight</span> := <span style="color: #000000;">20</span><br /> :<span style="color: #000000;">nFooterLines</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">lFooter</span> := <span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /> :<span style="color: #000000;">lHScroll</span> := <span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br /><br /> :<span style="color: #000000;">l2015</span> := .T.<br /> :<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ! lInvert,<span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16294002</span>,<span style="color: #000000;">15263976</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">15263976</span>,<span style="color: #000000;">16294002</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">8388608</span>,<span style="color: #000000;">15263976</span> <span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">15263976</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span> || aClrCol<span style="color: #000000;">[</span> oBrw:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrSelFocus</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">{</span> <span style="color: #000000;">16777215</span>,<span style="color: #000000;">16288063</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrHeader</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16288063</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrFooter</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">16288063</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bClrSel</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">{</span> <span style="color: #000000;">16777215</span>,<span style="color: #000000;">16288063</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nRecSelColor</span> := <span style="color: #000000;">16776960</span> <span style="color: #B900B9;">//color de la columna activa primera</span><br /> :<span style="color: #000000;">oFont</span> := oBrwFont<br /> :<span style="color: #000000;">hRowPen</span> := CreatePen<span style="color: #000000;">(</span> PS_SOLID,<span style="color: #000000;">2</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//el grueso de la fila</span><br /> :<span style="color: #000000;">hColPen</span> := CreatePen<span style="color: #000000;">(</span> PS_SOLID,<span style="color: #000000;">2</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// el grueso de la columna</span><br /> :<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">20</span> <span style="color: #B900B9;">//ancho de la celda</span><br /> <br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /> aClrCol := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">16579010</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">//color de la fila selecionado y color de la letra en la final</span><br /><br /> BtnBar<span style="color: #000000;">(</span> oBrw,oDlg,oRsContribu <span style="color: #000000;">)</span><br /> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//-------------------------------------------------------------//</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> btnBar<span style="color: #000000;">(</span> oBrw,oDlg,oRsContribu <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------//</span><br /> <span style="color: #00C800;">local</span> oBar1, oBtn<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">70</span> <span style="color: #000000;">2010</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">ACTION</span> Nuevocontri<span style="color: #000000;">(</span>oBrw,.T.,oRsContribu <span style="color: #000000;">)</span>;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\n</span>uevo.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Nuevo"</span> TOOLTIP <span style="color: #ff0000;">"Nuevo"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">ACTION</span> Nuevocontri<span style="color: #000000;">(</span>oBrw,.F.,oRsContribu <span style="color: #000000;">)</span>;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\m</span>odificar.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Editar"</span> ;<br /> TOOLTIP <span style="color: #ff0000;">"Editar"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">ACTION</span> Elimicontri<span style="color: #000000;">(</span>oBrw<span style="color: #000000;">)</span> GROUP ;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\b</span>orrar.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Eliminar"</span> TOOLTIP <span style="color: #ff0000;">"Eliminar"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">ACTION</span> Buscontrib<span style="color: #000000;">(</span>oBrw,norden1<span style="color: #000000;">)</span>;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\b</span>uscar.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Buscar"</span> TOOLTIP <span style="color: #ff0000;">"Buscar Un Registro"</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">ACTION</span> This:<span style="color: #000000;">ShowPopUp</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MENU</span> ordenarcontri<span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Ordenar la Base de Datos por Codigo, Apellidos o Direccion del Contribuente"</span> ;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\i</span>ndex.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ordenar Por"</span> TOOLTIP <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Una Base Datos de Catastro"</span>, <span style="color: #ff0000;">"Ordenar"</span> <span style="color: #000000;">}</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar1 <span style="color: #0000ff;">action</span><span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\P</span>REDSANTANA13.01<span style="color: #000000;">\b</span>itmap<span style="color: #000000;">\s</span>alir.bmp"</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> TOOLTIP <span style="color: #ff0000;">"Salir de la Ventana"</span><br /><br /><br /><span style="color: #00C800;">return</span> oBar1<br /><br /><br /> </div>[/code:3w4rypnv]
|
Bloquear un registro en el xbrowse
|
Use this method for edit
[code=fw:170sxpth]<div class="fw" id="{CB}" style="font-family: monospace;"><br />EditBaseRecord<span style="color: #000000;">(</span> cFieldList, lNew, bEdit, oBrw, lLock <span style="color: #000000;">)</span><br /> </div>[/code:170sxpth]
and use .T. for the last parameter for lLock.
|
Bloqueo al Actualizar y al enviar email
|
Buenas tardes, compañeros:
En mi APP tengo servicio de actualización siguiendo instrucciones del blog de nuestro amigo Gabriel Maimó: [url:2jck5do2]http://bielsys.blogspot.com/2009/02/actualizacion-automatica-de.html[/url:2jck5do2]
Funciona perfecto en todos los windows,[color=#FF0000:2jck5do2] excepto en W10[/color:2jck5do2]
También tengo servicio de email, donde el usuario puede cumplimentar formulario de sugerencia y enviarme un email.
[code=fw:2jck5do2]<div class="fw" id="{CB}" style="font-family: monospace;">oCfg := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"CDO.Configuration"</span> <span style="color: #000000;">)</span><br /> With Object oCfg:<span style="color: #000000;">Fields</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSMTPServer <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := Trim<span style="color: #000000;">(</span> cMailServer <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSMTPServerPort <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := nPort<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSendUsing <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := nSendOpt<br /> <span style="color: #00C800;">If</span> lAuth<br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSMTPAuthenticate <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSendUserName <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := Trim<span style="color: #000000;">(</span> cUser <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSendPassword <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := Trim<span style="color: #000000;">(</span> cPass <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">Item</span><span style="color: #000000;">(</span> cdoSMTPUseSSL <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">EndIf</span><br /> :<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> End With<br /> oMsg := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"CDO.Message"</span> <span style="color: #000000;">)</span><br /> With Object oMsg<br /> :<span style="color: #000000;">Configuration</span> := oCfg<br /> :<span style="color: #0000ff;">From</span> := Trim<span style="color: #000000;">(</span> cFrom <span style="color: #000000;">)</span><br /> :<span style="color: #0000ff;">To</span> := Trim<span style="color: #000000;">(</span> cTo <span style="color: #000000;">)</span><br /> :<span style="color: #0000ff;">Subject</span> := Trim<span style="color: #000000;">(</span> cSubject <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">TextBody</span> := Trim<span style="color: #000000;">(</span> cBody+ctex <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">For</span> nEle := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">(</span> aAttach <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">AddAttachment</span> := AllTrim<span style="color: #000000;">(</span> aAttach<span style="color: #000000;">[</span> nEle <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">(</span> cBCC <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">BCC</span> := Trim<span style="color: #000000;">(</span> cBCC <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">EndIf</span><br /> :<span style="color: #000000;">Send</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> End With</div>[/code:2jck5do2]
Funciona también perfecto, [color=#FF0000:2jck5do2]excepto en W10'[/color:2jck5do2]
¿Por qué? Revisé configuración firewall y tiene agregado el EXE
¿Se puede configurar w10 desde la APP en tiempo de ejecución?
¿Hay que configurar algo en W10 para que permita esta actualización/envio de email?
¿Existe otro método que NO bloquee w10?
saludos.
LORENZO.
|
Bloqueo al Actualizar y al enviar email
|
Lorenzo,
Muestra algún mensaje ó error ?
|
Bloqueo al Actualizar y al enviar email
|
Hola, ¿cuál es el proveedor?
Saludos.
|
Bloqueo al Actualizar y al enviar email
|
Hola Antonio, hola Karinha
No muestra error ninguno. Simplemente no actualiza/no envía email.
Proveedor: gmail (y en mi configuración de gmail tengo permitido el “acceso a aplicaciones menos seguras”)
He indagado más y me di cuenta que entre los clientes con w10 algunos pueden actualizar y otros no.
Gracias por vuestro interés.
Lorenzo.
|
Bloqueo al Actualizar y al enviar email
|
No estoy seguro, pero creo que gmail.com ya no es gratuito. Sería necesario contactar con su soporte. Abrazos.
[url:3iamfcvx]https://support.google.com/mail/answer/9312312?hl=es[/url:3iamfcvx]
Regards, saludos.
|
Bloqueo al Actualizar y al enviar email
|
Hola,
Perdonadme, pero creo que el problema NO es Gmail. Con W7, Wvista, Wxp... etc... funciona perfecto!!.
El problema está con algunos equipos con W10. Hay usuarios que no pueden actualizar/enviar email y otros sí pueden. Así que debe ser la propia configuración de w10.
Deberá ser la configuración de windows defender, firewall, o filtro "Smart-Screen" que por defecto bloquean la descarga de archivos EXE para las actualizaciones (potencialmente peligrosos)
¿Existe la posibilidad de poder configurar o alterar esta configuración en tiempo de ejecución?
saludos.
LORENZO.
|
Bloqueo al Actualizar y al enviar email
|
Activar/Inhabilitar la verificación en dos pasos
Abra su cuenta de Google.
En la sección "Seguridad", seleccione la verificación en dos pasos. Es posible que deba iniciar sesión.
Seleccione Activar/Desactivar.
Aparecerá una ventana emergente para confirmar que desea activar/deshabilitar la verificación en dos pasos. Seleccione Activar/Desactivar. Mantenga su teléfono a su lado para recibir un código de Google.
[url]chrome://settings/security[/url]
Saludos.
|
Bloqueo al Actualizar y al enviar email
|
De momento, porque es muy cambiante, yo estoy pudiendo enviar, en gmail, archivos .exe COMPRIMIDOS en formato bzip2 (7zip tiene esa posibilidad)
[quote="Loren":2wf8ymby]Hola,
Perdonadme, pero creo que el problema NO es Gmail. Con W7, Wvista, Wxp... etc... funciona perfecto!!.
El problema está con algunos equipos con W10. Hay usuarios que no pueden actualizar/enviar email y otros sí pueden. Así que debe ser la propia configuración de w10.
Deberá ser la configuración de windows defender, firewall, o filtro "Smart-Screen" que por defecto bloquean la descarga de archivos EXE para las actualizaciones (potencialmente peligrosos)
¿Existe la posibilidad de poder configurar o alterar esta configuración en tiempo de ejecución?
saludos.
LORENZO.[/quote:2wf8ymby]
|
Bloqueo de Tabla
|
Hola Amigos, necesito de su ayuda tengo una tabla llamada PARAMETROS en donde tengo 2 registro uno llamado pasajes y el otro llamado reserva, es un sistema de ventas de pasajes de buses, resulta que cada cierto tiempo( digamos que meses) en un mometo esa tabla s bloquea y me deja todos los puntos de ventas sin poder hacer nada, ya que de ahi se obtiendo los parametros de pasajes y reserva ya que cada punto de ventas graba se va aumentando en uno.
trabajo con TDOLPHIN
asi obtengo los datos
cPara:=xServer:Query( "SELECT * FROM parametro Where ma_codi = '"+"PASAJE"+"'" )
If cPara:LastRec() > 0
nPasaje:=cPara:ma_nume
Endif
cPara:End()
* ACA CAPTURA EL NUMERO DE RESERVA Y LO AUMENTA
*----------------------------------------------
cSql:="UPDATE parametro SET ma_nume=LAST_INSERT_ID(ma_nume+1) WHERE ma_codi='"+"RESERVA'"
xServer:Execute( cSql )
oQryId := xServer:Query( "SELECT last_insert_id() AS nId")
nReserva := oQryId:nId
aCampos := { 'ma_nume' }
aValues := { nPasaje+1}
aWhere := "ma_codi= '"+"PASAJE"+"'"
xServer :Update( "parametro", aCampos, aValues, aWhere )
esto es lo que tengo..
asi necesito su ayuda
saludos
|
Bloqueo de fichero
|
Hola amigos
Tengo un trabajo entre manos y no se como resolverlo
La idea es que en un directorio hay varios ficheros .jpg que contienen imagenes de albaranes, cargarlos en un array, y presentar siempre el primero para trabajar, una vez hecho el trabajo, borrar dicho fichero. Hasta ahí no hay problema si hubiera un solo operador, pero en un sistema de red, si un operador tiene el jpg en pantalla y todavía no lo ha destruido, al cargar otro operador el array, también cargaría en pantalla el mismo fichero, ya que sería el primero del array; por lo que los dos trabajarían en el mismo albarán.
Me gustaría saber si hay alguna forma de cuando trabajo con un .jpg, bloquearlo para que no lo pueda capturar otro operador.
Si no fuera así, sería buena idea para impedir duplicidad, copiar éste fichero en otro directorio temporal y borrarlo del directorio anterior mientras se meten los datos de éste?
Saludos
Jose Luis
|
Bloqueo de fichero
|
Jose Luis:
Quizas te pueda servir:
Archivos: Alba1.jpg, Alba2.jpg, Alba3.jpg, ....
Base de datos: con 2 campos nombre y estatus:
Nombre -> Alba1
Estatus -> H (Habilitado), U (usando,en uso)
Cuando borras el archivo tambien lo borras de la base de datos.
Es lo que se me ocurre.
Saludos
Ruben Fernandez.
|
Bloqueo de fichero
|
Complementando...
Tus jpg se encuentran inscritas en la BD. Si uno está en uso el flag de estatus debe ponerse en "U" y por tanto no se carga a tu array... cuando terminan el trabajo el status cambia a "H".
Me parece que sía una solución por la via que estás yendo.
[quote="Ruben Fernandez":1hgh3khd]Jose Luis:
Quizas te pueda servir:
Archivos: Alba1.jpg, Alba2.jpg, Alba3.jpg, ....
Base de datos: con 2 campos nombre y estatus:
Nombre -> Alba1
Estatus -> H (Habilitado), U (usando,en uso)
Cuando borras el archivo tambien lo borras de la base de datos.
Es lo que se me ocurre.
Saludos
Ruben Fernandez.[/quote:1hgh3khd]
|
Bloqueo de fichero
|
Entonces deduzco por vuestra idea, que tendría que haber una BD por ejemplo "Imagenes.DBF", en la que cuando un operador cualquiera entre en ésta opción haga lo siguiente:
- 1º Cargar un array con los nombres de los documentos que hay en el directorio.
- 2º Comprobar los nombres de éste array con los que hay en la BD
- 3º Añadir los que no existan.
- 4º Cuando se ponga a trabajar con ellos, que marque el que está en uso
Tendré que usar ésta opción, ya que no veo otra en la que no se duplique el trabajo en un momento dado.
Muchas gracias por vuestra ayuda
Saludos
Jose Luis
|
Bloqueo de fichero
|
Esa es la idea...!!! De ese modo aseguras que no haya uso duplicado o mas segun los usuarios de tu programa.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.