switch object types at run time

In the designer generated code i want to change 10 controls from inkedits to rich text boxes based on a flag...how do i do this so that my changes dont get overwritten when i use the editor on the form

Thanks,

Dan



Answer this question

switch object types at run time

  • Barak Ori

    Hi droden,

    This is very curious issue. I will go develop some code for you in free time.

    Good Coding!

    Javier Luna
    http://guydotnetxmlwebservices.blogspot.com/



  • Mongsreturn

    pseudo code:

    For each C as control in me.controls

    If typeof C is inkedits and Flag=True then

    CreateRTbx(DirectCast(c,inkedit))

    end if

    Private sub CreateRTbx(byval IE as inkedit)

    Dim RTbx as New RichTextBox

    RTbx.Location = IE.Location

    RTbx.Blah = IE.Blah

    ........

    me.controls.add(RTbx)

    IE.Visible = False

    end sub



  • switch object types at run time