代码如下:
[mw_shl_code=c,true]
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
void FullScreen(){
HWND hwnd=GetForegroundWindow();
int x=GetSystemMetrics(SM_CXSCREEN)+300,y=GetSystemMetrics(SM_CYSCREEN)+300;
char setting[30];
sprintf(setting,"mode con:cols=%d lines=%d",x,y);//设置控制台行数列数
system(setting);
SetWindowPos(hwnd, HWND_TOPMOST,0,0,x+300,y+300,NULL);//置顶
MoveWindow(hwnd,-10,-40,x+300,y+300,1);//移动
printf("\n\n");
}
int main()
{
FreeConsole();
sleep(2000);
FullScreen();
printf("\tHello world!");
getchar();
return 0;
}
[/mw_shl_code]
坑不坑爹,伤不起啊有没有{:soso_e151:}{:soso_e151:}
|