Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Trancparent startup window

Author
Message
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 17th Feb 2003 18:31
How do you do an trancparent startup screen (including some pictures and text, but thats not the problem) Lets say you want a round circle startupp with the text "loading.." before the game/app swith to full screen..
------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Feb 2003 19:04
Fairly simple, especially if you know C...

What I do is create program1 which has the startup window in, which calls program2.

Program1 then waits until program2 starts running before removing the window and exiting.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 17th Feb 2003 19:37
But then that first program you talk about ain't written i dark basic pro.. or have I wrong.. you meen you write a program in c/c++/visual basic/c# and start that program first then it calls the secong program thats written in dbpro but then the loading screen/progress meeter in % wont work.. What I asked about whas how (if it possible? But what I know anything can be done) you do a startup screen with progress bar in % of the loading sequens.. in other words how do you just show a "round" picture withe the status bar in it when starting your finished game/app.. or like you call it in normal apps "splash screen" (thsts transparent with the windows desktop/other apps running)

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 17th Feb 2003 19:39
I want the game written in ONLY dark basic pro (exepts for my plugins)

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Feb 2003 21:27
Heres a suggestion for a DLL for you MrTAToad.

One command to open a window and fill it with a bitmap from a named file. (OPEN SPLASH WINDOW filename$)
One command to close it. (CLOSE SPLASH WINDOW)

Then use it like this:
1) Set DBPro to start with the window hidden.
2) TPC DLL command : Open the window and show bitmap
3) DBPro proggy does it's loading thing
4) TPC DLL command : Destroy the window
5) Make DBPro window appear.

You could always get tricky with it and allow a progress bar to be drawn. If you don't want to do it, I'll do it later on this week.
SasukiShinozawa
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 17th Feb 2003 22:04
That question isn't really clear. Are you saying that the bitmap has parts that are black that you want to edit out? Or are you just trying to ghost the whole screen in and of itself?

Watashi wa yama desu.
Anata wa ishi desu.
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 00:27
show like a bitmab for an example a face that's cut out.. and just show the face over the windows desktop.. you know what I meen now.. sorry fo my bad englidsh

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
SasukiShinozawa
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 18th Feb 2003 00:32
Okay, well, if you're trying to get the Windows desktop background, you're going to have to get a screen capture of that and load it as your first image.

Then for the other stuff you want on top, do this:

1) Use the Load Image command to load up your bitmap

2) Use the Sprite command to change the image to a sprite

3) Use the Set Sprite command and set the transparency to 1 so that all black areas will not be drawn to the screen.

That should do it.

Tanto? Iie. Kore wa tachi desu.
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2003 10:57
Good idea Ian, be worth think about...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 14:23
SasukiShinozawa: but thats a very slow process.. because you have to have the same screen size of your desktop in your game then.. at least in the startup section..?

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
SasukiShinozawa
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 18th Feb 2003 15:35
Not really. When the resolution changes, so does the desktop, so you can just take a snapshot of it after using the set resolution command.

Yeah, loading things into sprites is slow, but it works....

Tanto? Iie. Kore wa tachi desu.
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 17:08
yes but your idea of answer on my question ain't what I wanted.. let's say you want to do a game in window mode.. but without the window properties.. and have the game in a round window.. and then be able to for an example chose my computer in the background by cliking on the desktop while the game stills runnig in the backroud in the rounbd window..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 17:09
that can't be done in your sulution..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 18th Feb 2003 17:21
IceBird - you said "I want the game written in ONLY dark basic pro (exepts for my plugins)" so the answer is - it cannot be done.

You cannot have an irregular shaped window, still active and working from Windows, that responds to clicks etc with native DBPro code.

It can't be done in any solution that doesn't involve someone writing you a third-party plugin (I don't know of any that exist yet to do this) or without writing a loader program in another language.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2003 17:28
I'm doing a splash-screen plug-in that may help. Hope to be doing a progress/percentage/current file loading bit to it too...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
mimesis
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 18th Feb 2003 18:05
Surely there must be a way to do this by using calls
to existing windows dll's that everybody have like: User32.dll, Gdi32.dll ?
So if you want to help out ,please dont try to reinvent the
wheel rather that poiinting us in the right direction on how
to use this system dll's calls.
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 18:44
rich: okay, that's what I thought to and that's why I asked everybody if someone has an sulution for it

MrTAToad: would be very happy if you could make such a plugin

Bassi: of course your right! but I don't know the calls... if I had I wouldn't be asking for help here at the forum :/

PS. Thanks for all the response =)

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
mimesis
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 18th Feb 2003 19:08
@IceBird
I wasn't aiming at you , but the people in this forums that have c++\windows-programming experience.
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 19:59
I do have a more experience but more in the basic kind of way

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2003 21:56
I've started it - hopefully I should have something soonish...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 22:10
Good! looking forward to se how your result ends

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2003 22:18
I'm sure you are... So far, its coming on well...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 22:22
What have you done so far then? curios as h*ll

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 18th Feb 2003 22:31
You could if you have some time over add some extra things like registration/key file/serial/cd key/cd check functions (these function is very easy to add, even I know how to do) to in the dll.. just a tip and I think many people prefer having "some" of these runtimes in the dll instead of calling the system dlls.. not everyone knows the call for exaple cd check.. I know but, but I'm sure some newbies don't..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2003 23:32
No, wont do serial key enteries.

What I've got so far is a setup for 4 types of splash screens :

A) One with just a picture. This can be any size, up to the screen resolution width and height. Can be centered (to the screen width or height) or not.
B) A picture with a progress. This is a fixed size. Can be centered or not.
C) A picture with an area for displaying the current. filename thats loading/deleteing/unpacking etc. Also fixed size. Can be centered or not
D) A picture with a percentage value. Also fixed size, and again, can be centered or not.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 00:17
Yes but can you have an round image for example.. thats transparent with the windows desktop??

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 00:19
Becuase thats what the main subject with MY post..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 00:23
That will have to come later...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 00:25
...possibly

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 00:57
Yea yea.. that was what I wanted though.. (the possibility to use transparent pictures/texts directly on the desktop)

Thanks anyway for you trying...

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Feb 2003 00:57
Icebird: Slow down mate. You have to start with a standard window code before you can start messing with transparent regions. If it was easy, everyone would be doing it
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 01:00
I will ask a good frend instead to write me the plugin... he's a damn good c++ coder so he probably know what to do But I have to wait a week for he to come home again he's on semester right now.. and probably a night or two for him writing the dll..

.. as I said before.. thanks anyway for trying

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 01:02
The standard window option code in c++ is very easy though.. EVEN I CAN DO THAT in just some minutes..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Feb 2003 01:04
MrTAToad: CreateEllipticRgn and SetWindowRgn are the calls you need for this. Oh, and apparently once you have called SetWindowRgn, the OS owns the region handle, so no changes are allowed, but also no need to delete it.
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 01:05
and just the window code with a picture and som texts.. that you can code in dp too..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 01:07
...aarrrgg ..sorry if you find me anoying.. but I realy want to do that kind of thong in dark basic pro.. I'm not angry if you got that impression by me.. I'm just tired thats all..

cheers everyone..

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 10:59
Dont worry...

As for the plug-in, I'll let you have it when its ready.

Ian - thanks for the info.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IceBird
22
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Sweden
Posted: 19th Feb 2003 14:24
Thanks

------------------------------------------------
Someone is watching you...... And it isn't ME!
------------------------------------------------
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 14:35
Sorry if I'm butting in, but I might be able to create an program where you just place a .bmp file and a text file containing the exe run in a folder along with the program and it will make you a transparent window with the bitmap file as a background?

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 14:54
I've done it!

3 steps to a transparent start up window:

1 - Make a 640x480 image that is your startup image (any white [255,255,255] areas ae transparent - if you want this changed let me know). Save this as screen.bmp.
2 - Now copy "test.exe" (you can rename it), "screen.bmp" and "info.txt" to the directory where you program is.
3 - Open info.txt and change the line "yourfile.exe" to you exe's name

That's it! Now run test.exe, it will display your startup screen for 3 secs then open your program.

PS - I've included a sample exe file so you can see it working straight away. This was made in VB (so it may crash) and will create "Applicationpath.txt" - delete that file.


http://www.aozf28.dsl.pipex.com/Transparentstartup.zip - 928k

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 15:01
Yes, but he wants circles...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 15:03
...and mine will be, well, more encompassing...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 16:32
Circles? The don't you just make an image with a circle on it?

I'm planning on adding more features. I just created it to see if an idea I had about this will work, and it did. I'm sorry if it's not up to your standard of plugin work, but it's the best I could do.

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 18:10
Dont worry, my plug-in will be availiable at some point in the future.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 18:17
I'm quite proud of it actually.

Didn't take long, and seems to work well.

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 18:47
It t'will be interesting to compare...

...I'll be testing it with my 'company's logo - it'll be the first anyone anyone will have seen the new logo...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 18:59
I'll be adding things such as loading bar support soon.

Mine was really a quick, cheap and dirty first attempt. It seems to work, although there are a few things I'd like to sort out before I release properly. These are:

- Slight distortion of image
- More configurability

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
Jaidex
22
Years of Service
User Offline
Joined: 28th Jan 2003
Location:
Posted: 19th Feb 2003 22:58
One more point that may be useful here, Mr. TAtoed. Someone suggested that you use SetWindowRgn and CreateEllipticRgn. Those will work if you just want to do round or Elliptical shapes, you can use CreatePolygonRgn if you want to create a shape specified by a series of connected dots (I'm pretty sure that's the name of it - I'm reporting it from memory - if it's NOT correct, it's close).

rapscaLLion
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 19th Feb 2003 23:32
For anyone who DOESN'T understand what he means, here:



No, this isn't my desktop, I got the pic from google, but the point is, there is a program window open, that has a circular or other irregular shaped menu, and the rest of the window is transparent, showing the desktop behind it. Not possible in DBPro alone, however DLLs and plugins could do the trick.

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 19th Feb 2003 23:58
I'll be uploading the Splash plug-in tomorrow sometime...

This is the current test program:



Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2025-05-18 07:23:45
Your offset time is: 2025-05-18 07:23:45