You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a modal progress window while loading your data.
Question/Problem/Abstract:
Have you ever needed a small window with a progressbar with focus, but having the code being executed in another window?
I use this trick for our client/server application when retrieving data from the server.
The connection is uninterruptable, and the user is not allowed to click anywhere while the connection is open. This small trick prohibits that, and tells the user about the process of retrieving his data.
The recipe is like this:
Create a small sized window with a TProgressBar inside. Name the TProgressBar "ProgressBar".
Make an instance of the window. For example:
var
f : TfrmProgress;
initialization
f := nil;
end.
To open the window, use the following lines of code:
procedureOpenWindow;
beginif f = nilthenbegin
f := TfrmProgress.Create( Application );
f.WindowList := DisableTaskWindows(f.Handle);
f.Show;
end;
end;
The window is now open and modal, but your thread of code continues where you left off.
Possible new tip from
extra/Topelina Tips.odt
FocusModal
Open a modal progress window while loading your data.
Question/Problem/Abstract:
Have you ever needed a small window with a progressbar with focus, but having the code being executed in another window?
I use this trick for our client/server application when retrieving data from the server.
The connection is uninterruptable, and the user is not allowed to click anywhere while the connection is open. This small trick prohibits that, and tells the user about the process of retrieving his data.
The recipe is like this:
Create a small sized window with a
TProgressBar
inside. Name theTProgressBar
"ProgressBar".Make an instance of the window. For example:
To open the window, use the following lines of code:
The window is now open and modal, but your thread of code continues where you left off.
You can set the progressbar by:
To close the window, do the following:
Usage:
Use the code like this:
The text was updated successfully, but these errors were encountered: