![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Есть GroupBox с надписью внутри него находится ProgressBar [D6, Win95/98]
DimaIv © (2002-03-20 09:04:00)кокда ProgressBar запускается пропадает рамочка у GroupBox и Caption у GroupBox тоже не видно, и вообще невидно ничего в пределах одного сантиметра вверху и внизу.
Севостьянов Игорь (2002-03-21 10:57:00) [1]Application.ProcessMessagesлучше не использовать, так как будут отрабатывать все сообщения... И если нажмешь на кнопку в это время, то сообщение обработается и могут быть неприятности... Лучше уж использовать WinAPI функцию для обновления окна
UpdateWindow(Handle);
Вот описание из MSDN
UpdateWindow
The UpdateWindow function updates the client area of the specified window by sending a WM_PAINT message to the window if the window"s update region is not empty. The function sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent.
BOOL UpdateWindow(
HWND hWnd // handle to window
);
Parameters
hWnd
[in] Handle to the window to be updated.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT/ 2000: To get extended error information, call GetLastError.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
Painting and Drawing Overview, Painting and Drawing Functions, ExcludeUpdateRgn, GetUpdateRect, GetUpdateRgn, InvalidateRect, InvalidateRgn, WM_PAINT
ALFA (2002-03-20 21:28:00) [2]в цикл образующий движение ProgressBar поставь
Application.ProcessMessages
а обновлять не чего ненадо
Все должно быть видно
пример
for i:=1 to 100 do
begin
ProgressBar.Position:=i;
.......
Application.ProcessMessages
end;
ppcat (2002-03-20 10:49:00) [3]А лучше сделать Refresh для всей формы.
RedWood (2002-03-20 10:19:00) [4]Всем привет !
так вроде должно работать :
for i := min to max do begin
ProgressBar.Position := i;
GroupBox.Repaint;
...
bla-bla-bla
...
end;
Song (2002-03-20 10:06:00) [5]надо код...
попробуйте обновлять форму.
DimaIv (2002-03-20 09:42:00) [6]>song
Да именно.
Song (2002-03-20 09:31:00) [7]"запускается"... Это как?
Начинает "отсчитывать деления"???