News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Vista-style popup window for your game/application

Started by Adaz, March 18, 2008, 06:52:36 AM

Previous topic - Next topic

Adaz

I wrote a small ActiveX EXE library in VB6 which shows a Vista-style popup window with a 3 line question and 1 to 3 buttons with customizable captions.

First you have to run manually the exe itself to register it. (It doesn't work with an ExeFile command, I don't know why)

I attached a sample code and the exe file.

Important: if you already registered Popup.exe and you move it somewhere else, it won't work there because it's registered in the original place, so first you have to execute "Popup.exe /unregserver", then at the new place "Popup.exe /regserver" or simply "Popup.exe"

Feel free to add any comments about it.

EDIT: popup.zip removed

Ádáz

Hungary

Adaz

#1
Hi,

I've rewritten it right away. At last it became a DLL! I was obliged to make an exe because it's impossible to display a window with an ActiveX dll. Anyway I thought so. It's only very very difficult.

Two important changes:
1. Since now you don't have to register manually, PB registers it automatically.
2. You don't have to close the popup window, now it can close itself.

EDIT: popup.zip removed

Ádáz

Hungary

kevin


Adaz

Quote from: kevin on March 18, 2008, 11:01:27 AM
your missing the PBP file.

Is that necessary? Just save a new one. I cannot post it now, I'm not there...

Ádáz

Hungary

kevin

Quote from: Adaz on March 18, 2008, 11:48:05 AM
Quote from: kevin on March 18, 2008, 11:01:27 AM
your missing the PBP file.

Is that necessary? Just save a new one. I cannot post it now, I'm not there...

  People can't test what you uploaded, without building a project..   

Adaz

Quote from: kevin on March 18, 2008, 12:08:00 PM
  People can't test what you uploaded, without building a project..   
Ok, thank you!
In a little while I'll improve it with some functions, such as a checkbox you can use for e.g. "Don't show this again".

Ádáz

Hungary

Adaz

Changes in v1.2:

- SetCaptions superseded. Just set the captions then call Popupshow.
- Now there are 8 obligatory string parameters you must pass to Popupshow.
- New function: GetCheckbox. It returns 1 if the user checked the checkbox and 0 if unchecked. (You must use it before GetResult)


USAGE:


#Include "ActiveX"
success=RegisterAxDll(CurrentDir$()+"Popup.dll")
Id = NewAx("Popup.PopupClass")

AddAxStringParam(id,"1st parameter")
AddAxStringParam(id,"2nd parameter")
...
AddAxStringParam(id,"8th parameter")

CallAxFunc(Id, "Popupshow"): ClearAxParams Id

Repeat
  chk=CallAxIntFunc(id,"GetCheckbox") ;returns 1 if the user checked the checkbox and 0 if unchecked
  btn=CallAxIntFunc(id,"GetResult")   ;returns 0 if no buttons pressed, else returns 1,2 or 3
Until btn>0



The 8 obligatory parameters are:


1. Title, at least an empty string must be here!
2. 1st line of text, at least an empty string must be here!
3. 2nd line of text, at least an empty string must be here!
4. 3rd line of text, at least an empty string must be here!
5. 1st (left) button. Appears only if you use a non-empty string.
6. 2nd (middle) button. Appears only if you use a non-empty string.
7. 3rd (right) button. Appears only if you use a non-empty string.
8. Checkbox button and text. They appear only if you use a non-empty string.
    IMPORTANT: If you use a # character at the end of the chekbox string, the checkbox will be checked initially. (E.g. "Don't show this again#")





This time I included the PBActiveX.dll and a compiled version of the example program for easy trying.


Ádáz

Hungary

ATLUS


basil99

Got an error from WinRar and WinZip - !   Unknown method in Popup.dll

plz take a look
Free Games Site - http://vespacrabro.com

Adaz

Quote from: basil99 on March 24, 2008, 06:51:06 AM
Got an error from WinRar and WinZip - !   Unknown method in Popup.dll
plz take a look
No problem here with WinZip 11.0 (7313)
Did you download Popup1.2.zip (892.62 KB)?

Ádáz

Hungary

basil99

I have latest Winrar and try Winzip 9

seems both are too old with new Winzip 11 features
yes, I download popup*.zip, all files extracts Ok, exept popup.dll

may be you can upload it separatly ?  :)

It will be great, thanks in advance
Free Games Site - http://vespacrabro.com

Adaz

#11
Quote from: basil99 on March 25, 2008, 07:36:06 AM
may be you can upload it separatly ?  :)
It will be great, thanks in advance

I re-uploaded the full package rezipped with Windows built-in compressed folders.

Ádáz

Hungary

basil99

Free Games Site - http://vespacrabro.com

Adaz

Thanks basil99!

Everybody: Please feel free to post improvement ideas, if any.

Ádáz

Hungary