Guys,
Does anyone has hourglass gif animated? i need to make it animate when the program is loading.... please help where can i find it.. ?
and what is the best way to animate in VB ?
Printable View
Guys,
Does anyone has hourglass gif animated? i need to make it animate when the program is loading.... please help where can i find it.. ?
and what is the best way to animate in VB ?
Animated Cursors
VB Code:
' This code to be inserted into a module Private Declare Function LoadCursorFromFile Lib "user32" Alias _ "LoadCursorFromFileA" (ByVal lpFileName As String) As Long Private Declare Function SetSystemCursor Lib "user32" _ (ByVal hcur As Long, ByVal id As Long) As Long Private Declare Function GetCursor Lib "user32" () As Long Private Declare Function CopyIcon Lib "user32" (ByVal hcur As Long) As Long Private Const OCR_NORMAL = 32512 Public lngOldCursor As Long, lngNewCursor As Long Public Sub StartAnimatedCursor(AniFilePath As String) ' Create a copy of the current cursor, ' for Windows NT compatibility lngOldCursor = CopyIcon(GetCursor()) ' Check the passed string, if it contains ' a solid file path, then load the cursor ' from file. If not, add the App.Path, ' *then* load cursor... If InStr(1, AniFilePath, "\") Then lngNewCursor = LoadCursorFromFile(AniFilePath) Else lngNewCursor = LoadCursorFromFile(App.Path & _ "\" & AniFilePath) End If ' Activate the cursor SetSystemCursor lngNewCursor, OCR_NORMAL End Sub Public Sub RestoreLastCursor() ' Restore last cursor SetSystemCursor lngOldCursor, OCR_NORMAL End Sub Private Sub Command1_Click() StartAnimatedCursor ("C:\Deepak\Downloads\Icons\ani\3db2bus1.ani") MsgBox "Start long process here..." RestoreLastCursor End Sub
actually.. is not the cursor that i want to animate.. i want to animate a picture in the picture box.. can that be done during the registration process?
:wave:
u can use WebBrowser ActiveX control to display animated gif file within your program.
Add the WebBrowser ActiveX control to your form. go to Project >> Components, then mark the 'Microsoft Internet Controls' check box, and press OK.
VB Code:
Private Sub Form_Load() 'Replace 'C:\myDir\myFile.gif' with your GIF file. 'the following two lines should be written in one line WebBrowser1.Navigate "about:<html><body scroll='no'><img src='C:\myDir\myFile.gif'></img></body></html>" End Sub
or use this third party dll.
Copy this file to C:\WINNT\SYSTEM32
Add it to ur form from Project >> Components