imagen al inicio del sistema

imagen al inicio del sistema

Postby Patricio Avalos Aguirre » Wed Oct 19, 2005 3:16 pm

Estimados

Hay alguna forma de colocar una imagen bmp sin necesidad de hacer una por cada resolucion de pantalla

lo hago se la siguente manera

DEFINE WINDOW _oWnd TITLE 'Sistema ";
COLOR Rgb( 130, 130, 130 ), Rgb( 130, 130, 130 ) ;
MENU BuildMenu() ;
MENUINFO 2 ;
MDI

DEFINE BITMAP oBmp FILE "Imagen\Fondo.bmp" OF _oWnd

bla....bla..

ACTIVATE WINDOW _oWnd MAXIMIZED ;
ON PAINT DrawBitmap( hDC, oBmp:hBitmap, ;
( _oWnd:nHeight() / 2 ) - ( oBmp:nHeight() / 2 ), ;
( _oWnd:nWidth() / 2 ) - ( oBmp:nWidth() / 2 ),0,0 )


El problema que si cambian la resolucion es bmp no sale

alguna sugerencia

Saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Imagen BMP

Postby Joel Andujo » Wed Oct 19, 2005 5:14 pm

Patricio Yo, utilizo esto para colocar un JPG

nJpgAlto :=228 // Alto del JPG
nJpgAncho:=251 // Ancho del JPG
nMaxAlto :=GetSysMetrics(1) // Altura de Conf. del monitor en Pixeles
nMaxAncho:=GetSysMetrics(0) // Ancho de Conf. del monitor en Pixeles
nRenJpg :=(nMaxAlto /2)-(nJpgAlto /2)-30
nColJpg :=(nMaxAncho/2)-(nJpgAncho/2)

cJPGFile:='\IMAGENES\LOGOSCA.JPG'
@nRenJpg,nColJpg IMAGE oBmp FILENAME cJPGFile SIZE 228,251 PIXEL NOBORDER OF oPpal

Saludos espero te sirva
Joel Andujo
User avatar
Joel Andujo
 
Posts: 130
Joined: Fri Oct 07, 2005 3:14 pm
Location: Cd. Obregón, Sonora, México

Postby Patricio Avalos Aguirre » Wed Oct 19, 2005 7:21 pm

Joel

consulta, con lo que tu dices puedes agrandar la pantalla o achicar sin que el dibujo se pierda

saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Resuelto!!

Postby Patricio Avalos Aguirre » Wed Oct 19, 2005 7:42 pm

!!Resuelto!!

La verdad que sucede solo con xp, y la solucion la encontre en fivetilus


ACTIVATE WINDOW _oWnd MAXIMIZED ;
ON PAINT BmpTiled( hDC, _oWnd, oBmp )


STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )

local nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
local nRow := 0, nCol := 0, n
local nBmpWidth := oBmp:nWidth(), nBmpHeight := oBmp:nHeight()

if oBmp:hBitmap == 0
return nil
endif

while nRow < nHeight
nCol = 0
while nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
end
nRow += nBmpHeight
end

return nil


saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: groiss and 16 guests