- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
ProclaimDragon
Sorry, forgot to say in the topic title that this is C#.
Let me explain what I want to do...
We all know that with Windows Vista brought a new UI font, Segoe UI, but XP still uses Tahoma as UI font. This doesn't help us programmers. I've searched in Google and what I found was to use SystemFonts.MessageBoxFont as the Form's font because all other controls Font properties will inherit from it.
Now, I could do this.font = SystemFonts.MessageBoxFont; before InitializeComponent(); on every single form I use but that will have 2 problems:
1) I'll have to repeat this line for every form.
2) The designer will not be updated accordingly.
If I moved this.font = SystemFonts.MessageBoxFont; into InitializeComponent() itself, then, the designer would be updated but I still would need to do it manually for every form.
My first solution:
Create a class (MyForm, for instance) that inherits from Form and change the properties I need in it's constructor. Then, every form I use in my application must be inherited from MyForm instead of Form. This is simpler than to place the line above in every InitializeComponent(), although, I still have to manually change every from to inherit from MyForm instead of Form.
To sum this up... I'm looking for a way (if possible) to change some default properties of Form without creating a new class that inherits from it, which allows me to make all the needed properties changes in one place and all my forms will still inherit from Form (as they are by default).
Is this possible?
Edited by NazgulledLink to comment
https://www.neowin.net/forum/topic/638927-c-is-it-possible-to-override-the-form-class/Share on other sites
15 answers to this question
Recommended Posts