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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Max Windows Controls

Max Windows Controls

Scheduled Pinned Locked Moved C#
helpquestion
5 Posts 2 Posters 2 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.
  • D Offline
    D Offline
    Dylan van Heerden
    wrote on last edited by
    #1

    Hi all I was wondering if there's any limit to the windows controls? I recieve the following error "Error creating window handle." while trying to databind a treeview to textbox. Thanks ppl

    H 1 Reply Last reply
    0
    • D Dylan van Heerden

      Hi all I was wondering if there's any limit to the windows controls? I recieve the following error "Error creating window handle." while trying to databind a treeview to textbox. Thanks ppl

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Yes there is a limit to the number of handles in Windows and Windows NT, the former being much lower but still impractical to ever reach. This is most likely not your problem. The problem is, most likely, that a TextBox is not a container control. The use of "databind" is also not possible in this context, since neither represents data. Please post relevent code so that we can help you diagnose the problem you're having, since the discription you've given doesn't have nearly enough information to form any decent diagnosis. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

      D 1 Reply Last reply
      0
      • H Heath Stewart

        Yes there is a limit to the number of handles in Windows and Windows NT, the former being much lower but still impractical to ever reach. This is most likely not your problem. The problem is, most likely, that a TextBox is not a container control. The use of "databind" is also not possible in this context, since neither represents data. Please post relevent code so that we can help you diagnose the problem you're having, since the discription you've given doesn't have nearly enough information to form any decent diagnosis. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

        D Offline
        D Offline
        Dylan van Heerden
        wrote on last edited by
        #3

        Ok here's the code where it happens This works fine "this.textBox_ClsId.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsIdentifier.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsDescription.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsVersion.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" This is the only line giving me the error "//this.textBox_ClsExtends.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" This is also working fine "this.checkBox_ClsAbstract.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.checkBox_ClsNew.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.checkBox_ClsSealed.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" thanks

        H 1 Reply Last reply
        0
        • D Dylan van Heerden

          Ok here's the code where it happens This works fine "this.textBox_ClsId.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsIdentifier.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsDescription.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.textBox_ClsVersion.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" This is the only line giving me the error "//this.textBox_ClsExtends.DataBindings.Add(new Binding("Text", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" This is also working fine "this.checkBox_ClsAbstract.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.checkBox_ClsNew.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember")); this.checkBox_ClsSealed.DataBindings.Add(new Binding("Checked", ((DataSource)this.treeView_WorkView.SelectedNode.Tag), "Datamember"));" thanks

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          What's a DataSource, and what's the "Datamember"? Please don't post pseudo-code since it typically doesn't show the error. If DataSource is actually a class you created then please explain it, otherwise please use the actual class. For "Datamember" it's not so much important, but specifying such information should not be any sort of breach. If someone wanted to see your code, they'd just have to disassemble or decompile it with a slew of tools already available, including ildasm.exe that ships with the .NET Framework SDK. If DataSource is a class besides a DataSet, DataTable, DataView, or DataViewManager derivative, then you're using property bindings. What type is the property that is returned from whatever "Datamember" represents in that line? If it is a data or data-derived class from those listed above, what type of data does the column represented by "Datamember" in that line represent, and is it returning DBNull (or null, if a strongly typed DataSet)? This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

          D 1 Reply Last reply
          0
          • H Heath Stewart

            What's a DataSource, and what's the "Datamember"? Please don't post pseudo-code since it typically doesn't show the error. If DataSource is actually a class you created then please explain it, otherwise please use the actual class. For "Datamember" it's not so much important, but specifying such information should not be any sort of breach. If someone wanted to see your code, they'd just have to disassemble or decompile it with a slew of tools already available, including ildasm.exe that ships with the .NET Framework SDK. If DataSource is a class besides a DataSet, DataTable, DataView, or DataViewManager derivative, then you're using property bindings. What type is the property that is returned from whatever "Datamember" represents in that line? If it is a data or data-derived class from those listed above, what type of data does the column represented by "Datamember" in that line represent, and is it returning DBNull (or null, if a strongly typed DataSet)? This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

            D Offline
            D Offline
            Dylan van Heerden
            wrote on last edited by
            #5

            I apologize for not providing the correct information. The datasource is a class and the class name is "Class" and the datamember is "Extends". I found out that the datamember "Extends" was not assigned. Again I apologize but I'd like to say thank you for the help. Thanks

            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