ABEO Posted June 8, 2003 Share Posted June 8, 2003 This is my first time posting code so be nice:Put this code in the Declerations(at the top):Option Explicit '************************************* 'Copyright © 2001 by Alexander Anikin '& DREAM Interactive - QQQ 'e-mail: aka@i.com.ua 'For more my code samples visit: 'http://hotmix.narod.ru '*************************************Private Declare Function AlphaBlend Lib "msimg32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal widthSrc As Long, ByVal heightSrc As Long, ByVal dreamAKA As Long) As Long 'only Windows 98 or LaterDim Num As Byte, nN%, nBlend&This is the simple stuff :Private Sub Form_Activate() Call Run_BlendingEnd SubPrivate Sub Form_Unload(Cancel As Integer) EndEnd SubNow for the effects You need to add a picture box and name it 'picSrc'.Then find the two pictures you wish to blend and set one as the background of the form, and the other as the picture in picSrc.Then add this code:Private Sub Run_Blending()Num = 255nN = 5Do DoEvents '*********************************************** nBlend = vbBlue - CLng(Num) * (vbYellow + 1) 'It's Magic Formula is 'Alchemical Mixture of Elements of Gold & Sky 'It's obtained by an almost mystical way '*********************************************** Num = Num - nN If Num = 0 Then nN = -5 ElseIf Num = 255 Then nN = 5 End If Me.Cls AlphaBlend Me.hDC, 0, 0, picSrc.ScaleWidth, picSrc.ScaleHeight, picSrc.hDC, 0, 0, picSrc.ScaleWidth, picSrc.ScaleHeight, nBlendLoopEnd SubChange the value of 'nN' to increase/decrease speed of the blend, all comments by the original author have been left in the code(I just wanted to show you something cool that you may not have seen Have fun with this Link to comment Share on other sites More sharing options...
aka Posted September 10, 2003 Share Posted September 10, 2003 It's my code! Wow! Thank You for advertising RegardsAlexander Anikin [aka]______________________http://hotmix.narod.ru*** Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now