Page 1 of 1

App as Ruler

Posted: Thu Jan 09, 2020 11:11 am
by AUGE_OHR
hi,

i'm searching for Ruler as App using harbour / HMG like this
Ruler.JPG
Ruler.JPG (110.28 KiB) Viewed 2622 times
do some one have made it an can share some Code :?:

Re: App as Ruler

Posted: Thu Jan 09, 2020 12:51 pm
by Carlos Britos
hope this can help you.
source code.C is in zip
ruler.zip
(36.06 KiB) Downloaded 186 times

Re: App as Ruler

Posted: Thu Jan 09, 2020 6:59 pm
by AUGE_OHR
Carlos Britos wrote: Thu Jan 09, 2020 12:51 pm hope this can help you.
source code.C is in zip
OK, Thx i will try it

Re: App as Ruler

Posted: Fri Jan 10, 2020 5:57 am
by bpd2000
Carlos Britos wrote: Thu Jan 09, 2020 12:51 pm hope this can help you.
source code.C is in zip

ruler.zip
Grigory or any master in C can adopt in HMG

Re: App as Ruler

Posted: Fri Jan 10, 2020 6:41 am
by bpd2000
AUGE_OHR wrote: i'm searching for Ruler as App using harbour / HMG like this
Refer GridPlus,you will find Function DrawScale
http://hmgforum.com/viewtopic.php?f=10& ... s&start=20

Re: App as Ruler

Posted: Fri Jan 10, 2020 9:09 am
by AUGE_OHR
hi,
bpd2000 wrote: Fri Jan 10, 2020 6:41 am Refer GridPlus,you will find Function DrawScale
have made simple "pure" HMG_Ruler
Icon_Missing.png
Icon_Missing.png (151.18 KiB) Viewed 2498 times
include Source and Icon as Resource.
please have a look at this Snapshot. Explorer does not show EXE Icon :?:
and why in Tasklist vertical Icon is not shown :?:
HMG_RULER.ZIP
(3.43 KiB) Downloaded 161 times
---

as the vertical is only 120 wide i can't use Titlebar to move it ... and it have a Artifact left of it.
how can i get ride of of Min/Max Button Space (!) under HMG :?:

Code: Select all

/* Toggle window properties
   Example:

   A. To turn off (disable) the Maximise button:

       SetWindowPropertyOff( oDlg, WS_MAXIMIZEBOX )

   B. To turn off (disable) the Minimise button:

       SetWindowPropertyOff( oDlg, WS_MINIMIZEBOX )

   C. To turn off the max and min buttons:

       SetWindowPropertyOff( oDlg, WS_MAXIMIZEBOX+WS_MINIMIZEBOX )

   Notes:
   Sample A only disables the maximise button.
   Sample B only disables the minimise button.
   Sample C actually removes the minimise and maximise buttons.

   The inference here is that one cannot exist without the other.

*/

Function SetWindowPropertyOff( oWin, nProperties, lOnOff )
   local nPtr
   local i

   DEFAULT lOnOff to FALSE // toggle=off

   nPtr := GetWindowLongA( oWin:getHWnd(), GWL_STYLE )
   for i := 1 to 32
      if nProperties[i]
         nPtr[i] := lOnOff
      endif
   next
   SetWindowLongA( oWin:getHWnd(), GWL_STYLE, nPtr )
   return Nil

DLLFUNCTION GetWindowLongA( nHwnd, nStyle ) USING STDCALL FROM User32.dll
DLLFUNCTION SetWindowLongA( nHwnd, nStyle, nPtr ) USING STDCALL FROM User32.dll

Re: App as Ruler

Posted: Mon Jan 13, 2020 5:17 am
by AUGE_OHR
hi,

new Version :
5 Point mark
Context Menu for Transparency
NOMAXIMIZE NOMINIMIZE -> no Artefact

now vertical Ruler can be moved using Titlebar

here is the Source
HMG_RULER2.ZIP
(3.83 KiB) Downloaded 177 times