Author Topic: Script BASIC - VB6 OCX Forms  (Read 2984 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Script BASIC - VB6 OCX Forms
« on: August 22, 2018, 10:54:15 PM »
I'm trying to pick up where Dave Zimmer left off with Script BASIC using VB6 forms as OCX controls.

Here is an example I plan to expand on.

Code: Script BASIC
  1. IMPORT COM.sbi
  2.  
  3. obj = COM::CREATE(:SET, "VB6.Sample")
  4.  
  5. 'Sample function prototypes
  6. ' longTest(v As Long)
  7. ' intTest(v As Integer)
  8. ' ByteTest(v As Byte)
  9. ' GetString(prompt As String, title, def) As String
  10. ' ShowUI() As Long
  11.  
  12. IF obj = 0 THEN
  13.   PRINT "Create Object FAILED!\n"
  14. ELSE
  15.   PRINT "TypeName obj = ", COM::TN(obj), "\n"
  16.   ' display object interface dialog
  17.  COM::DI(obj)
  18.   COM::CBN(obj, "longTest", :CALL, 20000)
  19.   COM::CBN(obj, "intTest", :CALL, 1000)
  20.   COM::CBN(obj, "byteTest", :CALL, 255)
  21.   retVal = COM::CBN(obj, "GetString", :CALL, "Enter some Text:", "my title", "default value!")
  22.   PRINT "GetString returned: ", retVal, "\n"
  23.   ' do NOT release objects you dont own..
  24.  objForm = COM::CBN(obj, "LaunchUI")
  25.   PRINT "objForm = ", objForm, "\n"
  26.   FOR i = 0 TO 10
  27.     COM::CBN(objForm, "AddItem", :CALL, "Hello from script basic! " & i)
  28.   NEXT
  29.   PRINT "Waiting until user closes form to proceede..\n"
  30.   COM::CBN(obj, "BlockUntilFormCloses")
  31.   sDate = COM::CBN(obj, "SelectDate")
  32.   IF LEN(sDate) = 0 THEN
  33.     PRINT "User pressed cancel for date selection\n"
  34.   ELSE
  35.     PRINT "Date: ", sDate, "\n"
  36.   END IF
  37.   COM::RELEASE(obj)
  38.   PRINT "All Done!\n"
  39. END IF
  40.  


C:\ScriptBASIC\examples>sbwin vb6_example.sb
TypeName obj = _Sample
GetString returned: Some Text
objForm = 3579816
Waiting until user closes form to proceede..
Date: 22/8/2018
All Done!

C:\ScriptBASIC\examples>






















« Last Edit: August 22, 2018, 11:16:02 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC - VB6 OCX Forms
« Reply #1 on: August 23, 2018, 01:31:42 AM »
Yes ... I'm going to have to follow your adventures in VB OCX/forms.

I must admit that I was wondering (last night) about parsing a .frm source into a different widget set and dialect of BASIC for direcrt use - just using VB as a form designer - thus allowing it to create cross-platform forms.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #2 on: August 23, 2018, 07:45:28 AM »
I definitely can see using the VB IDE as a way to create IUP LED form definition files.

The only issue is VB is fixed position based and IUP is container based.
« Last Edit: August 23, 2018, 08:56:49 AM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #3 on: August 23, 2018, 01:25:46 PM »
Here is an example of VB6 form events calling back to Script BASIC functions and subs.  This functionality is crucial if VB6 is going to be used as an intelligent OCX form.

Code: Script BASIC
  1. IMPORT COM.sbi
  2.  
  3. FUNCTION Button1_Click(arg, arg1, arg2, arg3, arg4, arg5)
  4.   PRINT "Button1_Click arg =", arg, "\n"
  5.   PRINT "Button1_Click arg1 = ", arg1, "\n"
  6.   PRINT "Button1_Click arg2 = ", arg2, "\n"
  7.   PRINT "Button1_Click arg3 = ", arg3, "\n"
  8.   PRINT "Button1_Click arg4 = ", arg4, "\n"
  9.   PRINT "Button1_Click arg5 = ", arg5, "\n"
  10.   Button1_Click = arg + 1
  11. END FUNCTION
  12.  
  13. FUNCTION Button2_Click(arg)
  14.   PRINT "Back in script basic Button2_Click arg = ", arg, "\n"
  15.   Button2_Click = arg * 2
  16. END FUNCTION
  17.  
  18. obj = COM::CREATE(:SET, "VB6.Sample")
  19.  
  20. IF obj = 0 THEN
  21.   PRINT "CreateObject failed!\n"
  22. ELSE
  23.   PRINT "obj = ", obj, "\n"
  24.   oCollection = COM::CBN(obj, "CallBackHandlers", :GET)
  25.   PRINT "oCollection = ", oCollection, "\n"
  26.   COM::CBN(oCollection, "Add", :CALL, ADDRESS(Button1_Click()), "frmCallBack.cmdOp1_Click" )
  27.   COM::CBN(oCollection, "Add", :CALL, ADDRESS(Button2_Click()), "frmCallBack.cmdOp2_Click" )
  28.   retVal = COM::CBN(obj, "LaunchCallBackForm", :CALL, 21)
  29.   PRINT "LaunchCallBackForm returned ", retVal, "\n"
  30.   COM::RELEASE(obj)
  31.   PRINT "test complete!\n"
  32. END IF
  33.  


C:\ScriptBASIC\examples\sbvb>scriba cb.sb
obj = 5646152
oCollection = 5646320
Button1_Click arg =21
Button1_Click arg1 = two
Button1_Click arg2 = 3
Button1_Click arg3 = four
Button1_Click arg4 = 5
Button1_Click arg5 = 5646720
Back in script basic Button2_Click arg = 22
LaunchCallBackForm returned 44
test complete!

C:\ScriptBASIC\examples\sbvb>


I'm curious how many other BASIC languages other than VB can access OCX controls via COM/OLE automation?
 
« Last Edit: August 23, 2018, 03:45:15 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #4 on: August 23, 2018, 03:10:19 PM »
This is an example of using an OCX as an out-of-process server. in the form of a .exe file. I didn't have to register the OCX. Interesting note, you can't run out-of-process with .NET.

I'm leaning towards using out-of-process server OCX based forms with Script BASIC. They offer more flexibility but give up performance which isn't my concern with the applications I write. (accounting software)

OCX EXE

Creating an OCX control

What is an OCX?

COM in plain C

Code: Script BASIC
  1. IMPORT COM.sbi
  2.  
  3. 'test using an activex exe
  4. obj = COM::CREATE(:SET, "VB6Exe.Sample")
  5. IF obj = 0 THEN
  6.   PRINT "CreateObject failed!\n"
  7. ELSE
  8.   PRINT "TypeName obj = ", COM::TN(obj), "\n"
  9.   sDate = COM::CBN(obj, "SelectDate")
  10.   IF LEN(sDate) = 0 THEN
  11.     PRINT "User pressed cancel for date selection\n"
  12.   ELSE
  13.     PRINT "Date: ", sDate, "\n"
  14.   END IF
  15.   COM::RELEASE(obj)
  16.   PRINT "Done!\n"
  17. END IF
  18.  


C:\ScriptBASIC\examples\sbvb>scriba cbexe.sb
TypeName obj = _Sample
Date: 23/8/2018
Done!

C:\ScriptBASIC\examples\sbvb>

« Last Edit: August 25, 2018, 07:37:00 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC - VB6 OCX Forms
« Reply #5 on: August 24, 2018, 01:54:57 AM »
I definitely can see using the VB IDE as a way to create IUP LED form definition files.

The only issue is VB is fixed position based and IUP is container based.

*nods*

Should still be doable - especially if you're like me, and use sub-frames as a part of the form hierarchy in VB.

It's really more about automating the donkey work of creating the form file instead of having to do it from scratch every time. Perhaps the VB code associated with the form could be used to generate whatever customisation is required - allowing a form to be modified without losing the IUP parameters that represent the tweaks used to make the change over seamless.

Maybe in the form of:
Code: [Select]
sub WidgetName()
   with WidgetName
      .MaxWidth = value
      .MinWidth = value
      .MaxStringLength = value
      .UseHandler = HandlerName([property_list])
      .Property1 = "property"
      .Property2 = "value"
      'etc.
   end with
end sub


You could even include whatever validation and pre-processing routines you want - just as in standard VB - in order to generate a block of translated code for whatever target dialect you're after. Even C, Pascal etc.

The beauty of this is that it doesn't even have to be valid VB code, since you're using VB purely as an editor, and are never going to need to compile the form in VB.
« Last Edit: August 24, 2018, 01:59:11 AM by AlyssonR »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #6 on: August 24, 2018, 08:25:19 AM »
I think there would be more interest in a VB6 migration than a PowerBasic effort.

I'm curious how popular OCX forms as components use by other languages was in the day?
« Last Edit: August 24, 2018, 08:32:00 AM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC - VB6 OCX Forms
« Reply #7 on: August 24, 2018, 11:01:08 AM »
I only ever saw a few OCXs in use outside of specialist controls - and they were all used on ASP/IIS sites.

Online, they really didn't work well outside of Internet Explorer at first, and they were never seamless on Linux while OCX was being actively pushed by MS.

Last time I developed an OCX, it worked well on Windows browsers as well as on Mozilla for Linux (Debian Squeeze).

I'm not sure whether there was much uptake in C, as I never used Visual C.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #8 on: August 24, 2018, 11:22:40 AM »
Excel is a very popular OCX used by COM/OLE supported languages. I also use COM automation with Crystal Reports and QuickBooks desktop integrations.

I think building intelligent OCX application forms and connect to them via COM/OLE automation, (CallByName in SB's instance) the business logic is separate and in the language of choice. I really don't have much interest in using OCX form controls in a web browser.
 

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #9 on: August 25, 2018, 12:29:34 AM »
I'm working on an OCX control that will demonstrate the following in one control.

  • Create example forms with callbacks to SB functions and subs
  • Access OCX properties and methods made public from SB callback routines
  • Use CCR to maintain common control and theme standards per OS
  • Run as an out-of-process OCX server - Test remote (network) client / server access

I'm thinking of converting the IUP Online Dictionary example to an OCX form. This would allow folks to compare the two directions using both GUI approaches.
« Last Edit: August 25, 2018, 11:08:56 AM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC - VB6 OCX Forms
« Reply #10 on: August 25, 2018, 01:58:18 AM »
I meant that I only ever saw OCXs explicitly used in web pages.

I did use a few 3rd party OCX widgets myself, though.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #11 on: August 25, 2018, 02:39:20 PM »
Many have forgotten how cool VB6 really is. The updated common controls access and theming support make it a viable IDE for today's programming.

BASIC isn't about SDK or WinAPI programming. The concept behind BASIC is to accomplish any task in the minimal number of steps and at the highest level possible.

Use C++ if Windows API programming gets you off.

Second Request
Quote
I'm curious how many other BASIC languages other than VB can access OCX controls via COM/OLE automation?

« Last Edit: August 25, 2018, 07:18:06 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #12 on: August 26, 2018, 04:11:16 PM »
Quote
I'm thinking of converting the IUP Online Dictionary example to an OCX form. This would allow folks to compare the two directions using both GUI approaches.

Here is the IUP and VB6 versions of the Script BASIC Online Dictionary example. This is a list of advantages I think the VB6 OCX GUI as an object offers.

  • Turns your GUI code into an independent object accessible by any language that supports COM/OLE automation.
  • Form object can be used to handle common validation, date/time and currency formatting. I still need to look into localization and multi-lingual options.
  • OCX forms can run as an out-of-process server and accessed by a remote client on the network. I'm curious to see how well this works.
  • VB6 gives more control and intelligence (in BASIC) than IUP and its default method and property set it offers. 

ToDo Items

  • Create VB callback support functions to SB subs and functions
  • Assign VB control names to match the IUP control IDs
  • Export needed form controls OCX properties and methods to automation access from SB
  • Add resize class to emulate the resizing features of IUP.
  • Test remote client network access to OCX out-of-proccess server.

IUP


Code: Script BASIC
  1. ' IUP Online Dictionary
  2.  
  3. IMPORT iup.sbi
  4.  
  5. servers[0]="dict.org"
  6. servers[1]="dict1.us.dict.org"
  7. servers[2]="all.dict.org"
  8.  
  9. about="""This is a Demo
  10. of the IUP GUI Binding
  11. for Scriptbasic"""
  12.  
  13. ' Initialize IUP
  14. Iup::Open()
  15.  
  16. ' Create main window
  17.  
  18. win = Iup::Create("dialog")
  19.   Iup::SetAttributes(win, "TITLE=\"ScriptBasic IUP Online Dictionary\", SIZE=500x300")
  20.   Iup::SetCallback(win,"CLOSE_CB",ADDRESS(Win_exit()))
  21.  
  22. ' Create container to house ALL GUI objects
  23.  
  24. vbox = Iup::Create("vbox")
  25.   Iup::SetAttributes(vbox, "MARGIN=10x10")
  26.  
  27. ' Create server panel
  28.  
  29. topBox = Iup::Create("hbox")
  30.   Iup::SetAttributes(topBox, "GAP=10")
  31.   Iup::Append(vbox, topBox)
  32. serverFrame = Iup::Create("frame")
  33.   Iup::SetAttributes(serverFrame, "TITLE=Servers, EXPAND=YES")
  34.   Iup::Append(topBox, serverFrame)
  35. serverBox = Iup::Create("hbox")
  36.   Iup::SetAttributes(serverBox, "GAP=5")
  37.   Iup::Append(serverFrame, serverBox)
  38. serverCombo = Iup::Create("list")
  39.   Iup::SetAttributes(serverCombo, "DROPDOWN=YES, SIZE=120x, EXPAND=HORIZONTAL, VALUE=1")
  40.   Iup::Append(serverBox, serverCombo)
  41.   Iup::SetCallback(serverCombo, "ACTION", ADDRESS(serverCombo_selected()))
  42. btnFetch = Iup::Create("button")
  43.   Iup::SetAttributes(btnFetch, "TITLE=Fetch, SIZE = 50x")
  44.   Iup::Append(serverBox, btnFetch)
  45.   Iup::SetCallback(btnFetch, "ACTION", ADDRESS(btnFetch_clicked()))
  46.  
  47. ' Create control panel
  48.  
  49. controlFrame = Iup::Create("frame")
  50.   Iup::SetAttributes(controlFrame, "TITLE=Controls")
  51.   Iup::Append(topBox, controlFrame)
  52. controlBox = Iup::Create("hbox")
  53.   Iup::SetAttributes(controlBox, "GAP=5")
  54.   Iup::Append(controlFrame, controlBox)
  55. btnAbout = Iup::Create("button")
  56.   Iup::SetAttributes(btnAbout, "TITLE=About, SIZE = 50x")
  57.   Iup::Append(controlBox, btnAbout)
  58.   Iup::SetCallback(btnAbout, "ACTION", ADDRESS(btnAbout_clicked()))
  59. btnClear = Iup::Create("button")
  60.   Iup::SetAttributes(btnClear, "TITLE=Clear, SIZE = 50x")
  61.   Iup::Append(controlBox, btnClear)
  62.   Iup::SetCallback(btnClear, "ACTION", ADDRESS(btnClear_clicked()))
  63. btnExit = Iup::Create("button")
  64.   Iup::SetAttributes(btnExit, "TITLE=Exit, SIZE = 50x")
  65.   Iup::Append(controlBox, btnExit)
  66.   Iup::SetCallback(btnExit,"ACTION",ADDRESS(Win_exit()))
  67.  
  68. ' Create dictionary panel
  69.  
  70. dictFrame = Iup::Create("frame")
  71.   Iup::SetAttributes(dictFrame, "TITLE=Dictionaries")
  72.   Iup::Append(vbox, dictFrame)
  73. serverList = Iup::Create("list")
  74.   Iup::SetAttributes(serverList, "EXPAND=YES, VISIBLELINES=1")
  75.   Iup::Append(dictFrame, serverList)
  76.   Iup::SetCallback(serverList, "ACTION", ADDRESS(serverList_selected()))
  77.  
  78. ' Create text part
  79.  
  80. transFrame = IUP::Create("frame")
  81.   Iup::SetAttributes(transFrame, "TITLE=Translation")
  82.   Iup::Append(vbox, transFrame)
  83. text = Iup::Create("text")
  84.   Iup::SetAttributes(text, "MULTILINE=YES, EXPAND=YES")
  85.   Iup::Append(transFrame, text)
  86.  
  87. ' Create entry and search button
  88.  
  89. bottomBox = Iup::Create("hbox")
  90.   Iup::SetAttributes(bottomBox, "GAP=10")
  91.   Iup::Append(vbox, bottomBox)
  92. label = Iup::Create("label")
  93.   Iup::SetAttributes(label, "TITLE=\"Enter Word to Search For:\", SIZE=x12")
  94.   Iup::Append(bottomBox, label)
  95. entry = Iup::Create("text")
  96.   Iup::SetAttributes(entry, "EXPAND=HORIZONTAL")
  97.   Iup::Append(bottomBox, entry)
  98. btnSearch = Iup::Create("button")
  99.   Iup::SetAttributes(btnSearch,"TITLE=Search, SIZE=50x")
  100.   Iup::Append(bottomBox, btnSearch)
  101.   Iup::SetCallback(btnSearch, "ACTION", ADDRESS(btnSearch_clicked()))
  102. chkAll = Iup::Create("toggle")
  103.   Iup::SetAttributes(chkAll, "TITLE=ALL, SIZE=x12")
  104.   Iup::Append(bottomBox, chkAll)
  105. chkUTF = Iup::Create("toggle")
  106.   Iup::SetAttributes(chkUTF, "TITLE=UTF-8, SIZE=x12")
  107.   Iup::Append(bottomBox, chkUTF)
  108.  
  109. ' Add the main GUI container to the Window
  110.  
  111. Iup::Append(win, vbox)
  112.  
  113. ' Setup dialog defaults
  114.  
  115. Iup::Show(win)
  116. Iup::SetFocus(btnFetch)
  117. FOR i = 0 TO UBOUND(servers)
  118.   Iup::SetAttribute(serverCombo, "APPENDITEM", servers[i])
  119. NEXT
  120. Iup::SetAttribute(serverCombo, "VALUE", "1")
  121. Iup::Update(serverCombo)
  122. server_selection = servers[0]
  123.  
  124. ' Main processing loop
  125.  
  126. Iup::MainLoop()
  127. Iup::Close()
  128. END
  129.  
  130. ' Callback routines
  131.  
  132. SUB Win_exit
  133.   Iup::ExitLoop = TRUE
  134. END SUB
  135.  
  136. SUB btnAbout_clicked
  137.   Iup::Message("ABOUT", about)
  138. END SUB
  139.  
  140. SUB serverCombo_selected
  141.   server_selection = Iup::GetListText()
  142. END SUB
  143.  
  144. SUB serverList_selected
  145.   whichDictionary = Iup::GetListText()
  146. END SUB
  147.  
  148. SUB btnFetch_clicked
  149.   LOCAL dat, total, count
  150.   ON ERROR GOTO G_NetError
  151.   OPEN server_selection & ":2628" FOR SOCKET AS #1
  152.   PRINT#1,"SHOW DB\n"
  153.   LINE INPUT#1, dat
  154.   LINE INPUT#1, dat
  155.   count = 0
  156.   WHILE LEFT(dat, 1) <> "."
  157.     LINE INPUT#1, dat
  158.     IF LEFT(dat, 1) <> "." THEN total[count] = TRIM(dat)
  159.     count+=1
  160.   WEND
  161.   PRINT#1,"QUIT\n"
  162.   CLOSE(#1)
  163.   FOR cnt = 0 TO count - 2
  164.     Iup::SetAttribute(serverList, "APPENDITEM", total[cnt])
  165.   NEXT
  166.   Iup::SetAttribute(serverList, "VALUE", "1")
  167.   Iup::Update(serverCombo)
  168.   whichDictionary = total[0]
  169.   EXIT SUB
  170.  
  171.   G_NetError:
  172.   ' PRINT "Server ",server_selection," not available. (",ERROR,")\n"
  173. END SUB
  174.  
  175. SUB btnClear_clicked
  176.   Iup::ClearList(serverList)
  177.   Iup::SetAttribute(text, "VALUE", "")
  178.   Iup::SetAttribute(entry, "VALUE", "")
  179. END SUB
  180.  
  181. SUB btnSearch_clicked
  182.   LOCAL dict, dat, total, info
  183.   IUP::SetAttribute(text, "VALUE","Fetching....")
  184.   ON ERROR GOTO L_NetError
  185.   dict = LEFT(whichDictionary, INSTR(whichDictionary, " "))
  186.   OPEN server_selection & ":2628" FOR SOCKET AS 1
  187.   IF Iup::GetAttribute(chkAll, "VALUE") THEN
  188.     PRINT#1,"DEFINE * " & Iup::GetAttribute(entry,"VALUE") & "\n"
  189.   ELSE
  190.     PRINT#1,"DEFINE " & dict & " " & Iup::GetAttribute(entry,"VALUE") & "\n"
  191.   END IF
  192.   REPEAT
  193.     LINE INPUT#1, dat
  194.     IF LEFT(dat, 3) = "151" THEN
  195.       total$ &= "------------------------------\r\n"
  196.       total$ &= RIGHT(dat, LEN(dat) - LEN(Iup::GetAttribute(entry, "VALUE")) - LEN(dict))
  197.       total$ &= "------------------------------\r\n"
  198.       REPEAT
  199.         LINE INPUT#1, info
  200.         info = REPLACE(info, CHR(34), CHR(92) & CHR(34))
  201.         IF LEFT(info, 1) <> "." THEN total &= TRIM(info) & "\n"
  202.       UNTIL LEFT(info, 1) = "."
  203.       total &= "\n"
  204.     END IF
  205.   UNTIL LEFT(dat, 3) = "250" OR VAL(LEFT(dat, 3)) > 499
  206.   PRINT#1,"QUIT\n"
  207.   CLOSE(#1)
  208.   IF LEFT(dat, 3) = "552" THEN
  209.     total = "No match found."
  210.   ELSE IF LEFT(dat, 3) = "501" THEN
  211.     total = "Select a dictionary first!"
  212.   ELSE IF LEFT(dat, 3) = "550" THEN
  213.     total = "Invalid database!"
  214.   END IF
  215.   Iup::SetAttribute(text, "VALUE", total)
  216. EXIT SUB
  217.  
  218. L_NetError:
  219.   dat[0] = "Could not lookup word! (" & ERROR & ")"
  220.   Iup::SetAttribute(text, "VALUE", dat)
  221. END SUB
  222.  


VB6


Code: Visual Basic
  1. VERSION 5.00
  2. Object = "{A99BDCD4-AB6D-490E-A03D-BF90764CBC6B}#1.0#0"; "VBCCR14.OCX"
  3. Begin VB.Form win
  4.    Caption         =   "Script BASIC VB6 Online Dictionary"
  5.    ClientHeight    =   7860
  6.    ClientLeft      =   120
  7.    ClientTop       =   450
  8.    ClientWidth     =   10995
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   7860
  11.    ScaleWidth      =   10995
  12.    StartUpPosition =   3  'Windows Default
  13.   Begin VBCCR14.CheckBoxW chkUTF
  14.       Height          =   315
  15.       Left            =   9915
  16.       TabIndex        =   11
  17.       Top             =   7200
  18.       Width           =   765
  19.       _ExtentX        =   1349
  20.       _ExtentY        =   556
  21.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  22.          Name            =   "MS Sans Serif"
  23.          Size            =   8.25
  24.          Charset         =   0
  25.          Weight          =   400
  26.          Underline       =   0   'False
  27.         Italic          =   0   'False
  28.         Strikethrough   =   0   'False
  29.      EndProperty
  30.       Caption         =   "Main.frx":0000
  31.    End
  32.    Begin VBCCR14.CheckBoxW chkAll
  33.       Height          =   255
  34.       Left            =   9105
  35.       TabIndex        =   10
  36.       Top             =   7245
  37.       Width           =   540
  38.       _ExtentX        =   953
  39.       _ExtentY        =   450
  40.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  41.          Name            =   "MS Sans Serif"
  42.          Size            =   8.25
  43.          Charset         =   0
  44.          Weight          =   400
  45.          Underline       =   0   'False
  46.         Italic          =   0   'False
  47.         Strikethrough   =   0   'False
  48.      EndProperty
  49.       Caption         =   "Main.frx":002A
  50.    End
  51.    Begin VBCCR14.CommandButtonW btnSearch
  52.       Height          =   345
  53.       Left            =   7815
  54.       TabIndex        =   9
  55.       Top             =   7185
  56.       Width           =   1140
  57.       _ExtentX        =   2011
  58.       _ExtentY        =   609
  59.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  60.          Name            =   "MS Sans Serif"
  61.          Size            =   8.25
  62.          Charset         =   0
  63.          Weight          =   400
  64.          Underline       =   0   'False
  65.         Italic          =   0   'False
  66.         Strikethrough   =   0   'False
  67.      EndProperty
  68.       Caption         =   "Main.frx":0050
  69.    End
  70.    Begin VBCCR14.TextBoxW entry
  71.       Height          =   330
  72.       Left            =   2475
  73.       TabIndex        =   8
  74.       Top             =   7185
  75.       Width           =   5205
  76.       _ExtentX        =   9181
  77.       _ExtentY        =   582
  78.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  79.          Name            =   "MS Sans Serif"
  80.          Size            =   8.25
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.         Italic          =   0   'False
  85.         Strikethrough   =   0   'False
  86.      EndProperty
  87.    End
  88.    Begin VBCCR14.FrameW transFrame
  89.       Height          =   2805
  90.       Left            =   150
  91.       Top             =   4215
  92.       Width           =   10740
  93.       _ExtentX        =   18944
  94.       _ExtentY        =   4948
  95.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  96.          Name            =   "MS Sans Serif"
  97.          Size            =   8.25
  98.          Charset         =   0
  99.          Weight          =   400
  100.          Underline       =   0   'False
  101.         Italic          =   0   'False
  102.         Strikethrough   =   0   'False
  103.      EndProperty
  104.       Caption         =   "Main.frx":007C
  105.       Begin VBCCR14.TextBoxW text
  106.          Height          =   2505
  107.          Left            =   0
  108.          TabIndex        =   6
  109.          Top             =   255
  110.          Width           =   10740
  111.          _ExtentX        =   18944
  112.          _ExtentY        =   4419
  113.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  114.             Name            =   "MS Sans Serif"
  115.             Size            =   8.25
  116.             Charset         =   0
  117.             Weight          =   400
  118.             Underline       =   0   'False
  119.            Italic          =   0   'False
  120.            Strikethrough   =   0   'False
  121.         EndProperty
  122.          BorderStyle     =   0
  123.          ScrollBars      =   3
  124.       End
  125.    End
  126.    Begin VBCCR14.FrameW dictFrame
  127.       Height          =   2820
  128.       Left            =   150
  129.       Top             =   1410
  130.       Width           =   10740
  131.       _ExtentX        =   18944
  132.       _ExtentY        =   4974
  133.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  134.          Name            =   "MS Sans Serif"
  135.          Size            =   8.25
  136.          Charset         =   0
  137.          Weight          =   400
  138.          Underline       =   0   'False
  139.         Italic          =   0   'False
  140.         Strikethrough   =   0   'False
  141.      EndProperty
  142.       Caption         =   "Main.frx":00B2
  143.       Begin VBCCR14.ListBoxW serverList
  144.          Height          =   2340
  145.          Left            =   15
  146.          TabIndex        =   5
  147.          Top             =   240
  148.          Width           =   10710
  149.          _ExtentX        =   18891
  150.          _ExtentY        =   4128
  151.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  152.             Name            =   "MS Sans Serif"
  153.             Size            =   8.25
  154.             Charset         =   0
  155.             Weight          =   400
  156.             Underline       =   0   'False
  157.            Italic          =   0   'False
  158.            Strikethrough   =   0   'False
  159.         EndProperty
  160.          BackColor       =   -2147483643
  161.          ForeColor       =   -2147483640
  162.          BorderStyle     =   0
  163.       End
  164.    End
  165.    Begin VBCCR14.FrameW controlFrame
  166.       Height          =   915
  167.       Left            =   6840
  168.       Top             =   300
  169.       Width           =   3900
  170.       _ExtentX        =   6879
  171.       _ExtentY        =   1614
  172.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  173.          Name            =   "MS Sans Serif"
  174.          Size            =   8.25
  175.          Charset         =   0
  176.          Weight          =   400
  177.          Underline       =   0   'False
  178.         Italic          =   0   'False
  179.         Strikethrough   =   0   'False
  180.      EndProperty
  181.       Caption         =   "Main.frx":00EA
  182.       Begin VBCCR14.CommandButtonW btnExit
  183.          Height          =   345
  184.          Left            =   2595
  185.          TabIndex        =   4
  186.          Top             =   405
  187.          Width           =   1125
  188.          _ExtentX        =   1984
  189.          _ExtentY        =   609
  190.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  191.             Name            =   "MS Sans Serif"
  192.             Size            =   8.25
  193.             Charset         =   0
  194.             Weight          =   400
  195.             Underline       =   0   'False
  196.            Italic          =   0   'False
  197.            Strikethrough   =   0   'False
  198.         EndProperty
  199.          Caption         =   "Main.frx":011A
  200.       End
  201.       Begin VBCCR14.CommandButtonW btnClear
  202.          Height          =   360
  203.          Left            =   1395
  204.          TabIndex        =   3
  205.          Top             =   405
  206.          Width           =   1125
  207.          _ExtentX        =   1984
  208.          _ExtentY        =   635
  209.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  210.             Name            =   "MS Sans Serif"
  211.             Size            =   8.25
  212.             Charset         =   0
  213.             Weight          =   400
  214.             Underline       =   0   'False
  215.            Italic          =   0   'False
  216.            Strikethrough   =   0   'False
  217.         EndProperty
  218.          Caption         =   "Main.frx":0142
  219.       End
  220.       Begin VBCCR14.CommandButtonW btnAbout
  221.          Height          =   360
  222.          Left            =   195
  223.          TabIndex        =   2
  224.          Top             =   405
  225.          Width           =   1125
  226.          _ExtentX        =   1984
  227.          _ExtentY        =   635
  228.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  229.             Name            =   "MS Sans Serif"
  230.             Size            =   8.25
  231.             Charset         =   0
  232.             Weight          =   400
  233.             Underline       =   0   'False
  234.            Italic          =   0   'False
  235.            Strikethrough   =   0   'False
  236.         EndProperty
  237.          Caption         =   "Main.frx":016C
  238.       End
  239.    End
  240.    Begin VBCCR14.FrameW serverFrame
  241.       Height          =   915
  242.       Left            =   285
  243.       Top             =   315
  244.       Width           =   6375
  245.       _ExtentX        =   11245
  246.       _ExtentY        =   1614
  247.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  248.          Name            =   "MS Sans Serif"
  249.          Size            =   8.25
  250.          Charset         =   0
  251.          Weight          =   400
  252.          Underline       =   0   'False
  253.         Italic          =   0   'False
  254.         Strikethrough   =   0   'False
  255.      EndProperty
  256.       Caption         =   "Main.frx":0196
  257.       Begin VBCCR14.CommandButtonW btnFetch
  258.          Height          =   345
  259.          Left            =   5085
  260.          TabIndex        =   1
  261.          Top             =   390
  262.          Width           =   1125
  263.          _ExtentX        =   1984
  264.          _ExtentY        =   609
  265.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  266.             Name            =   "MS Sans Serif"
  267.             Size            =   8.25
  268.             Charset         =   0
  269.             Weight          =   400
  270.             Underline       =   0   'False
  271.            Italic          =   0   'False
  272.            Strikethrough   =   0   'False
  273.         EndProperty
  274.          Caption         =   "Main.frx":01C4
  275.       End
  276.       Begin VBCCR14.ComboBoxW serverCombo
  277.          Height          =   315
  278.          Left            =   195
  279.          TabIndex        =   0
  280.          Top             =   405
  281.          Width           =   4800
  282.          _ExtentX        =   8467
  283.          _ExtentY        =   556
  284.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  285.             Name            =   "MS Sans Serif"
  286.             Size            =   8.25
  287.             Charset         =   0
  288.             Weight          =   400
  289.             Underline       =   0   'False
  290.            Italic          =   0   'False
  291.            Strikethrough   =   0   'False
  292.         EndProperty
  293.          Style           =   2
  294.          Text            =   "Main.frx":01EE
  295.       End
  296.    End
  297.    Begin VBCCR14.LabelW label
  298.       Height          =   195
  299.       Left            =   300
  300.       TabIndex        =   7
  301.       Top             =   7230
  302.       Width           =   1875
  303.       _ExtentX        =   3307
  304.       _ExtentY        =   344
  305.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
  306.          Name            =   "MS Sans Serif"
  307.          Size            =   8.25
  308.          Charset         =   0
  309.          Weight          =   400
  310.          Underline       =   0   'False
  311.         Italic          =   0   'False
  312.         Strikethrough   =   0   'False
  313.      EndProperty
  314.       Caption         =   "Enter Word to Search For:"
  315.    End
  316. End
  317. Attribute VB_Name = "win"
  318. Attribute VB_GlobalNameSpace = False
  319. Attribute VB_Creatable = False
  320. Attribute VB_PredeclaredId = True
  321. Attribute VB_Exposed = False
  322.  

« Last Edit: August 26, 2018, 10:25:49 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC - VB6 OCX Forms
« Reply #13 on: August 29, 2018, 11:12:14 PM »
Based on on the underwhelming response to this thread, I assume the concept of using a VB OCX as a GUI object and controlled via a COM/OLE automation interface doesn't excite anyone?

Hard core SDK / WinAPI32 coding emulated in a somewhat like BASIC seems to be the popular trend to achieve a Windows GUI.

I can't make any money if I have to recreate the wheel each time building a Windows GUI framework before I even get started on the project I'm being paid for.


« Last Edit: August 30, 2018, 12:03:12 AM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC - VB6 OCX Forms
« Reply #14 on: August 30, 2018, 01:11:03 AM »
I, for one, like the idea of OCX forms.

I, however, am but one voice in the wilderness ...

 ... and am not (presently) actively developing any user interfaces.