PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Trabalhando com o Registro do Windows - Editando o Registro do Windows - Edit Regedit - Mudando o proxy do windows, ativando ou desativando o proxy pela edição no registro do Windows.
Trabalhando com o Registro do Windows - Editando o Registro do Windows - Edit Regedit - Mudando o proxy do windows, ativando ou desativando o proxy pela edição no registro do Windows.
Débuté par Boller, 07 fév. 2023 17:14 - 1 réponse
Membre enregistré
3 655 messages
Popularité : +175 (223 votes)
Posté le 07 février 2023 - 17:14
Exemplo de como trabalhar com o Registro do Windows - Editando o Registro do Windows - Edit Regedit - Mudando o proxy do windows, ativando ou desativando o proxy pela edição no registro do Windows.

Mudando o proxy do windows, ativando ou desativando o proxy pela edição no registro do Windows.

Mudando para enable ou disable e informando a url e porta do PROXY SERVER

ON:





OFF:





Aplicativo Exemplo:





CODIGO DO BOTAO

//[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
//"ProxyEnable"=dword:00000001
//"ProxyServer"="http://proxy.ce.com.br:8080"

KeyPath is string = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\"
ok1, ok2 is boolean
ProxyEnable is string = "ProxyEnable"
ProxyServer is string = "ProxyServer"

ativo_inativo is int

IF RADIO_Ativa_Desativa = 1 THEN
ativo_inativo = 1
ELSE
ativo_inativo = 0
END

IF RegistryExist(registryMode64,KeyPath,ProxyEnable) = True THEN
ok1 = True
END
RegistrySetValue(registryMode64,KeyPath,ProxyEnable,ativo_inativo,registryTypeInt)


IF RegistryExist(registryMode64,KeyPath,ProxyServer) = True
ok2 = True
END
RegistrySetValue(registryMode64,KeyPath,ProxyServer,Lower(NoSpace(EDT_Url_Porta)),registryTypeString)

Info(ok1,ok2)

Close()


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Membre enregistré
3 655 messages
Popularité : +175 (223 votes)
Posté le 07 février 2023 - 17:32
CODIGO FONTE

https://repository.windev.com/publish.awp…

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/