Страница: 1 |
Вопрос: Загрузка формы | Добавлено: 11.07.04 11:29 |
Автор вопроса: ![]() |
Как сделать, чтобы форма при загрузке появлялась не стандартным образом, а по особому(н-р постепенным появлением, как диски Alexsoft). Сам видел пример, но забыл где. Помогите plz |
Ответы | Всего ответов: 4 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() Разработчик Offline Client ICQ: 233286456 Вопросов: 34 Ответов: 5445 |
Web-сайт: Профиль | Цитата | #1 | Добавлено: 11.07.04 12:53 |
как у Alexsoft, дык это он просто рисует сам, т.е. берет фоткает под собой экран, ставит это изображение на окошко, а потом, прорисовывает свое окно рандомом выбирая эффект из нескольких заранее созданных...
А вообще можешь попробовать AnimateWindow, до Alexsoft ей конечно далеко, но это уже хоть что-то ![]() |
Номер ответа: 2 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Вопросов: 4 Ответов: 6 |
Профиль | Цитата | #2 | Добавлено: 11.07.04 15:09 |
Дык вот эти эффекты мне и нужны. Расскажи поподробнее про animate |
Номер ответа: 3 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() Разработчик Offline Client ICQ: 233286456 Вопросов: 34 Ответов: 5445 |
Web-сайт: Профиль | Цитата | #3 | Добавлено: 11.07.04 15:14 |
Если поискать, найдешь не мало примеров на эту функция, благо ее использование достаточно простое
Рассказывает MSDN: AnimateWindow The AnimateWindow function enables you to produce special effects when showing or hiding windows. There are three types of animation: roll, slide, and alpha-blended fade. BOOL AnimateWindow( HWND hwnd, // handle to window ![]() ![]() ); Parameters hwnd [in] Handle to the window to animate. The calling thread must own this window. dwTime [in] Specifies how long it takes to play the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play. dwFlags [in] Specifies the type of animation. This parameter can be one or more of the following values. Value Description AW_SLIDE Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER. AW_ACTIVATE Activates the window. Do not use this value with AW_HIDE. AW_BLEND Uses a fade effect. This flag can be used only if hwnd is a top-level window. AW_HIDE Hides the window. By default, the window is shown. AW_CENTER Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. AW_HOR_POSITIVE Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND. AW_HOR_NEGATIVE Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND. AW_VER_POSITIVE Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND. AW_VER_NEGATIVE Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. The function will fail in the following situations: The window uses the window region. The window is already visible and you are trying to show the window. The window is already hidden and you are trying to hide the window. To get extended error information, call the GetLastError function. Remarks You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE or AW_VER_NEGATIVE to animate a window diagonally. The window procedures for the window and its child windows may need to handle any WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT. Requirements Windows NT/2000 or later: Requires Windows 2000 or later. Windows 95/98/Me: Requires Windows 98 or later. Header: Declared in Winuser.h; include Windows.h. Library: Use User32.lib. |
Номер ответа: 4 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() Разработчик Offline Client ICQ: 233286456 Вопросов: 34 Ответов: 5445 |
Web-сайт: Профиль | Цитата | #4 | Добавлено: 11.07.04 15:16 |
А вот это нам говорит Api_Guide, в большинстве случаев бесполезный...
Const AW_HOR_POSITIVE = &H1 'Animates the window from left to right. This flag can be used with roll or slide animation. Const AW_HOR_NEGATIVE = &H2 'Animates the window from right to left. This flag can be used with roll or slide animation. Const AW_VER_POSITIVE = &H4 'Animates the window from top to bottom. This flag can be used with roll or slide animation. Const AW_VER_NEGATIVE = &H8 'Animates the window from bottom to top. This flag can be used with roll or slide animation. Const AW_CENTER = &H10 'Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. Const AW_HIDE = &H10000 'Hides the window. By default, the window is shown. Const AW_ACTIVATE = &H20000 'Activates the window. Const AW_SLIDE = &H40000 'Uses slide animation. By default, roll animation is used. Const AW_BLEND = &H80000 'Uses a fade effect. This flag can be used only if hwnd is a top-level window. Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Long, ByVal dwTime As Long, ByVal dwFlags As Long) As Boolean Private Sub Form_Load() 'KPD-Team 1999 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net 'Set the graphic mode to persistent Me.AutoRedraw = True Me.Print "Unload me" End Sub Private Sub Form_Unload(Cancel As Integer) 'Animate the window AnimateWindow Me.hwnd, 200, AW_VER_POSITIVE Or AW_HOR_NEGATIVE Or AW_HIDE 'Unload our form completely Set Form1 = Nothing End Sub |
Страница: 1 |
|