Author Topic: VB6 Extended  (Read 18384 times)

0 Members and 1 Guest are viewing this topic.

Mike Lobanovsky

  • Guest
Re: VB6 Extended
« Reply #15 on: October 20, 2014, 09:45:12 PM »
John,

The thread attempts to set forth some general guidelines to be followed in order to upgrade an existing project with the replacement controls from Krool's library, starting with this message.

It looks like you will need some manual work done on your main form to upgrade it by eliminating the stock mscomctl.ocx controls altogether and replacing them with Krool's counterparts. That's the downside of it. But there's also an advantage: you can fix your control placement in the meantime to allow for somewhat different metrics in Vista+ environments and you can also flip the tabs to the tab control's top to let them get their theming right together with the other controls on the main form.

JRS

  • Guest
Re: VB6 Extended
« Reply #16 on: October 20, 2014, 10:21:48 PM »
Quote
But there's also an advantage: you can fix your control placement in the meantime to allow for somewhat different metrics in Vista+ environments and you can also flip the tabs to the tab control's top to let them get their theming right together with the other controls on the main form.

You read my mind. Dave's beta release was to get functionality going. It was my job to put it in a pretty dress.  8) I got wrapped up in SBLisp and should have been working with Dave on this.  :-\

JRS

  • Guest
Re: VB6 Extended
« Reply #17 on: October 21, 2014, 09:29:54 PM »
Mike,

It seems that the new common controls OCX only works with .exe based forms and not ActiveX OLE interfaced forms. On a positive note, the new OCX allowed me to remove the theming SUB and .rc which the new OCX seems to handle even if I'm not using the OCX's specific controls.

Any ideas how I might be able to get the new OCX to work with my ActiveX created forms?


Mike Lobanovsky

  • Guest
Re: VB6 Extended
« Reply #18 on: October 21, 2014, 11:41:22 PM »
Sorry John,

Can't give you any clues right away; it's been a long time since I fiddled with VB6 last. I need two or three days to finish off my current freelance contract and I'm planning to be free by this weekend. Can it wait till then, do you think?

JRS

  • Guest
Re: VB6 Extended
« Reply #19 on: October 21, 2014, 11:48:58 PM »
No rush. Real life always comes first. Thanks for the offer to have a peek.

JRS

  • Guest
Re: VB6 Extended
« Reply #20 on: October 24, 2014, 10:48:47 AM »
Mike,

Update

I joined VBForums and was able to get a response from Krool and he pointed me to someone that may have had success using his OCX with ActiveX form controls. (DLL). I sent him a PM and hope to hear back.

(See Krool's thread for current activity)

While I'm waiting ...

I'm wondering if I create an  ActiveX DLL from scratch using the new OCX, maybe I'll have better luck. Worth a try.
« Last Edit: October 24, 2014, 09:47:59 PM by John »

JRS

  • Guest
Re: VB6 Extended
« Reply #21 on: October 25, 2014, 07:32:15 PM »
Here is the link to get your mouse wheel working in the VB6 IDE.

Mouse wheel events do not work in the Visual Basic 6.0 IDE

JRS

  • Guest
Re: VB6 Extended
« Reply #22 on: October 26, 2014, 04:21:31 PM »
No word from Krool but I have been chatting with Dave and found out the SB COM ext. module should handle ActiveX .exe controls as well. (wasn't tested) I'm happy to report that it worked but was unable to get it to work with the new OCX common controls replacement. I was able to get theming to work with the Manifest Creator add-in. (see attached)

The listbox add item caused an exception error (but recovered) and it didn't show the form with the old OCX MSCAL (calendar) control.

I'm just about to call this a lost cause unless Mike can pull some magic from his VB hat.

At least I have a way to create modern looking .exe VB classic applications. (SB IDE/Debugger)

.

JRS

  • Guest
Re: VB6 Extended
« Reply #23 on: October 26, 2014, 09:30:03 PM »
I have come to the conclusion that the only sane path to take with this is to use VB6 as a GUI designer and generate an IUP cross platform GUI solution. My hope is that using Dave's COM/VB connection I can get the pixel scale values for control sizes and placement using the defined scale. (.frm defaults to twips) I can then dynamically translate that to IUP under SB program control. It's all theory at the moment but I can't see investing a bunch of time into trying to extend VB classic as a side project of SB.

I would compare the VB classic fan club to bunch of Harley Davidson hobbyists that can't let the old girl go.

Attached is what the SB COM object  browser is returning for the SB_Example.dll. (ActiveX DLL example)

.
« Last Edit: October 26, 2014, 11:54:25 PM by John »

JRS

  • Guest
Re: VB6 Extended
« Reply #24 on: October 27, 2014, 06:09:36 PM »
VB6 makes adding a web browser control to your project like adding a button.

Code: Visual Basic
  1. Private Sub Form_Load()
  2.   WebBrowser1.Navigate "www.scriptbasic.org/forum/index.php"
  3. End Sub
  4.  

VBForums Statistics

Threads  670,772   Posts  4,235,229   Members  170,707


Another example of ageless beauty. (see attached - for Mike)

.
« Last Edit: October 27, 2014, 08:30:06 PM by John »

JRS

  • Guest
Re: VB6 Extended
« Reply #25 on: October 28, 2014, 08:35:21 PM »
For those running Vista and beyond, here is a nice enhanced message dialog project for VB6.

cTaskDialog 0.6



JRS

  • Guest
Re: VB6 Extended
« Reply #26 on: October 29, 2014, 10:48:22 PM »
I ran into a nice VB6 add-in called CodeView. A very handy tool for finding things quickly.

Download

FWIW This second round with VB6 and the enhancements by the community is like running into an old girl friend and realizing there still might be something there.  :-*

.
« Last Edit: October 29, 2014, 11:24:37 PM by John »

JRS

  • Guest
Re: VB6 Extended
« Reply #27 on: October 30, 2014, 01:42:46 PM »
I have a thread going on the VBForums site in the Other BASIC board. (180+ views < 12 hours) One of the members that seems to be a VP pro is showing interest in the project.

FYI: Here is what my current VB6 IDE looks like on XP. (see attached)

.

Mike Lobanovsky

  • Guest
Re: VB6 Extended
« Reply #28 on: October 30, 2014, 01:59:54 PM »


VB6 is cool and has always been. :D

Try to use the Google Translator to follow this post. It will enable you to generate true Windows console applications in VB6 easily as well -- a feature that's never been supported by VB6 natively.

JRS

  • Guest
Re: VB6 Extended
« Reply #29 on: October 30, 2014, 02:35:07 PM »
Thanks Mike for the console app toolkit. I used Google Translate to read it but had to go back to the original to download the files.

EasyConsole - create a console application in VB in just a few steps

In this theme, new version, bug reports and questions on the use of brick.
In the "Projects" is the theme of a satellite - it reasoning technology, praise and criticism.

This brick allows you to create a VB (VB6) full console application, attaching to this record minimum of effort, adding to the project about 10 lines of code:!:

Brick itself - the usual module EasyConsole (easycons.bas):
Latest version:

     easycons_1.0.0.zip
         version 1.0.0
         (656 bytes) Downloads: 104


In order to take advantage of a brick, you need to perform only three steps:

     Add EasyConsole module into your project.

     Connect to Project → References type library «Microsoft Scripting Runtime», known to some as the townsfolk FSO.



Note that before you add it, the item must look somewhere in the middle of the list.

Making VB generate "console» EXE-Schnick. When my plugin ACM-Tools will be made, it would require all-only install one checkbox in the properties of the VB-project. But until I made this plugin, you will need to edit the VBP-file (the project file) manually in Notepad and add the following two lines:

Code: Visual Basic
  1. [VBCompiler]
  2. LinkSwitches = -subsystem: console
  3.  


You can then use the module and compile the full console applications to VB6!

The use is as follows:

     You call the function once EasyconInitialize of module EasyConsole.
     You from anywhere in your project accesses objects stdin, stdout or stderr for its management console.
     For example the following code:

Code: Visual Basic
  1. stdout.WriteLine "Hello Wolrd! Long Live VBStreets!"
  2.  

     Displays in the console line «Hello Wolrd! Long Live VBStreets! ».

Deal with brick examples will help you:

examples.zip
     Archive with examples (4 examples)
     (22.12 KB) Downloads: 89

The archive 4 examples:

     HelloWorld - simply displays some welcome text to the console.



Reversor - you type in the console word or sentence, and the program displays it in the console in otzerkalennom (strreverse) form.


SimpleShell - stupid primitive command-line shell (type cmd.exe). Supports about 9 teams and launch external programs.


VbGrep - a simplified version of the utility grep - the command line specified search words (separated by spaces), the utility reads text from stdin-a, and outputs to stdout only those rows where the search text. At the same time, and displays the line number in which the search term is found. The example does not need to run the utility itself, and the batch file TEST_VBGREP.BAT, which feeds the utility text file with the text of the song Jingle Bells, as well as the words to search for specified words «the» and «fun».


Template (Template)
Also, for your convenience, so that every time you do not have to create a project, add a module, add the item to the Project → References and edit the project file in notepad, I made a template that will immediately create a project with the right screwing:


You may be familiar with the mechanism of templates when added template from FNDLL. To install the template, you need to download this file here:

template_1.0.0.zip
     Project Template (with the module with version 1.0.0)
     (1.51 KB) Downloads: 75


And extract its contents to a folder with the project templates.

For example, if you have VB6 installed on a standard location:
c: \ program files \ Microsoft Visual Studio \ VB98 \
Then you need to extract the files in this folder:
c: \ program files \ Microsoft Visual Studio \ VB98 \ Template \ Projects

Lows
This solution has one drawback. Console applications can not be debugged. Rather, debug, of course you can, but try to write something to stdout when running under debugging (or read anything from stdin-a) privedё error (which, nevertheless, can be treated).

If you are debugging is critical, I see two possible solutions to this problem:

     Make a copy of the file and name it VB6.EXE, say, VB6CON.EXE. Then use a utility EDITBIN edit the file, changing the value of the field on the subsystem console. That is something like this:


After that, to work on your console project, use it as an IDE VB6CON.EXE, rather than just VB6.EXE. In this case, together with the environment will create a console window, and debugged your console programs will work fully, just as would behave in a compiled form.
Editbin utility included with Visual Studio, and 6, and the Platform SDK, so it must be you, unless you are one of those strange people who put only VB6, but not the whole VS6. But in any case, you can edit any other editor vb6con.exe PE-files.

Quite another option. You can create a class or form CDbgConsoleEmulator, which Implements ITextStream write and implement this interface. The module also EasyConsole using technology I have described an elegant determine under debugging if the project works, you need to work while under debugging instead of FSO-shnyh objects slip an instance of your class CDbgConsoleEmulator (which can be not just a class, but also the form in particular) . This instance will handle calls himself Read / ReadLine / Write / WriteLine and do something. For example, if it is a form - fully emulate the console interface.

« Last Edit: October 30, 2014, 03:10:08 PM by John »