Página 1 de 1

Imagem no Form Principal

Enviado: 13 Out 2009 12:03
por JAIR RANGEL
Bom dia a todos !

Perdoem a ignorância no assunto.
Mas gostaria de inserir uma imagem no form principal do Programa. De modo que, ao carregar o programa, a imagem fosse exibida em toda a tela do form. Como uma imagem de fundo ou papel de parede.
Ao passo em que se o form fosse maximizado, a imagem também acompanhasse o tamanho do form.

Utilizo Harbour+IDE MiniGUI (Roberto Lopes).

Desde já, obridado !!!! :xau

Jair Rangel

Re: IMAGEM NO FORM PRINCIPAL

Enviado: 13 Out 2009 12:53
por asimoes
Olá Jair,

Está na documentação da minigui.

Exemplo de uso:

Código: Selecionar todos

 @095,002 IMAGE Image_1 ;
               PICTURE "IMG\RIO.JPG" ;
               WIDTH  GetDeskTopWidth()-11 ;
               HEIGHT GetDeskTopHeight()-167 ;
               STRETCH    ;
               WHITEBACKGROUND

Código: Selecionar todos

An image static control can display bitmaps, icons (including animated icons), JPEG, GIF, CUR or enhanced metafiles.  
SYNTAX

Standard Window: 

@ <nRow> ,<nCol> IMAGE <ControlName> 
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
PICTURE <cPictureName> 
[ ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> ]
[ WIDTH <nWidth> HEIGHT <nHeight> ]
[STRETCH ]
[ WHITEBACKGROUND ]
[ HELPID <nHelpId> ]
[ INVISIBLE ] 

Dialog Window: 

REDEFINE IMAGE <ControlName> 
ID <nId> 
[ OF | PARENT | DIALOG <ParentWindowName> ]
PICTURE <cPictureName> 
[ ACTION | ONCLICK | ON CLICK <ActionProcedureName> | <bBlock> ]
[STRETCH ]
[ WHITEBACKGROUND ]
[ HELPID <nHelpId> ]
[ INVISIBLE ] 

Alternate Syntax:

DEFINE IMAGE <ControlName> 

[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
PICTURE <cPictureName> 
[ ACTION |<ActionProcedureName> | <bBlock> ]
[ WIDTH <nWidth> HEIGHT <nHeight> ]
[STRETCH < .T. | .F.> ]
[ WHITEBACKGROUND < .T. | .F.> ]
[ HELPID <nHelpId> ]
[ INVISIBLE < .T. | .F.> ] 

END IMAGE 

PROPERTIES:

·   Enabled Set / Gets enabled state of a Image control 
·   Visible           Sets or gets visible a Image control. 
·   Picture Set / Gets image name of a mage control. 
·   Row  Set / Gets row position of a Image control. 
·   Col    Set / Gets column position of a Image control. 
·   Width Set / Gets width of a Image control. 
·   Height  Set / Gets height of a Image control. 
·   Action Set / Gets Image control's tooltip text. 
·   Name (R)  Retrieves the name of a Image control. 
·   Parent (D) Set the name as character identifier of the parent window.  
·   HelpId (D)   
·   Stretch (D)   



D: Available at control definition only
R: Read-Only 

EVENTS:

·   OnClick Action to be performed when generic clicking of the control 



METHODS:

·   Show  Shows a Image control 
·   Hide Hides a Image control. 
·   Release Releases a Image control from memory. 
·   Refresh Repaint a Image control 
·   SaveAs Save Control as BitMap file. 
[]´S