Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 20-09-2013
Jose_Pérez Jose_Pérez is offline
Miembro
 
Registrado: may 2003
Posts: 156
Poder: 21
Jose_Pérez Va por buen camino
Internet Explorer - Modo de explorador.

Hola:

En Internet Explorer 9, es posible cambiar el modo de explorador a una versión anterior. Esto se consigue pulsando F12 y cambiando a la versión deseada en la barra de menús.

Pues bien, ¿es posible cambiar el modo de explorador a través de Delphi 5?

Un saludo.
Responder Con Cita
  #2  
Antiguo 30-09-2013
Avatar de Pericles
Pericles Pericles is offline
Miembro
NULL
 
Registrado: sep 2013
Ubicación: Buenos Aires, Argentina
Posts: 24
Poder: 0
Pericles Va por buen camino
Hola, te paso información que figura en ayuda de windows.. y función ejemplo de llamadas desde delphi 2010... estimo que funcinoaria sin problemas en delphi 7.

Saludos
Nicolas Perichon

Elemento a modificar en Registro de windows:

HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE Microsoft Internet Explorer Main FeatureControl
FEATURE_BROWSER_EMULATION
contoso.exe = (DWORD) 000090000

info de Microsoft:
msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation

Código Delphi [-]
procedure SetRegistryData(RootKey: HKEY; Key, Value: string;
     RegDataType: TRegDataType; Data: variant);
var
   Rergistro: TRegistry;
   texto: string;
begin
     Rergistro := TRegistry.Create(KEY_WRITE);
     try
          Rergistro.RootKey := RootKey;
          if Rergistro.OpenKey(Key, True) then
             begin
                     try
                            //rdUnknown, rdString, rdExpandString, rdInteger, rdBinary
                            if RegDataType = rdUnknown then RegDataType := Rergistro.GetDataType(Value);
                            if RegDataType = rdString then
                               Rergistro.WriteString(Value, Data)
                               else if RegDataType = rdExpandString then
                                    Rergistro.WriteExpandString(Value, Data)
                               else if RegDataType = rdInteger then
                                    Rergistro.WriteInteger(Value, Data)
                               else if RegDataType = rdBinary then
                                    begin
                                         texto := Data;
                                         Rergistro.WriteBinaryData(Value, PChar(texto)^, Length(texto));
                                    end
                               else
                                    raise Exception.Create(SysErrorMessage(ERROR_CANTWRITE));
                     except
                             Rergistro.CloseKey;
                             raise;
                     end;
                     Rergistro.CloseKey;
             end
          else
              raise Exception.Create(SysErrorMessage(GetLastError));
     finally
             Rergistro.Free;
     end;
end;


Ejemplo de codigo de llamada:

Código Delphi [-]
 SetRegistryData(HKEY_LOCAL_MACHINE,
    '\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',
    'contoso.exe',rdBinary, 9999 );
Responder Con Cita
  #3  
Antiguo 02-10-2013
Jose_Pérez Jose_Pérez is offline
Miembro
 
Registrado: may 2003
Posts: 156
Poder: 21
Jose_Pérez Va por buen camino
Parece que funciona en Delphi 5, sin embargo, no consigo cambiar el modo del explorador a la versión 7. He pasado la versión deseada en el último parámetro, como se muestra abajo en el código. ¿Cuál es la forma correcta de hacerlo?

Código Delphi [-]
 SetRegistryData(HKEY_LOCAL_MACHINE,
    '\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',
    'contoso.exe',rdBinary, 7);

Gracias por tu respuesta.
Responder Con Cita
  #4  
Antiguo 03-10-2013
Avatar de Pericles
Pericles Pericles is offline
Miembro
NULL
 
Registrado: sep 2013
Ubicación: Buenos Aires, Argentina
Posts: 24
Poder: 0
Pericles Va por buen camino
Hola, supuestamente según MS el código debería ser 7000 para IE7.

Saludos
Nicolas Perichon

info de Microsoft:
msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation

10001 (0x2711)Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.
10000 (0x02710) Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.
9999 (0x270F)Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
9000 (0x2328)Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.
Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.
8888 (0x22B8)Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.
8000 (0x1F40)Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8
Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.
7000 (0x1B58) Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.
Responder Con Cita
  #5  
Antiguo 20-10-2013
Jose_Pérez Jose_Pérez is offline
Miembro
 
Registrado: may 2003
Posts: 156
Poder: 21
Jose_Pérez Va por buen camino
Código Delphi [-]
 SetRegistryData(HKEY_LOCAL_MACHINE,
    '\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION',
    'contoso.exe',rdBinary, 7000);

No consigo que funcione.

Y disculpa la demora en contestarte.
Responder Con Cita
  #6  
Antiguo 20-10-2013
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Poder: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Probablemente no te funciona porque tu aplicación no tiene permisos para escribir en "HKEY_LOCAL_MACHINE". Sin embargo, en realidad no es necesario, puesto que la misma clave se encuentra en "HKEY_CURRENT_USER". Así que cambia lo uno por lo otro y prueba a ver.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita
  #7  
Antiguo 20-10-2013
Jose_Pérez Jose_Pérez is offline
Miembro
 
Registrado: may 2003
Posts: 156
Poder: 21
Jose_Pérez Va por buen camino
No funciona de ninguna de las maneras. Lo estoy provando en Windows 7 Professional.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Como ejecutar un EXE de Intraweb desde el explorador de internet egostar Internet 10 28-06-2018 00:28:30
Fallo en internet explorer ElDioni Noticias 26 19-09-2012 20:03:00
Internet Explorer 8 jhonny Noticias 5 04-05-2007 18:44:45
Internet Explorer 7 Final dec Noticias 6 23-10-2006 01:56:40
No se ven imagenes en Internet Explorer Albano Internet 10 09-01-2006 20:43:51


La franja horaria es GMT +2. Ahora son las 07:57:52.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi