Move a Title-less Form

If you’ve struggled with setting static variables in MouseDown, and MouseUp commands to enable users to drag borderless windows around the screen, here’s a simpler way:

If Button = False Then s1.Move X, YIf Button = 1 Then Me.Move Me.Left + (X - s1.Left), Me.Top + (Y - s1.Top)

When you run the form, you’ll see the Shape move around with the mouse before you begin dragging. But as soon as you start dragging, the form moves, while the Shape stays still. Set the Shape’s Visible property to false to make the process invisible to users. Note that, if there are other controls on the form, users have to click on the form’s surface for this scheme to work. In such cases, you should explicitly provide a visual cue so users will know where to “grab” to drag your forms.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS

homes in the real estate industry

Exploring the Latest Tech Trends Impacting the Real Estate Industry

The real estate industry is changing thanks to the newest technological advancements. These new developments — from blockchain and AI to virtual reality and 3D printing — are poised to change how we buy and sell homes. Real estate brokers, buyers, sellers, wholesale real estate professionals, fix and flippers, and beyond may