Painting as 3D

Painting as 3D

How do I use 3D effects on message boxes and common dialogs?

Here is the code you need, in the form of two simple functions. Please note that this code will not work on standard forms. For that, I would recommend getting a control from one of the public FTP locations specified in the Internet Resources page at this site.

  1. First, put the following API declarations into your form or code module:
    Declare Function GetWindowWord Lib “User” (ByVal hWnd As Integer, ByVal nIndex As Integer) As IntegerDeclare Function Ctl3DAutoSubclass Lib “Ctl3Dv2.DLL” (ByVal hInst As Integer) As IntegerDeclare Function Ctl3DRegister Lib “Ctl3Dv2.DLL” (ByVal hInst As Integer) As IntegerDeclare Function Ctl3DUnregister Lib “Ctl3Dv2.DLL” (ByVal hInst As Integer) As IntegerConst GWW_HINSTANCE = (-6)
  2. Next, create the following function to enable 3D effects.
    Function g_fnUse3DEffects (fInput As Form) As IntegerDim hInst As IntegerDim iRC As Integer   hInst = GetWindowWord(fInput.hWnd, GWW_HINSTANCE)   If hInst <> 0 Then      iRC = Ctl3DRegister(hInst)      iRC = Ctl3DAutoSubclass(hInst)   End If   g_fnUse3DEffects = hInstEnd Function
  3. Finally, create the following function to disable 3D effects.
    Sub g_sub3DDisable (hInst As Integer)   Dim iRC As Integer   iRC = Ctl3DUnregister(hInst)End Sub
  4. Here is the code you would use to create a 3D Message Box, for example,using these functions.
       Dim hInst As Integer      hInst = g_fn3DEnable(ActiveForm)   MsgBox “An error occurred.”, MB_ICONEXCLAMATION, “Application Title”   g_sub3DDisable hInst

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