Move a form without borders with Mask

Post

Posted
Rating:
#1 (In Topic #415)
Avatar
Trainee
Hi everyone, I'm new to the Forum, sorry if I make some mistakes ..
I state that I have been developing software in Visual Basic, C ++, B4A and B4J for years, now I would like to learn Gambas to develop software for Linux.  :D

Generally I love to draw the interface very well, this pushes me to prefer forms without borders …

I searched one hour online for a solution without a useful result, my problem is the following: how do I move a Form by clicking on a PictureBox and dragging?

I tried to write this script by doing some tests, the Form moves but the problem is that it is moved only when the left mouse button is released .. I would like a smooth and real-time movement to be performed with the movement of the cursor, can someone help me? Thanks

'===== My Try =====

Code

Public Sub PictureBox1_MouseUp()
  'Verifica Tasto
  If Mouse.Left = True Then
   'Muovi Form
   Me.Move(Mouse.X, Mouse.Y)
  Endif
End
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
 Hi DavideTr.
Welcome to the forum.

I needed to do this myself for a 'future project' so we both have a solution now.
This is just one way - there are potentially many more.

Attachment

Moving a Form without borders example


Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Trainee
Fantastic, thanks to your help I understood my mistake, I will adapt the script to my needs, you have been very kind, thanks. ;)
Online now: No Back to the top
1 guest and 0 members have just viewed this.