topic
stringlengths
1
63
text
stringlengths
1
577k
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Entiendo que lo que deseas es usar un brush para el fondo del diálogo, si ?
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Hola Antonio,En algunos casos utilizo brushs (con bmps o AlphaBitmaps), en otros colores, en otros la Clase TSTSay del maestro Manuel Mercado, en otros casos Groups con captions, etc., etc., etc. En general, la cláusula TRANSPARENT en los diálogos es casi que indispensable, salvo que sea un diálogo super-super sencillo.El problema es que en todas mis aplicaciones y desarrollos especiales a clientes, por aquello de mejorar el look, incluyo intensivamente diálogos con TRANSPARENT.Todo estuvo perfecto hasta la versión FWH 8.05. Ahora, que utilizo FWH 8.07, cada vez que tengo que tocar una aplicación por algún ajuste, cambio o adición (y esto es con frecuencia por solicitud de los clientes), al recompilarla salta el problema de la estética en los radios. Si quito la clausula TRANSPARENT los radios pintan bien, pero algunos de los otros controles dejan de tomar como fondo el color o el brush (según sea el caso), de los diálogos. Lo mismo pasa con TFolder y TPanel. Seguro que fue algún cambio que hiciste relacionado con TRANSPARENT en Diálogos que está ocasionando este comportamiento.Por lo pronto, y como emergencia para los modificaciones que he tenido que hacerle a un cliente, he hecho lo siguiente en aquellos diálogos que tengo definidos desde recursos y en los que tengo algunos radios con su ID y algunos SAY que son simples textos y que no necesitan ID por lo que están identificados como -1. A estos says si no tienen ID al pintar el diálogo sin TRANSPARENT les pinta mal el fondo, pero en cambio PINTA BIEN LOS RADIOS.Si le pongo TRANSPARENT pinta BIEN LOS SAYS pero MAL LOS RADIOS.Entonces, dejé los diálogos sin TRANPARENT y antes del ACTIVATE DIALOG puse:[code:2r80s8k9] For i:=1 TO Len(oDlg:aControls) if oDlg:aControls[i]:ClassName()=="TSAY" oDlg:aControls[i]:lTransparent:=.T. endif next [/code:2r80s8k9]Solución chapucera, pero me sacó del apuro. Pero, comprenderás, mortal si tengo que tomar todas las aplicaciones, y todos sus diálogos para hacer este modificación. Además se complica con otros controles.Es posible revertir ese cambio. ? Cómo lo hago ?Saludos y gracias,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Has comparado el código de TRadio de la 8.05 y de la 8.07, por si hay alguna diferencia evidente ?
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Antonio,Tanto Radio.prg como Radmenu.prg son idénticas inclusive desde FWH 8.02Estoy seguro que el problema se relaciona directamente con DIALOGOS y TRANSPARENCIAS. Estamos haciendo un trabajo urgente para un cliente, y ahora tenemos el problema con TPAGES. Se define un diálogo desde recursos, el cual incluye un TPAGE. De igual manera, desde recursos se definen las Páginas para TPage. En una de ellas se usan Radios.El diálogo lleva de fondo un Brush con Bmp. Si defines el diálogo como TRANSPARENT no pone el brush de fondo en las páginas de TPage, además de que daña los radios.Intenté con:[code:6ujv9zr9] for i:= 1 TO Len(oPages:aDialogs) oPages:aDialogs[i]:lTransparent := .T. oPages:aDialogs[i]:oBrush := oBrush oPages:aDialogs[i]:SetBrush(oBrush) oPages:aDialogs[i]:Refresh() next [/code:6ujv9zr9] Pero, con oPages:aDialogs[i]:lTransparent := .T. pone el brush en las páginas pero pinta mal los radios. Si pones oPages:aDialogs[i]:lTransparent := .F. pinta bien los radios, pero NO PINTA EL BRUSH DE LAS PAGINAS. Hemos probado de todo y no encontramos solución, salvo regresarnos a la versión FWH 8.02 . La locura. Se nos está atrasando completamente el trabajo. Son las 7:45 p.m. y ya el cansancio y la frustración me tienen fundido. Ahora son las 8:45 p.m. y encontré otra solución chapucera: [code:6ujv9zr9] DEFINE DIALOG oDlg RESOURCE "DLG_PRINCIP" TITLE "La lucura de las actualizaciones"; ICON oIcon1 BRUSH oBrush // TRANSPARENT luego redefino TPage, REDEFINE PAGES oPages ID 180 OF oDlg DIALOGS "PAG_PAG1","PAG_PAG2" le asigno el brush oPages:oBrush:=oBrush y antes del ACTIVATE DIALOG For i:=1 TO Len(oDlg:aControls) if oDlg:aControls[i]:ClassName()=="TSAY" oDlg:aControls[i]:lTransparent:=.T. endif next [/code:6ujv9zr9]Medio pinta el brush en las páginas del TPage (pues se lo asigné directamente ya que no hereda el del Diálogo). Aunque regular estéticamente, caminando rápido no se nota, pero en cambio, ahora a los Radios no les pinta, a todas las opciones, el cuadrito cuando pasas el mouse encima de las mismas, PERO, EN EL CAPTION DE LAS OPCIONES DEL RADIO NO PONE EL BRUSH.Que frustrante. Por favor ayúdame. Dada la complejidad de la clase TDialogo, que a su vez hereda de TWindow, no me atrevo a meterle la mano (y ni tengo idea por dónde metersela) y ya estamos super atrasados, y como comprenderás, super desanimados.Gracias y saludos,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Un ejemplo:[img:2g6r8ced]http://www.mastersoft3000.com/publico/imagemal3.jpg[/img:2g6r8ced]1. Los Radios los deja sin Brush.2. El brush asignado al Diálogo cubre toda su superficie por lo que no debería verse truncado. Si observas, verás que:[list:2g6r8ced]a.- a la izquierda del diálogo aperece cortado, b.- dentro de la página de TPage repite el brush (lo cual es obvio, pues como no lo está heredando del diálogo, toca asignarlo directamente a la clase TPage y por eso se repite), c.- rompe la continuidad del Brush original. Observa lado derecho y el bottom de la página de TPage [/list:u:2g6r8ced]Saludos,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Lamento que este asunto haya generado frustración y tanto esfuerzo <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->No es por buscar una excusa, pero la realidad es que Windows no provee transparencias en diálogos de forma estandard, es decir, soportadas directamente por el GUI de Windows, por lo que la forma de implementarlo es a base de buscarle las vueltas a Windows y encontrarle la forma de "colarse" en el pintado que él hace.En tu caso además se complica el asunto pues estás usando un control TPages que a su vez gestiona diálogos no modales. Asi, la estructura que estas usando es:1) diálogo2) pages3) dialogos del pages4) radios situados sobre esos diálogos del pagesEn esas circunstancias, como comentas, la transparencia no se está haciendo bien. Por supuesto que la estética es importante ("un coche ha de funcionar bien y si encima es bonito, aún mejor") pero siempre es preferible anteponer la funcionalidad a la estética. Vamos a hacer algunas pruebas y ver si podemos ofrecerte una solución más adecuada. Gracias,
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Hola Antonio:[quote:1gpx4o4b]En esas circunstancias, como comentas, la transparencia no se está haciendo bien. Por supuesto que la estética es importante ("un coche ha de funcionar bien y si encima es bonito, aún mejor") pero siempre es preferible anteponer la funcionalidad a la estética. [/quote:1gpx4o4b]Ni modo, pero tienes razón.Dejando al lado lo del brush, si creo importantísimo resolver lo de los radios, pues este problema persiste en un diálogo normal, sin brush. Si por alguna razón tienes que darle al diálogo el atributo de transparente, daña el pintado de los radios. El asunto es, que antes no pasaba esto. Por favor mira la imagen puesta al inicio de este hilo. Es el ejemplo "TESTRAD.PRG" con TRANSPARENT. Cada vez que pulsas sobre una de las opciones del radio, va quedando marcado. Antes no pasaba.Con que solucionemos esto quedo tranquilo.Gracias y saludos,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Hola Antonio, Alguna idea de cómo solucionar el pintado de los radios ? Verificaste el ejemplo \FWH\SAMPLES\TESTRAD.PRG con TRANSPARENT ?Nadie más ha tenido este problema ?Saludos,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos:Mientras Antonio le busca la forma de solucionartelo, quizas puedas usar la clase tsradio del Sr. Manuel Mercado. Viene con la tsbutton y se llama tsradio.SaludosRuben Fernandez.(Creo que esta en utilidades, sino pidesela a MM)
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Rubén, gracias por tu sugerencia.Pero tampoco funciona. Si en el ejemplo TESTRAD.PRG que incluye el maestro Manuel, pones la cláusula TRANSPARENT en el diálogo que se define desde recursos, verás que aunque ya no pinta el cuadrado punteado sobre las opciones del radio, cuando seleccionas una por una, ahora no toma el brush definido de fondo. Antes funcionaba perfecto.Definitivamente fue algo que cambio en TDialog o TWindow que está ocasionando conflicto con las tranparencias. Pero es que ANTES FUNCIONABA.Antonio, por favor ayuda, no hemos podido recompilar ninguno de nuestros aplicativos usando FWH 8.07 por este problema. Por lo pronto hemos desmontado FWH 8.07 y reinstalado 8.02. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Ayudaaaaaaa..... <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->Gracias y saludos,Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Antonio,Encontrado el problema. Está en TControl. <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> En el Method Colors, desactivaste la línea 429 , DrawPBack( ::hWnd, hDC ) y la reemplazaste por ParentImage( ::hWnd, hDC ).Si se desactiva este cambio y se deja como estaba, con DrawPBack( ::hWnd, hDC ), el pintado de los radios VUELVE A FUNCIONAR BIEN.- Porqué se hizo ese cambio <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> - Qué hace la función ParentImage( ::hWnd, hDC ) ( Aparte de dañar el pintado de los radios ) <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> - Qué consecuencias trae el quitarla <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Saludos, Carlos Gallego
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Estaba haciendo pruebas ahora mismo y justo te iba a comentar esto que me dices <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->DrawPBack() está basada en el API de "temas" de Windows y posiblemente se está encargando de quitar el recuadro punteado, pinta y lo vuelve a poner, para que quede bien.ParentImage() es una función nuestra que copia el área de la zona padre que ocupa el control, al fondo de la imagen del control y no está controlando el recuadro punteado. De ahí el problema.Puedes volver a cambiar la llamada a DrawPBack(). El usar ParentImage() es para copiar zonas dibujadas con brushes, y no solo limitarnos a los "temas" de Windows.Si conseguimos solucionar el dibujado del recuadro punteado, entonces podriamos usar ParentImage(). Ese recuadro se pinta con una operación "xor", es decir, que al volver a llamarse borra la anterior. Se conmuta.
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Estoy probando con DrawFocusRect() y tambien enviando WM_SETFOCUS ó WM_KILLFOCUS. La idea es quitar el recuadro punteado antes de llamar a ParentImage().El enviarle esos mensajes provoca un bucle, ya que vuelven a generar un mensaje de pintado.A ver si damos con la solución...
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Carlos,Andamos revisando el código fuente de DrawThemeParentBackground() de "Wine" para ver si nos la pista de lo que nos hace falta:<!-- m --><a class="postlink" href="http://cvs.winehq.org/cvsweb/wine/dlls/uxtheme/draw.c?rev=1.48&content-type=text/x-cvsweb-markup">http://cvs.winehq.org/cvsweb/wine/dlls/ ... web-markup</a><!-- m -->
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Solucionado! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Nos dió la pista necesaria:[code:17q6mpwe] if Upper&#40; &#58;&#58;ClassName&#40;&#41; &#41; $ "TCHECKBOX;TRADIO;TGROUP" // DrawPBack&#40; &#58;&#58;hWnd, hDC &#41; ParentImage&#40; &#58;&#58;hWnd, hDC &#41; SendMessage&#40; &#58;&#58;oWnd&#58;hWnd, WM_ERASEBKGND, hDC, 0 &#41; endif [/code:17q6mpwe]Aqui está funcionando bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->Carlos, por favor pruébalo y nos comentas, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Yo cada dia alucino más.Quien diría que el Software Libre nos ayudaría a encontrar los soluciones al API de Windows.
Ahora Problema con DIALOG TRANSPARENT y RADIOS
Antonio, Grande Maestro <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Funcionó perfecto.Millón de gracias y saludos,Carlos Gallego
Aiuto con il calcolo dei giorni
Sto usando una funzione per il calcolo dei giorni un po' particolare A me serve il totale dei giorni per la stagione bassa,media e alta [b:2uhq0qyg]Prima di tutto mi vado a caricare da un file INI i settaggi per ledate esatte delle stagioni :[/b:2uhq0qyg] #include "fivewin.ch" #include "dtpicker.ch" STATIC nDAYS := 0, LDAYS := .T. STATIC nDAYS1 := 0, nDAYS2 := 0, nDAYS3 := 0, nDAYS4 := 0 Function test() Local oDlg Local dInizio:=date() Local dFine:=date() Local cIniFile:= ".\rivamania.ini" Local cYEAR := LTRIM( STR( YEAR(DATE()) )) Local dBassa1 := GetPvProfString("Stagioni", "BASSA1","17.05.", cIniFile) Local dBassa2 := GetPvProfString("Stagioni", "BASSA2","27.06.", cIniFile) Local dMedia1 := GetPvProfString("Stagioni", "MEDIA1","28.06.", cIniFile) Local dMedia2 := GetPvProfString("Stagioni", "MEDIA2","25.07.", cIniFile) Local dAlta1 := GetPvProfString("Stagioni", "ALTA1","26.07.", cIniFile) Local dAlta2 := GetPvProfString("Stagioni", "ALTA2","29.08.", cIniFile) Local dBassa3 := GetPvProfString("Stagioni", "BASSA3","30.08.", cIniFile) Local dBassa4 := GetPvProfString("Stagioni", "BASSA4","20.09.", cIniFile) [b:2uhq0qyg]Poi devo calcolare i giorni partendo da una data di inizio e una data di fine ( ma probabilmente mi sono incartato da qualche parte)[/b:2uhq0qyg] PRIVATE aSEASON[4][3] PRIVATE aDAYS[3][1] aDAYS[1][1] := 0 aDAYS[2][1] := 0 aDAYS[3][1] := 0 lDAYS = .F. aSEASON[1] := { dBassa1 + cYEAR, dBassa2 + cYEAR }// Bassa aSEASON[2] := { dMedia1 + cYEAR, dMedia2 + cYEAR } // media aSEASON[3] := { dAlta1 + cYEAR, dAlta2 + cYEAR } // alta aSEASON[4] := { dBassa3 + cYEAR, dBassa4 + cYEAR } // bassa define dialog oDlg from 10,20 to 24,80 @ 1,2 say "Calcolo giorni" @ 2, 3 DTPICKER dINIzio of oDlg SIZE 80,10 @ 3, 3 DTPICKER dfine of oDlg SIZE 80,10 @ 4, 2 BUTTON "fai calcolo ..." of oDlg ; ACTION (MSGINFO("CONTO A VIDEO ","Info"),CalcolaDays(DInizio, DFine ,aSEASON) ) activate dialog oDlg STATIC FUNCTION CalcolaDays( dDAY1, dDAY2, aSEASON ) nDAYS1 := 0 // LOW nDAYS2 := 0 // AVERAGE nDAYS3 := 0 // HIGHT nDAYS4 := 0 // LOW nDAYS := 0 IF dDAY1 >= cTOD(aSEASON[1][1] ) .and. dDAY2 <= cTOD(aSEASON[1][2] ) .or. ; dDAY1 >= cTOD(aSEASON[2][1] ) .and. dDAY2 <= cTOD(aSEASON[2][2] ) .or. ; dDAY1 >= cTOD(aSEASON[3][1] ) .and. dDAY2 <= cTOD(aSEASON[3][2] ) .or. ; dDAY1 >= cTOD(aSEASON[4][1] ) .and. dDAY2 <= cTOD(aSEASON[4][2] ) IF dDAY1 >= cTOD(aSEASON[1][1] ) .and. dDAY2 <= cTOD(aSEASON[1][2]) nDAYS1 := 1 + ( dDAY2 - dDAY1 ) ENDIF // --------------------------------------------------------------------------- IF dDAY1 >= cTOD(aSEASON[2][1] ) .and. dDAY2 <= cTOD(aSEASON[2][2]) nDAYS2 := 1 + (dDAY2 - dDAY1) ENDIF // --------------------------------------------------------------------------- IF dDAY1 >= cTOD(aSEASON[3][1] ) .and. dDAY2 <= cTOD(aSEASON[3][2]) nDAYS3 := 1 + (dDAY2 - dDAY1) ENDIF // ---------------------------------------------------------------------------- IF dDAY1 >= cTOD(aSEASON[4][1] ) .and. dDAY2 <= cTOD(aSEASON[4][2]) nDAYS4 := 1 + (dDAY2 - dDAY1) ENDIF ENDIF IF dDAY1 >= cTOD(aSEASON[1][1]) .and. dDAY1 <= cTOD(aSEASON[1][2]) .and. ; dDAY2 >= cTOD(aSEASON[4][1]) .and. dDAY2 <= cTOD(aSEASON[4][2]) nDAYS1 := 1 + ( cTOD(aSEASON[1][2]) - dDAY1 ) nDAYS2 := 1 + ( cTOD(aSEASON[2][2]) - cTOD(aSEASON[2][1]) ) nDAYS3 := 1 + ( cTOD(aSEASON[3][2]) - cTOD(aSEASON[3][1]) ) nDAYS4 := 1 + ( dDAY2 - cTOD(aSEASON[4][1]) ) ENDIF IF dDAY1 >= cTOD(aSEASON[1][1]) .and. dDAY1 <= cTOD(aSEASON[1][2]) .and. ; dDAY2 >= cTOD(aSEASON[2][1]) .and. dDAY2 <= cTOD(aSEASON[2][2]) nDAYS1 := 1 + ( cTOD(aSEASON[1][2]) - dDAY1 ) nDAYS2 := 1 + dDAY2 - ( cTOD(aSEASON[2][1]) ) ENDIF IF dDAY1 >= cTOD(aSEASON[2][1]) .and. dDAY1 <= cTOD(aSEASON[2][2]) .and. ; dDAY2 >= cTOD(aSEASON[3][1]) .and. dDAY2 <= cTOD(aSEASON[3][2]) nDAYS2 := 1 + ( cTOD(aSEASON[2][2]) - dDAY1 ) nDAYS3 := 1 + dDAY2 - ( cTOD(aSEASON[3][1]) ) ENDIF IF dDAY1 >= cTOD(aSEASON[3][1]) .and. dDAY1 <= cTOD(aSEASON[3][2]) .and. ; dDAY2 >= cTOD(aSEASON[4][1]) .and. dDAY2 <= cTOD(aSEASON[4][2]) nDAYS3 := 1 + ( cTOD(aSEASON[3][2]) - dDAY1 ) nDAYS4 := 1 + dDAY2 - ( cTOD(aSEASON[4][1]) ) ENDIF IF dDAY1 >= cTOD(aSEASON[1][1]) .and. dDAY1 <= cTOD(aSEASON[1][2]) .and. ; dDAY2 >= cTOD(aSEASON[3][1]) .and. dDAY2 <= cTOD(aSEASON[3][2]) nDAYS1 := 1 + ( cTOD(aSEASON[1][2]) - dDAY1 ) nDAYS2 := 1 + ( cTOD(aSEASON[2][2]) - cTOD(aSEASON[2][1]) ) nDAYS3 := 1 + dDAY2 - ( cTOD(aSEASON[3][1]) ) ENDIF IF dDAY1 >= cTOD(aSEASON[2][1]) .and. dDAY1 <= cTOD(aSEASON[2][2]) .and. ; dDAY2 >= cTOD(aSEASON[4][1]) .and. dDAY2 <= cTOD(aSEASON[4][2]) nDAYS2 := 1 + ( cTOD(aSEASON[2][2]) - dDAY1 ) nDAYS3 := 1 + ( cTOD(aSEASON[3][2]) - cTOD(aSEASON[3][1]) ) nDAYS4 := 1 + dDAY2 - ( cTOD(aSEASON[4][1]) ) ENDIF cSTART := "" cEND := "" IF dDAY1 >= cTOD(aSEASON[1][1]) .and. dDAY1 <= cTOD(aSEASON[1][2]) cSTART := "LOW" ENDIF IF dDAY1 >= cTOD(aSEASON[2][1]) .and. dDAY1 <= cTOD(aSEASON[2][2]) cSTART := "AVERAGE" ENDIF IF dDAY1 >= cTOD(aSEASON[3][1]) .and. dDAY1 <= cTOD(aSEASON[3][2]) cSTART := "HIGH" ENDIF IF dDAY1 >= cTOD(aSEASON[4][1]) .and. dDAY1 <= cTOD(aSEASON[4][2]) cSTART := "LOW" ENDIF IF dDAY2 >= cTOD(aSEASON[1][1]) .and. dDAY2 <= cTOD(aSEASON[1][2]) cEND := "LOW" ENDIF IF dDAY2 >= cTOD(aSEASON[2][1]) .and. dDAY2 <= cTOD(aSEASON[2][2]) cEND := "AVERAGE" ENDIF IF dDAY2 >= cTOD(aSEASON[3][1]) .and. dDAY2 <= cTOD(aSEASON[3][2]) cEND := "HIGH" ENDIF IF dDAY2 >= cTOD(aSEASON[4][1]) .and. dDAY2 <= cTOD(aSEASON[4][2]) cEND := "LOW" ENDIF cSEASON := cSTART + " - " + cEND nDAYS := nDAYS1 + nDAYS2 + nDAYS3 + nDAYS4 IF lDAYS = .F. MsgInfo( "Stagione Bassa: " + STR(nDAYS1) + " giorni" + CRLF + ; "Stagione Media: " + STR(nDAYS2) + " giorni" + CRLF + ; "Stagione Alta : " + STR(nDAYS3) + " giorni" + CRLF + ; "Stagione Bassa: " + STR(nDAYS4) + " giorni" + CRLF + CRLF + ; "Calcolo totale: " + LTRIM( STR ( 1 + (dDAY2 - dDAY1) ) ) + " giorni", "RivaMania Pro" ) ENDIF aDAYS[1][1] := nDAYS1 + nDAYS4 aDAYS[2][1] := nDAYS2 aDAYS[3][1] := nDAYS3 RETURN( nDAYS, aDAYS ) provate aprendere una data di inizio uguale o maggiore di 20 giugno e una data finale di 20 settembre( o minore di 20) per provare
Ajuda
Holla me gostaria de una class que criase una dialog dentro deuna otra dialogalguem sabe como fazer ?define dialog x1 x2:[aki dialog 2]activate dialog x1 on init (x2:Activate())
Ajuda
[code:16ljdvrm] local oDlg1 DEFINE DIALOG oDlg1 ACTIVATE DIALOG oDlg1 ; ON INIT CreaDialog2&#40;&#41; &#46;&#46;&#46; function CreaDialog2&#40;&#41; local oDlg2 DEFINE DIALOG oDlg2 ACTIVATE DIALOG oDlg2 return nil [/code:16ljdvrm]
Ajuda
Anoni, yo gostaria que la 2 dialog fica-se dientro dela 1 dialogyo fiz lo que yo queria pero mostra las barra de rolagem como desativar?[code:2pmtsxth] CLASS cFolder DATA aDialogs METHOD New&#40;nTop,nLeft,nWidth,nHeight&#41; CONSTRUCTOR ENDCLASS METHOD New&#40;nTop,nLeft,nWidth,nHeight&#41; CLASS cFolder Local i,novo novo&#58;=TDialog&#40;&#41;&#58;New&#40;nTop,nLeft,nWidth,nHeight,,,,&#46;F&#46;,NOR&#40;268435456,4194304,1073741824,2097152&#41;,,,,oDlg,&#46;T&#46;,,,,,&#41; novo&#58;Activate&#40;novo&#58;bLClicked,novo&#58;bMoved,novo&#58;bPainted,&#46;F&#46;,, &#46;F&#46; ,,novo&#58;bRClicked,&#123;||&#46;T&#46;&#125;,&#41; Return&#40;Self&#41;[/code:2pmtsxth]yo gostaria que sumise no mostrase la SCROOL
Ajuda com DLL (RESOLVIDO)
pessoal a seguinte função em uma DLL: [b:16afyyqy]int MopEscreveCaracter (int, unsigned char, int);[/b:16afyyqy] 2.10 - Função MopEscreveString O que faz: Esta função escreve uma string a partir da posição atual do cursor na área de memória compartilhada do display selecionado. Protótipo: em C: int MopEscreveString (int nTipo, unsigned char *str, int nTam); Entradas: nTipo:- Display a ser selecionado: 2 - display CLIENTE str:- String a ser escrita. nTam:- Tamanho da string. Saídas: Não existem. [b:16afyyqy]Como fica em FIVEWIN?[/b:16afyyqy]
Ajuda com DLL (RESOLVIDO)
Resolvido com DLLCALL: dllcall( xdll, DC_CALL_STD, "MopEscreveCaracter", 2, "B",1 ) muito obrigado
Ajuda com DLL Function
//GrCapRawImageToHandle(unsigned char* rawImage, unsigned int width, unsigned int height, HDC hdc, HBITMAP &handle); Dll Function CapRawImageToHandle (RawImage AS CHAR ,; width AS LONG ,; height AS LONG ,; hdc AS HDC ,; @handler As LPSTR ) AS LONG PASCAL; FROM "_GrCapRawImageToHandle@20" Lib cdll estoy hacendo errrado ?
Ajuda com DLL Function
Try this: [code=fw:3cg8i4jm]<div class="fw" id="{CB}" style="font-family: monospace;">Dll <span style="color: #00C800;">Function</span> CAPRAWIMAGETOHANDLE <span style="color: #000000;">&#40;</span>RawImage AS LPSTR  ,;<br />                                  width AS LONG  ,;<br />                                  height AS LONG  ,;<br />                                  hdc AS LONG  ,;<br />                                  @handler AS PTR <span style="color: #000000;">&#41;</span> AS LONG PASCAL;<br />                                  <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"_GrCapRawImageToHandle@20"</span> Lib cdll</div>[/code:3cg8i4jm] What is assigned to cdll? EMG
Ajuda com DLL Function
funcction main cdll := loadlibrary("finger.dll") .... FreeLibrary(cdll) return i will try and return result thanks
Ajuda com DLL Function
Ok, it should work with my sample. EMG
Ajuda com DLL Function
Erico, Thanks for you samples, this work fine !!! Thanks so much. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Ajuda com FGET (de novo)
Olá a todos !!! Como faço para quando pressionar o RETURN/RET (FGET) no meio da linha não alterar o texto, ou seja, o texto que está após o cursor é inserido em uma nova linha e gostaria de evitar isto. Ex.: linha 1=> AAAAAA linha 2=> BBBBBBB linha 3=> CCCCCC Se o cursor estiver em linha1 => AA[b:3b0co4v1]A[/b:3b0co4v1]AAA e der o enter ficara assim: linha 1=> AA linha 2=> [b:3b0co4v1]A[/b:3b0co4v1]AAA linha 3=> BBBBBBB linha 4=> CCCCCC Grato a todos !!! SDO...
Ajuda com Get e Ids
Olá estou implementando tecla de função para atalho de botões de consultas. Para não haver problemas de clicar um F2 por exemplo em qualquer get como saber de qual get foi acionado F2? ou o ID do controle? Exemplo: Set Key VK_F2 Consiste() ... REDEFINE GET oGet1 VAR CODIGO // F2 não deve executar Consiste() REDEFINE GET oGet2 VAR NOME // F2 deve executar Consiste() ... Static Function Consiste() If ???? <> ???? Return .t. Endif ... Return .t. Obrigado.
Ajuda com Get e Ids
Wanderson, Una solución sería deshabilitar F2 en ese Get al tomar foco y restaurarlo al perderlo: <oGet1>:bGotFocus = { || SetKey( VK_F2, nil ) } <oGet1>:bLostFocus = { || SetKey( VK_F2, { || Consiste() } }
Ajuda com Get e Ids
Otra posible solución es controlar que elemento tiene el foco: Static Function Consiste() If oDlg:aControls[ 1 ]:lFocused Return .t. Endif ... Return .t.
Ajuda com Get e Ids
Gracias Antônio, funcionou estupendo.
Ajuda com cdo email
Hola, Cdo funciona perfeito em windows10 e não no server 2008 (lento e não envia). Alguma sugestão? Gracias
Ajuda com cdo email
Mostre um exemplo, por favor. Muestre un ejemplo, porfa. [url:212d5d1n]http&#58;//forums&#46;iis&#46;net/t/1184023&#46;aspx?Issues+with+CDO+MESSAGE+on+Windows+2008+R2+Server[/url:212d5d1n] [url:212d5d1n]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=4&t=10764&p=61999[/url:212d5d1n] [url:212d5d1n]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=14663[/url:212d5d1n]
Ajuda com cdo email
Obrigado karinha o primeiro link funcionou, está lento mas está enviando, vou tentar achar agora o problema da lentidão.
Ajuda com problema
Tenho uma dialog ou msginfo e acontece o seguinte: Se usar TAB ou de CLICAR com o mouse fora, acontece destas janelas irem para tras. Alguem tem alguma ideia do que pode estar acontecendo? fwh11.5
Ajuda com problema
SGS, Puedes proporcionar un pequeño PRG de ejemplo que lo reproduzca ? gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ajuda com xbrowse
Olá no me funciona xbrowse com bitmaps. O que está errado? // Definição do xbrowse oBrw := TXBrowse():New( oDlg ) oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrw:CreateFromResource( 4047 ) oBrw:nColDividerStyle := 5 //LINESTYLE_BLACK // COLUNAS oBrw:lColDividerComplete := .T. oBrw:nHeaderHeight :=30 oBrw:nStretchCol := STRETCHCOL_LAST oBrw:bClrRowFocus := { || { CLR_BLACK, RGB( 150,231,70 ) } } oBrw:bChange := { || Muda(), oBrw:Refresh() } oCol := oBrw:AddCol() oCol:AddResource("CHECKON") oCol:AddResource("CHECKOFF") oCol:cHeader := "" oCol:nArrayCol := 1 oCol:nWidth := 20 oCol:bStrData := nil oCol := oBrw:AddCol() oCol:cHeader := "Nº BOLETO" oCol:nArrayCol := 2 oCol:nWidth := 100 oBrw:l2007:=.t. oBrw:bClrSel:={ || { CLR_BLACK, RGB(185,220,255) } } ... // Load Array VetBol :={} For x = 1 to 5 AAdd(VetBol,{".f.",oArqBol:BOLETO}) Next x oBrw:SetArray( VetBol ) oCol:bBmpData := {|| IIF( oBrw:aArrayData[ oBrw:nArrayAt ][1], 1, 2) } oBrw:Refresh() Gracias
Ajuda com Avaliacion de aparelhos.... para FwPPC
Es possible usar FwPPc,,neste modelos de SmarFones: <!-- m --><a class="postlink" href="http://www.nokia.com.br/A4523373">http://www.nokia.com.br/A4523373</a><!-- m --> <!-- m --><a class="postlink" href="http://motorola-rm.locaweb.com.br/motoq/pt/q-features.asp?Country=BRA&language=PRL&productid=30546">http://motorola-rm.locaweb.com.br/motoq ... ctid=30546</a><!-- m --> Saluds
Ajuda com Avaliacion de aparelhos.... para FwPPC
Ale, Usan Windows Mobile ?
Ajuda com Avaliacion de aparelhos.... para FwPPC
O Motorola Q...usa Windows mobilie.
Ajuda com Avaliacion de aparelhos.... para FwPPC
Ten en cuenta que el Motorola es un smartphone, no un Pocket PC, y que está más limitado.
Ajuda com Avaliacion de aparelhos.... para FwPPC
Mas, o FwPPc funciona com el SmartPhone ? Saluds
Ajuda com Avaliacion de aparelhos.... para FwPPC
Si, si funciona, pero el tamaño de la pantalla es más pequeño y es algo más complicado, ya que no hay administrador de programas (programs manager) en él.
Ajuda com Avaliacion de aparelhos.... para FwPPC
Gracias Maestro..agora compriendo...mas..acho que no terei saida. O Cliente, quer usar uno SmartPhone e no um Pocket. Gracias pela informacion. Saluds
Ajuda com Avaliacion de aparelhos.... para FwPPC
eu estou com um qtek 9100 + ainda nao começei os testes com o pccestou viajando quando chegar podemos trocar ideias da um alo no msn ... assim que chegar respondo t+
Ajuda con tree
Olá, no me funciona bits transparentes en tree nem las colores fore e back. Salu2 [url:3n2r2qub]http&#58;//img74&#46;imageshack&#46;us/img74/3172/treemy8&#46;jpg[/url:3n2r2qub]
Ajuda con tree
Wanderson, Por favor revisa samples\TestTree.prg y los bitmaps que usa bitmaps\16x16\folder.bmp y fldmask.bmp
Ajuda para el Antonio
Hola Antonio[img:187bw7f3]http&#58;//www&#46;redstarsoft&#46;net/files/amostra&#46;jpg[/img:187bw7f3][url:187bw7f3]http&#58;//www&#46;redstarsoft&#46;net/files/teste&#46;rar[/url:187bw7f3] ahora necessito que ajudame con una coisa, la imagem amostra.jpg up anexada tien los quadros en vermelho que es la onde voy necessitar inserir la imagem para ficar igual ao messagebar pero editei lo arquivo menu.prg del c:\fwh\source\class\menu.prg y no encontrei nada habrando sobre las imagem del style 2007 tu pode ajudarme endicandome donde estas lo arquivo que necessito alterar para que yo possa ter resultado possitivo con esto la messagebar esta OK dela forma que yo queria ahora tiengo que mudar lo menu.gracias
Ajuda para el Antonio
Lailton,Aún no hemos proporcionado una forma de parametrizar los colores del menú al usar el estilo 2007.Vamos a implementarlo cuanto antes,
Ajuda para el Antonio
=] gracias Antonio, cuanto haver novidade cuanto a esto porfavor notifiquemeY cuanto ao [code:111far6n]DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007[/code:111far6n]es possble modificar ?gracias
Ajuda(exemplo) com FGET
Olá a todos !!! Estou precisando controlar um GET com as seguintes condições: - Campo de 180 caracteres; - Cada linha deve conter 45 caracteres. Não estou conseguindo definir estes parametros pelo FGET, alguém teria um exemplo ou poderia me dar uma luz ?? Desde já agradeço a todos e um abraço ! SDO...
Ajuda(exemplo) com FGET
Dear SDO, The following data and methods of FGet may be useful [b:12bwltbu]Datas[/b:12bwltbu] nLineCount -> Number of lines [b:12bwltbu]Methods[/b:12bwltbu] GetLineCount -> Returns total number of lines LenText -> Returns the total number of characters of the control Len -> Text length Return/Ret -> Inserts a character return [b:12bwltbu]Fivewin Wiki[/b:12bwltbu] <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com/doku.php?id=fivewin_class_tfget">http://wiki.fivetechsoft.com/doku.php?i ... lass_tfget</a><!-- m --> <!-- m --><a class="postlink" href="http://wiki.fivetechsoft.com/doku.php?id=fivewin_commands_get">http://wiki.fivetechsoft.com/doku.php?i ... mmands_get</a><!-- m --> Please refer the sample \Fwh\samples\testfget.prg Regards Anser
Ajuda(exemplo) com FGET
Olá anserkk, Origado pela atenção. Agora com mais calma vou analisar os comandos. Mais uma vez obrigado e um abraço !! SDO....
Ajusta tamaño de una foto
Tengo en pantalla un área predeterminada y en el diseño de la hoja a imprimir también. de que manera ajusto las dimensiones de alto y ancho de la foto para esas áreas, sin que la imagen quede distorsionada, no me sirve ajustar la imagen al área predeterminada. Gracias
Ajusta tamaño de una foto
mira se ayuda: [code=fw:2pyazndb]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImagem <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILENAME DbClientes:<span style="color: #000000;">Fotos</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">UPDATE</span> &nbsp; <span style="color: #0000ff;">CURSOR</span> &nbsp;oHand<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;oImagem:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oImagem:<span style="color: #000000;">lStretch</span> := <span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp;oImagem:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2pyazndb]
Ajusta tamaño de una foto
Karinha Gracias por la respuesta, pero tampoco me sirve hacer el stretch Espero otras ideas mr Antonio Linares y compañía.
Ajusta tamaño de una foto
Como estás haciendo, talbéz un simples ADJUST te sirva. salu2
Ajusta tamaño de una foto
[quote="J. Ernesto":3a8b3t24]Tengo en pantalla un área predeterminada y en el diseño de la hoja a imprimir también. de que manera ajusto las dimensiones de alto y ancho de la foto para esas áreas, sin que la imagen quede distorsionada, no me sirve ajustar la imagen al área predeterminada. Gracias[/quote:3a8b3t24] Ernesto, el truco está en ajustar el objeto oImage al tamaño de la foto. Lo ideal es que todas las fotos tengan el mismo tamaño. Prueba esto, a ver si te da el resultado deseado: (solo lo he usado en pantalla, y si se distorsiona, no lo he notado.) [code=fw:3a8b3t24]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">&#40;</span> gcFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nWidthImg &nbsp;:= nBmpWidth<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;nHeightImg := nBmpHeight<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nWidthImg > nHeightImg &nbsp; <span style="color: #B900B9;">//elegimos el lado de la foto que tenga el mayor valor &nbsp;</span><br />&nbsp; &nbsp; &nbsp; nFactor := &nbsp;nWidthFrame/nWidthImg<br />&nbsp; &nbsp;elseif nHeightImg > nWidthImg <br />&nbsp; &nbsp; &nbsp; nFactor := &nbsp;nHeightFrame/nHeightImg<br />&nbsp; &nbsp;elseif nHeightImg = nWidthImg &nbsp; <span style="color: #B900B9;">//si imagen es cuadrada...</span><br />&nbsp; &nbsp; &nbsp; nFactor := &nbsp;nHeightFrame/nHeightImg<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oImage:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nBmpWidth<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span>*nFactor, nBmpHeight<span style="color: #000000;">&#40;</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span>*nFactor, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oImage:<span style="color: #000000;">lStretch</span> := .t.<br />&nbsp; &nbsp;oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3a8b3t24] Saludos.
Ajustando la altura de las ventanas del IDE
Ajustando la altura de las ventanas del IDE a la nueva altura de la barra de tareas de Windows 7 (y a cualquier otra barra de tareas):[url=http&#58;//imageshack&#46;us:d4r7xvw6][img:d4r7xvw6]http&#58;//img98&#46;imageshack&#46;us/img98/2811/iders7&#46;png[/img:d4r7xvw6][/url:d4r7xvw6]
Ajustar Browse a Ventana
Estimados, No logro conseguir la forma de ajustar un browse en una ventana a solo las columnas que quiero mostrar. Aca el codigo que utilizo DEFINE WINDOW oWndBCO MDICHILD OF oWndPrinc ; FROM 0, 0 TO 0, 0 ; SET MESSAGE OF oWndBCO oWndBCO:Hide() oBrw := TXBrowse():New( oWndBCO ) oCol = oBrw:AddCol() oCol:cHEADER := "Codigo" oCol:bStrData := { ||BANCO->BCO_CODIGO } oCol:nWidth := 95 oCol = oBrw:AddCol() oCol:cHEADER := "Nombre" oCol:bStrData := { ||BANCO->BCO_DESCRI } oCol:nWidth := 250 oCol := oBrw:AddCol() oCol:cHeader := "Cuenta Contable" oCol:bStrData := {|| BANCO->BCO_CUENTA } oBrw:SetRDD() oBrw:CreateFromCode() oWndBCO:SetControl(oBrw) ACTIVATE WINDOW oWndBCO ; ON INIT oBrw:Refresh() ; oWndPrinc:cascade() oWndBCO:oClient = oBrw oWndBCO:Show() //-----Fin de codigo [url=http&#58;//img441&#46;imageshack&#46;us/i/browsere&#46;jpg/:1e8owb96][img:1e8owb96]http&#58;//img441&#46;imageshack&#46;us/img441/9403/browsere&#46;jpg[/img:1e8owb96][/url:1e8owb96]
Ajustar Browse a Ventana
Saludos para la version que usas no esta disponible esa caracteristica, esta disponible desde la version 8.04 (abril 2008) oBrw:nStretchCol = STRETCHCOL_LAST o si quieres estirar alguna columan en especifico oBrw:nStretchCol = 3
Ajustar Browse a Ventana
Y que otra alternativa tengo?
Ajustar Browse a Ventana
Saludos se me ocurre una solucion algo tediosa, debes pensarla y "hechar" algo de logica y codigo te lo explico... usa el codeblock bResized del objeto "WINDOW" contenedor del browse.... puedes ver un ejemplo en testmdir.prg como usar bResized con el argumento nWidth recibido en ese codeblock, que es el ancho de la ventana, podras calcular automaticamente el ancho debera tener la(s) columna(s) para ajustarse al ancho de la ventana de forma equitativa... aqui es donde debes pensar un poco y usar algo de logica <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> el ancho de las columnas esta representada en los objetos columnas en la data nWidth, ejemplo oBrw:aCols[ 3 ]:nWidth = 100 eso ajusta el ancho de la columna 3 a 100
Ajustar Browse a Ventana
Gracias, Voy a intentarlo y si lo logro agrego el codigo aca como contribucion. Saludos
Ajustar Browse a Ventana
este es un codigo que escribi hace dos años atras, puede que te sirva de guia... trata de un xbrowse que se ajusta a una ventana y a su vez de forma simetrica a la resolucion de la pantalla es algo complicado pero alli lo dejo [url:32xx7tul]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=74000#p74000[/url:32xx7tul]
Ajustar Combobox a Buttonbar
Hola : Tengo una buttonbar con medidas 36,36 , los botones se ajustan bien pero con el combobox tengo mas problemas para ajustarlo, lo tengo mas o menos bien, pero me gustaria ajustarlo mas antes cuando usaba los botones de buttonbar 24,27 se ajustaba bien, pero como los botones se veian muy pequeños, tuve que cambiar el caso es que la clausula SIZE no me hace caso. No se que hago mal, pongo algo de codigo. [code=fw:27yh4as5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// La button bar</span><br />&nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar 3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">36</span>, <span style="color: #000000;">36</span> <span style="color: #0000ff;">OF</span> oWndObr <span style="color: #0000ff;">CURSOR</span> oCursor<br /><span style="color: #B900B9;">// Los botones se ajustan bien</span><br /><span style="color: #B900B9;">// Definicion Combobox</span><br />cCombo:= <span style="color: #000000;">1</span><br />&nbsp;@ .<span style="color: #000000;">31</span>, <span style="color: #000000;">54.6</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo <span style="color: #0000ff;">VAR</span> cCombo <span style="color: #0000ff;">ITEMS</span> aCombo ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> IndexObra<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">125</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">FONT</span> oFsSerif;<br />&nbsp; &nbsp;<span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Cambia el indice de ordenación"</span> <span style="color: #0000ff;">WHEN</span> Obr-><span style="color: #000000;">&#40;</span>LastRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span> <span style="color: #0000ff;">OF</span> oBar<br /><br />&nbsp;</div>[/code:27yh4as5] En cuanto a la anchura del combo esta bien, me interesaria ajustar altura para que se vea mejor en la BUTTONBAR si cambio SIZE 125,200 por ejemplo se pinta igual no hace caso al segundo parametro que seria la altura. ¿no? Agradeceria vuestra ayuda. Saludos Jose
Ajustar DIALOG de um RC
obrigado
Ajustar DIALOG de um RC
Sr. Antonio, Existe alguma função do fivewin que ajusta automaticamente um DIALOG de um RC. Explico: Tenho um DIALOG criada em desktop 800x600, este RC se ajustaria em um POCKET PC?
Ajustar DIALOG de um RC
SGS, No, no hay forma automática de hacerlo. Además la distribución de los controles del diálogo posiblemente tendrias que cambiarla para que se viesen bien. Podrías hacer una función que leyese el RC y que lo convirtiese a otro RC modificado, pero tendrías que implementarlo segun tus necesidades y preferencias.
Ajustar Dialogo a Ventana
Estimados, Alguien tendra un codigo que defina un Dialogo y lo ajuste dentro de una ventana, es decir, que esta sea su contenedora? Gracias de antemano
Ajustar Dialogo a Ventana
Alguna opcion ?
Ajustar Dialogo a Ventana
Este ejemplo tiene una ventana principal con un xbrowse y una barra de botones, y le incrusta un dialogo. Luego la ventana se adapta al dialogo. [code=fw:1znvk52d]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"A/B/M de Grupos"</span> &nbsp;<span style="color: #0000ff;">OF</span> oApp:<span style="color: #000000;">oWnd</span> NOZOOM <span style="color: #0000ff;">ICON</span> oApp:<span style="color: #000000;">oIco</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">05</span>,<span style="color: #000000;">05</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">50</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">OF</span> oWnd1 <span style="color: #000000;">2010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ALTA"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp;TOOLTIP <span style="color: #ff0000;">"Agregar Registro"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>Formu<span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Alta"</span> TOP <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"MODI"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp;TOOLTIP <span style="color: #ff0000;">"Modificar Registro"</span> &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>Formu<span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Modifica"</span> TOP <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"BAJA"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; TOOLTIP <span style="color: #ff0000;">"Eliminar Registro"</span> &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>Baja<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Baja"</span> TOP <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALE"</span> <span style="color: #0000ff;">OF</span> oBar &nbsp; &nbsp;TOOLTIP <span style="color: #ff0000;">"Cerrar Ventana"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cerrar"</span> TOP<br />&nbsp; &nbsp;oWnd1:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oWnd1:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Esta es la funcion que llamo para que el dialogo se ajuste</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ABMS"</span> <span style="color: #0000ff;">OF</span> oWnd1 &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw DATASOURCE oQryBrw &nbsp;COLUMNS <span style="color: #ff0000;">"Codigo"</span>,<span style="color: #ff0000;">"nombre"</span> &nbsp;HEADERS <span style="color: #ff0000;">"Código"</span>,<span style="color: #ff0000;">"Nombre"</span> &nbsp;SIZES <span style="color: #000000;">60</span>,<span style="color: #000000;">345</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg AUTOSORT <span style="color: #0000ff;">ON</span> DBLCLICK <span style="color: #000000;">&#40;</span>Formu<span style="color: #000000;">&#40;</span> .f.<span style="color: #000000;">&#41;</span>,oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Activo el dialogo y al iniciar muevo a 0,0</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .T.<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>cerrar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd, oDlg, lCentra<span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">STATIC</span> lActivo := .F.<br />&nbsp; <span style="color: #00C800;">LOCAL</span> &nbsp;aRect, nPosY, nPosX, nPosXX, oIco<br />&nbsp; <span style="color: #00C800;">IF</span> IsIconic<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> .T.<br />&nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; <span style="color: #00C800;">IF</span> !<span style="color: #000000;">&#40;</span>lActivo<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;lActivo = .T.<br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Muevo dialogo a 0,0 para que quede bien incrustado...</span><br />&nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Primero Seteo Como si Windows Fuera Estandar...</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+8</span>, oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">+27</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Calculo diferencia !</span><br />&nbsp; &nbsp; &nbsp;aRect &nbsp;:= GetClientRect<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosY := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nTop</span>-oWnd:<span style="color: #000000;">nBottom</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosX := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosXX := INT<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span> - <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nRight</span>-oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Ahora la pongo JUSTA, JUSTA...</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span>+nPosX,oDlg:<span style="color: #000000;">nHeight</span>+nPosY<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> lCentra<br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nTop</span><span style="color: #000000;">+5</span>,nPosXX<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp;lActivo := .F.<br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">&#40;</span>oIco<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWndClient</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> .T.<br />&nbsp;</div>[/code:1znvk52d] Este es el recurso [code=fw:1znvk52d]<div class="fw" id="{CB}" style="font-family: monospace;">ABMS <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">15</span>, <span style="color: #000000;">19</span>, <span style="color: #000000;">551</span>, <span style="color: #000000;">309</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">111</span>, <span style="color: #ff0000;">"TXBROWSE"</span>, WS_TABSTOP|0x00b000a1, <span style="color: #000000;">4</span>, <span style="color: #000000;">44</span>, <span style="color: #000000;">540</span>, <span style="color: #000000;">240</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Buscar====>>>:"</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">113</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">68</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">476</span>, <span style="color: #000000;">8</span><br /><span style="color: #000000;">&#125;</span></div>[/code:1znvk52d] Espero te sirva
Ajustar a la window un xBrowse
Hola a todos Pues la pregunta es esa, ¿hay alguna manera de ajustar un xBrowse a una ventana windows? El tema es que tengo algunos listbox que los he pasado a xBrowse, pero.... como son de pocos campos, dos o tres nada más me deja un vacío enorme en la ventana, he intentado con el method ajust aunque no me lo ajusta, he creado una columna vacía por si acaso así pudiera llenar la ventana, pero nada. Alguno sabe como ajustarlo? Muchas Gracias a todos Pedro
Ajustar a la window un xBrowse
Pedro... oWnd:oClient = oBrw puedes hacer ajuste de la ultima columna de esta forma oBrw:nStretchCol = STRETCHCOL_LAST
Ajustar a la window un xBrowse
Muchas gracias Daniel, la solución fue oBrw:nStretchCol = STRETCHCOL_LAST Problema solucionado Gracias Pedro
Ajustar a la window un xBrowse
oBrw:nStretchCol = STRETCHCOL_LAST existe para FWH version 6.12? Saludos,
Ajustar a la window un xBrowse
Compuin La mejor forma de averiguarlo es revisar la clase /source/classes/xbrowse.prg
Ajustar a la window un xBrowse
No existe. Como se evita una columna adicional al final en la v 6.12 Saludos,
Ajustar ancho de un Get SOLUCIONADO
Hola a todos. ¿Cómo puedo ajustar el ancho de oGet al ancho de su variable de texto, en tiempo de ejecución? Gracias por adelantado. Hi. How do I can adjust the width of oGet to the width of its text variable, at runtime? Thanks in advance.
Ajustar ancho de un Get SOLUCIONADO
Francisco, [code=fw:3tq55rq3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Inicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oGet1, cTxt1, oFont1<br />   cTxt1 := <span style="color: #ff0000;">"oGet width for any text"</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br />       @ <span style="color: #000000;">20</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cTxt1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont1<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> AjustGet<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Function</span> AjustGet<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> nWidthTxt := AllTrim<span style="color: #000000;">&#40;</span>oGet1:<span style="color: #000000;">cCaption</span><span style="color: #000000;">&#41;</span><br />   oGet1:<span style="color: #000000;">nWidth</span> := GetTextWidth<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, Alltrim<span style="color: #000000;">&#40;</span>oGet1:<span style="color: #000000;">cCaption</span><span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">8</span>    <span style="color: #B900B9;">// 8 -> Valor ajuste.</span><br />   oGet1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span></div>[/code:3tq55rq3]
Ajustar ancho de un Get SOLUCIONADO
Francisco, versión mejorada <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> [code=fw:1md6ym6k]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><br /><span style="color: #00C800;">Function</span> Inicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oGet1, cTxt1, oFont1<br />   cTxt1 := <span style="color: #ff0000;">"oGet width for any text"</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br />      @ <span style="color: #000000;">20</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Probar varios anchos"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> VariosAjustes<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">20</span><br />      @ <span style="color: #000000;">50</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cTxt1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont1<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> AjustGet<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">Function</span> AjustGet<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> nWidthTxt := AllTrim<span style="color: #000000;">&#40;</span>oGet1:<span style="color: #000000;">cCaption</span><span style="color: #000000;">&#41;</span>, i := <span style="color: #000000;">1</span><br />   oGet1:<span style="color: #000000;">nWidth</span> := GetTextWidth<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, Alltrim<span style="color: #000000;">&#40;</span>oGet1:<span style="color: #000000;">cText</span><span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">8</span>    <span style="color: #B900B9;">// 8 -> Valor ajuste.</span><br />   oGet1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">Function</span> VariosAjustes<span style="color: #000000;">&#40;</span>oGet1<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cTxt<br />   <span style="color: #00C800;">LOCAL</span> nWidthTxt := AllTrim<span style="color: #000000;">&#40;</span>oGet1:<span style="color: #000000;">cCaption</span><span style="color: #000000;">&#41;</span>, i := <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">LOCAL</span> aTextos := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Texto 1"</span>,;<br />                     <span style="color: #ff0000;">"Un texto más largo"</span>,;<br />                     <span style="color: #ff0000;">"Menos texto"</span>,;<br />                     <span style="color: #ff0000;">"Otra línea pero más larga"</span>,;<br />                     <span style="color: #ff0000;">"Mucha más largo que todas las líneas anteriores"</span>,;<br />                     <span style="color: #ff0000;">"Otra vez corto"</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">For</span> i :=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span>aTextos<span style="color: #000000;">&#41;</span><br />       cTxt := AllTrim<span style="color: #000000;">&#40;</span>aTextos<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />       oGet1:<span style="color: #000000;">cText</span> := cTxt<br />       oGet1:<span style="color: #000000;">nWidth</span> := GetTextWidth<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, cTxt, oGet1:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">8</span>    <span style="color: #B900B9;">// 8 -> Valor ajuste.</span><br />       oGet1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       SysWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1md6ym6k]
Ajustar ancho de un Get SOLUCIONADO
Carlos, Funciona bien. Excelente ejemplo! Muchas gracias. Saludos.
Ajustar compilacion y linkado compilador MSVC Microsoft
Saludos a todos. Estoy usando Borland 7.40 como compilador y el editor el Fivedit, con el que no tengo problema, pero mi objetivo futuro seria pasarme a 64 bits. y ahi creo que la mejor opcion es el compilador de Microsoft , es por lo que estoy haciendo pruebas con la version de 32 bits que tengo de Fivewin. para configurar el FivEdit estoy teniendo muchos problemas , creo que es debido a que uso la Version Enterprise de Visual Studio. como el buildh32.bat de Fivewin me construye bien el ejecutable he pasado esos parametros al FivEdit pero todavia me da problemas, sobre todo en el compilador de recursos rc, lo solucionare con Cristobal. Pero antes me gustaria comentar los flags de la compilacion el linkado etc. con msvc compilacion. [code=fw:28o578xd]<div class="fw" id="{CB}" style="font-family: monospace;">cl.exe -TP -W3 -c /GS- /I%hdir%\include /GA %<span style="color: #000000;">1</span>.c</div>[/code:28o578xd] El flag TP significa que todos los archivos a utilizar seran C++ nosotros utilizamos .C, entonces porque no usamos -TC, que seria todos los archivos seran .C? uso rc [code=fw:28o578xd]<div class="fw" id="{CB}" style="font-family: monospace;">rc -r -d__FLAT__</div>[/code:28o578xd] Esta opcion __FLAT__ no aparece en las opciones del rc/?, Alguien sabe para que sirve? Despues a quien use este entorno a mi en mi versin de Visual Studio Enterprise tengo el compilador de recursos rc en esta ruta. Tambien lo teneis ahi vosotros o esta en otra, lo digo por acotar el problema con FivEdit. [quote:28o578xd]C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\rc.exe[/quote:28o578xd] Muchisimas gracias por vuestra inestimable ayuda. Saludos. Jose.
Ajustar compilacion y linkado compilador MSVC Microsoft
Estimado José, En el fichero buildh32.bat actual de FWH se usan estos flags: cl.exe -nologo -c -O2 -W4 -wd4127 /I%hdir%\include %1.c en cuando a -d__FLAT__ sirve para declarar un "define" y asi poder reconocer desde el fichero RC que estamos en 32 bits. De la misma forma usamos -d__64__ para saber que estamos construyendo para 64 bits. Cuando se pasó de 16 a 32 bits se solía usar el define __FLAT__ para los 32 bits, de ahi el usar ese en vez de __32__
Ajustar contenido página web en control TDockPnel
Buenas noches para todos, tengo otra pregunta. Estoy intentando cargar el contenido de una pagina web en un control TDockPnel, siguiendo el ejemplo que publico nuestro amigo Cristobal, logramos que se muestre la pagina web como la primera imagen, el problema es que necesitamos que se muestre como segunda imagen (STRETCH). [code=fw:2p2cimz8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> ShowPageWeb<span style="color: #000000;">&#40;</span> o, nT, nL, nH, nW   <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oActiveX<br />  oActiveX := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"InternetExplorer.Application"</span> <span style="color: #000000;">&#41;</span><br />   WITH OBJECT oActiveX<br />      :<span style="color: #000000;">Visible</span>    := .t.<br />      :<span style="color: #000000;">ToolBar</span>    := .f.<br />      :<span style="color: #000000;">StatusBar</span>  := .f.<br />      :<span style="color: #000000;">MenuBar</span>    := .f.<br />      :<span style="color: #000000;">FullScreen</span> := .t.<br />      :<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate"</span>, <span style="color: #ff0000;">"https://www.google.com/"</span> <span style="color: #000000;">&#41;</span><br />   END<br /><span style="color: #00C800;">Return</span> oActiveX<br /> </div>[/code:2p2cimz8] El resultado : [img:2p2cimz8]https&#58;//hymplus&#46;com/forofw/webajusta1&#46;png[/img:2p2cimz8] Pero lo que necesitamos lograr es lo siguiente: [img:2p2cimz8]https&#58;//hymplus&#46;com/forofw/webajusta2&#46;png[/img:2p2cimz8]
Ajustar contenido página web en control TDockPnel
Leandro, prueba asi a ver: [code=fw:wyxt7sk6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// ( C ) Cristobal Navarro - 2021</span><br /><span style="color: #B900B9;">// TDockPnel with ActiveX</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"colores.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Static</span> oWindow<br /><span style="color: #00C800;">Static</span> nWAncho<br /><span style="color: #00C800;">Static</span> nWAlto <br /><span style="color: #00C800;">Static</span> nCol &nbsp; <br /><span style="color: #00C800;">Static</span> nRow &nbsp; <br /><br /><span style="color: #00C800;">Static</span> oFont4<br /><span style="color: #00C800;">Static</span> cPathApp<br /><br /><span style="color: #00C800;">Static</span> oDock1<br /><span style="color: #00C800;">Static</span> oDock2<br /><span style="color: #00C800;">Static</span> oDock3<br /><span style="color: #00C800;">Static</span> oDock4<br /><span style="color: #00C800;">Static</span> oDock5<br /><br /><span style="color: #00C800;">Static</span> cText := <span style="color: #ff0000;">""</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFont &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Segoe UI Symbol"</span> <span style="color: #B900B9;">//TAHOMA &nbsp; //CALIBRI</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CALIBRI"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br /><br />&nbsp; &nbsp;TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont4:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;nWAncho &nbsp; := Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWAlto &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCol &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> - nWAncho <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nRow &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> - nWAlto &nbsp;<span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWindow <span style="color: #0000ff;">FROM</span> nRow, nCol <span style="color: #0000ff;">TO</span> nWAlto + nRow, nWAncho + nCol ; <span style="color: #B900B9;">//MDI ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test TDockPnel Control ActiveX - "</span> + FWVERSION ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_WHITE, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWindow<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cUrl &nbsp;:= <span style="color: #ff0000;">"www.google.es"</span><br /><br />&nbsp; &nbsp;oDock1 &nbsp;:= TDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWindow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;WITH OBJECT oDock1<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetHeightCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCoors</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">42</span> &nbsp;<span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">20</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | cUrl <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetColors</span><span style="color: #000000;">&#40;</span> CLR_WHITE, METRO_RED, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span> <span style="color: #000000;">&#41;</span>, CLR_WHITE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetBorderSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetImgsFiles</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\o</span>ptions.bmp"</span>, <span style="color: #000000;">&#123;</span> | o | MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"ToolTip"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCtrlsPnel</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o, nT, nL, nH, nW, oB | oB := ShowPageWeb<span style="color: #000000;">&#40;</span> o, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp;<span style="color: #000000;">&#41;</span><span style="color: #B900B9;">//, ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetParent( oB:hWnd, o:hWnd ) } )</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMnu<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow &nbsp;:= o:<span style="color: #000000;">nTop</span> &nbsp;+ Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol &nbsp;:= o:<span style="color: #000000;">nLeft</span> + Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMnu <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2013</span> ;<br />&nbsp; &nbsp; &nbsp; COLORSELECT METRO_STEEL, METRO_STEEL, CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; COLORMENU CLR_WHITE, CLR_BLUE ;<br />&nbsp; &nbsp; &nbsp; COLORSEPARATOR METRO_STEEL ;<br />&nbsp; &nbsp; &nbsp; COLORLEFT CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont4<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Info"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Class TDockPnel"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">ACTION</span> oWindow:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">MENU</span> oMnu <span style="color: #00C800;">AT</span> nRow, nCol <span style="color: #0000ff;">OF</span> o:<span style="color: #000000;">oWnd</span><br /><br /><span style="color: #00C800;">Return</span> oMnu<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ShowPageWeb<span style="color: #000000;">&#40;</span> oParent, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oActX<br />&nbsp; &nbsp;oActX := TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oParent, <span style="color: #ff0000;">"Shell.Explorer.2"</span>, nT, nL, nW, nH <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oActX:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate"</span>, cUrl <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> oActX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:wyxt7sk6]
Ajustar contenido página web en control TDockPnel
Cristobal, gracias por responder. Aun que ya se ajusta, ahora me salen errores de script, lo que no sucedía haciendo el llamado de la otra manera. [img:qtf5req4]https&#58;//hymplus&#46;com/forofw/webajusta3&#46;png[/img:qtf5req4]
Ajustar contenido página web en control TDockPnel
Leandro, no es un problema de TDockPnel, lo mismo ocurre si lo envías sobre una TWindow Para que te aparezca correctamente, el contenedor ha de estar maximizado [code=fw:2m3z72er]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// ( C ) Cristobal Navarro - 2021</span><br /><span style="color: #B900B9;">// TDockPnel with ActiveX</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"colores.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Static</span> oWindow<br /><span style="color: #00C800;">Static</span> nWAncho<br /><span style="color: #00C800;">Static</span> nWAlto <br /><span style="color: #00C800;">Static</span> nCol &nbsp; <br /><span style="color: #00C800;">Static</span> nRow &nbsp; <br /><br /><span style="color: #00C800;">Static</span> oFont4<br /><span style="color: #00C800;">Static</span> cPathApp<br /><br /><span style="color: #00C800;">Static</span> oDock1<br /><span style="color: #00C800;">Static</span> oDock2<br /><span style="color: #00C800;">Static</span> oDock3<br /><span style="color: #00C800;">Static</span> oDock4<br /><span style="color: #00C800;">Static</span> oDock5<br /><br /><span style="color: #00C800;">Static</span> cText := <span style="color: #ff0000;">""</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFont &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Segoe UI Symbol"</span> <span style="color: #B900B9;">//TAHOMA &nbsp; //CALIBRI</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CALIBRI"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br /><br />&nbsp; &nbsp;TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont4:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;nWAncho &nbsp; := Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWAlto &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCol &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> - nWAncho <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nRow &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> - nWAlto &nbsp;<span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWindow <span style="color: #0000ff;">FROM</span> nRow, nCol <span style="color: #0000ff;">TO</span> nWAlto + nRow, nWAncho + nCol ; <span style="color: #B900B9;">//MDI ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test TDockPnel Control ActiveX - "</span> + FWVERSION ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_WHITE, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWindow <span style="color: #0000ff;">MAXIMIZED</span> &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> &nbsp;CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cUrl &nbsp;:= <span style="color: #ff0000;">"www.google.es"</span><br /><br />&nbsp; &nbsp;oDock1 &nbsp;:= TDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWindow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;WITH OBJECT oDock1<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetHeightCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCoors</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">42</span> &nbsp;<span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">20</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | cUrl <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetColors</span><span style="color: #000000;">&#40;</span> CLR_WHITE, METRO_RED, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span> <span style="color: #000000;">&#41;</span>, CLR_WHITE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetBorderSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetImgsFiles</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\o</span>ptions.bmp"</span>, <span style="color: #000000;">&#123;</span> | o | MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"ToolTip"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCtrlsPnel</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o, nT, nL, nH, nW, oB | oB := ShowPageWeb<span style="color: #000000;">&#40;</span> o, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #B900B9;">//, ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetParent( oB:hWnd, o:hWnd ) } )</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /><span style="color: #00C800;">Function</span> MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMnu<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow &nbsp;:= o:<span style="color: #000000;">nTop</span> &nbsp;+ Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol &nbsp;:= o:<span style="color: #000000;">nLeft</span> + Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMnu <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2013</span> ;<br />&nbsp; &nbsp; &nbsp; COLORSELECT METRO_STEEL, METRO_STEEL, CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; COLORMENU CLR_WHITE, CLR_BLUE ;<br />&nbsp; &nbsp; &nbsp; COLORSEPARATOR METRO_STEEL ;<br />&nbsp; &nbsp; &nbsp; COLORLEFT CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont4<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Info"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Class TDockPnel"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">ACTION</span> oWindow:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">MENU</span> oMnu <span style="color: #00C800;">AT</span> nRow, nCol <span style="color: #0000ff;">OF</span> o:<span style="color: #000000;">oWnd</span><br /><br /><span style="color: #00C800;">Return</span> oMnu<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> ShowPageWeb<span style="color: #000000;">&#40;</span> oParent, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oActX<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oActX := CreateObject( "InternetExplorer.Application", "IE_" )</span><br />&nbsp; &nbsp;oActX := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}"</span>, <span style="color: #ff0000;">"IE_"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;WITH OBJECT oActX<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Visible</span> &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">ToolBar</span> &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">StatusBar</span> &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">MenuBar</span> &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">FullScreen</span> := .T.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate"</span>, cURL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;SetParent<span style="color: #000000;">&#40;</span> oActX:<span style="color: #000000;">hWnd</span>, oParent:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">Return</span> oActX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br />&nbsp;</div>[/code:2m3z72er]
Ajustar contenido página web en control TDockPnel
Gracias por responder amigo No te preocupes se que el error no es de tu clase, gracias por la ayuda. Pero ahora me esta devolviendo este error. [code=fw:160txzlq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\fwh1909\samples\leandro10.exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">971</span>,<span style="color: #000000;">072</span> bytes<br />   Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Build <span style="color: #000000;">20190613</span><span style="color: #000000;">&#41;</span><br />   FiveWin  version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">19.09</span><br />   C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.3</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />   Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">02</span>/<span style="color: #000000;">07</span>/<span style="color: #000000;">21</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">20</span>:<span style="color: #000000;">40</span><br />   Error description: <span style="color: #000000;">Error</span> TOleAuto/<span style="color: #000000;">65535</span>  : <span style="color: #000000;">TOLEAUTO</span>:<span style="color: #00C800;">NEW</span><br />   Args:<br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = C   <span style="color: #000000;">&#123;</span>D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E<span style="color: #000000;">&#125;</span><br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = U   <br />     <span style="color: #000000;">&#91;</span>   <span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> = C   IE_<br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => <span style="color: #00C800;">THROW</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #00C800;">NEW</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => CREATEOBJECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">leandro10</span>.prg => SHOWPAGEWEB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">131</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">leandro10</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>CREADOCKS<span style="color: #000000;">&#40;</span> <span style="color: #000000;">88</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\internal\TDOCKPNEL.PRG => TDOCKPNEL:<span style="color: #000000;">PAINTPNELH</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">814</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\internal\TDOCKPNEL.PRG => TDOCKPNEL:<span style="color: #000000;">PAINTCTRLSPNELP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">739</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\internal\TDOCKPNEL.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TDOCKPNEL:<span style="color: #000000;">CREATEPNELP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">660</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TPANEL.PRG => TPANEL:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">162</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TPANEL.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TPANEL:<span style="color: #000000;">TPANEL</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">23</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TPANEL:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TPANEL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1767</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3559</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1097</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">leandro10</span>.prg => TESTDOCKPNEL<span style="color: #000000;">&#40;</span> <span style="color: #000000;">65</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">leandro10</span>.prg => MAIN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:160txzlq]
Ajustar contenido página web en control TDockPnel
Leandro, intenta ahora: [code=fw:4sw52a9j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\TDOCP2.PRG</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// ( C ) Cristobal Navarro - 2021</span><br /><span style="color: #B900B9;">// TDockPnel with ActiveX</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"colores.ch"</span><br /><br /><span style="color: #00C800;">Static</span> oWindow<br /><span style="color: #00C800;">Static</span> nWAncho<br /><span style="color: #00C800;">Static</span> nWAlto<br /><span style="color: #00C800;">Static</span> nCol &nbsp;<br /><span style="color: #00C800;">Static</span> nRow &nbsp;<br /><br /><span style="color: #00C800;">Static</span> oFont4<br /><span style="color: #00C800;">Static</span> cPathApp<br /><br /><span style="color: #00C800;">Static</span> oDock1<br /><span style="color: #00C800;">Static</span> oDock2<br /><span style="color: #00C800;">Static</span> oDock3<br /><span style="color: #00C800;">Static</span> oDock4<br /><span style="color: #00C800;">Static</span> oDock5<br /><br /><span style="color: #00C800;">Static</span> cText := <span style="color: #ff0000;">""</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFont &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Segoe UI Symbol"</span> <span style="color: #B900B9;">//TAHOMA &nbsp; //CALIBRI</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"CALIBRI"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-16</span><br /><br />&nbsp; &nbsp;TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont4:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> TestDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;nWAncho &nbsp; := Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWAlto &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">0.95</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCol &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> - nWAncho <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nRow &nbsp; &nbsp; &nbsp;:= Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> - nWAlto &nbsp;<span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWindow <span style="color: #0000ff;">FROM</span> nRow, nCol <span style="color: #0000ff;">TO</span> nWAlto + nRow, nWAncho + nCol ; <span style="color: #B900B9;">//MDI ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test TDockPnel Control ActiveX - "</span> + FWVERSION ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_WHITE, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span>, <span style="color: #000000;">182</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWindow<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> CreaDocks<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// local cUrl &nbsp;:= "www.google.es"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cUrl &nbsp;:= <span style="color: #ff0000;">"www.google.com"</span><br /><br />&nbsp; &nbsp;oDock1 &nbsp;:= TDockPnel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWindow <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;WITH OBJECT oDock1<br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetHeightCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCoors</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">42</span> &nbsp;<span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> | o | o:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">20</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCaption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | cUrl <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetColors</span><span style="color: #000000;">&#40;</span> CLR_WHITE, METRO_RED, Rgb<span style="color: #000000;">&#40;</span> <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">88</span> <span style="color: #000000;">&#41;</span>, CLR_WHITE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont4 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetBorderSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetImgsFiles</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\o</span>ptions.bmp"</span>, <span style="color: #000000;">&#123;</span> | o | MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"ToolTip"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetCtrlsPnel</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o, nT, nL, nH, nW, oB | oB := ShowPageWeb<span style="color: #000000;">&#40;</span> o, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp;<span style="color: #000000;">&#41;</span><span style="color: #B900B9;">//, ;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetParent( oB:hWnd, o:hWnd ) } )</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> MyPopupMnu<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMnu<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow &nbsp;:= o:<span style="color: #000000;">nTop</span> &nbsp;+ Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nHeight</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCol &nbsp;:= o:<span style="color: #000000;">nLeft</span> + Int<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMnu <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2013</span> ;<br />&nbsp; &nbsp; &nbsp; COLORSELECT METRO_STEEL, METRO_STEEL, CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; COLORMENU CLR_WHITE, CLR_BLUE ;<br />&nbsp; &nbsp; &nbsp; COLORSEPARATOR METRO_STEEL ;<br />&nbsp; &nbsp; &nbsp; COLORLEFT CLR_WHITE ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont4<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Info"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Class TDockPnel"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">ACTION</span> oWindow:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">MENU</span> oMnu <span style="color: #00C800;">AT</span> nRow, nCol <span style="color: #0000ff;">OF</span> o:<span style="color: #000000;">oWnd</span><br /><br /><span style="color: #00C800;">Return</span> oMnu<br /><br /><span style="color: #00C800;">Function</span> ShowPageWeb<span style="color: #000000;">&#40;</span> oParent, cUrl, nT, nL, nH, nW <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oActiveX, oHttp, oActiveXdo<br /><br />&nbsp; &nbsp;oActiveX := TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oParent, <span style="color: #ff0000;">"Shell.Explorer.2"</span>, nT, nL, nW, nH <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oActivex&#<span style="color: #000000;">058</span>;Silent := .T. <span style="color: #B900B9;">// aqui silence... en el script.</span><br /><br />&nbsp; &nbsp;oActiveX&#<span style="color: #000000;">058</span>;Do<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate"</span>, cUrl <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oActivex&#<span style="color: #000000;">058</span>;SetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span> oActivex&#<span style="color: #000000;">058</span>;Busy<br /><br />&nbsp; &nbsp; &nbsp; SysWait<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp;oActiveXdo := oActiveX&#<span style="color: #000000;">058</span>;Document<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oHttp := oActiveX&#<span style="color: #000000;">058</span>;GetProp<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Document"</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// -> Object Document</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> oHttp <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Problemas en el Site..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Problemas en el Site..."</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">Return</span> oActiveX<br /><br /><span style="color: #B900B9;">// Fin</span><br />&nbsp;</div>[/code:4sw52a9j] Saludos.
Ajustar contenido página web en control TDockPnel
Function ShowPageWeb( oParent, cUrl, nT, nL, nH, nW ) local oActiveX, oHttp, oActiveXdo oActiveX := TActiveX():New( oParent, "Shell.Explorer.2", nT, nL, nW, nH ) oActivex&#058;Silent := .T. // aqui silence... en el script. oActiveX&#058;Do( "Navigate", cUrl ) oActivex&#058;SetFocus() WHILE oActivex&#058;Busy SysWait(.2) ENDDO oActiveXdo := oActiveX&#058;Document() oHttp := oActiveX&#058;GetProp( "Document" ) // -> Object Document IF Empty( oHttp ) MsgInfo( "Problemas en el Site...", ; "Problemas en el Site..." ) RETURN( .F. ) ENDIF Return oActiveX
Ajustar contenido página web en control TDockPnel
Gracias por responder Ya no muestra lo errores, pero ahora el problema es que la pagina no se muestra bien, parece que los estilos css no se cargan. La página el navegador [url:3swx90cl]https&#58;//hymplus&#46;com/[/url:3swx90cl] Así se ve en el contenedor [img:3swx90cl]https&#58;//hymplus&#46;com/forofw/webajusta4&#46;png[/img:3swx90cl]
Ajustar contenido página web en control TDockPnel
Leandro, en tu caso, és mejor que hagas asi: [code=fw:3u2wtpdc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\LEANDRO.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Llama_hymplus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Llama_hymplus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oOle<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> chymplus<br /><br />&nbsp; &nbsp;chymplus := <span style="color: #ff0000;">"https://hymplus.com/"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">-10</span>, <span style="color: #000000;">-10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">-5</span>, <span style="color: #000000;">-5</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span> ShellExecute<span style="color: #000000;">&#40;</span>GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"open"</span>,<span style="color: #ff0000;">'"'</span>+chymplus+<span style="color: #ff0000;">'"'</span><span style="color: #000000;">&#41;</span>, oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// Fin</span><br />&nbsp;</div>[/code:3u2wtpdc] Saludos.
Ajustar contenido página web en control TDockPnel
karinha, gracias por responder. Pero el código que me enviaste lo que hace es abrir una ventana del navegador directo a nuestro sitio web, pero lo que necesitamos es que este quede contenido dentro del control TDockPnel.
Ajustar contenido página web en control TDockPnel
Leandro, con el último código que te envié a mí me funciona correctamente simplemente cambiando la url [img:2ljejjkz]https&#58;//i&#46;postimg&#46;cc/fRq9mC4V/dock15&#46;png[/img:2ljejjkz] Si no te funciona, envíame un correo
Ajustar contenido página web en control TDockPnel
Cristobal, siguiendo el hilo de este post, existe la posibilidad de mostrar una página web dentro de una windows? Porque tengo una versión más antigua de Fivewin y no tengo TDockPnel. He intentado con este ejemplo [code=fw:2mblm0p3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oWndChild, oActiveX<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"FiveWin ActiveX Support"</span> <span style="color: #0000ff;">MDI</span> &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">OF</span> oWnd<br />&nbsp; &nbsp;oActiveX = TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWndChild, <span style="color: #ff0000;">"Shell.Explorer"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWndChild:<span style="color: #000000;">oClient</span> = oActiveX <span style="color: #B900B9;">// To fill the entire window surface</span><br />&nbsp; &nbsp;oWndChild:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oActiveX&#<span style="color: #000000;">058</span>;Do<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate2"</span>, <span style="color: #ff0000;">"http://www.fivetechsoft.com"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2mblm0p3] Pero no carga los estilos ni los script. Desde ya muchas gracias
Ajustar contenido página web en control TDockPnel
Intente ahora: [code=fw:sdz07mvn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\CMSOFT1.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oActiveX<br /><br /><span style="color: #00C800;">FUNCTION</span> CmSoft_Web<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oChildWnd, cTitle<br /><br />&nbsp; &nbsp;cTitle := <span style="color: #ff0000;">"FiveWin Brasil"</span><br /><br />&nbsp; &nbsp;MsgWait<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CONECTANDO AL FIVEWIN MUNDIAL..."</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"AGUARDE UM MOMENTO POR FAVOR... "</span>, <span style="color: #000000;">2.0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oChildWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">800</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> cTitle<br /><br />&nbsp; &nbsp;oActiveX = TActiveX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oChildWnd, <span style="color: #ff0000;">"Shell.Explorer.2"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oActivex&#<span style="color: #000000;">058</span>;Silent := .T.<br /><br />&nbsp; &nbsp;oChildWnd:<span style="color: #000000;">oClient</span> = oActiveX<br /><br />&nbsp; &nbsp;oActiveX&#<span style="color: #000000;">058</span>;Do<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Navigate2"</span>, <span style="color: #ff0000;">"http://www.fivetechsoft.com"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oActivex&#<span style="color: #000000;">058</span>;SetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oChildWnd<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN</span><br />&nbsp;</div>[/code:sdz07mvn] Regards, saludos.
Ajustar contenido página web en control TDockPnel
Intente ahora: // \SAMPLES\CMSOFT1.PRG #Include "FiveWin.ch" STATIC oActiveX FUNCTION CmSoft_Web() LOCAL oChildWnd, cTitle cTitle := "FiveWin Brasil" MsgWait( "CONECTANDO AL FIVEWIN MUNDIAL...", ; "AGUARDE UM MOMENTO POR FAVOR... ", 2.0 ) DEFINE WINDOW oChildWnd FROM 0, 0 TO 600, 800 PIXEL TITLE cTitle oActiveX = TActiveX():New( oChildWnd, "Shell.Explorer.2" ) oActivex&#058;Silent := .T. oChildWnd:oClient = oActiveX oActiveX&#058;Do( "Navigate2", "http://www.fivetechsoft.com" ) oActivex&#058;SetFocus() ACTIVATE WINDOW oChildWnd RETURN NIL // FIN Regards, saludos.