Results 1 to 12 of 12

Thread: Visual Form Editor by vb6(For VBS,Python,Javasript,Lua)Scripting language tool

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Visual Form Editor by vb6(For VBS,Python,Javasript,Lua)Scripting language tool

    OCX FOR :Webbrowser,MSflexgrid,VB6 UserControl,MediaPlayer,***

    Code:
    Dim WithEvents oControl As VBControlExtender
    'After the declaration with event declaration, you can find that the object appears in the drop-down box of the object in the upper left corner of the code window, that is, the object has events or methods, and its events include DragDrop, DragOver, LostFocus, GotFocus , ObjectEvent and Validate, where ObjectEvent is a general event capture.
    Private Sub Command1_Click()
    LoadControl
    End Sub
    
    Private Sub Command2_Click()
    LoadControl2
    End Sub
    
    Private Sub LoadControl()
        Set oControl = Controls.Add("Prj1.Usercontrol1", "MyButton")
        'Set oControl = Controls.Add("VB.CommandButton", "MyButton")
        oControl.Visible = True
        oControl.Top = Command1.Top + Command1.Height + 50
    End Sub
    
    Private Sub LoadControl2()
        Set oControl = Me.Controls.Add("Shell.Explorer.2", "Web1")
        oControl.Width = 400 * Screen.TwipsPerPixelX
        oControl.Height = 300 * Screen.TwipsPerPixelY
        oControl.Top = Command1.Top + Command1.Height + 50
        oControl.Left = Me.ScaleWidth / 2
        oControl.Visible = True
        oControl.Silent = True
        oControl.Navigate "https://www.baidu.com"
    End Sub
    
    Private Sub oControl_ObjectEvent(Event1 As EventInfo)
       Select Case Event1.Name
        Case "Click" 'Click事件   '您可以添加处理Click事件代码
            MsgBox "You Click MyButton!"
        Case "MouseDown"
            Me.Caption = "MouseDown-" & Now
        Case Else ' 其他事件
           ' Handle unknown events here.
           'Debug.Print "事件:" & Event1.Name & ",参数个数:" & Event1.EventParameters.Count
           Debug.Print "Event Name:" & Event1.Name & ",EventParameters Count:" & Event1.EventParameters.Count
        End Select
    End Sub
    Quote Originally Posted by yereverluvinuncleber View Post
    The worry to me is that this tool is not BASIC-centric and thus is unlikely to be VB6 compatible. It might be useful tool for developing in general providing a nice forms generator for tools that don't currently have one but each language requires a different implementation as to how that data is stored and utilised. In .NET the form is defined in code, in VB6 it is described in the FRM file, in some tools that use .js it is stored as XML or CSS. I'd love to see a FOSS forms designer, then you could define the output as you require.

    As far as I am aware there isn't a FOSS forms designer that lends itself to easy modification of the output, if anyone knows one please do tell.

    As far as the code editor component is concerned I already have two editors, the VB6 IDE and RJTextEd.

    What it needs to tie it together is VB6 compatibility and an effort to tie it into one language.
    One of my ideas is to make multiple controls and properties on the form into JSON format. You can also use the XML format, which becomes a universal standard. Others can also modify and add N controls, modify or delete them automatically with code.
    In fact, this is a simple prototype of a strong structure of a data table.
    I have done all the control properties, several forms, all stored in the data table.
    Simply put, if you make a database (ACCESS or SQLITE), it is a software project that can be directly compiled into EXE
    This is like a big invention, creativity, and a unique new idea.

    I am also developing a programming IDE, which is mainly used for scripting. The code inside is VBS or Freebasic, Python, Javascript.
    I have designed a visual form designer. You can add built-in VB buttons, text boxes and other controls, or you can add third-party OCX controls, as long as you enter the CLSID and name (you can also choose)
    If you are interested, you can communicate together.
    Attached Images Attached Images  
    Last edited by xiaoyao; May 2nd, 2021 at 09:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width