SHOW statement

Purpose:

SHOW displays a control.

Syntax:

SHOW(HndlWnd AS HWND)

Parameters:

  • Data type: HWND
    HndlWnd The handle to control to be shown. Parentheses are optional.

Example:

'-------------------------------------------------------
' Written by Mike Sanders
' BCX Flip v1.00 2005/08/15
'-------------------------------------------------------
GUI "BCX Flip",PIXELS

DIM RAW x,y  AS LONG
DIM hForm    AS HWND
DIM hdcForm  AS HDC
DIM hdcPaint AS HDC
DIM hdcDesk  AS HDC
DIM psPaint  AS PAINTSTRUCT

SUB FORMLOAD()
 x        = GetSystemMetrics(SM_CXSCREEN)
 y        = GetSystemMetrics(SM_CYSCREEN)
 hForm    = BCX_FORM(0,0,0,x,y,WS_POPUP)
 hdcDesk  = GETBMP(0,0,x,y,GetDesktopWindow())
 hdcForm  = GetDC(hForm)
 SHOW(hForm)
 SendMessage(hForm,WM_PAINT,0,0)
END SUB

BEGIN EVENTS
 SELECT CASE CBMSG
  CASE WM_PAINT
    hdcPaint = BeginPaint(hForm, &psPaint)
    StretchBlt(hdcForm,0,y,x,-y,hdcDesk,0,0,x,y,SRCCOPY)
    EndPaint(hForm, &psPaint)
  CASE WM_KEYDOWN: Done()
  CASE WM_DESTROY: PostQuitMessage(0)
  END SELECT
END EVENTS

SUB Done ()
  MSGBOX "Gotcha! =)","BCX Flip"
  DeleteDC(hdcDesk)
  DeleteDC(hdcForm)
  DestroyWindow(hForm)
END SUB

HIDE statement

Purpose:

HIDE hides a control.

Syntax:

HIDE(HndlWnd AS HWND)

Parameters:

  • Data type: HWND
    HndlWnd The handle to control to be hidden. Parentheses are optional.

Example:

HIDE(Form1)

For an example of the HIDE statement see Demo.bas.