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 8774841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:40:10+00:00 2026-06-13T18:40:10+00:00

I want to track TopMost property changes in my custom forms which are referred

  • 0

I want to track TopMost property changes in my custom forms which are referred as (Form). I cannot use override, because TopMost isn’t abstract or virtual, I can’t use new keyword because it has no effect while implicit referring.

What is the best way to deal with such a task? We can substitute any property instead TopMost as long as base class (Form) has neither “change”-event, nor ONSomething virtual method to override, and our property isn’t marked as abstract or virtual.

Example:

I have many classes based on Form

MyForm1:Form, class MyForm2:Form, class MyForm_n:Form

Some “factory” returns instances of Form type

Form f = GetMyForm();

And finally i do

f.TopMost = !f.TopMost;

The deal is that I can’t really use any other return type for Form GetMyForm(). I can’t use interface or other base class except actual Form one (in fact, there is no factory, I use .ParentForm property of some control).

What is the best way to acheive task and keep my code as clean as possible? Thanks in advance.

  • 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-13T18:40:11+00:00Added an answer on June 13, 2026 at 6:40 pm

    It sounds like you might want to introduce a new abstract class between your concrete classes and Form. That could have an ObservedTopMost property or something like that, which delegates to TopMost but also raises an event.

    It’s important to note that that this will only be useful when the new property is used; it won’t magically spot changes to the existing property from elsewhere. It might be good enough for your purposes though.

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

Sidebar

Related Questions

I want to track a list of root objects which are not contained by
I want to track which character is deleted by the user through Delete or
I am creating one desktop application in which I want to track user activity
I have a form, I want to track if its dirty, if it is,
I want to track my GPS device using gprs connection, which should give details
I want to track users clicking links to external sites. I'm happy to use
I want to track changes for files inside a directory, and notify web services
I want to track the changes made to every column in a particular table.
I want to track new activity start , I use this code to only
I want to track a laser light dot(which is on a wall) with a

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.