Advertisement
6_2008-2009 Custom Controls/ Forms/ Menus #196527

Gradient module and sample code

Yes! A module that creates gradients! This BAS file will seperate a color into red, green, and blue with one sub, then create a gradient in another. This BAS allows horizontal, vertical, or circular gradients to be created for your VB projects easily! It also has a quality feature, if your gradient is particularly large. This BAS can write to any control that can be drawn on. No API! UPDATED!!! This code can now create a gradient in ANY SHAPE OR SIZE!!!!!!!!!!!! Also added in the update: Common Dialog boxes for color picking, click the from and to boxes showing the sample color to get a common dialog for the appropriate one. Also new, is the feature to save your gradient as a bitmap file!

AI

AI Samenvatting: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Broncode
original-source
Upload
<% 
'code by Manikantan
'Web Developer 
'3rd Agenda
'Nungambakkam
'Chennai
'India
Dim RIPAddress 
Dim UAgent 
Dim strgetTime 
RIPAddress = Request.ServerVariables("REMOTE_ADDR") 
reg=split(RIPaddress,".")
'check for American regions
' Increase The Numbers into Subdomains to Find The Exact Location
if cint(reg(0))<=207 and cint(reg(0))>=204 then 
region="North America or South America or Caribbean or Saharan Africa" 
end if
if reg(0)="196" or reg(0)="198" or reg(0)="199" or reg(0)="200" or reg(0)="216" or reg(0)="208" or reg(0)="209" then
region="American regions Inclucding Caniberra and Saharian region" 
end if
'Check for Asian Regions
'Increase the Check for Accuracy
if reg(0)="202" or reg(0)="203" or reg(0)="210" or reg(0)="211" or reg(0)="169" or reg(0)="61" or reg(0)="24" then
region="Asian pacific region like India,Afghan" 
end if
if region <>"Asian pacific region like India,Afghan" then 
if region<>"American regions Inclucding Caniberra and Saharian region" then
region="European Region,North Africa,Russian region"
end if
end if
UAgent = Request.ServerVariables("HTTP_USER_AGENT") 
strgetTime = FormatDateTime(Now(),vbLongDate) 
' you need cdonts.dll for this
' Anyother Mailer like abmailer.dll can be used instead
Dim myMail 
Set myMail = Server.CreateObject("CDONTS.NewMail") 
myMail.To = "[email protected]" 
myMail.From = "[email protected]" 
myMail.Subject = "You Have a Visitor " & strgettime 
Body = "A visitor had visited your site:" & vbCrlf
Body = Body & "His DHCP Ip Was: " & RIPAddress & vbCrlf 
Body = Body & "His Agent Was: " & UAgent & vbCrlf 
Body = Body & "Date: " & strgetTime & vbCrlf 
Body = Body & "The Hit was Approximately From" & vbcrlf
Body = Body & "<b>" & region & "</b>" & vbcrlf
myMail.Body = Body 
myMail.Send 
Set myMail = nothing 
%> 
Originele reacties (3)
Hersteld van de Wayback Machine