TabPage.CreateGraphics throwing NotSupportedException

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

anon_at_yahoo.com
Date: 02/07/05


Date: 7 Feb 2005 11:31:36 -0800

I've searched this forum for similar issues, and it seems that one
popular answer is, 'CreateGraphics() is only valid for Forms and
Controls'. But isn't a TabPage a Control? So why won't it work?

The other popular answer seems to be 'create a custom control and
override the onPaint() method'. I'm a newbie to all this, but it seems
like if you do that, you lose a lot of the utility that the Form
Designer gives you. I have a TabControl with 3 TabPages on it, each
with several 'normal' controls like Labels. The FormsDesigner does all
the nice generated code for that, and it seems like if I have to create
a custom control, I'm going to lose all that generated code.

Yes I know it's already been generated and I can just copy/paste it,
but if I want to change anything via Forms Designer, I now have to
manually do all that.

Is there some compromise between the Designer and customizing controls?



Relevant Pages

  • Re: sorry to repost....last try: CCRP Treeview question
    ... 'Less popular' in the sense that we're not so in-your-face with the ... controls anymore ... ... Please respond only to the newsgroups so all can benefit. ... trouble with distributing the MS common controls but still causing ...
    (microsoft.public.vb.general.discussion)
  • Re: Security in my Cyber Cafe
    ... I am sorry Lucas - I don't know - seemed a good start to see what is most ... popular on the download site. ... that controls some of the things that CyberCafe controls, ... >How can I protect my files but still alow it access? ...
    (microsoft.public.windowsxp.security_admin)
  • Re: UnCommon Web intro video
    ... Only if the 'divine' controls the appropriate tools. ... despite the free software shortcomings of the more popular ...
    (comp.lang.lisp)
  • Re: Inserting Template Fields
    ... click on the Word Options item and then the Popular category, ... Controls section of the Ribbon. ...
    (microsoft.public.word.newusers)
  • Re: Create TabPages at runtime (with controls)
    ... > contains several controls. ... > If I do TabControl.TabPages.Add(MyTabPage), ... Or, derive your own class from the Tabpage class, but you won't be able to ... use a designer to design it. ...
    (microsoft.public.dotnet.languages.vb)