Howto: Make Irrlicht GUI's using visual basic 6.0

A forum to store posts deemed exceptionally wise and useful
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Howto: Make Irrlicht GUI's using visual basic 6.0

Post by Mercior »

I started hard coding menus for my games editor today and realised that it was going to take far too much time and effort to hard code all the menu positions and I didn't fancy coding a gui editor.. then I remembered a function in vb6 for iterating through the forms controls!

An hour later I had the Irrlicht GUI tool! This is for vb6 users only!!! (it may work in .net I dunno). I have created a project which you open up in vb and you place all your gui elements on the form as usual in vb, then you run the application and click the "make code" button and it will produce the c++ code to make the irrlicht gui elements!

This:
Image

Becomes this:
Image

Currently I've only added support for edit boxes, buttons, text labels and combo boxes but if you look at the source you'll see its very easy to add new items - the source code for this is under 100 lines :)

You may download it HERE
PadrinatoR
Posts: 50
Joined: Tue Mar 09, 2004 9:53 pm
Location: Spain

Post by PadrinatoR »

wow!! It's so useful!! Thanks a lot ;)
There are only 10 types of people: those who understand binary and those who don't

--------------------------------------------

Image
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

Post by Serg Nechaeff »

A great tool indeed!
also maybe someone could compile an exe for those who dont have visual basic? Because I dont have one :)
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post by Mercior »

Nope sorry you need vb6 for this because you use the vb6 IDE to make the form, the binary version just produces a code output of the controls in the binary, if you understand :)

I beleive microsoft word has a mini vb macro maker, the code might work using that...
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Wow, cool tool :)
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

Sweeeeet! Any idea of why it would not work with .NET? I will try as soon as I get a chance.
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Awesome idea, i never though about doing that. Btw, will it work w/ the Visual Basic Macro Editor, or do i need to pull out my copy of visual basic 6.0 ;-)
The Robomaniac
Project Head / Lead Programmer
Centaur Force
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post by Mercior »

Sadly I can't get this to work in the word macro editor because it doesn't seem to support the for.. each statement :(

As for .net I've never tried it but as long as it supports for..each then I guess it should work.
eis_os
Posts: 12
Joined: Sun Apr 18, 2004 12:40 pm

Post by eis_os »

There is a free version of VB to create activex controls,
in a control you can add all standard controls. It's called vb5cce. Visual Basic 5 Control Creation Edition.

If I remember correctly you can create various size controls with it, and aswell save the control. I think the tool needs only a small tweak to understand the ctl files produced with it...

Ohh and in a control you should be able to run any vb5 code aswell.

Or you create the forms in VBA and say export :)
It shouldn't be hard to write a perl / bash / something script to read frm's or ctl's
Unarekin
Posts: 60
Joined: Thu Apr 22, 2004 11:02 pm

Post by Unarekin »

I up and started working on tweaking this to work as a standalone program.

Essentially, the idea is that you are presented with the options to add the various menu items, and the control is loaded at run-time. The controls will also be positionable, so that you can move them about.

I made a few tweaks to Mercior's code that generates the GUI code.

It uses a VB function, TypeOf() now, which returns a string that denotes the type of control it is, rather than being wholly dependent on the name of the control. I also changed it to use a Select statement (Same concept as C's switch() ) instead of a handful of Ifs.

I'm also considering having the program able to save/load in the XML GUI format thingy that's been posted on here before, and incorporating the scaling macros for resolution-independent GUIs.
Marquis
Posts: 3
Joined: Tue Mar 30, 2004 4:47 pm

Guimaker

Post by Marquis »

I made a guimaker all in C++ with the Irrlicht librairy. The program is not finished. It's generate the code of GUI.

The binary and source can be downloaded at
http://www.info.polymtl.ca/~etbou/guimaker.zip
Guest

Post by Guest »

hey theres a code for u to drag controls around on a VB app. dont know how to contact mercior but would like to know if he interested in improving his GUI editor.
dakz0rz
Posts: 9
Joined: Thu Sep 16, 2004 10:10 am

Post by dakz0rz »

Guest: mercior@hotmail.com is his email address..
Got it from his profile..

Marquis: That address for your guimaker does not exist
dracflamloc

Post by dracflamloc »

I'm creating a fully-functional and interactive gui designer. I should have an alpha up by the end of the weekend. Thanks for the idea, I hope you'll enjoy it and find it useful, I do!
dracflamloc
Posts: 142
Joined: Sat Dec 11, 2004 8:13 am
Contact:

Post by dracflamloc »

Nevermind that about the alpha being up sunday night, its up now. Check it out, let me know what you think. Obviously the interface could use some work right now but I'd rather get more supported gui objects in there first. Let me know how things go for you! I tested the currently supported types and they worked fine but your mileage may vary (its an alpha :wink:)

It requires the .NET Framework which can be obtained on windows update or microsoft.com in case you don't have it already.

The link: http://www.dracsoft.com/zips/irr_gui_editor.zip

Edit: Alpha 2 is up. ComboBox support, and improved user interface.
Post Reply