Harbour MiniGUI 2.7.0

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Harbour MiniGUI 2.7.0

Post by Roberto Lopez »

esgici wrote:]
Sorry Roberto :(
It was a JOKE!!!

No problem at all !!!


Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Harbour MiniGUI 2.7.0

Post by esgici »

Roberto Lopez wrote: It was a JOKE!!!
In that case sorry for don't understood the joke :)

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Harbour MiniGUI 2.7.0

Post by sudip »

Ha, ha, ha .... :lol:
This was a little pleasantry between Sudip and me.

We had use this term only as opposite of program makers, that's all.
I am feeling at home in this forum :)

Thank you all for this healthy environment :)

Regards.

Sudip
With best regards,
Sudip
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Harbour MiniGUI 2.7.0

Post by sudip »

Hello Roberto,

I just found System object. It's excellent. I changed in my Dbf to Excel project also.

Code: Select all

         System.clipboard := cMemo
It's another cool (IMHO, "cooler") feature of new version :)

Thank you very much!

With best regards.

Sudip
With best regards,
Sudip
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Harbour MiniGUI 2.7.0

Post by esgici »

Roberto Lopez wrote:- Harbour MiniGUI 2.7.0 Changelog:
...
- New: 'System' object. It will aloow to read (and write when possible) various operating system properties.
...
I am experimenting more deeply on new features.

Addition this 'System' object isn't a good thing ;)

Now we will demand adding more properties to it.

F.e. System.Infos => <aSystemInfos>

Best Regards.

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Harbour MiniGUI 2.7.0

Post by gfilatov »

esgici wrote: Now we will demand adding more properties to it.

F.e. System.Infos => <aSystemInfos>
Hello Esgici,

No problem :!:
Try the following working sample:

Code: Select all

*
* MINIGUI - HARBOUR - Win32
*
ANNOUNCE RDDSYS

#include "minigui.ch"

#define PROGRAM "System Metrics"
#define VERSION " v.1.0"
#define COPYRIGHT " 2005 Grigory Filatov"

#define NTRIM( n ) LTrim( Str( n ) )

/*
 * GetSystemMetrics() codes
 */

#define SM_CXSCREEN             0
#define SM_CYSCREEN             1
#define SM_CXVSCROLL            2
#define SM_CYHSCROLL            3
#define SM_CYCAPTION            4
#define SM_CXBORDER             5
#define SM_CYBORDER             6
#define SM_CXDLGFRAME           7
#define SM_CYDLGFRAME           8
#define SM_CYVTHUMB             9
#define SM_CXHTHUMB             10
#define SM_CXICON               11
#define SM_CYICON               12
#define SM_CXCURSOR             13
#define SM_CYCURSOR             14
#define SM_CYMENU               15
#define SM_CXFULLSCREEN         16
#define SM_CYFULLSCREEN         17
#define SM_CYKANJIWINDOW        18
#define SM_MOUSEPRESENT         19
#define SM_CYVSCROLL            20
#define SM_CXHSCROLL            21
#define SM_DEBUG                22
#define SM_SWAPBUTTON           23
#define SM_RESERVED1            24
#define SM_RESERVED2            25
#define SM_RESERVED3            26
#define SM_RESERVED4            27
#define SM_CXMIN                28
#define SM_CYMIN                29
#define SM_CXSIZE               30
#define SM_CYSIZE               31
#define SM_CXFRAME              32
#define SM_CYFRAME              33
#define SM_CXMINTRACK           34
#define SM_CYMINTRACK           35
#define SM_CXDOUBLECLK          36
#define SM_CYDOUBLECLK          37
#define SM_CXICONSPACING        38
#define SM_CYICONSPACING        39
#define SM_MENUDROPALIGNMENT    40
#define SM_PENWINDOWS           41
#define SM_DBCSENABLED          42
#define SM_CMOUSEBUTTONS        43

#define SM_CXFIXEDFRAME           SM_CXDLGFRAME  /* ;win40 name change */
#define SM_CYFIXEDFRAME           SM_CYDLGFRAME  /* ;win40 name change */
#define SM_CXSIZEFRAME            SM_CXFRAME     /* ;win40 name change */
#define SM_CYSIZEFRAME            SM_CYFRAME     /* ;win40 name change */

#define SM_SECURE               44
#define SM_CXEDGE               45
#define SM_CYEDGE               46
#define SM_CXMINSPACING         47
#define SM_CYMINSPACING         48
#define SM_CXSMICON             49
#define SM_CYSMICON             50
#define SM_CYSMCAPTION          51
#define SM_CXSMSIZE             52
#define SM_CYSMSIZE             53
#define SM_CXMENUSIZE           54
#define SM_CYMENUSIZE           55
#define SM_ARRANGE              56
#define SM_CXMINIMIZED          57
#define SM_CYMINIMIZED          58
#define SM_CXMAXTRACK           59
#define SM_CYMAXTRACK           60
#define SM_CXMAXIMIZED          61
#define SM_CYMAXIMIZED          62
#define SM_NETWORK              63
#define SM_CLEANBOOT            67
#define SM_CXDRAG               68
#define SM_CYDRAG               69
#define SM_SHOWSOUNDS           70
#define SM_CXMENUCHECK          71
#define SM_CYMENUCHECK          72
#define SM_SLOWMACHINE          73
#define SM_MIDEASTENABLED       74
#define SM_MOUSEWHEELPRESENT    75
#define SM_XVIRTUALSCREEN       76
#define SM_YVIRTUALSCREEN       77
#define SM_CXVIRTUALSCREEN      78
#define SM_CYVIRTUALSCREEN      79
#define SM_CMONITORS            80
#define SM_SAMEDISPLAYFORMAT    81
*--------------------------------------------------------*
Function Main()
*--------------------------------------------------------*
LOCAL i, m, aItems := {}, sm := ;
	{ ;
	{SM_ARRANGE,		"SM_ARRANGE", "Flags specifying how the system arranged minimized windows. For more information about minimized windows, see the following Remarks section."},;
	{SM_CLEANBOOT,		"SM_CLEANBOOT", "Value that specifies how the system was started: 0 Normal boot; 1 - Fail-safe boot; 2 - Fail-safe with network boot. Fail-safe boot (also called SafeBoot) bypasses the user's startup files."},;
	{SM_CMONITORS,		"SM_CMONITORS", "Windows 2000 and later; Windows 98: Number of display monitors on the desktop."},;
	{SM_CMOUSEBUTTONS,	"SM_CMOUSEBUTTONS", "Number of buttons on mouse, or zero if no mouse is installed."},;
	{SM_CXBORDER,		"SM_CXBORDER", ""},;
	{SM_CYBORDER,		"SM_CYBORDER", "Width and height, in pixels, of a window border. This is equivalent to the SM_CXEDGE value for windows with the 3-D look."},;
	{SM_CXCURSOR,		"SM_CXCURSOR", ""},;
	{SM_CYCURSOR,		"SM_CYCURSOR", "Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes. "},;
	{SM_CXDLGFRAME,		"SM_CXDLGFRAME", ""},;
	{SM_CYDLGFRAME,		"SM_CYDLGFRAME", "Same as SM_CXFIXEDFRAME and SM_CYFIXEDFRAME. "},;
	{SM_CXDOUBLECLK,	"SM_CXDOUBLECLK", " "},;
	{SM_CYDOUBLECLK,	"SM_CYDOUBLECLK", "Width and height, in pixels, of the rectangle around the location of a first click in a double-click sequence. The second click must occur within this rectangle for the system to consider the two clicks a double-click. (The two clicks must also occur within a specified time.) To set the width and height of the double-click rectangle, call SystemParametersInfo with the SPI_SETDOUBLECLKHEIGHT and SPI_SETDOUBLECLKWIDTH flags."},;
	{SM_CXDRAG,			"SM_CXDRAG", ""},;
	{SM_CYDRAG,			"SM_CYDRAG", "Width and height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. "},;
	{SM_CXEDGE,			"SM_CXEDGE", ""},;
	{SM_CYEDGE,			"SM_CYEDGE", "Dimensions, in pixels, of a 3-D border. These are the 3-D counterparts of SM_CXBORDER and SM_CYBORDER. "},;
	{SM_CXFIXEDFRAME,	"SM_CXFIXEDFRAME", ""},;
	{SM_CYFIXEDFRAME,	"SM_CYFIXEDFRAME", "Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. SM_CXFIXEDFRAME is the width of the horizontal border and SM_CYFIXEDFRAME is the height of the vertical border. Same as SM_CXDLGFRAME and SM_CYDLGFRAME."},;
	{SM_CXFRAME,		"SM_CXFRAME", ""},;
	{SM_CYFRAME,		"SM_CYFRAME", "Same as SM_CXSIZEFRAME and SM_CYSIZEFRAME. "},;
	{SM_CXFULLSCREEN,	"SM_CXFULLSCREEN", ""},;
	{SM_CYFULLSCREEN,	"SM_CYFULLSCREEN", "Width and height of the client area for a full-screen window on the primary display monitor. To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.  "},;
	{SM_CXHSCROLL,		"SM_CXHSCROLL", ""},;
	{SM_CYHSCROLL,		"SM_CYHSCROLL", "Width, in pixels, of the arrow bitmap on a horizontal scroll bar; and height, in pixels, of a horizontal scroll bar. "},;
	{SM_CXHTHUMB,		"SM_CXHTHUMB", "Width, in pixels, of the thumb box in a horizontal scroll bar. "},;
	{SM_CXICON,			"SM_CXICON", " "},;
	{SM_CYICON,			"SM_CYICON", "The default width and height, in pixels, of an icon. The LoadIcon function can load only icons of these dimensions.  "},;
	{SM_CXICONSPACING,	"SM_CXICONSPACING", ""},;
	{SM_CYICONSPACING,	"SM_CYICONSPACING", "Dimensions, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of this size when arranged. These values are always greater than or equal to SM_CXICON and SM_CYICON. "},;
	{SM_CXMAXIMIZED,	"SM_CXMAXIMIZED", ""},;
	{SM_CYMAXIMIZED,	"SM_CYMAXIMIZED", "Default dimensions, in pixels, of a maximized top-level window on the primary display monitor. "},;
	{SM_CXMAXTRACK,		"SM_CXMAXTRACK", ""},;
	{SM_CYMAXTRACK,		"SM_CYMAXTRACK", "Default maximum dimensions, in pixels, of a window that has a caption and sizing borders. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override these values by processing the WM_GETMINMAXINFO message. "},;
	{SM_CXMENUCHECK,	"SM_CXMENUCHECK", ""},;
	{SM_CYMENUCHECK,	"SM_CYMENUCHECK", "Dimensions, in pixels, of the default menu check-mark bitmap. "},;
	{SM_CXMENUSIZE,		"SM_CXMENUSIZE", ""},;
	{SM_CYMENUSIZE,		"SM_CYMENUSIZE", "Dimensions, in pixels, of menu bar buttons, such as the child window close button used in the multiple document interface.  "},;
	{SM_CXMIN,			"SM_CXMIN", ""},;
	{SM_CYMIN,			"SM_CYMIN", "Minimum width and height, in pixels, of a window. "},;
	{SM_CXMINIMIZED,	"SM_CXMINIMIZED", ""},;
	{SM_CYMINIMIZED,	"SM_CYMINIMIZED", "Dimensions, in pixels, of a normal minimized window. "},;
	{SM_CXMINSPACING,	"SM_CXMINSPACING", ""},;
	{SM_CYMINSPACING,	"SM_CYMINSPACING", "Dimensions, in pixels, of a grid cell for minimized windows. Each minimized window fits into a rectangle this size when arranged. These values are always greater than or equal to SM_CXMINIMIZED and SM_CYMINIMIZED. "},;
	{SM_CXMINTRACK,		"SM_CXMINTRACK", ""},;
	{SM_CYMINTRACK,		"SM_CYMINTRACK", "Minimum tracking width and height, in pixels, of a window. The user cannot drag the window frame to a size smaller than these dimensions. A window can override these values by processing the WM_GETMINMAXINFO message. "},;
	{SM_CXSCREEN,		"SM_CXSCREEN", " "},;
	{SM_CYSCREEN,		"SM_CYSCREEN", "Width and height, in pixels, of the screen of the primary display monitor. These are the same values you obtain by calling GetDeviceCaps(hdcPrimaryMonitor, HORZRES/VERTRES). "},;
	{SM_CXSIZE,			"SM_CXSIZE", ""},;
	{SM_CYSIZE,			"SM_CYSIZE", "Width and height, in pixels, of a button in a window's caption or title bar. "},;
	{SM_CXSIZEFRAME,	"SM_CXSIZEFRAME", ""},;
	{SM_CYSIZEFRAME,	"SM_CYSIZEFRAME", "Thickness, in pixels, of the sizing border around the perimeter of a window that can be resized. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.  Same as SM_CXFRAME and SM_CYFRAME."},;
	{SM_CXSMICON,		"SM_CXSMICON", ""},;
	{SM_CYSMICON,		"SM_CYSMICON", "Recommended dimensions, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view. "},;
	{SM_CXSMSIZE,		"SM_CXSMSIZE", ""},;
	{SM_CYSMSIZE,		"SM_CYSMSIZE", "Dimensions, in pixels, of small caption buttons. "},;
	{SM_CXVIRTUALSCREEN,"SM_CXVIRTUALSCREEN", ""},;
	{SM_CYVIRTUALSCREEN,"SM_CYVIRTUALSCREEN", "Windows 2000 and later; Windows 98: Width and height, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN metrics are the coordinates of the top-left corner of the virtual screen. "},;
	{SM_CXVSCROLL,		"SM_CXVSCROLL", ""},;
	{SM_CYVSCROLL,		"SM_CYVSCROLL", "Width, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical scroll bar. "},;
	{SM_CYCAPTION,		"SM_CYCAPTION", "Height, in pixels, of a normal caption area. "},;
	{SM_CYKANJIWINDOW,	"SM_CYKANJIWINDOW", "For double byte character set versions of the system, this is the height, in pixels, of the Kanji window at the bottom of the screen. "},;
	{SM_CYMENU,			"SM_CYMENU", "Height, in pixels, of a single-line menu bar. "},;
	{SM_CYSMCAPTION,	"SM_CYSMCAPTION", "Height, in pixels, of a small caption. "},;
	{SM_CYVTHUMB,		"SM_CYVTHUMB", "Height, in pixels, of the thumb box in a vertical scroll bar. "},;
	{SM_DBCSENABLED,	"SM_DBCSENABLED", "TRUE or nonzero if the double-byte character-set (DBCS) version of User.exe is installed; FALSE or zero otherwise. "},;
	{SM_DEBUG,			"SM_DEBUG", "TRUE or nonzero if the debugging version of User.exe is installed; FALSE or zero otherwise. "},;
;//	{SM_IMMENABLED,		"SM_IMMENABLED", "Windows 2000: TRUE or nonzero if Input Method Manager/Input Method Editor features are enabled; FALSE or zero otherwise. Can determine if the system handles Unicode IME. However, if the IME is language dependent you should also check that the target language has been installed. Otherwise some components, like fonts or registry settings, may not be present. "},;
	{SM_MENUDROPALIGNMENT,"SM_MENUDROPALIGNMENT", "TRUE or nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; FALSE or zero if the menus are left-aligned. "},;
	{SM_MIDEASTENABLED,	"SM_MIDEASTENABLED", "TRUE if the system is enabled for Hebrew and Arabic languages. "},;
	{SM_MOUSEPRESENT,	"SM_MOUSEPRESENT", "TRUE or nonzero if a mouse is installed; FALSE or zero otherwise. "},;
	{SM_MOUSEWHEELPRESENT,"SM_MOUSEWHEELPRESENT", "Windows NT 4.0 and later, Windows 98: TRUE or nonzero if a mouse with a wheel is installed; FALSE or zero otherwise. "},;
	{SM_NETWORK,		"SM_NETWORK", "The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use. "},;
	{SM_PENWINDOWS,		"SM_PENWINDOWS", "TRUE or nonzero if the Microsoft Windows for Pen computing extensions are installed; FALSE or zero otherwise. "},;
;//	{SM_REMOTESESSION,	"SM_REMOTESESSION", "Terminal Server Edition 4.0 SP4 or Windows 2000 or later: This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session, the return value is TRUE or nonzero. If the calling process is associated with the Terminal Server console session, the return value is zero. "},;
	{SM_SECURE,			"SM_SECURE", "TRUE if security is present; FALSE otherwise. "},;
	{SM_SAMEDISPLAYFORMAT,"SM_SAMEDISPLAYFORMAT", "Windows 2000 and later; Windows 98: TRUE if all the display monitors have the same color format, FALSE otherwise. Note that two displays can have the same bit depth, but different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those bits can be located in different places in a pixel's color value. "},;
	{SM_SHOWSOUNDS,		"SM_SHOWSOUNDS", "TRUE or nonzero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; FALSE, or zero, otherwise. "},;
	{SM_SLOWMACHINE,	"SM_SLOWMACHINE", "TRUE if the computer has a low-end (slow) processor; FALSE otherwise. "},;
	{SM_SWAPBUTTON,		"SM_SWAPBUTTON", "TRUE or nonzero if the meanings of the left and right mouse buttons are swapped; FALSE or zero otherwise. "},;
	{SM_XVIRTUALSCREEN,	"SM_XVIRTUALSCREEN", ""},;
	{SM_YVIRTUALSCREEN,	"SM_YVIRTUALSCREEN", "Windows 2000 and later; Windows 98: Coordinates for the left side and the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN metrics are the width and height of the virtual screen. "};
	}

FOR i := 1 TO Len( sm )

	m := GetSystemMetrics ( sm [i] [1] )

	Aadd( aItems, { sm [i] [2], NTRIM( m ), sm [i] [3] } )

NEXT

DEFINE WINDOW Form_1 ; 
	AT 0,0 ; 
	WIDTH 606 ; 
	HEIGHT 275 ;
	TITLE PROGRAM ; 
	MAIN ;
	NOMAXIMIZE NOSIZE ;
	ON MOUSECLICK MsgAbout() ;
	FONT 'MS Sans Serif' ;
	SIZE 9

	m := Form_1.Width - 2 * GetBorderWidth() - 10

	@ 6,6 GRID Grid_1 ;
		WIDTH m ;
		HEIGHT Form_1.Height - GetTitleHeight() - 2 * GetBorderHeight() - 10 ;
		HEADERS { 'Name', 'Value', 'Description' } ; 
		WIDTHS { 162, 42, m - GetSystemMetrics ( SM_CXVSCROLL ) - 208 } ;
		ITEMS aItems ;
		NOLINES ;
		ON DBLCLICK ( System.Clipboard := GetColValue( "Grid_1", "Form_1", 1 ), ;
			MsgInfo( "The name have been copied to clipboard", PROGRAM ) ) ;
		JUSTIFY { BROWSE_JTFY_LEFT,BROWSE_JTFY_RIGHT, BROWSE_JTFY_LEFT }

	ON KEY ESCAPE ACTION ReleaseAllWindows()

END WINDOW

CENTER WINDOW Form_1

ACTIVATE WINDOW Form_1

Return Nil

*--------------------------------------------------------*
Function GetColValue( xObj, xForm, nCol )
*--------------------------------------------------------*
  Local nPos:= GetProperty(xForm, xObj, 'Value')
  Local aRet:= GetProperty(xForm, xObj, 'Item', nPos)

Return aRet[nCol] 

*--------------------------------------------------------*
Function MsgAbout()
*--------------------------------------------------------*
return MsgInfo( PROGRAM + VERSION + CRLF + ;
	"Copyright " + Chr(169) + COPYRIGHT + CRLF + CRLF + ;
	"eMail: gfilatov@freemail.ru" + CRLF + CRLF + ;
	"This program is Freeware!" + CRLF + ;
	padc("Copying is allowed!", 30), "About..." )
 

#pragma BEGINDUMP

#define HB_OS_WIN_32_USED
#define _WIN32_WINNT   0x0400

#include <windows.h>
#include "hbapi.h"
#include "hbapiitm.h"

HB_FUNC ( GETSYSTEMMETRICS )

{
	hb_retni( GetSystemMetrics( hb_parni( 1 ) ) );
}

#pragma ENDDUMP
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Harbour MiniGUI 2.7.0

Post by esgici »

gfilatov wrote: No problem :!:
Thanks Grigory

Anyway the inspiration come from your famous SysInfo prg and routines.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Harbour MiniGUI 2.7.0

Post by Roberto Lopez »

esgici wrote: I am experimenting more deeply on new features.

Addition this 'System' object isn't a good thing ;)

Now we will demand adding more properties to it.

F.e. System.Infos => <aSystemInfos>

Best Regards.

--

Esgici
There is LOTS of things that can be added. I'm testing new ones right now!


Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply