App as Ruler

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 457
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 49 times
Been thanked: 92 times

App as Ruler

Post by AUGE_OHR » Thu Jan 09, 2020 11:11 am

hi,

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

Carlos Britos
Posts: 221
Joined: Sat Aug 02, 2008 5:03 pm
Has thanked: 6 times
Been thanked: 5 times

Post by Carlos Britos » Thu Jan 09, 2020 12:51 pm

hope this can help you.
source code.C is in zip
ruler.zip
(36.06 KiB) Downloaded 33 times
Regards/Saludos, Carlos (bcd12a)

User avatar
AUGE_OHR
Posts: 457
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 49 times
Been thanked: 92 times

Post by AUGE_OHR » Thu Jan 09, 2020 6:59 pm

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
have fun
Jimmy

User avatar
bpd2000
Posts: 1117
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 213 times
Been thanked: 114 times

Post by bpd2000 » Fri Jan 10, 2020 5:57 am

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
BPD
Convert Dream into Reality through HMG

User avatar
bpd2000
Posts: 1117
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 213 times
Been thanked: 114 times

Post by bpd2000 » Fri Jan 10, 2020 6:41 am

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
BPD
Convert Dream into Reality through HMG

User avatar
AUGE_OHR
Posts: 457
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 49 times
Been thanked: 92 times

Post by AUGE_OHR » Fri Jan 10, 2020 9:09 am

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 319 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 25 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
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 457
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 49 times
Been thanked: 92 times

Post by AUGE_OHR » Mon Jan 13, 2020 5:17 am

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 26 times
have fun
Jimmy

Post Reply