Jump to content
Fivewin Brasil

Recommended Posts

Ola Sergio, ve se é isto que vc esta querendo...

REDEFINE IMAGE oImage FILENAME alltrim(cArquivo) ID 4002 OF oDlg UPDATE SCROLL

REDEFINE CHECKBOX oImage:lStretch ID 4003 OF oDlg ;

ON CHANGE ( oImage:ScrollAdjust(), oImage:Refresh() )

Abraços

Luiz Fernando

http:\\img193.imageshack.us\img193\6434\foto3nr.jpg

msn: empresoft@globo.com

skype:empresoft

empresoft@globo.com

FWH 8.04,XHARBOUR 1.1,PELES,XDEV,VLIB,ADS 8.1

FWH 9.12,XHARBOUR 1.2,ADS 9.0 / FWH1104

Link to comment
Share on other sites

Olá amigo!

Veja se ajuda, no meu sistema pego qq imagem e redefino o tamanho dela assim:

//...define objeto imagem...

//...obtém o arquivo de imagem

IF !Empty(gcFile) .and. File(gcFile) //tratamento

oImg:LoadBmp( gcFile )

nX := 215

nY := 333

oImg:hBitmap := ResizeBmp( oImg:hBitmap, nX, nY, .T. ) //redimensiona

oImg:lStretch := .T.

oImg:Refresh()

endif

Caraguatatuba/sp

Editado por - jmsilva on 05/11/2011 09:44:50

Link to comment
Share on other sites

olá S.A. , uma outra forma é vc utilizar o metodo :move() para redimensionar o objeto, veja 1 exemplo abaixo:

* fator de redimensionamento

nFactorWitdh=1.5

nFactorHeight=2.0

ad:=getcoors(obmp:hWnd) //pega coordenadas do objeto

* ownd é o objeto a redimensionar, image, bmp, etc...

oWnd:Move( oWnd:nTop * nFactorHeight , ;

oWnd:nLeft * nFactorWitdh, ;

((ad[4]-ad[2])) * nFactorWitdh, ;

((ad[3]-ad[1])) * nFactorHeight , ;

.F. )

abraço

William

"Eu creio, que de algum modo, que seje relativo em demasia a subjetiva constitucional perante tecnicamente aos que assim ditam o descritivo em si, no parágrafo subconsequente do subconciente doutrinários."

Link to comment
Share on other sites

// Se entendi...


cFile := SubStr( cGetFile( "*.BMP", "Selecione o Arquivo Bitmap (.BMP)" ), 3 )

nResHoriz := oWndMain:nHorzRes() // retorna a resolucao horizontal

nResVert := oWndMain:nVertRes() // retorna a resolucao vertical

IF nResHoriz = 1440 .AND. nResVert = 900

@ 0, 0 IMAGE oImage SIZE 1440, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1360 .AND. nResVert = 768

@ 0, 0 IMAGE oImage SIZE 1360, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1280 .AND. nResVert = 720

@ 0, 0 IMAGE oImage SIZE 1280, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1280 .AND. nResVert = 768

@ 0, 0 IMAGE oImage SIZE 1280, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1280 .AND. nResVert = 800

@ 0, 0 IMAGE oImage SIZE 1280, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1280 .AND. nResVert = 960

@ 0, 0 IMAGE oImage SIZE 1280, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1280 .AND. nResVert = 720

@ 0, 0 IMAGE oImage SIZE 1280, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1600 .AND. nResVert = 1200

@ 0, 0 IMAGE oImage SIZE 1600, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1680 .AND. nResVert = 1050

@ 0, 0 IMAGE oImage SIZE 1680, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 2560 .AND. nResVert = 1600

@ 0, 0 IMAGE oImage SIZE 2560, 668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSEIF nResHoriz = 1024 .AND. nResVert = 768

IF ISWINXP()

@ 0, 0 IMAGE oImage SIZE 1024,668 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSE

@ 0, 0 IMAGE oImage SIZE 1024,678 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ENDIF

ELSE

IF ISWINXP()

@ 0, 0 IMAGE oImage SIZE 800,500 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ELSE

@ 0, 0 IMAGE oImage SIZE 800,510 OF oWin ADJUST

oImage:Progress( .F. )

oImage:LoadBmp( cFile )

ENDIF

ENDIF

id=code>id=code>

Salve...

João Santos - São Paulo.

kmt_karinha@pop.com.br

joao@pleno.com.br

Fone: (11) 3106-2832 / 8243-5632 - TIM

FWH 2.7 - xHARBOUR WorkShop.Exe

dentinho.jpg?rnd=0.830315402649066

Link to comment
Share on other sites

se a solução do JMsilva te resolve o problema, para gravar no HD é facil, observe o metodo saveimage da classe timage, faz o que vc quer.

METHOD SaveImage( cFile, nFormat, nQuality ) CLASS TImage

// 0 -> Bmp

// 2 -> Jpg

// 13 -> Png

William

"Eu creio, que de algum modo, que seje relativo em demasia a subjetiva constitucional perante tecnicamente aos que assim ditam o descritivo em si, no parágrafo subconsequente do subconciente doutrinários."

Link to comment
Share on other sites

  • 1 year later...

amigo to precisando de uma  aplicação que fará a importacao de XML

é assim que preciso que seja importado..

 

a minha aplicação busca de tempos em tempos os XML que ficaram em um FTP e salva na pasta

C:\XML_CLIENTES

dentro dessa pasta tem aA SUB-PASTAS

C:\XML_CLIENTES\IMPORTADOS

C:\XML_CLIENTES\REJEITADOS

 

o seja a aplicação que preciso é para a cada tempo ir lendo essa pasta e importar o(s) XML que vao sendo recebidos.

separando assim

 

CABEÇALHO, ITENS, CONTAS A PAGAR, TRANSPORTADORA(ESSE PODE ATÉ FICAR JUNTO COM O CABECALHO)

 

APOS IMPORTAR COM EXITO ELE MOVE O XML PARA C:\XML_CLIENTES\IMPORTADOS, SE DER ERRO DE IMPORTACAO C:\XML_CLIENTES\REJEITADOS

ASSIM ATÉ A PASTA NÃO TER NADA MAIS.

 

 

TERIA UMA IDEIA DE CUSTO E TEMPO ?

 

 


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...