Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. how to create new control in window application in vb.net 2.0

how to create new control in window application in vb.net 2.0

Scheduled Pinned Locked Moved Windows Forms
questioncsharphelptutorial
4 Posts 2 Posters 12 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bhushan thorat
    wrote on last edited by
    #1

    hi, i want to create table in runtime like ms word table,how can i create table? or can any one tell how to create new control which is not in toolbox i have to create new control plz help me its urgent

    B.N.Thorat 9881215484 Mumbai

    R 1 Reply Last reply
    0
    • B bhushan thorat

      hi, i want to create table in runtime like ms word table,how can i create table? or can any one tell how to create new control which is not in toolbox i have to create new control plz help me its urgent

      B.N.Thorat 9881215484 Mumbai

      R Offline
      R Offline
      Richard Blythe
      wrote on last edited by
      #2

      Unless you write some custom code to simulate a table, the closest control to use would be the DataGridView control. Creating the DataGridView behind the scense pretty difficult so I would advise you to drag one onto a windows form, set the properties and appearance like you want them then see what code Visual Studio has written behind the designer page. To add the dynamically created control to a form, reference the form then it's "Controls" property which has an "Add" method: //C# Sample this.Controls.Add(myControl,xPosition,yPosition); ' VB Sample Me.Controls.Add(myControl,xPosition,yPosition); If you are wanting a completlely new custom control, your in for a lot of graphics coding. A fairly advanced but great book on this subject is: "Pro .Net 2.0 Graphics Programming" by Eric White. Cheers! Richard

      B 1 Reply Last reply
      0
      • R Richard Blythe

        Unless you write some custom code to simulate a table, the closest control to use would be the DataGridView control. Creating the DataGridView behind the scense pretty difficult so I would advise you to drag one onto a windows form, set the properties and appearance like you want them then see what code Visual Studio has written behind the designer page. To add the dynamically created control to a form, reference the form then it's "Controls" property which has an "Add" method: //C# Sample this.Controls.Add(myControl,xPosition,yPosition); ' VB Sample Me.Controls.Add(myControl,xPosition,yPosition); If you are wanting a completlely new custom control, your in for a lot of graphics coding. A fairly advanced but great book on this subject is: "Pro .Net 2.0 Graphics Programming" by Eric White. Cheers! Richard

        B Offline
        B Offline
        bhushan thorat
        wrote on last edited by
        #3

        Thanks, but my requirement is not datagrid i have to create table just like in microsoft word table in which user can write text & with the text size of cell will increase like MS word table. can u suggest what should i do for such type of table? i will thankful to u thanks for ur reply.

        B.N.Thorat 9881215484 Mumbai

        R 1 Reply Last reply
        0
        • B bhushan thorat

          Thanks, but my requirement is not datagrid i have to create table just like in microsoft word table in which user can write text & with the text size of cell will increase like MS word table. can u suggest what should i do for such type of table? i will thankful to u thanks for ur reply.

          B.N.Thorat 9881215484 Mumbai

          R Offline
          R Offline
          Richard Blythe
          wrote on last edited by
          #4

          If you are wanting to create the control yourself you better have some nerve pills on hand. :) All of the functionality you mentioned will have to be created from scratch which will require a lot of paint and logic code. You will also need a good reference book. Check out: http//www.apress.com for a custom controls book. Good Luck! Richard

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups