Speed Your Animations and Save Memory

Speed Your Animations and Save Memory

Tired of loading icons or bitmaps or creating many images withthe several styles of pictures in form modules that blow up yourapplication and slow it down in VB3?

If so, you can create several icons or bitmaps of similar style.Then create a pure text (ASCII) file like printer.txt or printer.rcthis way:

 NameID_keyword_[load-option]_        [mem-option]_filename

First, define each of the terms in this code. Where nameID equalsInteger or name, the ID has to be unique for every category specifiedby the keyword:

 keyword = ICON,BITMAP

If the code “[load-option]” is equal to PRELOAD, thenthe resource loads immediately. If it is equal to LOADONCALL,the (Default) resource loads when called.

If the code “[mem-option]” is equal to FIXED, the resourceremains at a fixed memory location. If it is equal to MOVABLE,then the (Default) Resource can be moved if necessary in orderto compact memory. If it is equal to DISCARDABLE, then the resourcecan be discarded if no longer needed.

And “filename” specifies the name of the file that containsthe resource. The name must be a valid MS-DOS file name, and itmust be a full path if the file is not in the current workingdirectory. The path can be either quoted or nonquoted string.The text file looks like this:


Open the DOS-WINDOW in Win 3.1 or return to DOS and run the rc.exethat shipped with the German version of VB4 Pro (also on the American/Englishversion CD-ROM).

It may look like this:

c -r printer.rc

or for the 32-bit RES file:

c -r printer.rc

Next, push enter and the resource file will soon be generated.Search for the file named “printer.res” or the nameyou have chosen.

Create a new project. Add a picture box and a timer to your form.Then add the RES file to your project.

The timer-event looks like this:

 Private Sub Timer1_Timer()Static ID        ID = ID+1        IF ID = 10 Then                ID = 1        End IF         Picture.Picture = _                LoadResPicture(ID,1)End Sub

Don’t forget to set the timer interval.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing