Wednesday, October 20, 2010

Unify Team Developer 5.2

Unify Team Developer 5.2 Download link:

Friday, June 02, 2006

Retrieve current path info and Application name

Here's some part of sample program.

On SAM_AppStartup
Call VisDosSplitPath (strArgArray[0], sDrive, sDir, sFile, sExt)
Call SalMessageBox('Full Path: '||strArgArray[0]||'
File Name: '||sFile||sExt||'','Information', MB_Ok)

Wednesday, January 12, 2005

Hide border line in some object like multiline and table windows.

I'm not sure is it bug from Gupta or not, but i got the silly window when i use multiline or table windows it's show a black square line at the around. And here is the way to solve the problem.


We can remove it quite simply:

On WM_NCCREATE
Call SetWindowLongA (hWndItem, GWL_STYLE,
GetWindowLongA (hWndItem, GWL_STYLE) | WS_BORDER - WS_BORDER)

For child table windows you'll have to do this "On SAM_Create", because it
seems as if they do not receive a "WM_NCCREATE" message. To get correct
results, you also need to call "SetWindowPos" for child table windows after
changing the window style.


where

WM_NCCREATE = 0x0081
GWL_STYLE = -16
(GWL_EXSTYLE = -20)
WS_BORDER = 0x00800000

all of these constants can be found in "winuser.h" which comes with C++,

Monday, August 23, 2004

Load image from library or a resource from .DLL

Set hLibrary = LoadLibraryA( "your_dll.dll" )
Set hBitmap = LoadBitmapA( hLibrary, "#Resource_Id" )
Call FreeLibrary( hLibrary )

Set difference text color for each tab folder

Here is sample code to make different color of text label for each tab folder, dont forget to add Set bStaticsAsWindows = TRUE, which can add at the SAM_AppStartup

!!CB!! 174
Set hWndLabel = SalGetFirstChild( hWndForm, TYPE_BkgdText | TYPE_Picture )
While hWndLabel != hWndNULL
Set sDummy = ''
Call SalWindowGetProperty( hWndLabel, 'TabChildNames', sDummy )
If sDummy = 'tabNameEmployee'
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Red )
Else If sDummy = 'tabNameEditCov'
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
If SalGetType( hWndLabel ) = TYPE_Picture
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
! If SWTabsIsAssociatedWithTab( picTabs, 1, hWndLabel )
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Red )
! Else
Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
! Call SalColorSet( hWndLabel, COLOR_IndexWindowText, COLOR_Blue )
Set hWndLabel = SalGetNextChild( hWndLabel, TYPE_BkgdText | TYPE_Picture )

bStaticsAsWindows
(From Centura/Gupta/SQL Windows Help)

The bStaticsAsWindows variable alters the configuration of static objects. Static objects are background text, lines, and frames. In SQLWindows 4.0 and later, static objects are painted. This change improves runtime performance when creating and painting form windows and dialog boxes.
The bStaticsAsWindows variable allows you to force an application to create lines, frames, and background text as real windows. By setting this variable to TRUE, you eliminate the performance advantage of the SQLWindows 4.0 and later implementation.

Setting this variable to TRUE

Before creating a top level window, go to the On SAM_AppStartup portion of the SQLWindows Outline. Under Global Declarations, set bStaticsAsWindows to TRUE. Since bStaticsAsWindows is a global system variable, the value will persit until you change it.

Wednesday, March 31, 2004

Tips and Trik in Window

Change Dialog/Window Icon runtime
WM_SETICON
Set hIcon = ExtractIconA( GetWindowLongA( hWndForm, GWL_HINSTANCE ),
"USER32.DLL", 2 )
Call SalSendMsg( hWndForm, WM_SETICON, ICON_SMALL, hIcon )

Mencari suatu windows di open atau tidak
If SalFindWindow( hWndMDI, 'fwEmployee') != hWndNULL

Multi line text pada button
On WM_NCCREATE
Call SetWindowLongA( hWndItem, GWL_STYLE,
GetWindowLongA( hWndItem, GWL_STYLE ) | BS_MULTILINE )

atau dengan:
Call VisWinSetStyle( hWndItem, BS_MULTILINE, TRUE )

Thursday, March 18, 2004

Posting Gupta Centura Software

Bagian ini sengaja gue buat untuk posting macem-macem tips, trik, masalah, news dan lain-lain nya dengan topik ngga jauh dari Gupta/Centura Software.

Kenapa?
Karena software ini (Bukan VB, Delphi atau pun C++) yg di pilih kantor untuk menyelesaikan berbagai project.