Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Support

Pages: 1 ... 8 9 [10] 11 12 ... 59
136
General Discussions / VB2IUP
« on: October 12, 2014, 11:08:21 PM »
A member of the BaCon forum created a utility to convert Pencil .ep files to BaCon HUG assisted forms. I carried on with the idea but using VB6 IDE as the GUI builder and translating the .frm files to IUP for a cross platform GUI. Jose Roca from the PowerBASIC forum created this very helpful list of VB6 components.

I hope to have something to show soon.


There are three broad categories of controls in Visual Basic:

a) Intrinsic controls, such as the command button and frame controls. These controls are contained inside the Visual Basic .exe file.

b) ActiveX controls, which exist as separate files with a .ocx file name extension. These include controls that are available in all editions of Visual Basic (DataCombo, DataList controls, and so on) and those that are available only in the Professional and Enterprise editions (such as Listview, Toolbar, Animation, and Tabbed Dialog). Many third-party ActiveX controls are also available.

c) Insertable Objects, such as a Microsoft Excel Worksheet object containing a list of all your company's employees, or a Microsoft Project Calendar object containing the scheduling information for a project.

Intrinsic Controls

The following table summarizes the intrinsic controls found in the Visual Basic toolbox.

CheckBox Displays a True/False or Yes/No option. You can check any number of check boxes on a form at one time.

ComboBox Combines a text box with a list box. Allows a user to type in a selection or select an item from a drop-down list.

Command button CommandButton Carries out a command or action when a user chooses it.

Data Enables you to connect to an existing database and display information from it on your forms.

DirListBox Displays and allows a user to select directories and paths.

DriveListBox Displays and allows a user to select valid disk drives.

FileListBox Displays and allows a user to select from a list of files.

Frame Provides a visual and functional container for controls.

HScrollBar and VScrollBar Allow a user to add scroll bars to controls that do not automatically provide them. (These are not the same as the built-in scroll bars found with many controls.)

Image Displays bitmaps, icons, or Windows metafiles, JPEG, or GIF files; acts like a command button when clicked.

Label Displays text a user cannot interact with or modify.

Line Adds a straight-line segment to a form.

ListBox Displays a list of items that a user can choose from.

OLE container Embeds data into a Visual Basic application.

OptionButton The Option Button control, as part of an option group with other option buttons, displays multiple choices, from which a user can choose only one.

PictureBox Displays bitmaps, icons, or Windows metafiles, JPEG, or GIF files. It also displays text or acts as a visual container for other controls.

Shape Adds a rectangle, square, ellipse, or circle to a form, frame, or picture box.

TextBox Provides an area to enter or display text.

Timer Executes timer events at specified time intervals.

As they are contained inside the Visual Basic .exe file, and not in an OCX, they can only be used with VB6.


Standard ActiveX Controls

The Learning edition of Visual Basic contains a number of ActiveX controls (referred to as standard ActiveX controls) that allow you to add advanced features to your applications. ActiveX controls have the file name extension .ocx and can be used in your project by manually adding them to the toolbox.

The following table summarizes the standard ActiveX controls available in the Learning edition of Visual Basic.

ADO Data Control ADODC Creates a connection to a database using ADO. Assignable to the DataSource property of other controls such as the DataGrid.

Common dialog CommonDialog Provides a standard set of dialog boxes for operations such as opening and saving files, setting print options, and selecting colors and fonts.

DataCombo DataCombo Provides most of the features of the standard combo box control, plus increased data access capabilities.

DataGrid DataGrid A grid control that allows can be data-bound to a data source such as the ADO Data Control. Reading and editing the recordset is possible.

DataList DataList Provides most of the features of the standard list box control, plus increased data access capabilities.

Microsoft Hierarchical FlexGrid MSHFlexGrid A read-only grid control that can be bound the Data Environment designer to show hierarchical recordsets.

These can be used with PB, but except the Common Dialogs, require the use of a OLE Container to host them.


ActiveX Controls

ADO Data Control
The ADO Data Control is similar to the intrinsic Data control and the Remote Data Control (RDC). The ADO Data Control allows you to quickly create a connection to a database using Microsoft ActiveX Data Objects (ADO).

Animation Control
The Animation control allows you to create buttons which display animations, such as .avi files, when clicked. The control can play only AVI files that have no sound. In addition, the Animation control can display only uncompressed .avi files or .avi files that have been compressed using Run-Length Encoding (RLE).

CommonDialog Control
The CommonDialog control provides a standard set of dialog boxes for operations such as opening and saving files, setting print options, and selecting colors and fonts. The control also has the ability to display help by running the Windows Help engine.

CoolBar Control
A CoolBar control contains a collection of Band objects used to create a configurable toolbar that is associated with a form.

DataCombo Control
The DataCombo control is a data-bound combo box that is automatically populated from a field in an attached data source, and optionally updates a field in a related table of another data source.

DataGrid Control
Displays and enables data manipulation of a series of rows and columns representing records and fields from a Recordset object.

DataList Control
The DataList control is a data-bound list box that is automatically populated from a field in an attached data source, and optionally updates a field in a related table of another data source.

DataRepeater Control
The DataRepeater control functions as a scrollable container of data-bound user controls. Each control appears in its own row as a "repeated" control, allowing the user to view several data-bound user controls at once.

DateTimePicker Control
The DateTimePicker control enables you to provide a formatted date field that allows easy date selection. In addition, users can select a date from a dropdown calendar interface similar to the MonthView control.

DBCombo Control
The DBCombo control is a data bound combo box with a drop-down list box which is automatically populated from a field in an attached Data control, and optionally updates a field in a related table of another Data control. The text box portion of DBCombo can be used to edit the selected field.

DBList Control
he DBList control is a data bound list box which is automatically populated from a field in an attached Data control, and optionally updates a field in a related table of another Data control.

FlatScrollBar Control
The FlatScrollBar control is a mouse-sensitive version of the standard Windows scroll bar that offers two-dimensional formatting options. It can also replace the standard Windows three-dimensional scroll bar. The FlatScrollBar provides increased interactivity when using the scroll arrows and the scroll box.

ImageCombo Control
The ImageCombo control is a picture-enabled version of the standard Windows combo box. Each item in the list portion of the control can have a picture assigned to it.

ImageList Control
An ImageList control contains a collection of ListImage objects, each of which can be referred to by its index or key. The ImageList control is not meant to be used alone, but as a central repository to conveniently supply other controls with images.

ListView Control
The ListView control displays items using one of four different views. You can arrange items into columns with or without column headings as well as display accompanying icons and text.

MAPIMessages Control
The messaging application program interface (MAPI) controls allow you to create mail-enabled Visual Basic MAPI applications.

MAPISession Control
The messaging application program interface (MAPI) controls allow you to create mail-enabled Visual Basic MAPI applications.

Masked Edit Control
The Masked Edit control provides restricted data input as well as formatted data output. This control supplies visual cues about the type of data being entered or displayed.

Microsoft Internet Transfer Control
The Internet Transfer control provides implementation of two of the most widely used protocols on the Internet, HyperText Transfer Protocol (HTTP) and File Transfer Protocol (FTP).

MonthView Control
The MonthView control enables you to create applications that let users view and set date information via a calendar-like interface.

MSChart Control
A chart that graphically displays data.

MSComm Control
The MSComm control provides serial communications for your application by allowing the transmission and reception of data through a serial port.

MSFlexGrid Control
The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.

MSHFlexGrid Control
The Microsoft Hierarchical FlexGrid (MSHFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a data control, MSHFlexGrid displays read-only data.

Multimedia MCI Control
The Multimedia MCI control manages the recording and playback of multimedia files on Media Control Interface (MCI) devices. Conceptually, this control is a set of push buttons that issues MCI commands to devices such as audio boards, MIDI sequencers, CD-ROM drives, audio CD players, videodisc players, and videotape recorders and players. The MCI control also supports the playback of Video for Windows (*.avi) files.

PictureClip Control
The PictureClip control allows you to select an area of a source bitmap and then display the image of that area in a form or picture box. PictureClip controls are invisible at run time.

ProgressBar Control
The ProgressBar control shows the progress of a lengthy operation by filling a rectangle with chunks from left to right.

RemoteData Control
Provides access to data stored in a remote ODBC data source through bound controls. The RemoteData control enables you to move from row to row in a result set and to display and manipulate data from the rows in bound controls.

RichTextBox Control
The RichTextBox control allows the user to enter and edit text while also providing more advanced formatting features than the conventional TextBox control.

Slider Control
A Slider control is a window containing a slider and optional tick marks. You can move the slider by dragging it, clicking the mouse to either side of the slider, or using the keyboard.

SSTab Control
The SSTab control provides a group of tabs, each of which acts as a container for other controls. Only one tab is active in the control at a time, displaying the controls it contains to the user while hiding the controls in the other tabs.

StatusBar Control
A StatusBar control provides a window, usually at the bottom of a parent form, through which an application can display various kinds of status data. The StatusBar can be divided up into a maximum of sixteen Panel objects that are contained in a Panels collection.

SysInfo Control
The SysInfo control allows you to respond to certain system messages sent to all applications by the operating system. Your application can then adapt to changes in the operating system if necessary.

TabStrip Control
A TabStrip control is like the dividers in a notebook or the labels on a group of file folders. By using a TabStrip control, you can define multiple pages for the same area of a window or dialog box in your application.

Toolbar Control
A Toolbar control contains a collection of Button objects used to create a toolbar that is associated with an application.

TreeView Control
A TreeView control displays a hierarchical list of Node objects, each of which consists of a label and an optional bitmap. A TreeView is typically used to display the headings in a document, the entries in an index, the files and directories on a disk, or any other kind of information that might usefully be displayed as a hierarchy.

UpDown Control
An UpDown control has a pair of arrow buttons which the user can click to increment or decrement a value, such as a scroll position or a value in an associated control, known as a buddy control.

Winsock Control
The Winsock control, invisible to the user, provides easy access to TCP and UDP network services. It can be used by Microsoft Access, Visual Basic, Visual C++, or Visual FoxPro developers. To write client or server applications you do not need to understand the details of TCP or to call low level Winsock APIs. By setting properties and invoking methods of the control, you can easily connect to a remote machine and exchange data in both directions.


137
COM / Re: SBVB
« on: October 10, 2014, 10:44:45 AM »
Mike from for O2 forum gave the Script BASIC IDE/Debugger/COM a try on the new Windows 10 preview release. This is good news for all VB classic hold outs.

138
COM / Re: SBVB
« on: October 09, 2014, 09:59:58 PM »
This example uses an OCX control built with the FREE Microsoft VB5CCE (Visual BASIC 5 Controls Edition). HERE is a link to a zip that contains VB5CCE, xp theme manifest and help for CCE. (10.2 MB)

   

Code: Script BASIC
  1. import com.inc
  2.  
  3. function Button1_Click(arg)
  4.         print "Back in script basic Button1_Click arg=", arg, "\n"
  5.         Button1_Click = arg + 1
  6. end function
  7.  
  8. obj = CreateObject("VB5.CCESample")
  9.  
  10. if obj = 0 then
  11.     print "CreateObject failed!\n"
  12. else
  13.     print "obj = ", obj, "\n"
  14.                
  15.     oCollection = CallByName(obj, "CallBackHandlers", VbGet)
  16.     print "oCollection = ", oCollection, "\n"
  17.    
  18.     CallByName(oCollection, "Add", VbMethod, ADDRESS(Button1_Click()), "frmCallBack.cmdOp1_Click" )
  19.    
  20.     retVal = CallByName(obj, "LaunchCallBackForm", vbMethod, 21)
  21.     print "LaunchCallBackForm returned ", retVal, "\n"
  22.    
  23.     ReleaseObject(obj)
  24.     print "test complete!\n"
  25. end if
  26.  

Console Output


C:\ScriptBasic_Control-master\engine\COM_Extension_DLL\vb5cce_Example>scriba VB5_Example.sb
obj = 1402016
oCollection = 1410024
Back in script basic Button1_Click arg=21
LaunchCallBackForm returned 22
test complete!

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL\vb5cce_Example>


139
COM / Re: SBVB
« on: October 09, 2014, 06:28:09 PM »
Here is an example of VB6 calling Script BASIC functions.

      

Code: Script BASIC
  1. import com.inc
  2.  
  3. 'in the VB6 GUI
  4. 'this one uses SBCallBackEx which supports multiple types and args
  5. 'return values can be either string or long.
  6. function Button1_Click(arg, arg1, arg2, arg3, arg4, arg5)
  7.         print "Button1_Click arg=", arg, "\n"
  8.         print "Button1_Click arg1=", arg1, "\n"
  9.         print "Button1_Click arg2=", arg2, "\n"
  10.         print "Button1_Click arg3=", arg3, "\n"
  11.         print "Button1_Click arg4=", arg4, "\n"
  12.         print "Button1_Click arg5=", arg5, "\n"
  13.         Button1_Click = arg + 1
  14. end function
  15.  
  16. 'in the VB6 GUI
  17. 'this one uses SBCallBack it only takes one long arg. return value is long
  18. function Button2_Click(arg)
  19.         print "Back in script basic Button2_Click arg=", arg, "\n"
  20.         Button2_Click = arg * 2
  21. end function
  22.  
  23. obj = CreateObject("VB6.Sample")
  24.  
  25. if obj = 0 then
  26.     print "CreateObject failed!\n"
  27. else
  28.         print "obj = ", obj, "\n"
  29.                
  30.         oCollection = CallByName(obj, "CallBackHandlers", VbGet)
  31.     print "oCollection = ", oCollection, "\n"
  32.    
  33.     CallByName(oCollection, "Add", VbMethod, ADDRESS(Button1_Click()), "frmCallBack.cmdOp1_Click" )
  34.     CallByName(oCollection, "Add", VbMethod, ADDRESS(Button2_Click()), "frmCallBack.cmdOp2_Click" )
  35.    
  36.     retVal = CallByName(obj, "LaunchCallBackForm", vbMethod, 21)
  37.     print "LaunchCallBackForm returned ", retVal, "\n"
  38.    
  39.     ReleaseObject(obj)
  40.     print "test complete!\n"
  41. end if
  42.  

Console Output

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>scriba COM_VB6_CallBack_Example.sb
obj = 1417264
oCollection = 1417344
Button1_Click arg=21
Button1_Click arg1=two
Button1_Click arg2=3
Button1_Click arg3=four
Button1_Click arg4=5
Button1_Click arg5=1356152
Back in script basic Button2_Click arg=22
LaunchCallBackForm returned 44
test complete!

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>


140
COM / Re: SBVB
« on: October 09, 2014, 05:31:53 PM »
Here is a C# (C-Sharp) .NET calendar control example being called from Script BASIC COM.



Code: Script BASIC
  1. import com.inc
  2.  
  3. cs = CreateObject("Sample.Sample")
  4.  
  5. if cs = 0 then
  6.         print "Failed to create the C# com object did you register the dll with regasm and have .NET installed?"
  7.         return
  8. end if
  9.  
  10. d = CallByName(cs, "GetDate")
  11. print "User Selected date: ", d
  12.  

Console Output


C:\ScriptBasic_Control-master\engine\COM_Extension_DLL\CS_Sample>scriba cs_date.sb
User Selected date: 10/9/2014
C:\ScriptBasic_Control-master\engine\COM_Extension_DLL\CS_Sample>



141
COM / SBVB
« on: October 09, 2014, 11:38:35 AM »
This thread will demonstrate using the Script BASIC COM interface with Visual BASIC and .NET forms as COM ActiveX controls.

      



   



Code: Script BASIC
  1. import com.inc
  2.  
  3. obj = CreateObject("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 "CreateObject failed!\n"
  14. else
  15.  
  16.     print "TypeName obj = ", TypeName(obj), "\n"
  17.  
  18.     CallByName(obj, "longTest", VbMethod, 20000)
  19.     CallByName(obj, "intTest", VbMethod, 1000)
  20.     CallByName(obj, "byteTest", VbMethod, 255)
  21.    
  22.     'this one fails silently because its invalid value for byte type..
  23.    CallByName(obj, "byteTest", VbMethod, 256)
  24.  
  25.     retVal = CallByName(obj, "GetString", VbMethod, "Enter some Text:", "my title", "default value!")
  26.     print "GetString returned: ", retVal, "\n"
  27.    
  28.     'do NOT release objects you dont own..
  29.    objForm = CallByName(obj, "LaunchUI")
  30.     print "objForm = ", objForm, "\n"
  31.    
  32.     for i=0 to 10
  33.         CallByName(objForm, "AddItem", VbMethod, "Hello from script basic! " & i)
  34.     next
  35.    
  36.     print "Waiting until user closes form to proceede..\n"
  37.     CallByName(obj, "BlockUntilFormCloses")
  38.    
  39.     sDate = CallByName(obj, "SelectDate")
  40.     if len(sDate) = 0 then
  41.         print "User pressed cancel for date selection\n"
  42.     else
  43.         print "Date: ", sDate, "\n"
  44.     end if
  45.    
  46.     ReleaseObject(obj)
  47.     print "anndddd were done!\n"
  48.    
  49. end if
  50.  

Console Output

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>scriba COM_VB6_Example.sb
TypeName obj = _Sample
GetString returned: Script BASIC talks to VB6.
objForm = 1417320
Waiting until user closes form to proceede..
Date: 9/10/2014
anndddd were done!

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>





142
Debugger / Re: Debugger progress
« on: October 08, 2014, 08:03:01 PM »
Quote
1.  XP SP2

I would highly recommend finding a SP3 update. Your XP system is seriously out of date.

143
Debugger / Re: Debugger progress
« on: October 08, 2014, 02:04:43 PM »
Are you running XP SP3? What is the speed (mhz/ghz) of your CPU? How much memory do you have?


144
Debugger / Re: Debugger progress
« on: October 08, 2014, 11:01:24 AM »
Do you have VB6 on your system? If not do you have the latest VB6 runtime redistributables installed?

As mentioned before, it works flawlessly on my XP VirtualBox and on my Win7 64 bit partition. How old is your PC? I have asked others to give it a try and report back if they are seeing your symptoms.

Status

Aurel (O2 forum) - XP - IDE and SAPI COM example works.

145
Debugger / Re: Debugger progress
« on: October 07, 2014, 06:23:09 PM »
Don,

I just applied the VB6 SP6 accumulative updates under XP and regenerated the SBDebug.exe program. Can you give this a try and see if it helps?

John

146
Debugger / Re: Debugger progress
« on: October 07, 2014, 04:38:07 PM »
Don,

I'm here on Windows 7 64 bit and the Script BASIC IDE/Debugger seems to work fine here as well. Just like on XP.


147
Debugger / Re: Debugger progress
« on: October 07, 2014, 01:45:23 PM »
What Windows OS are you running on Don? It seems to work fine in my XP VirtualBox. I'll try it on my Windows 7 64 bit partition and see if I have issues there. Thanks for the feedback.

Hint: I always click on the window (editor/debugger, vars, ...) before scrolling. (mouse/arrows or scrollbars) See if that helps. I would also make sure you're running the latest VB redistributables. thread on the subject

Note: I had to use IE to download this VB6 update as Firefox gave a network error.

148
Debugger / Re: Debugger progress
« on: October 07, 2014, 12:43:06 AM »
I created a Bitbucket Repository for Dave's Script BASIC COM and IDE/Debugger. Dave's Github repository (maintained by him) has aspirations for a VB6 Script BASIC scripting engine as an ActiveX control. 

The Bitbucket repository has been updated with the Script BASIC 2.2 version and a new Windows installer created.

Attached is the SB COM object interface viewer.

Code: Script BASIC
  1. import com.inc
  2.  
  3. 'on error resume next
  4.  
  5. oExcelApp = CreateObject("Excel.Application")
  6.  
  7. if oExcelApp = 0 then
  8.     print "Failed to create Excel Object do you have it installed?"
  9.     return
  10. end if
  11.  
  12. print "Typename = ", TypeName(oExcelApp), "\n"
  13.  
  14. print "Launching DescribeInterface dialog...\n"
  15. DescribeInterface oExcelApp
  16.  
  17. print "Shutting down Excel and releasing object...\n"
  18. CallByName(oExcelApp, "Quit")
  19. ReleaseObject(oExcelApp)
  20.  
  21. print "Script complete!\n"
  22.  


C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>scriba typeinfo.sb
Typename = _Application
Launching DescribeInterface dialog...
Shutting down Excel and releasing object...
Script complete!

C:\ScriptBasic_Control-master\engine\COM_Extension_DLL>


Here is a thread showing the Script BASIC COM extension module creating an Excel Spreadsheet.

149
Debugger / Re: Debugger progress
« on: October 05, 2014, 11:09:17 PM »
Don,

Here is the rebuild of Dave's Script BASIC IDE/Debugger with the 2.2 enhancements. (Tom's math functions and Peter's LIKE fix)

John

The sb_engine.dll should be the only file you need to update. I included a VB6 recompile of the SBDebug.exe and called it SBIDE.exe.

150
Debugger / Re: Debugger progress
« on: October 03, 2014, 04:05:12 PM »
Don,

I hope to rebuild Dave's COM / IDE project this weekend with the current source. I don't know if I will be able to create the install program though.

FYI The RAD and other 14 math functions were added by Tom for the 2.2 release. Tom's math additions and Peter's fix for LIKE is about all that was effected in scriba. Most of the Script BASIC 2.2 release enhancements are extension module based.

John

Pages: 1 ... 8 9 [10] 11 12 ... 59