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
Printable View
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
:( huhuhuhuhuhuhuhuhuhuu. no one......... :) help... thanks
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.
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.
this doesn't help... but who cares about a fading splash screen? it's bloat.
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
Yes (of course) :) It seemed to work well.Quote:
Originally posted by charmedcharmer
..... have you tested the code already?
Bruce.
i stand corrected. the api way is not bloat. it's rather sexy :cool:
thanks for the help! superly and overly appreciated by me! :)