View Full Version : Visual Basic altering BMP files?

03-12-2004, 05:52 AM
I have windows ME and I am writing a program using Visual Basic 6.(not .NET, which is for XP)

I have a program that creates logos (startup screens).They are made from 320x400 BMP files saved as .SYS files.To animate them,I need to set bytes H32 and H33 (decimal 50 and 51)to specific numbers,say HEC and H00(decimal 240 and 0).I assume the plan is to open this file as binary and Put my values there.The file is "LogoAnim.SYS"a BMP file of 127K in length.Can someone give me the specific code for this?

You can lead a horse to water,but it would be easier to ride him there.....

03-13-2004, 09:31 PM
Why do I answer my own questions?

Global xx As Integer

SavePicture LogoAnimator.Image1.Picture, FileName
Open FileName For Binary As #1
xx = 256 - Val(LogoAnimator.NumberAnimated.Text)
Put #1, 52, xx
xx = 0
If LogoAnimator.BackandForth.Value = 1 Then
xx = 1
End If
Put #1, 53, xx
Close #1

Now- how is the best way to insert a string?