Progress Bar

Тема в разделе "Lotus - Программирование", создана пользователем Medevic, 17 июн 2005.

  1. Medevic

    Medevic Что это ? :)
    Lotus team

    Регистрация:
    10 дек 2004
    Сообщения:
    3.346
    Симпатии:
    2
    Вот. Нашел способ как сделать прогресс бар. Думаю будет интересно.

    Код (Text):
    -declarations section-

    Const NPB_TWOLINE% = 1 '1 is for the big "in its window" progress bar and 32 is for the small blue line at the bottom of the screen

    '-- Procedures in nnotesws.dll
    Declare Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As Integer ) As Long
    Declare Sub NEMProgressEnd Lib "nnotesws.dll" ( Byval hwnd As Long )
    Declare Sub NEMProgressSetBarPos Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwPos As Long)
    Declare Sub NEMProgressSetBarRange Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwMax As Long )
    Declare Sub NEMProgressSetText Lib "nnotesws.dll" ( Byval hwnd As Long, Byval pcszLine1 As String, Byval pcszLine2 As String )

    -sample code for a button-

    Sub Click(Source As Button)
    Dim hwnd As Long
    Dim i As Long
    Dim j As Long

    'Create the progress bar
    hwnd = NEMProgressBegin( NPB_TWOLINE )

    'Set the bar range - the default is 100
    NEMProgressSetBarRange hwnd, 200

    'Display text on the dialog.
    NemProgressSetText hwnd, "Calculating ...", "Start"

    For i = 0 To 200
    For j = 0 To 5000
    'artificial delay for the example !!
    Next j
    'Update the bar position
    NEMProgressSetBarPos hwnd, i
    'Update the text at twenty five percent
    If i = 50 Then
    NEMProgressSetText hwnd, "Calculating ....", "25%"
    End If
    'Update the text at fifty percent
    If i = 100 Then
    NEMProgressSetText hwnd, "Calculating .....", "50 %"
    End If
    'Update the text at seventy five percent
    If i = 150 Then
    NEMProgressSetText hwnd, "Calculating ......", "75 %"
    End If
    Next
    'Destroy the dialog when we're done
    NEMProgressEnd hwnd

    End Sub
    Делал не я и копирайта не знаю. :rolleyes:
     
  2. Domino6

    Domino6 Гость

    Код (Text):
    16.09.1999 on 15:25 What does this LotusScript do: Displays Notes Progress Bar.
    (Declarations)
    Const NPB_STATUSBAR% = 32
    Declare Sub NEMProgressEnd Lib "nnotesws.dll" ( Byval hwnd As Long )
    Declare Function NEMProgressBegin Lib "nnotesws.dll" ( Byval wFlags As Integer ) As Long
    Declare Sub NEMProgressSetBarPos Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwPos As Long)
    Declare Sub NEMProgressSetBarRange Lib "nnotesws.dll" ( Byval hwnd As Long, Byval dwMax As Long )
    Declare Sub NEMProgressSetText Lib "nnotesws.dll" ( Byval hwnd As Long, Byval pcszLine1 As String, Byval pcszLine2 As String )

    Sub Click(Source As Button)
    Dim hwnd As Long
    Dim i As Long
    Dim j As Long

    'Create the progress bar
    hwnd = NEMProgressBegin( NPB_STATUSBAR )

    'Set the bar range - the default is 100
    NEMProgressSetBarRange hwnd, 100

    For i = 0 To 100
    'Simple delay for the example!!
    For j = 0 To 5000

    Next
    'Update the bar position
    NEMProgressSetBarPos hwnd, i

    Next
    'Destroy the dialog when we're done
    NEMProgressEnd hwnd
    End Sub
    Этот красивее он статусбаре бежит
     
  3. Medevic

    Medevic Что это ? :)
    Lotus team

    Регистрация:
    10 дек 2004
    Сообщения:
    3.346
    Симпатии:
    2
    <!--QuoteBegin-Domino6+17:06:2005, 15:48 -->
    <span class="vbquote">(Domino6 @ 17:06:2005, 15:48 )</span><!--QuoteEBegin-->Этот красивее он статусбаре бежит
    [snapback]21264" rel="nofollow" target="_blank[/snapback]​
    [/quote]
    Пробовал уже. У меня не бежит. :rolleyes:
     
Загрузка...
Похожие Темы - Progress Bar
  1. Shouldercannon
    Ответов:
    0
    Просмотров:
    620
  2. Radion2
    Ответов:
    0
    Просмотров:
    2.381
  3. BlackShadow
    Ответов:
    2
    Просмотров:
    3.008
  4. medin84
    Ответов:
    8
    Просмотров:
    3.678
  5. LuMee
    Ответов:
    5
    Просмотров:
    3.811

Поделиться этой страницей