Hit counter image utility

S

Steve Easton

A little utility that you can use to make custom hit counter images for FrontPage hit
counters.

http://www.95isalive.com/fixes/HitMeFP.htm

Cross posted to microsoft.public.frontpage.programming
Follow ups set to here.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rob Giordano \(Crash\)

Nice!

Minor: If you select a font color, then change from flat to 3d you lose the
selected color.
 
S

Steve Easton

Yep.

That's because when you change the style, the foreground, which contains the numbers,\
is "redrawn" by the system which reverts the foreground back to the system default color.

Working on a way around it.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rob Giordano \(Crash\)

what does one need to learn to write stuff like that, and fp cleaner?
 
S

Steve Easton

For applications that are *not* .net dependent:
Using Visual Studio 6.0 ( also called Visual Studio 98 )
as the programming interface and using one of the following languages
Visual Basic 6.0 , now called VB Classic
Or C++ 6.0
Or Visual Foxpro


To utilize the advantages of .NET
Visual Studio .NET 2003 or Visual Studio 2005
and
Visual Basic .NET
or
C# ( C sharp )
or
C++

And the MSDN library which is the "Help files" ( 1 gig install )

I originally wrote FP Cleaner using VS .NET 2003 and then realized I couldn't compile it
without it being dependent upon the .NET Framework.

So I went back to square one with VS 6.0 and used VB Classic and Windows API calls.
( Application Programming Interface )
Which is what you use to call the functions from the resident Windows exe and dll files.
There are over 5500 documented API calls, and many more that are undocumented,


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rob Giordano \(Crash\)

ouch ouch ouch
vb6...classic - what'd they take the sugar out if it? :)

sounds like you need a masters in computer science just to figure out what
you need to learn!
 
S

Steve Easton

Fixed.
New version published and available.

;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rob Giordano \(Crash\)

that was quick.



Steve Easton said:
Fixed.
New version published and available.

;-)

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
 
S

Steve Easton

I was trying to make it to difficult, then the light bulb lit.
I took the default color away from the system and assigned it to a
variable declared in the general declarations section

Dim ColorFont As Long

Added this to the form load statement so the numbers show as Black

ColorFont = RGB(0,0,0)

Then any time a new color is selected made ColorFont = to the value returned from
the Color Picker dialog which is returned as this: tChooseColor.rgbResult


ColorFont = tChooseColor.rgbResult

And bingo.

Recompile and publish to the web.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rob Giordano \(Crash\)

poifecto



Steve Easton said:
I was trying to make it to difficult, then the light bulb lit.
I took the default color away from the system and assigned it to a
variable declared in the general declarations section

Dim ColorFont As Long

Added this to the form load statement so the numbers show as Black

ColorFont = RGB(0,0,0)

Then any time a new color is selected made ColorFont = to the value
returned from
the Color Picker dialog which is returned as this:
tChooseColor.rgbResult


ColorFont = tChooseColor.rgbResult

And bingo.

Recompile and publish to the web.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
 
M

MikeR

Steve -
Any way to get the counter to align in the center of a line of text, instead of at the
top? There is no alignment attribute on the propertied dialog in FP2002.
Tnx.
MikeR 1st
(BTW U in Jax?)
 
S

Steve Easton

To align it in the center of some text would require placing it and the text in separate
cells
and then playing with the text in the adjacent cells.

As for Jax. Yes.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
M

MikeR

Thanks, I thought so. I should have said valign. I made another one with Arial Narrow,
14pt, and the bottoms aligned, although it's too tall for the rest of the text around it,
but that's OK.
Me too in Jax.
 
D

Dragonscar

That's really nifty, and I hate to appear stupid, but where the heck are the
FP counter images stored? And will FP show the HitMe images in the Web
Component list?

Thanks,

Laura
 
D

Dragonscar

One more question: is there a way for the gif image to have a transparent
background?

Thanks, again,
Laura
 
S

Steve Easton

No.

Unfortunately, fpcount.exe which is the file on a server that generates the current "hit
image" is not programmed to handle transparency

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
S

Steve Easton

You save the image HitMeFP creates in your images folder in your web.
You then use it as the "custom" image for your hit counter.

When a visitor opens your page, FPCount.exe ( a file that is part of the server extensions )
adds a "hit" to the number contained in the pagename.html.cnt file in the _private folder.
It then "parses" the hit counter image for the appropriate "numbers" required to display the
hit count and then generates a new unique image which is downloaded and displayed in the
visitors browser.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top