|
-
Nov 3rd, 2004, 10:57 AM
#1
Thread Starter
Addicted Member
Slowly Appearing Preloader
Hi guyz! I just want to ask how do i make a preloader just like ad-aware's preloader. you know.... a preloader that slowly appears.... i dont have any idea.. thanks for the help
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
-
Nov 3rd, 2004, 08:57 PM
#2
Thread Starter
Addicted Member
huhuhuhuhuhuhuhuhuhuu. no one......... help... thanks
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
-
Nov 3rd, 2004, 09:01 PM
#3
There was a post recently to make a Form near transparent, and you could vary the intensity.
(It was for a VB.Net equivalent)
With the code you could Do Loop (or timer), incremneting the value as you go.
I'll see if I can find it.
Bruce.
-
Nov 3rd, 2004, 09:26 PM
#4
This may do the trick (if you have Win 2K or above). Place a timer on the Form.
(Modified original code posted by RobDog888)
VB Code:
Option Explicit
'Note: Win 2K +
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _
(ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, _
ByVal lpProcName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, _
ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_ALPHA = &H2
Private mlHwnd As Long
Private Sub Form_Load()
Timer1.Interval = 100
Timer1.Enabled = True
AlphaBlendForm Me.hwnd, 0 'MAX VALUE = OPAIC/ MIN VALUE = 0 CANT SEE
End Sub
Private Sub AlphaBlendForm(ByVal lHwnd As Long, ByVal intTranslucenceLevel As Integer)
If APIExists("SetLayeredWindowAttributes", "User32") Then
SetWindowLong lHwnd, GWL_EXSTYLE, WS_EX_LAYERED
SetLayeredWindowAttributes lHwnd, 0, intTranslucenceLevel, LWA_ALPHA
Else
MsgBox "Your OS does not support Alpha Blending.", vbExclamation, "Alpha Blend"
End If
End Sub
Private Function APIExists(ByVal pstrFunctionName As String, ByVal pstrDllName As String) As Boolean
Dim lngHandle As Long
Dim lngAddr As Long
lngHandle = LoadLibrary(pstrDllName)
If Not (lngHandle = 0) Then
lngAddr = GetProcAddress(lngHandle, pstrFunctionName)
FreeLibrary lngHandle
End If
APIExists = Not (lngAddr = 0)
End Function
Private Sub Timer1_Timer()
Static intIdx As Integer
AlphaBlendForm Me.hwnd, intIdx
'Increment the Index counter
If intIdx >= 255 Then
Timer1.Enabled = False
Else
intIdx = intIdx + 5
End If
End Sub
Bruce.
Last edited by Bruce Fox; Nov 3rd, 2004 at 09:30 PM.
-
Nov 4th, 2004, 02:43 AM
#5
Frenzied Member
this doesn't help... but who cares about a fading splash screen? it's bloat.
-
Nov 11th, 2004, 09:51 AM
#6
Thread Starter
Addicted Member
its actually for creativity.. thanks. ill try this onoe a lil bit later.. thanks for the help... have you tested the code already? thanks alot
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
-
Nov 17th, 2004, 02:35 AM
#7
Originally posted by charmedcharmer
..... have you tested the code already?
Yes (of course) It seemed to work well.
Bruce.
-
Nov 17th, 2004, 03:08 AM
#8
Frenzied Member
i stand corrected. the api way is not bloat. it's rather sexy
-
Nov 17th, 2004, 03:35 AM
#9
Thread Starter
Addicted Member
thanks for the help! superly and overly appreciated by me!
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|