Use dfallent.pkg Use Windows.pkg Deferred_View Activate_oViewTeste for ; Object oViewTeste is a dbView Use Pacotes\ConsultarCNPJ.pkg Set Border_Style to Border_Thick Set Size to 299 469 Set Location to 0 0 Set Maximize_Icon to True Set Label to "ViewTeste" Set Verify_Data_Loss_Msg to 0 Set Verify_Exit_Msg to 0 Object oCNPJ_Form is a Form Set Size to 13 115 Set Location to 130 175 Set Label to "Informe o CNPJ (Somente n£meros)" Set Label_Justification_Mode to JMode_Top Set Label_Col_Offset to 0 End_Object Object oEfetuarCOnsulta_Button is a Button Set Location to 155 206 Set Label to "Consultar" // fires when the button is clicked Procedure OnClick String sCNPJConsultar Boolean bOk Integer iAux Get Value of oCNPJ_Form to sCNPJConsultar tRetornoConsultaCNPJ vtRetornoConsultaCNPJ Send ConsultarCNPJ of oConsultarInformacaoPortalReceitaWS sCNPJConsultar "C:\Dados\" True (&vtRetornoConsultaCNPJ) If (vtRetornoConsultaCNPJ.message<>"") Begin Error DFERR_OPERATOR vtRetornoConsultaCNPJ.message Procedure_Return End Showln vtRetornoConsultaCNPJ.nome Showln vtRetornoConsultaCNPJ.municipio //Exibir atividade principal For iAux from 0 to ((SizeOfArray(vtRetornoConsultaCNPJ.vtAtividadePrincipal))-1) Showln vtRetornoConsultaCNPJ.vtAtividadePrincipal[iAux].text Loop //Exibir atividade secund ria For iAux from 0 to ((SizeOfArray(vtRetornoConsultaCNPJ.vtAtividadeSecundaria))-1) Showln vtRetornoConsultaCNPJ.vtAtividadeSecundaria[iAux].text Loop //Exibir QSA For iAux from 0 to ((SizeOfArray(vtRetornoConsultaCNPJ.vtQSA))-1) Showln vtRetornoConsultaCNPJ.vtQSA[iAux].nome Loop End_Procedure End_Object Cd_End_Object