Jump to content
uniGUI Discussion Forums


Popular Content

Showing content with the highest reputation since 11/19/18 in Posts

  1. 10 points
    QrCode Reader for uniGUI That's is my new series (old "All about x topic") and now inspired in Chelsea DOES Series... (lol) here we go. This is the first experimental project for our future Pack 4 commercial/biz automation. The final version will have several other features as well as QrCode generation capability etc. This code is free and based on several JavaScript libs linked and adapted. This project design is hybrid. Restrictions: Chrome only allows WebRTC access via https or localhost. Safari ONLY https. FireFox is the most compatible of all. This is an HTML5 feature that has not yet been implemented in most browsers and many users have old versions. So check the browser version of your device and test with others browsers. Website that shows what each browser supports https://caniuse.com/#search=getUserMedia Mobile Compatibility with HTML5 http://mobilehtml5.org/ https://webrtc.github.io/samples/ https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API How to use: Copy the / files folder just below where you want to place your ISAPI or StandAlone. And let's rock ! Live Demo: https://lojasms.com.br/qrcode/qrcode.dll More Information, Resources, Books, and Project Packs visit http://www.unigui.com.br (the Brazilian portal to uniGUI). ' Enjoy... and have a good one! Sorry: but I'm experience some health problems today... tomorrow I'll post version with English Interface. Pack04-Project01 QrCode.rar
  2. 8 points
    I read somewhere here that was not possible to play a sound on the mobile platform using uniGUI. I completely forgot about the subject and these days I needed to put sound in one of my web/app/sites and already knew how to do with JQuery and mainly did not want those HTML5 audio controls disrupting the interface. And combining JQuery with uniGUI I was able to do much faster. So I made this example Desktop / Mobile showing that yes, "uniGUI DOES" sounds and very well. Both desktop and mobile. Example showing how to play direct from a URL, local (local file here refers to a file on the server and not from the client's computer, of course), using ClientEvents and conventional OnEnter Event. And in Mobile, no need to put in TAP, because it's obvious. Preview online. http://www.unigui.com.br:8077/ uniGUI DOES SOUNDS.rar
  3. 7 points
    I created a simple unit for google oauth2. To get QR Code, call UniImage1.Url:=GetQRCodeUrl(UniImage1.Width, UniImage1.Height, 'YOURSECRETKEY', 'your email address', 'Your name'); To ValidateOTP : if Format('%.6d', [CalculateOTP('YOURSECRETKEY')]) = UniEdit1.Text then begin // Valid end; Here some screenshots GoogleAuth.pas
  4. 7 points
    uniGUI DOES SESSION TIMEOUT PROPERLY There is nothing worst than lazy people using your program and keeping it open taking resources (DB access, memory, CPU time) and not paying homage to your wonderful work , hey ? They just leave there paying no attention whatsoever !!! I hate those lazy Btds people ! So, what about a solution to detect idle UI time at browser's side and alerts the user showing the real time left to close the session ? "No problemo, I got you back boy !!!" Seriously, when you have 50-100 concurrent sessions and not planning to expand to Hyper Server, it may cripple yours application performance very deeply and quickly. That's no joke for real developers ! So, kick out the lazy ones doing nothing ! Solution https://stackoverflow.com/questions/13246378/detecting-user-inactivity-over-a-browser-purely-through-javascript This project is based in the code above and I made some tweaks to work properly and warn the user to put, that lazy bstd, to work again or leave that marvelous piece of code of yours alone. I found a better code some days latter but it don't seams to make any big difference to the JS Snippet used here. I'm planning to a latter update in the users area of unigui.com.br. For now it's what I got working and tested. Instructions 1- Put the MainForm Script in your project. 2- In MainForm OnAjaxRequest past the code provided here. Change the messages and other details. 3- As you can see, there are two Events: one to trigger at a 1 minute idle time (_idle_timeout = no mouse ou keyboard activities) and starts to show the time remaining based in uniServerModule.SessionTimeout, to TimeOut, of course !. And teh other to show the busy mode (_busy). So when the session expires, at least you warned the user before and have a trigger point to save data and close any pending task. You can also flag "work mode" and and "idle mode" showing proper remaining session time. Have fun... and have a good one. Here is a second JS Code Snippet that works better and I will replace later. Stay tuned ! (or clicking...) var IDLE_TIMEOUT = 60; //seconds var _localStorageKey = 'global_countdown_last_reset_timestamp'; var _idleSecondsTimer = null; var _lastResetTimeStamp = (new Date()).getTime(); var _localStorage = null; AttachEvent(document, 'click', ResetTime); AttachEvent(document, 'mousemove', ResetTime); AttachEvent(document, 'keypress', ResetTime); AttachEvent(window, 'load', ResetTime); try { _localStorage = window.localStorage; } catch (ex) { } _idleSecondsTimer = window.setInterval(CheckIdleTime, 1000); function GetLastResetTimeStamp() { var lastResetTimeStamp = 0; if (_localStorage) { lastResetTimeStamp = parseInt(_localStorage[_localStorageKey], 10); if (isNaN(lastResetTimeStamp) || lastResetTimeStamp < 0) lastResetTimeStamp = (new Date()).getTime(); } else { lastResetTimeStamp = _lastResetTimeStamp; } return lastResetTimeStamp; } function SetLastResetTimeStamp(timeStamp) { if (_localStorage) { _localStorage[_localStorageKey] = timeStamp; } else { _lastResetTimeStamp = timeStamp; } } function ResetTime() { SetLastResetTimeStamp((new Date()).getTime()); } function AttachEvent(element, eventName, eventHandler) { if (element.addEventListener) { element.addEventListener(eventName, eventHandler, false); return true; } else if (element.attachEvent) { element.attachEvent('on' + eventName, eventHandler); return true; } else { //nothing to do, browser too old or non standard anyway return false; } } function WriteProgress(msg) { var oPanel = document.getElementById("SecondsUntilExpire"); if (oPanel) oPanel.innerHTML = msg; else if (console) console.log(msg); } function CheckIdleTime() { var currentTimeStamp = (new Date()).getTime(); var lastResetTimeStamp = GetLastResetTimeStamp(); var secondsDiff = Math.floor((currentTimeStamp - lastResetTimeStamp) / 1000); if (secondsDiff <= 0) { ResetTime(); secondsDiff = 0; } WriteProgress((IDLE_TIMEOUT - secondsDiff) + ""); if (secondsDiff >= IDLE_TIMEOUT) { window.clearInterval(_idleSecondsTimer); ResetTime(); alert("Time expired!"); document.location.href = "logout.html"; } } uniGUI DOES SESSION TIMEOUT PROPERLY.rar
  5. 7 points
    Good Morning Sirs, From 6_3 edition something has changed in FastReport. If you are using a, empty frxDBDataSet (to save your time) and design your report on the fly, then add thees two line in your unit, from now : ___________________________________________________ frxReport1.DataSets.Add(DBMyDataSet); frxReport1.EnabledDataSets.Add(DBMyDataSet); ___________________________________________________ Thx to Paul Gursky (FastReport Support Team) procedure TfrmFastReport.Prepare_And_ShowReport(Report: TfrxReport; Exp: TfrxPDFExport); var AUrl : string; begin Report.PrintOptions.ShowDialog := False; Report.ShowProgress := false; Report.PreviewOptions.AllowEdit := False; Report.EngineOptions.SilentMode := True; Report.EngineOptions.EnableThreadSafe := True; Report.EngineOptions.DestroyForms := False; Report.EngineOptions.UseGlobalDataSetList := False; Exp.Background := True; Exp.ShowProgress := False; Exp.ShowDialog := False; fFile_Temp:=UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', AUrl, True); Exp.FileName :=fFile_Temp; Exp.DefaultPath := ''; //****************************** Report.LoadFromFile(fFr3_File); // 1 DBMyDataSet.DataSet:=fFrDataSet; // 2 // FROM FastReport 6_3 (important) frxReport1.DataSets.Add(DBMyDataSet); //3 frxReport1.EnabledDataSets.Add(DBMyDataSet); //4 //****************************** fFrDataSet.DisableControls; // Yes Report.PrepareReport; Report.Export(Exp); UniURLFrame1.URL := AUrl; fFrDataSet.EnableControls; end; Best Regards.
  6. 7 points
    Ok, please find now attached my message dialog solution. For better understanding, I put it into a simple test environment. Finally it can be used very similar to the origin MessageDLG procedure. It supports already various settings, but still can be easily tailored to whatever needs you have. Any feedback & comments are welcome P.S. I just uploaded a new version with new options to change fonts, colors, icons (awesome font) and button content very easily from your application. Its a complete replacement of the existing messagedlg procedure. Just import the unit "uDialog.pas" and replace existing messagedlg calls with messagedlgA. P.P.S. Happy New Year to everybody of this great community uniGUI - MsgDLGDEmo.zip
  7. 6 points
    New upload SendSMS v.0.2.zip
  8. 6 points
    1) Works only in standalone, service mode 2) Tested over ARR proxy (IIS), Nginx 3) Use same port that UniServerModule 4) Enjoy WSEcho.zip P.S. Dont use with HyperServer(HyperService)
  9. 5 points
    Hi In the attachment a simple example how to send a sms text message. In this example is use www.bulksms.com for sending my sms messages but you can have you're own one if you want. Every sms provider has his own url for sending messages, in this case you see the url from bulksms. So in you're own case you have to see the documentation of the sms provider. Most sms providers have also mail-to-sms, but for me this is a simple low-cost solution to create you're own 2FA. Regards Peter SendSMS.zip
  10. 5 points
    Custom header for reports using HTML and converting it to image. it's flexible and powerful.
  11. 4 points
    Hello friends, Here is an easy sample for switching between Desktop and mobile version. Best regards. NB : Replace Const MyIP = by yours (on MainModule) Hybrid2.zip
  12. 4 points
    I was looking for an alternative for the default message dialog, which gets shipped with uniGUI. Goal was to have something which fits 100% to the design of my pages. I am sure that somebody will now say "Use CSS styles" to achieve what you are looking for. But to be honest digging for the right CSS settings finally would take even more time than my little development and finally is not as flexible. Below is a screen shot of the message dialog I tailored for my needs. As you can see it also is already adjusted to my native language (German). If you are interesting to get the code for an alternative message dialog, just let me know.
  13. 4 points
    Maybe this can help you. resize the webbrowser ejemplo_layout.rar
  14. 4 points
    Hi! For those who are still in the first steps of UniGui, just like me. Here is the implementation of the Jquery plugin to measure the strength of the password in your projects. PassMeter.rar
  15. 4 points
    Another from the series "All about..." All about a Login Form with a Background video Project Repository for a Initial Login Screen for desktop projects with background video and informative DIV and pause / play button. Adapted example from W3School (http://wwww.w3schools.com). Panel with Gradient in two colors and centralized shade to facilitate the definition of your login controls. Note that it is a borderless LoginForm and properly configured to work. Author: Fred Montier / Cetera Softwares 1- Open your IDE 2- Open the project in the Source folder and compile / execute. 3- Open your browser and go to the default address. 4- EX: http: // localhost: 8077 Future versions like this example and others you will find easily in the portal http://www.unigui.com.br Source code right below... have fun. Projeto24-LoginVideoInBackground.rar
  16. 3 points
  17. 3 points
    Hello Paul, I did not retreive it, but i will explain here, step by step, what i did with my free home server (This work from Oct 2015 without problem). A. Introduction 1.The first thing is how to start an Unigui application: - either via IIS (ISAPI dll): MyIP_ServerAdresss / MyAliasFolder / MyApplication.dll - Or via Service: MyIP_ServerAdresss / MyApplcation: MyPort (MyPort = 8077, 8078, 8079 ...) Follow the deployment steps in the Developer Manual: http://www.unigui.com/doc/online_help/deployment.htm (My preference, today (May 2019) goes for the Service. Since August 2018 use the FMSfot HyperServer technology and the Hyperserver requires a Standalone Application: it's very simple to set up Follow the steps: http://www.unigui.com/doc/online_help/hyperserver.htm) 2. Once your application launches well on your Development Station, you can then deploy it on a good PC (i5, 8 GB RAM, preferably Windows Server Edition) On ebay, you can have Genuine Windows Server Edition Licenses for € 8. Do not forget to install the Runtime on this PC: FMSoft_uniGUI_Complete_runtime_1.90.0.1501.exe (May 2019) 3. Now connect this PC (server) to the internet via a simple modem. 4. Open your favorite browser and tape: MyIP You will find your Internet IP address: xx.xx.xxx.xx 5. This IP address is not that of your PC (server), but that of your Modem (telephone line) So if you try to launch your application from a smart phone connected to the internet from a chip (not wifi) for example: xx.xx.xxx.xx / MyApplcation: MyPort This should give you the homepage of your Modem and you will not see your application launch! The Solution and this is the most important step: Tell your MODEM that this IP address (xx.xx.xxx.xx) should point to your PC (server). To do this : 5.1 Assign a static address to your PC (Server): example (see picture) 5.2 Enter your MODEM via Browser: 5.3 Look for something like: Advanced 5.4 DMZ> NAT 5.5 DMZ: Activated 5.6 Assign: the pointing address: 5.7 Save and Restart your Modem. End. Now your modem, as soon as it is called xx.xx.xxx.xx, from the outside, it will point to your PC (Server) 6. Test from a smart phone connected to the internet from a chip (no wifi) for example: xx.xx.xxx.xx / MyApplcation: MyPort And it will work 7. Do not forget to install a good UPS, voltage stabilizer to your PC (Server). END. Edited : I forgot ! B. Fixing IP adress Now, your internet IP adress points to your PC (Server) OK. But this IP adress remains 24 h only and will automatically change to morrow. Solution : 1. Buy a Domain Name with an IP Static yy.yy.yyy.yy from internet : there are a huge providers 1.1 Run your Unigui Application like this : - ISAPI : yy.yy.yyy.yy/MyAliasFolder/MyApplication.dll - Or Service : yy.yy.yyy.yy/MyApplcation:MyPort (MyPort = 8077, 8078, 8079 ...) 1.2 or smooth call : - ISAPI : MyDomaineName.com/MyAliasFolder/MyApplication.dll - Or Service : MyDomaineName.com/MyApplcation:MyPort (MyPort = 8077, 8078, 8079 ...) 2. Or use a Free dns like NoIP or my prefered Dynu dns : https://www.dynu.com/ 2.1 Sign Up and follow the steps 2.2 Download their great tool : Dynu IP Update Client this will capture your daily dynamic IP adress and fixed it as an alias. Example : YourSubDomaine.dynu.net point always to your PC (server) 2.3. Run your Unigui Application like this : - ISAPI : YourSubDomaine.dynu.net/MyAliasFolder/MyApplication.dll - Or Service : YourSubDomaine.dynu.net/MyApplcation:MyPort (MyPort = 8077, 8078, 8079 ...) Have fun Best Regards
  18. 3 points
    I wasted 2 days in this because some easy to avoid mistakes, read these to save some time 1- IF you Are going To install the Certificate on a stand alone Exe application Flow these 1- Before you start buy or install certificate you must read this first. a. http://www.unigui.com/doc/online_help/ssl_configuration.htm b. http://www.unigui.com/doc/online_help/getting-a-ssl-certificate-from.htm c. http://forums.unigui.com/index.php?/topic/8380-eidosslgetmethoderror-in-ssl-enable/&do=findComment&comment=43321 2- Don’t generate req.csr file using IIS as godaddy instructs , install and use openssl as the document above describes to generate 2 files. - download openssl from http://slproweb.com/products/Win32OpenSSL.html 3- Keep key.pem in safe place IE don’t lose it. 4- When downloading Certificates files from godaddy don’t select Server Type: IIS, but select Server Type: Other. -- rename the downloaded 2 files as described in the document above . 5- Use the right DLL files 32 or 64 according to your application type. Edit 2- IF you Are going install the certificate On IIS Server Flow below: - Generate csr.txt file using IIS as GoDaddy instructs. - VIP- When you copy the csr.txt Be very Carful there is a space at the end of the file don't uses select all or it will corrupt the certificate. -When downloading Certificates files from GoDaddy select Server Type: IIS regards
  19. 3 points
    Hello Friends, Finally, a big thx to Hayri ASLAN, who corrected my code. Thank you to everyone who participated in this topic : Paul, Sherzod and Hayri For those who are interested //********************************************************************** // METHODE without define (JavaScript Code) on Main > Script // Big Thx to Hayri ASLAN [Unigui Forum 24/04/2019] // Benefict to Use LocalStorage instead of Cookies : // 10 Mo Persistent data on Client Side (even with Refresh browser) // Only strings are store //********************************************************************** //1. To Set the Key 'K1' procedure TMainForm.UniButton1Click(Sender: TObject); var st:string; begin st:=UniEdit1.Text; UniButton1.JSInterface.JSCallGlobal('localStorage.setItem', ['K1', st] ); // Key , Value (always string) end; //2. To retreive Value of 'K1' on UniEdit2 procedure TMainForm.UniButton2Click(Sender: TObject); begin with UniEdit2.JSInterface do JSCall('setValue', [jsstatement('localStorage.getItem("K1")')]); // important : Key must be Quoted " " end; //3. To remove Key 'K1' procedure TMainForm.UniButton3Click(Sender: TObject); begin UniButton3.JSInterface.JSCallGlobal('localStorage.removeItem', ['K1']); end; All the Best LocalStorage2.zip
  20. 3 points
    The webinar was pretty good. When introducing the development tools they skipped over UniGUI very quickly. But when it came to the demo, UniGUI got the most exposure of all and attracted the most comments.
  21. 3 points
    Just saw this on begin..end website, It's good move, Farshad, you should blog more to bring more attention to your great framework. Regards, Mohammed
  22. 3 points
    Hi , Document Viewer: simple interface unigui to view OpenOffice + Pdf documents. See : http://viewerjs.org DocViewer.zip Good fun . Regards Salvatore Marullo
  23. 3 points
    Thank you, From your message I have reached another, where there is an example, which I had already seen, but it did not work correctly. I suppose the versions of the library were not correct. I added a call to a function that was missing ... and to work. I enclose the corrected example in case it serves you. regards Felix mobile_sig_test.zip
  24. 3 points
    Note, I've now created a github repo with the code and the fixes I made. It is available here.
  25. 3 points
    I have 57. Working with Delphi from 1998. Started programming 1982 on IBM1130 and my first personal comp was ZX Spectrum