Jump to content


Photo

Gmregistration V2.0


  • This topic is locked This topic is locked
28 replies to this topic

#1 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 08 June 2008 - 04:53 AM

GMRegistration v2.0


GMRegistration is a Simple DLL that allows you to show a simple "Enter the Serial number" dialog,
then it returns the text the user entered, and if the user pressed Ok or Cancel.


GMRegistration1.1 is a Simple DLL that allows you to show a simple "Enter your registration information" dialog,
then it returns the Name and Key the user entered, and if the user pressed Ok or Cancel.


GMRegistration2.0 is a simple DLL that allows you to show a simple registration dialog that asks the user for a Name and Key then returns it.
Now with version 2.0, you can have your own caption and text for the registration dialog.

Also this is my First DLL. :P

Version: GM6
Type: DLL
Size: 175kb (I don't know why?)

EDIT: Version 1.1 is out, now with a Name: and Key:, not just Serial:.

Version 1.0: http://www.dwof.net/...egistration.zip
Version 1.1: http://www.dwof.net/...stration1.1.zip
Version 2.0 http://www.dwof.net/...stration2.0.zip

Whats New in 2.0:
Now you can change the caption (title) of the dialog and the text it displays.

ToDo:
Make you be able to customize the size of the dialog... It just looks messy if you don't have a lot of text.

Edited by KC LC, 12 July 2009 - 12:03 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#2 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 08 June 2008 - 05:12 AM

What was this made in, sounds like it could be good.
  • 0

#3 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 08 June 2008 - 06:13 PM

It was made in Delphi... I took me forever to figure out how to make a DLL... but now It'll be easy to make'em cuz I know how...
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#4 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 08 June 2008 - 06:19 PM

Wow, and you needed many more than one call...I could honestly make a better one in VB but I won't have the same style :huh: That style looks better than the normal ones...

Pretty good first DLL :P

Try reducing the calls to one and returns a string like "Name::Key"

Edited by GMREC1111, 08 June 2008 - 09:28 PM.

  • 0

#5 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 10 June 2008 - 02:25 AM

hmmm... ill try.. but then it would be harder for people to use them...
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#6 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 June 2008 - 12:12 PM

No it wont, it returns that whole thing and would just be a small change rather than a large change.

GMREC::CERMG as an example could be done, combining both together when the window is closed, returning the formatted string. That is also nowhere near m password or key to anything, I just did it backwards if you didn't notice.
  • 0

#7 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 10 June 2008 - 12:18 PM

congrats, I am still trying to learn...
but isn't there "Mreg"?
  • 0

#8 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 10 June 2008 - 12:19 PM

Remoladen -It's nice to see a fellow delphi programmer creating dialogs for GM. I'd like to show you some delphi code which will make it easier to ctontrol delphi without having to have alot of dll calls (in fact, it's only one dll call!).
I'll edit later on and tell you how.

Edit: This code is called VDI and is cross between an interpreter and Delphi's RTTI (don't worry, you're not required to know what it is).
You know, in delphi if you have for example and Edit box, you set it's text as following:
Edit1.Text:='Hi there!';
With VDI, you send a similar string of code to the dll which then executes it.
In this case it goes:
your_dll_vdi("Form1.Edit1.Text=Hi there")
You'll notice that "Form1." is used (this is because you could use VDI with multiple forms), there's a "=" not delphi's ":=" (this is a sort of language of it's own, I though using colon is simply unnecassary) and there are no single quotes that denotes that "Hi there" is a string (this is because there is actually more then one data type, you could send "hi" and "70" and "5.8" all are converted to what the property should be).
It's very simple to use.

Please follow this link to it's topic

If you need any help with VDI or Delphi in general, plase don't hesitate to ask.

Also, a couple of posts under this there is mentioned my dialogs dll, which works with VDI.

Edited by uuf6429, 10 June 2008 - 12:30 PM.

  • 0

#9 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 10 June 2008 - 03:04 PM

hmm thanks uuf6429, ill try it out... Defiantly looks promising.. but the link is dead... ^_^

Edited by remoladen, 10 June 2008 - 03:05 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#10 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 10 June 2008 - 07:43 PM

Yeah, just noticed that.
Now I remember why I never updated, because I had lost the source.
I'll either rebuild it back, or get it from some friend.
  • 0

#11 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 June 2008 - 11:52 PM

If it were VB, simple :D I also learned how to make the cool window style...awesome.

It is up to you on explaining what "Name::Key" means and how you would use it. Make a little "Do this, Not This" example and it will make the user's use of the DLL much easier by having one get call rather than two.

I will make an example clone of this in Visual Basic but as an EXE as to not disturb your DLL in any way. I will not add this to my DLL unless I get a few requests.

Edit: LINK to the example, only a few lined of code and two forms. Basic. EXE so it will not replace yours.

Edited by GMREC1111, 11 June 2008 - 01:01 AM.

  • 0

#12 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 11 June 2008 - 03:39 AM

Ahhh yes, But I don't really see why having one less call makes it so much better?
But then also, I really liked the whole Product name and info thing! I'll ad that to the next version!

Edited by remoladen, 11 June 2008 - 03:48 AM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#13 Matt13

Matt13

    GMC Member

  • New Member
  • 580 posts
  • Version:Unknown

Posted 11 June 2008 - 04:09 AM

Quite simple and neat.
This could be used for my MReg System, however MReg System also supports a dialog as well with some more features for registration keys in the form: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

I would suggest to possibly allow the user to add a custom message to the dialog box as well.

Edited by Matt13, 11 June 2008 - 02:19 PM.

  • 0

#14 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 11 June 2008 - 06:57 AM

Thanks to freaked I got a copy of an the latest public version of VDI (still it's a bit out of date).
I'll tune it a bit and then send it over to my topic.
Afterwards, I'll notify you here.
  • 0

#15 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 June 2008 - 12:29 PM

Quite simple and neat.
This could be used for my MReg System, however MReg System also supports a dialog as well with some more features for registration keys in the form: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

I would suggest to possibly allow the user to add a custom message to the dialog box as well.

Lol, my little EXE test. A few lines, can be done in one function. One call!

It has a label that changes to the text specified and you can change more but I chose not to.

Edited by GMREC1111, 11 June 2008 - 12:30 PM.

  • 0

#16 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 11 June 2008 - 12:34 PM

With ONE call, VDI can change:
Visual appearance of any control, including font type, size and color
Control's color
Visiblity and useability (Enabled)
and data inputs like "Text" in edit's and Checked in radio/checkbox
And much more, in fact, you can pretty much change everything that is a property.
  • 0

#17 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 June 2008 - 08:14 PM

Same with Visual Basic, I can clone your DLL but I would need to learn more VB to change those stuff. I don't need an extension to it, just need it's form designer and my DLL compiler. I honestly can argue forever about this, VB can do the form making simply and changing is good too. I will prove it to you if you want.
  • 0

#18 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 11 June 2008 - 08:50 PM

I've used both VB and Delphi, with VB you can't change properties dynamically, with Delphi's RTTI you can, example:

... GM Side ...
gmControl='Edit1';
gmProp='Text';
gmVal='Hi!';
exec(gmControl,gmProp,gmVal);
....................
... Dll Side ...
function exec(Control, Property, Value : String );
begin
PropSetValue(Find(Control),Property, Value);
end;
....................
As simple as that!
In VB you'll have to use a lot of conditionals to find that particular control, evenmore, you can't support all controls (because ofr each control you need another conditional).
With Delphi, you just have to find the control and set it's property, without even having to know what type of property it is!.
  • 0

#19 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 11 June 2008 - 09:04 PM

Version 2.0 is now out! Now you can customize the title and the text it displays!
  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#20 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 June 2008 - 09:05 PM

It's hard to find a control? It is a lot like Game Maker, frmDialog.Text1.Text = StrConvFrmGM(Txt)

Just locate it like that. Your way is better if the dialog is customizable with adding controls and stuff. I really know this and it's possible without listing the control and property to set. I understand it's not really needed but it's much simpler to have the value as an argument. Much cleaner too.

I will make up another example soon if you honestly never tried this. Have you got to change them? I can change then from the called function then open the dialog.

How many calls are there?

Edited by GMREC1111, 11 June 2008 - 09:06 PM.

  • 0

#21 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 11 June 2008 - 09:09 PM

How many calls are there?

Are you talking about how many calls in GMRegistration?

Edited by remoladen, 11 June 2008 - 09:09 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#22 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 11 June 2008 - 09:12 PM

I'm saying it's hard to find a control from a string.
Like, 'Text1' was in a string, and you locate a pointer to it from the string.
  • 0

#23 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 June 2008 - 10:47 PM

Hard to find a control from a string?

Form_Name.Control_Name.Property = Property_Data


I am talking about GMRegistration, how many calls now?
  • 0

#24 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 12 June 2008 - 10:56 AM

Hard to find a control from a string?

Form_Name.Control_Name.Property = Property_Data


You can get what I mean.
Your example is hard coded.
Here's what I mean:
String t0='Form1'
String t1='Text1'
String t2='Property'
String t3='TheValue'

Now how can you execute that?
t0.t1.t2=t3 Won't work

I am talking about GMRegistration, how many calls now?

Couldn't you just download and check?

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

  • 0

#25 freaked

freaked

    freak up!

  • New Member
  • 890 posts

Posted 12 June 2008 - 12:05 PM

LOL, guys stop it now !
GMREC1111 and uuf6429 STOP !
or the OP's topic or rather the OP will suffer because the mods will eventually close this topic due to this stupid VB vs Dephi war !
  • 0

#26 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 12 June 2008 - 02:24 PM

XD quite right, forgot my manners...
Delphi rules!

Edited by uuf6429, 12 June 2008 - 02:25 PM.

  • 0

#27 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 12 June 2008 - 07:19 PM

Well 2 calls, get name and get key...

Edited by remoladen, 12 June 2008 - 07:19 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>

#28 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 12 June 2008 - 09:36 PM

That is where you should be wrong, if you have one call, people won't forget to get the key and/or name. They are quite used to one function doing all it should and your way is a bit off. It is getting better, keep it up!
  • 0

#29 remoladen

remoladen

    GMC Member

  • New Member
  • 147 posts

Posted 12 June 2008 - 09:46 PM

LOL, guys stop it now !
GMREC1111 and uuf6429 STOP !
or the OP's topic or rather the OP will suffer because the mods will eventually close this topic due to this stupid VB vs Dephi war !

lol thanks freaked

XD quite right, forgot my manners...
Delphi rules!

lmao!

Edited by remoladen, 12 June 2008 - 09:48 PM.

  • 0
Delphi DLL Maker = Me

<<Copy this into your sig if you're a Christian>>