Fórum Alterar resolução de video ao execultar aplicação #234458
26/05/2004
0
Gostaria de saber como proceder para que quando meu programa fosse rodado a resolução de video do micro alterasse para 800x600 e ao fechar retornasse ao que estava
Abraços Luis Neto
Luis Neto
Curtir tópico
+ 0Posts
26/05/2004
Rômulo Barros
[url]http://delphiforum.icft.com.br/forum/viewtopic.php?t=43782&highlight=width[/url]
[url]http://delphiforum.icft.com.br/forum/viewtopic.php?t=38968&highlight=width[/url]
[url]http://delphiforum.icft.com.br/forum/viewtopic.php?t=25814&highlight=width[/url]
Virão como é fácil !!!!
Dá uma olhadinha nos links... se naum resolver... avisa ae... e Flws :twisted:
Gostei + 0
26/05/2004
Cebikyn
http://www.swissdelphicenter.ch/en/showcode.php?id=158
Vir[i:231d97a45f]am[/i:231d97a45f] como não é tão fácil? :roll:
Gostei + 0
26/05/2004
Rômulo Barros
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
ScreenWidth: LongInt ;
ScreenHeight: LongInt ;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
scaled := true;
ScreenWidth := 800;
ScreenHeight := 600;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) DIV ScreenHeight;
width := longint(width) * longint(screen.width) DIV ScreenWidth;
scaleby(screen.width, ScreenWidth);
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
scaled := true;
ScreenWidth := 1024;
ScreenHeight := 768;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) DIV ScreenHeight;
width := longint(width) * longint(screen.width) DIV ScreenWidth;
scaleby(screen.width, ScreenWidth);
end;
End;
end.[size=18:7556411cb4][color=red:7556411cb4]Viu[/color:7556411cb4][/size:7556411cb4] como é fácil ? :roll:
Gostei + 0
26/05/2004
Cebikyn
[*:b23a655df4]Alterar a resolução não é simplesmente usar o método ScaleBy do form, pois tal método [b:b23a655df4]ajusta[/b:b23a655df4] o form à resolução atual
[*:b23a655df4]Sim, está correta sua correção de ´viram´ para ´viu´, mas eu utilizei esta forma para ironizar o seu ´virão´, que simplesmente não existe.[/list:u:b23a655df4]
Gostei + 0
26/05/2004
Rômulo Barros
Ok :roll:
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)