Show an Hourglass When Processing Data

Show an Hourglass When Processing Data

Have you ever forgotten to add code to set the MousePointer back to its default at the end of a procedureor function? This technique simplifies showing and resetting the MousePointer without adding code to theend of a procedure or function.When you create an object from a class, the Initialize event is generated. Any code in the event procedurefor that event then executes. This is the first code to execute for the object, before you set any properties orinvoke any methods. When the variable goes out of scope, all references to the object are released, theTerminate event is generated for the object, and any code in the Terminate event procedure for that object isexecuted:

 Declare Sub Sleep Lib "kernel32" _        (ByVal dwMilliseconds As Long)' this is an example of a procedure that' uses the CHourGlass classPrivate Sub ProcessData()        Dim MyHourGlass As CHourGlass        Set MyHourGlass = New CHourGlass        'Add processing code here        Sleep 5000 'This simulates the         'processing of data        'Resume processing code hereEnd Sub'Create a CHourGlass class with the 'following code:Private Sub Class_Initialize()        'Show HourGlass        Screen.MousePointer = vbHourglassEnd SubPrivate Sub Class_Terminate()        'Restore MousePointer        Screen.MousePointer = vbDefaultEnd Sub
Share the Post:
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

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as