Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6102089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:34:27+00:00 2026-05-23T13:34:27+00:00

Using C#, I am looking to hook into the Windows API (I’m not sure

  • 0

Using C#, I am looking to hook into the Windows API (I’m not sure which one) to capture which windows are being sent a maximize command. I want to then override that command to tell the window what the bound of the maximized window should be.

For example, when a user maximizes Notepad on an 800×600 screen, I want to specify the size that the window actually expands to. I might tell Notepad to “maximize” to 600×600 starting at position 200,0.

For this solution, it isn’t necessary that the window actually believe it is maximized, I just want to control the window so it doesn’t maximize to the whole screen (or that it restores itself automatically to the size I want if that is the best I can do).

As I stated, I want to control external applications (Notepad, Word, etc.) not my own application. I would prefer to write this application in C#. The actions I need to perform are:

  • Capture maximize (or resize) events
  • Readjust the changed window’s size
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:34:28+00:00Added an answer on May 23, 2026 at 1:34 pm

    You’ll need to be hooking into the windows Message Loops (http://msdn.microsoft.com/en-us/library/ms632595(v=VS.85).aspx for documentation on the APIs you need). Overall, you’ll either be doing a ton of P\Invokes, or you’ll want to use C and the raw Win32 APIs.

    I’m not certain, but I believe you will want to start by using a Windows Hook: http://msdn.microsoft.com/en-us/library/ms644990(v=VS.85).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking into using Visual Studio 2008's built in unit test projects instead of
I'm looking at using a Windows SharePoint Services 3.0 wiki as a metadata repository.
I was looking into using some .NET code from within a Delphi program, I
I'm looking into using Lucene and/or Solr to provide search in an RDBMS-powered web
I want to put some sort of hook into windows (only has to work
I am looking for the right Hook on Mac OS X, Linux and Windows
I've heard it mentioned elsewhere, one cannot programmatically hook into the phone call area
I'm looking into using the Mono framework for taking my current C# application cross-platform
I'm looking at using OpenID for my authentication scheme and wanted to know what
I am looking at using a custom template for a set of categories. Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.