<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I posted to the Gambas User List yesterday. I sent, with the
email, an attachment of my 'stripped down' project as a compressed
source (Test.tar.gz). When I look at the Archive, specifically my
post, it says:</p>
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">A non-text attachment was scrubbed...
Name: Test.tar.gz
Type: application/gzip
Size: 67367 bytes
Desc: not available
URL: <<a href="https://lists.gambas-basic.org/pipermail/user/attachments/20200515/e997d432/attachment-0001.gz">https://lists.gambas-basic.org/pipermail/user/attachments/20200515/e997d432/attachment-0001.gz</a>>
<font size="+1">I haven't posted for years. People when replying to posts asking for help with a project generally ask me for the project in a 'stripped down' form. Perhaps I should attach a project in a different way. If so, what?
So here's the code:
' Gambas class file
Private iAreaLeft As Integer
Private iAreaTop As Integer
Private iAreaWidth As Integer
Private iAreaHeight As Integer
Public Sub _new()
FSelectArea.Left = Screen.AvailableX
FSelectArea.Top = Screen.AvailableY
FSelectArea.Width = Screen.AvailableWidth
FSelectArea.Height = Screen.AvailableHeight
DrawingAreaDesktop.Left = Screen.AvailableX
DrawingAreaDesktop.Top = Screen.AvailableY
DrawingAreaDesktop.Width = Screen.AvailableWidth
DrawingAreaDesktop.Height = Screen.AvailableHeight
End
Public Sub Form_Open()
Message.Title = "To Specify Area to be Recorded:"
Message.Info("Mouse button down & hold down on top left corner, drag to bottom right corner, and mouse button up.")
Inc Application.Busy
iAreaLeft = Screen.Width
iAreaTop = Screen.Height
iAreaWidth = 0
iAreaHeight = 0
Finally
Application.Busy = 0
Catch
Message.Warning(ERROR.Text)
End
Public Sub DrawingAreaDesktop_MouseDown()
Inc Application.Busy
' Print "Area 1st corner: X=" & Mouse.X & ", Y=" & Mouse.Y
iAreaLeft = Mouse.X
iAreaTop = Mouse.Y
Paint.Begin(Last)
Finally
Application.Busy = 0
Catch
Message.Warning(ERROR.Text)
End
Public Sub DrawingAreaDesktop_MouseMove()
If iAreaLeft >= Mouse.X Or iAreaTop >= Mouse.Y Then
Return
Endif
Inc Application.Busy
iAreaWidth = Mouse.X - iAreaLeft
iAreaHeight = Mouse.Y - iAreaTop
Paint.Rectangle(iAreaLeft, iAreaTop, iAreaWidth, iAreaHeight)
Finally
Application.Busy = 0
Catch
Message.Warning(ERROR.Text)
End
Public Sub DrawingAreaDesktop_MouseUp()
If iAreaLeft >= Mouse.X Or iAreaTop >= Mouse.Y Then
Message.Title = "Try again:"
Message.Info("You have not selected an area")
Return
Endif
Inc Application.Busy
' Print "Area 2nd corner: X=" & Mouse.X & ", Y=" & Mouse.Y
iAreaWidth = Mouse.X - iAreaLeft
iAreaHeight = Mouse.Y - iAreaTop
Paint.End
Print "You have selected this area: " & iAreaLeft & ", " & iAreaTop & ", " & iAreaWidth & " ," & iAreaHeight
FMain.iRegionLeft = iAreaLeft
FMain.iRegionTop = iAreaTop
FMain.iRegionWidth = iAreaWidth
FMain.iRegionHeight = iAreaHeight
Last.Close
Finally
Application.Busy = 0
Catch
Message.Warning(ERROR.Text)
End
</font></pre>
<div class="moz-signature">
<p><br>
</p>
</div>
</body>
</html>