(Nodejs brother) You can also use HTML + FLASH + JS to write a desktop EXE.

Source: Internet
Author: User

First, let's take a look at the image below. All the interfaces below are implemented using html code. Programming IDE: vb6.0 use control: WEBBROWSER principle: Use olelib to let the program inherit: IDocHostUIHandler and ICustomDoc interfaces to rewrite window. external. Next, we will show you the basic API interfaces. [] Copy the code var C_System = function () {this. UI = {ReloadApp: function () {/* Reload all programs */}, DragForm: function (FormName) {/* drag form */}, HideForm: function (FormName) {/* Hide form */}, ShowForm: function (FormName) {/* display form */}, SetWidth: function (FormName, v) {/* set the width of the main form */}, GetWidth: function (FormName) {/* Get the width of the main form */}, SetHeight: function (FormName, v) {/* set the height of the main form */}, GetHeight: function (FormName) {/* get the main form Height */}, GetScreenWidth: function () {/* Get screen width */}, GetScreenHeight: function () {/* Get screen height */}, SetFormState: function (FormName, v) {/* set form status */}, GetFormState: function (FormName) {/* Get form status */}, GetFormHwnd: function (FormName) {/* obtain the form handle */}, VB_Load: function (FormName) {/**/}, VB_Unload: function (FormName) {}, VB_End: function () {}}; this. API = {CallApiByName: function (libName, ProcName, Pa) {}}; this. net = {GetNewXMLHTTP: function () {}, GetNewServerXMLHTTP: function () {}, GetNewWinHTTP: function () {}, getClipImg: function () {}}; this. CRC = {FileChecksum: function (file path) {}, StringChecksum: function (encrypted string) {}}; this. s_Debug = function (the object to be debugged) {}; this. ISIDEmode = function () {/* determine whether it is in the IDE environment */}; this. openUrl = function (str) {/* Open URL */}; System = new C_System (); Sys Tem = window. external; // obtain the interaction object in VB6.0 program. You can even use js to call the System's underlying API var hwnd = System. UI. getFormHwnd ("FrmMain"); System. API. callApiByName ("user32", "SetWindowLongA", hwnd,-20,524 288); System. API. callApiByName ("user32", "SetLayeredWindowAttributes", hwnd, 16711935,255, 3); the actual execution code in vb6.0 is: copy the code Public Function CallApiByName (ByVal libName As String, ProcName As String, paramArray Params () As Long Dim hProc As Long Dim hModule As Long ReDim m_O PCode (400 + 6 * UBound (Params) hModule = LoadLibrary (ByVal libName) If hModule = 0 Then MsgBox "Library reading failed! "Exit Function End If hProc = GetProcAddress (hModule, ByVal ProcName) If hProc = 0 Then MsgBox" Function read failed! ", VbCritical FreeLibrary hModule Exit Function End If CallApiByName = CallWindowProc (GetCodeStart (hProc, Params), 0, 1, 2, 3) FreeLibrary hModuleEnd Function copies the code engine using the System. net. getNewWinHTTP () [No. the System of the net Runtime Library is equivalent to a self-compiled Runtime Library to obtain a new WINHTTP object for cross-domain network access and complete Cookie control. Of course, this is not enough. Next, I plan to build an IDE and Runtime Library. The built-in Python and Lua dual-engine support may also support. net jit. Use WEBKIT + Google's V8 engine [from Chromium source code] to modify it. Similarly, window. external can be rewritten to external in the [Chromium source code regerer project] external_extension.cc file. You may have learned that NODEJS can write server-side code through js. It is also possible to write client code using JS. The total size of such a running database is less than 30 mb. More powerful than. net. Interface: 1. html5 and earlier versions are directly supported. css3 and earlier versions are supported, and Flash is supported. Greatly improved project cycle functions: 1. Support for direct use of js to call lua Python and DIY APIs. 2. Call the underlying API. Including multiple threads for calling GDI graphics to control database access. 3. Run it offline. 4. The APP store allows you to easily install new apps online. Compatibility: each program directly supports mainstream computer and mobile phone operating systems such as Windows Linux mac ios (Ihone) android WP. You do not need to develop it for each system separately. File size advantage: because it supports offline operation, every program is installed locally and then run online. Each APP generally does not exceed 1 MB. IDE advantages: There is no doubt that JS is the favorite programming language of most programmers. The difference between js and c ++ C # delphi JAVA is that js has always been treated as a weak language. There is no Runtime library on the platform. C # VB. NET uses the. NET Runtime Library. Both easy language and delphi have their own Runtime Library to achieve access to the underlying system. We can think so after nodejs's great success.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.