kapiaba Posted March 20, 2019 Report Share Posted March 20, 2019 Vagner de uma olhadinha para nosostros, please. // PROBLEMAS EM MAQUINAS MAIS NOVAS - COM WINDOWS 10 DE 64 BITS TRAVA. VMudaVideo(aResolucaoAtual[1],aResolucaoAtual[2]) // Vagner Wirts /********************************************************* * Função : Funcao em C para mudar a Resolução da Tela se Menor da Necessária para trabalhar * Data : 13/03/2013 às 12:05:26 por Vagner * Revisado em : 13/03/2013 às 12:05:35 por Vagner * Parâmetros : * iWidthNew - Largura Mínima Necessária * iHeightNew - Altura Mínima Necessária **********************************************************/ #Pragma BEGINDUMP #include <Windows.h> #include <ShellApi.h> #include <Wingdi.h> #include <hbapi.h> HB_FUNC (VMUDAVIDEO) { int iWidthNew = hb_parni(1); int iHeightNew = hb_parni(2); int iWidth,iHeight ; //Pega a Configuração Atual DEVMODE DeviceMode = { 0 }; EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &DeviceMode ); iWidth = DeviceMode.dmPelsWidth; iHeight = DeviceMode.dmPelsHeight; // if(iWidth < iWidthNew || iHeight < iHeightNew) { //Desculpem eu retirei isso pois só serve para eu, senão vcs não conseguirão retorar o monitor //Muda para a nova Configuração DeviceMode.dmPelsWidth = iWidthNew ; DeviceMode.dmPelsHeight = iHeightNew; ChangeDisplaySettings( &DeviceMode, 0 ); // } hb_reta( 2 ); hb_storni( iWidth , -1, 1 ); hb_storni( iHeight, -1, 2 ); } #pragma ENDDUMP /* Para Usar é simples : aResolucaoAtual := VMudaVideo(1024,768) Isso fará mudar para a nova configuração, lhe retornando um array, para que qndo sair do sistema retornar para a incial VMudaVideo(aResolucaoAtual[1],aResolucaoAtual[2]) Abraços, Vagner Wirts */ //----------------------------------------------------------------------------// Quote Link to comment Share on other sites More sharing options...
vagner Posted March 20, 2019 Report Share Posted March 20, 2019 João essa função é da windows, não sei se foi modificada, provavelmente por isso está travando, melhor você atualizar o seu sistema do que tentar modificar isso pelo sistema, o windows 10 é muito chato em relação as coisas. Abraços, Vagner Wirts kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 20, 2019 Author Report Share Posted March 20, 2019 Ok, tendi. Many thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.