Jump to content


Photo

Vb6 Dialog Dll


  • Please log in to reply
40 replies to this topic

#1 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 01 June 2008 - 11:43 PM

VB6 Dialog DLL


With this DLL you can use real Widows form in your Game Maker game/application, even though they are designed by me (May look bad to you) but you can request one from me, giving a layout for me. It was made in Visual Basic 6 with my DLL tutorial and is pretty basic. The one major downside is that it will not work on Vista, might be an upside to non-Vista users :blink: Maybe...

It currently has:
  • Password Box (Hides real password)
  • Drive List (A drop-down or available drives)
  • Get Directory
  • Get File (Specified Directory)
  • Get String (For random reasons...)
  • Locate File (Three controls that allow you to look around your computer for a file)
  • Show YouTube Video (A few bugs with caption)

DOWNLOAD: Here (V3)

The functions are simple and not hard to understand, the coding is fairly simple too.

InitDialog(); //Init the DLL for use
RetVal = GetPassword(strCaption, strDescr); //for people who don't like teh showing of get_string()
RetVal = DriveList(strCaption, strDescr); //choose a drive O.o
RetVal = GetDirectory(strCaption, strDescr); //find a directory...
RetVal = GetFile(strCaption, strDescr, strDirectory); //load a file in specified directory
RetVal = GetString(strCaption, strDescr); //Like get_string()
RetVal = LocateFile(strCaption, strDescr); //Like get_open_filename()
ShowYTVideo(strCaption, strVideoID) //.com only

Please note, first DLL, and they all freeze the game window upon use, I may be able to change that but I will wait until someone asks. I also made this today, it wasn't very hard.

If you would like to request a dialog, please post it or PM me what you want. There should be no issues but:

This does NOT work on some Vista computers. (Correct me if I'm wrong)

Edited by GMREC1111, 10 July 2008 - 03:01 PM.

  • 2

#2 BrokenGlass

BrokenGlass

    GMC Member

  • New Member
  • 524 posts

Posted 01 June 2008 - 11:45 PM

Nice DLL! This will be useful :blink:
  • 0

#3 Nixa

Nixa

    GMC Member

  • GMC Member
  • 497 posts
  • Version:GM:Studio

Posted 02 June 2008 - 02:42 PM

works fine on vista... but when i click cancel on DriveList function i got this message Posted Image
  • 0

Any questions related to GM? PM me ;)

Sudoku Puzzles [Download]


#4 freaked

freaked

    freak up!

  • New Member
  • 890 posts

Posted 02 June 2008 - 03:11 PM

w00t !
Looks like you managed to knock up a real dll after following my tut , making ur own tut, and then making this !

Its quite good.
  • 0

#5 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 02 June 2008 - 08:23 PM

works fine on vista... but when i click cancel on DriveList function i got this message

Oh, I forgot to program the Cancel button correctly after a test, thanks. I also managed to lose the actual project file, I have to rebuild it again. I have the files.

It does work on Vista, just not 64 Bit OS's.

w00t !
Looks like you managed to knock up a real dll after following my tut , making ur own tut, and then making this !

Its quite good.

Your tutorial honestly told me hardly anything, all I got was the location of the files I needed. I had to learn how to use arguments and other stuff myself. I still thank you.

I may add a dialog that asks for permission to download a file. It won't be too hard to do so I may end up doing it anyways.

Edited by GMREC1111, 07 June 2008 - 08:31 PM.

  • 2

#6 Kantah

Kantah

    RapidPhyreProducts

  • New Member
  • 738 posts

Posted 07 June 2008 - 06:03 PM

This is amazing.

Edited by Kantah, 07 June 2008 - 06:04 PM.

  • 0

#7 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 07 June 2008 - 07:13 PM

As I always say, delphi / C++ is always faster and far way better then GM. I myself has made some pretty good dialog dlls (one of them is by far the best one ever made on the GMC). If you want a link just ask. I'm not giving it right now because I don't want to seem like "advertising" it here.
  • 0

#8 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 07 June 2008 - 07:59 PM

Your topic is right below this one :P
  • 0

#9 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 07 June 2008 - 08:10 PM

My delphi dialogs dll is probably some 5 pages away from this one.
To remove further confusion I'll retrieve a link.
Edit: Here you go: Super Dialogs 6.

Edited by uuf6429, 07 June 2008 - 08:15 PM.

  • 0

#10 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 June 2008 - 08:14 PM

As I always say, delphi / C++ is always faster and far way better then GM. I myself has made some pretty good dialog dlls (one of them is by far the best one ever made on the GMC). If you want a link just ask. I'm not giving it right now because I don't want to seem like "advertising" it here.

Umm, this is Visual Basic, one of the first DLLs with string handling that was made in VB. Lukesterspy made a test DLL and test application and he had many, many calls going all at one, and drawing all. There really is only one limitation to it, 64bit OS's.

The dialogs are made in Visual Basic and not full code, I only use a few lined to do these as well. The harder part is data passing.


If you find another DLL made in Visual Basic on the GMC, link me to it, I would also want the link to your Dialog DLL.
  • 2

#11 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 07 June 2008 - 08:17 PM

Done
  • 0

#12 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 June 2008 - 08:24 PM

Ok, I saw it, I do not know how to make controls at runtime because I am a newbie to Visual Basic 6.

I believe that VB is much simpler than other compilers that DLLs are made with. All you need to do is:

Public Function Hello() As String 'Function Name: Hello, Return: String, Arguments: None
	Hello = StrConvToGM("Hello there!") 'Make it converted so Game Maker can use it normally
End Function

Along with the stuff you will never need to touch.
  • 2

#13 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 07 June 2008 - 08:47 PM

I believe Delphi is easier:
var Temp:String; // temporary string variable

function Hello:PChar; // Function Name: Hello, Return: String, Arguments: None
begin
   Temp :=  'Hello there!'; // Put return text in temporary variable
   Result := PChar(Temp); // Convert String to PChar (pchar is the string that GM uses)
end;

exports Hello; // tell it the function is exportable, sort of like making it public

Edited by uuf6429, 07 June 2008 - 08:48 PM.

  • 0

#14 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 June 2008 - 10:13 PM

Opinions, but VB has three lines and more simple functions. I agree that is simple too. Except all the odd cymbol uses, but I don't use Delphi so it's just me.

Does Delphi support forms, or no? I guess not.
  • 2

#15 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 08 June 2008 - 10:10 AM

It does.
Delphi is RAD, and at RAD it even beats VB (except VB visual studio maybe)
Did you see Super Dialogs 6?
It's all built with delphi and the dialogs designed with delphi IDE.
Edit: Here:
Posted Image
Of course my choice in using delphi is purely my opinion, but maybe you'd be interested to know that I used to use VB too.

Edited by uuf6429, 08 June 2008 - 10:12 AM.

  • 0

#16 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 12 June 2008 - 09:40 PM

UPDATE:

Fixed the PasswordBox as it has a dull character, added the requested one.

http://host-a.net/rot740/GMDialog.zip


Anyways, uuf6429, I made a DLL in VB and I honestly know what I am saying here. No defining variables, really simple functions that do not have much symbols in it. Though may I ask...Is Delphi free?
  • 2

#17 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 13 June 2008 - 09:31 AM

Delphi personal yes. Free for non-comercial use. Otherwise, it's free.
I gave up many languages (not really gave up, but my preference is now delphi), for the simple reason it's easy and easier to learn and manipulate. While at the same time, it offers features very similar to C++.
VB is a category of it's own. It works differently, and has it's advantages.
Sure it compiles small programs, but that's because the bulkiness is stored all around the computer.
Oh, and it's easy too, but lacks important features in C++/Delphi like RTTI (even though I've heard there's something vafuegly similar).
But, I won't rant more on this. If you try any other language, you'll see what I mean.
  • 0

#18 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 13 June 2008 - 11:50 AM

works fine on vista... but when i click cancel on DriveList function i got this message Posted Image

New version should have this fixed, it returns "c:" at the moment as I cannot return an empty string.

Umm, may I have a link to the download, I couldn't find a free download anywhere. I would like to try this.


Hah, no defining the functions :whistle: Done in a simple checkbox. You can also add DLL resources to the project that are stored internally and can have C++/Delphi functions as exports and be used. I honestly like VB because it has nothing hard to remember thats important...Nothing like C++'s defining and such, no listing variables and/or exports. Two major things:

- Include "vbAdvance Type Library"
- Check all functions that you want exported


Try making a DLL in VB, you will see it's easier but I agree, less functioned. If it's on the computer, it uses the computers tool to work.

Edited by GMREC1111, 13 June 2008 - 12:09 PM.

  • 2

#19 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 June 2008 - 10:51 PM

No defining of variables or functions isn't a feature to be proud of. All it does is encourage bad programming practice. I'm sure uuf and most others who program seriously would agree.

However, neat DLL for those who need dialogs in GM.
Well done!
  • 0

Chris Matthews, Co-Leader of Digital X

#20 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 June 2008 - 11:05 PM

Thanks! I don't know where you would need to define variables but OK...This is really hard as most of the good functions cannot be used in outside of a form. I could have made it possible to customize your form by providing an empty one and having some functions to create controls before showing it. I really am a newbie to Visual Basic and it is really hard to see this program wasted on other things rather than helping Game Maker, I am still the only one to release a Visual Basic DLL to be known of...a DLL was made but not with string arguments.
  • 2

#21 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 22 June 2008 - 01:08 AM

BUMP!

I have added a new dialog that seems to be a good use, it shows a YouTube video in a dialog...All you do is enter the ID of the video on youtube.com and it should load in a few seconds...

I am currently having trouble with one thing, an error fro the window...not GM. There is also a conflict between external_free and my DLL. If you call external_free, it freezes and needs to be process killed. I am trying to fix these but they do not interfere with the game until the game closes or is about to close.
  • 2

#22 lukesterspy

lukesterspy

    Robofish

  • GMC Member
  • 762 posts
  • Version:Unknown

Posted 24 June 2008 - 11:30 PM

This is pure awesomeness! uuf6429, just back off a little...so what he made a dll in Visual Basic, he never said that it is better than a Delphi dll, but simply that he has an opinion that it is easier to program in Visual Basic.
  • 0

R o b o fish Games


#23 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 24 June 2008 - 11:51 PM

Yes, and I can change values in forms without needing other extensions...But then again, VB needs a TLB file so it can compile as a Windows DLL.

Thanks, Luke.
  • 2

#24 xgamer

xgamer

    GMC Member

  • New Member
  • 161 posts

Posted 25 June 2008 - 01:08 AM

Nice =D
  • 0

#25 igloo9

igloo9

    GMC Member

  • New Member
  • 11 posts

Posted 25 June 2008 - 01:11 AM

Thats so awesome :D
  • 0

#26 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 June 2008 - 01:26 AM

Nice =D

Thanks :D (I always misspell thanks because I hit one key before another)

Thats so awesome :blink:

I know...only a few lines of code too D:

Edited by GMREC1111, 25 June 2008 - 01:30 AM.

  • 2

#27 coolist

coolist

    The Coolist

  • New Member
  • 913 posts

Posted 25 June 2008 - 01:27 AM

This is pure awesomeness! uuf6429, just back off a little...so what he made a dll in Visual Basic, he never said that it is better than a Delphi dll, but simply that he has an opinion that it is easier to program in Visual Basic.

He always asks people if they use visual basic for the dlls to see the capability of it! :D Well.. It makes sense.

Cool DLL Btw!

Edited by coolist, 25 June 2008 - 01:35 AM.

  • 0

#28 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 June 2008 - 01:32 AM

This is pure awesomeness! uuf6429, just back off a little...so what he made a dll in Visual Basic, he never said that it is better than a Delphi dll, but simply that he has an opinion that it is easier to program in Visual Basic.

He always asks people if they use visual basic for the dlls to see the capability of it! :blink: Well.. It makes sense.

Cool DLL Btw!

Yea, I am trying to put another DLL out there but the actual functions are getting me caught up...it's not VB...I am not a really good VB programmer and can't really do much with VB...

Thanks anyways :D

Edited by GMREC1111, 25 June 2008 - 01:36 AM.

  • 2

#29 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 25 June 2008 - 06:07 AM

This is pure awesomeness! uuf6429, just back off a little...so what he made a dll in Visual Basic, he never said that it is better than a Delphi dll, but simply that he has an opinion that it is easier to program in Visual Basic.

Ok ok!
I'm just saying Delphi's got it's advantages.
  • 0

#30 freaked

freaked

    freak up!

  • New Member
  • 890 posts

Posted 25 June 2008 - 07:02 AM

This DLL is nice and everything, but I get lots of and lots of errors with the You Tube box.
First I commented ShowYTVideo() from the Create Event and re-assigned it to the left key event.
When I pressed the left key, the box came up, but it would not close :)

Whenever I clicked the little X the box would disappear fractionally, and come up again :OMG:
The access to the GM Window was blocked.

Then I got and error - "Some problem with module GMDialog.exe" - Then task manager to close the app.
Then delete.
Full of errors, the You Tube thing is...
  • 0

#31 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 June 2008 - 10:59 AM

There is issues with the DLL forms, it has to do with them not closing properly and bugging out when the main form is closes and child forms are left. external_free() causes some errors and should b avoided for now. I also showed two YouTube videos in the example as a test...

I am working on the errors. And I like having skills in Super Mario.


The problem occurs when the parent window (Game) is closed and the child window(s) are left...they then bug out and prank you with errors...The freeing of the DLL then made it worse, I beleive a less bugged version should come soon.

Edited by GMREC1111, 25 June 2008 - 11:54 AM.

  • 2

#32 tdmgames

tdmgames

    GMC Member

  • New Member
  • 1641 posts

Posted 25 June 2008 - 11:56 AM

Very nice little DLL, it works - which of course it good :)

Hope to see some more soon!
  • 0
OH Balls!

Domain change: If any of my links do you not, please PM me and I will send you a working link :)

t3mp3st+Me+BMG = t3mp3st's edited avatar with changing colour effect.

#33 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 June 2008 - 12:21 PM

This DLL is nice and everything, but I get lots of and lots of errors with the You Tube box.
First I commented ShowYTVideo() from the Create Event and re-assigned it to the left key event.
When I pressed the left key, the box came up, but it would not close :)

Whenever I clicked the little X the box would disappear fractionally, and come up again :OMG:
The access to the GM Window was blocked.

Then I got and error - "Some problem with module GMDialog.exe" - Then task manager to close the app.
Then delete.
Full of errors, the You Tube thing is...

Was it a key press/release? If not, what do you think was the problem, haha. It will lag you if you do not use it wisely...loading many YouTube videos quickly is very laggy. The error is actually...gone now...it occourd in GetFile which never worked and I removed it! It should work well again, let me hold a few tests before a new releases.


Thanks tdmgames! (Your grammar crashed there...)
  • 2

#34 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 25 June 2008 - 07:05 PM

I thought vb had it's own garbage collector?

Usually something of that type is caused because the child forms are still being used when they should be freed (because main was freed).

I suggest that you delete all the childs first when the onclose handler of the main fires. I'm not sure about VB, because it's been a very long time since I used it, but I think it does has events like delphi.
  • 0

#35 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 25 June 2008 - 07:58 PM

Well, there are many functions you can use, I have so many issues right now...I cannot type in a few functions even if they are commented out...it says "Statement Expected" and I got confused...What do you mean "garbage collector."

- Me.End: Not available in DLL projects.
- Me.Close: Not available in DLL projects.
- Unload Me: Seems to work...but I encounter errors still.

The Form_Unload event may be what you are mentioning...I have tried that too.


I will be releasing the source as I do not have good from design skills and want people to make a VB DLL already! I will allow them to use it in their DLLs...(No YouTube dialog though, that's mine!)

Edited by GMREC1111, 25 June 2008 - 07:58 PM.

  • 2

#36 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 27 June 2008 - 12:26 PM

Can i correct you, cause you're wrong ;)
I have vista and it works for me...
I have 32bits vista, but i don't know for 64bit.
And btw. The youtube script gives way to much errors.
  • 0

#37 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 27 June 2008 - 03:59 PM

What errors? I test it a lot...*Checks Again*


Also, I know about it working on 32Bit OS's...Not so sure about 64Bit.
  • 2

#38 Chris94

Chris94

    GMC Member

  • New Member
  • 203 posts

Posted 28 June 2008 - 12:59 AM

I get errors from the Youtube script too. Opens up IE like 10 times and throws out a bunch of errors. I'm using Vista weather if that's is it or not, but all the other functions look great and work :snitch:! Good job, other than errors ::lmao:: .

Chris94
  • 0


How to use 39DLL in C++/Delphi Code Example : ZIP


#39 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 28 June 2008 - 04:59 AM

Yea, that is strange...I never got IE opening until now...I may know the problem and iw will be released soon, along with the source.
  • 2

#40 ZZ man

ZZ man

    GMC Member

  • New Member
  • 1745 posts

Posted 28 June 2008 - 03:41 PM

i does not work on vista !
  • 0
If you will be laughing on December 23 2012, put this in your sig.

#41 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 29 June 2008 - 03:24 AM

Totally random...If you are not on 16/32Bit then it may not work. Anyways, I may have found one major change in the DLL that may have caused this. When I added the YouTube videos, I was required to change from Apartment Threaded, to Single Threaded. It may be an issue with that and would put the YouTube video thing out of the DLL.


Fixed version will come soon...I have gotten rid of all errors I have seen after closing the window or attempting to. YouTube videos work but IE pop-ups are terrible...especially 20.

Edited by GMREC1111, 29 June 2008 - 03:45 AM.

  • 2