OCX FOR :Webbrowser,MSflexgrid,VB6 UserControl,MediaPlayer,***
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.
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
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.