You can move a window at any place. All you have to do get the handle of that window which you want to move. There are two API functions that can be used to move a window.
To get the handle of the window.
[DllImport("user32.dll")]
public static extern int FindWindow(string lpClassName, string lpWindowName);
There are two parameter
lpClassName :- Name of the process.
lpWindowName :- Title of the Window
In case of a blank notepad window which has a title Untitle parameres
For example for a new unsaved notepad window
lpClassName :- Notepad
lpWindowName :- Untitle
To move the the window.
[DllImport("User32.dll", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
private static extern bool MoveWindow(IntPtr hWnd, int xPos, int yPos, int Width, int Height, bool repaint);
Parameters Detail.
hWnd :- Handle of the window
xPos :- xPosition where you have to move
yPos :- yPosition where you have to move
Width :- Width of the Window
Height :- Height of the window
repaint :- Do you want to repaint the window.
Friday, February 4, 2011
Subscribe to:
Post Comments (Atom)
Followers
Link
Labels
Agille
(3)
Angular 2
(96)
Architecture
(7)
ASP .Net
(30)
C#/VB .Net
(161)
Entityframework
(11)
General
(33)
Git
(2)
Hosting
(2)
HTML
(4)
Interview
(12)
Interview-Agile
(1)
Interview-Angular
(25)
Interview-ASP .Net
(3)
Interview-C#
(16)
Interview-JavaScript
(1)
Interview-MVC
(30)
Interview-SQL Server
(4)
Interview-WCF
(2)
Islam
(6)
Java Script
(37)
JQuery
(1)
MVC
(53)
NodeJS
(1)
Puzzles
(1)
React-Native
(3)
Security
(1)
Shayri
(10)
SQL Server
(41)
VC++
(5)
WCF
(21)
Web API
(27)
WPF
(21)
No comments:
Post a Comment