Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
WinForms - progressBar: Почему зависает?
|
|||
|---|---|---|---|
|
#18+
Есть цикл, в котором производятся действия сильно нагружающие ЦП и память, а также изменяется значение прогрессбара, который должен отражать ход процесса. Проблема в том что состояние прогрессбра визуально не меняется и только по окончани цикла я вижу закрашенный прогрессбар. Как лечить? Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 15:58 |
|
||
|
WinForms - progressBar: Почему зависает?
|
|||
|---|---|---|---|
|
#18+
Все работает и ничего не виснет for (int i = 0; i < 101; i++) { this.ProBar.Value = i; this.ProBar.Refresh(); } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 16:32 |
|
||
|
WinForms - progressBar: Почему зависает?
|
|||
|---|---|---|---|
|
#18+
The range of a progress bar represents the entire duration of the operation, and the current position represents the progress that the application has made toward completing the operation. The window procedure uses the range and the current position of the progress bar to determine the percentage of the progress bar to fill with the highlight color, as well as to determine what text, if any, to display within the progress bar. If you do not set the range values, the system sets the minimum value to zero and the maximum value to 100 . You can adjust the range to convenient integers by using the PBM_SETRANGE message. A progress bar provides several messages that you can use to set the current position. The PBM_SETPOS message sets the position to a specified value. The PBM_DELTAPOS message advances the position by adding a specified value to the current position. The PBM_SETSTEP message enables you to specify a step increment for a progress bar. Subsequently, when you send the PBM_STEPIT message to the progress bar, the current position advances by the specified increment. The default step increment is 10. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 16:43 |
|
||
|
WinForms - progressBar: Почему зависает?
|
|||
|---|---|---|---|
|
#18+
А у меня это так выглядит: запускаю проесс, на прогрессбаре спустя некоторое время появляется первая чёрточка, сразу за этим содержимое формы заливается белым цветом, а мне показывают песочные часы :). Естественно всё чудесно если из тела цикла выкинуть все операции и оставить только обновление состояния прогрессбара. Я сделал всё что мог, кто может пусть сделает лучше. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2004, 16:55 |
|
||
|
|

start [/forum/topic.php?fid=20&gotonew=1&tid=1439213]: |
0ms |
get settings: |
11ms |
get forum list: |
20ms |
check forum access: |
4ms |
check topic access: |
5ms |
track hit: |
61ms |
get topic data: |
14ms |
get first new msg: |
9ms |
get forum data: |
5ms |
get page messages: |
61ms |
get tp. blocked users: |
2ms |
| others: | 267ms |
| total: | 459ms |

| 0 / 0 |
