Powerbasic Museum 2020-B

General Category => General Discussion => Topic started by: Robert Sarrazin on February 18, 2008, 05:08:35 AM

Title: INFORMATION to the user
Post by: Robert Sarrazin on February 18, 2008, 05:08:35 AM
Hi,
I try to tell the user,   like example:

  ----------------------------
|    One moment   S.V.P        |
|          File is loading           |
  ----------------------------

1-  I try to removed the ok button with msgbox

2- I try to find how to kill the msgbox by (kill......) without clicking
    the ok button.
    using timer or after sleep 5000 to close the msgbox and start the program.

-------------------------------------------------------------
The real reason I need to give that info to user.
My program start to read 12 file for month plus some 12 more for report
all file is load in array and sort. "in the FUNCTION PBMAIN()"
with the result, different dialog will be start the program.
I have to load all file before the program showDialogx.

The result. 
When we click to the icon to start the program nothing show for few second
the first reflex is to click again the icon to start the program.

When I use flash I always use progress bar before all image is load
I try to simulate that, without the need of complex progress bar
just a plain '''wait s.v.p.'''. and kill the message after few second
or kill when all file is load before to select the dialog we need.

Thank for your time and suggestion.
Title: Re: INFORMATION to the user
Post by: Patrice Terrier on February 18, 2008, 10:07:22 AM
Just a create a "STATIC" wth the dwExStyle = %WS_EX_TOPMOST and dwStyle = %WS_POPUP OR %WS_VISIBLE,
and CALL DestroyWindow when you want to get rid of it.

...
Title: Re: INFORMATION to the user
Post by: Robert Sarrazin on February 18, 2008, 07:27:16 PM
Thank, Patrice

I'm still 'Newbie' an I understand  your point but
I need few line code to help me.
when you said create static is a windows dialog or graphic.
I try to see in the help file about static, and only reference is
dim static. The fact 'CALL DestroyWindow ', it like windows dialog
I try few line with no success.
Thank
Title: Re: INFORMATION to the user
Post by: Patrice Terrier on February 18, 2008, 08:05:45 PM
I am speaking of the common window "STATIC" class.

LOCAL hCtrl, dwStyle, dwStyleEx AS LONG

dwStyle = %WS_POPUP OR %WS_VISIBLE OR %WS_BORDER
dwStyleEx = 0
hPaint = CreateWindowEx(dwStyleEx, "STATIC", "Put your message there", dwStyle, x, y, xWidth, yHeight, hParent, ID, hInstance, BYVAL %NULL)

Search MSDN for the use of the CreateWindow API and the parameter you can use with the "STATIC" class.

...
Title: Re: INFORMATION to the user
Post by: Robert Sarrazin on February 18, 2008, 09:12:34 PM
Thanks again Patrice

With that I got what I need to work on.
well comment on msdn.
Learning is a long process, :o
but with some tips it is more easy to advance . ::)