what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
Go Back  Xtreme Visual Basic Talk > > > what are the functions for disable the resize and put the window in center of screen?


Reply
 
Thread Tools Display Modes
  #21  
Old 03-10-2013, 02:14 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,293
Default


Quote:
Originally Posted by PlausiblyDamp View Post
Those errors look like it is trying to assign the result of the division to a function that returns an int rather than to a variable of type int.

Do you have the names ConsolePosX and ConsolePosY used anywhere else in your code?
only the Console word. are you tell me that Console idn't compatible with ConsolePosX?
Reply With Quote
  #22  
Old 03-11-2013, 03:31 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,293
Default

Quote:
Originally Posted by PlausiblyDamp View Post
Those errors look like it is trying to assign the result of the division to a function that returns an int rather than to a variable of type int.

Do you have the names ConsolePosX and ConsolePosY used anywhere else in your code?
finally i did the right code:
Code:
int SetWindow(HWND hwnwindow,int PosX, int PosY, int Width, int Height, BOOL Center)
{
	//P = 7 * C + 5		
	if (Center==FALSE)
	{
		SetWindowPos(hwnwindow,HWND_NOTOPMOST,PosX,PosY,0,0,SWP_NOOWNERZORDER);
	}
	else
	{
		//resize the window
		HWND   hwndScreen;
		RECT   rectScreen;
		int    ConsolePosX;
		int    ConsolePosY;	
	
		hwndScreen=GetDesktopWindow ();
		GetWindowRect(hwndScreen,&rectScreen); 
		ConsolePosX = (rectScreen.right/2 - Width/2);
		ConsolePosY = (rectScreen.bottom/2 - Height/2);
		SetWindowPos(hwnwindow,HWND_NOTOPMOST,ConsolePosX,ConsolePosY,0,0,SWP_NOOWNERZORDER);
	}
	Width=(Width-5)/7;
	Height=(Height-5)/7;
	char command[255];
	sprintf(command,"mode CON: cols=%d lines=%d",Width,Height);
	system(command);
	return 0;
}
the code works without any errors, but the system() use charaters
scalemode instead pixel. can anyone tell me how convert it?
i use these:
Width=(Width-5)/7;
Height=(Height-5)/7;
but i don't if is correct.. i did it from: P = 7 * C + 5
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen? what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
 
what are the functions for disable the resize and put the window in center of screen?
what are the functions for disable the resize and put the window in center of screen?
 
-->