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

  • SEARCH
  • Home
  • 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 8929435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:40:17+00:00 2026-06-15T08:40:17+00:00

I have a form and a panel within the form and this is my

  • 0

I have a form and a panel within the form and this is my code to handle the setparent which works fine.

hWnd = FindWindow("MapleStoryClass", null);
Panel_Handle();
SetParent(hWnd, PanelHandle);
SetWindowPos(hWnd, (IntPtr)SpecialWindowHandles.HWND_TOP,
    -3, -25, 800, 600, SetWindowPosFlags.SWP_NOSIZE);

The only question I have is how can I determine whether or not setparent worked via code? I understand I can visually check that setparent worked fine, but I need to input a check in my code to see if setparent worked.

  • 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-06-15T08:40:18+00:00Added an answer on June 15, 2026 at 8:40 am

    You can try using the GetParent WinApi function.

    From above Link:

    If the window is a child window, the return value is a handle to the
    parent window. If the window is a top-level window with the WS_POPUP
    style, the return value is a handle to the owner window.

    If the function fails, the return value is NULL. To get extended error
    information, call GetLastError. This function typically fails for
    one of the following reasons:

    •The window is a top-level window that is unowned or does not have the
    WS_POPUP style.
    •The owner window has WS_POPUP style.

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

Sidebar

Related Questions

I have this code that works fine when I call it from within the
I have web form with a panel which has form elements in side it.
We have a panel which displays a form with an arbitrary number of JTextFields
I have a real basic form (code below) with a bunch of back-panel PhP.
I have to embed an .exe within a panel in a .net windows form.
I have a panel containing a form (elements such as labels and textboxes within
I have a search page with a tabbed panel, with a form within each
I have Ext.tab.Panel with few items. One item is login panel of type Ext.form.Panel.From
I have a panel that may or may not be within other panels. I'm
I have a Windows form with a panel with several controls on it. The

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.