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. C#
  4. Limitations of windows forms

Limitations of windows forms

Scheduled Pinned Locked Moved C#
winformshelp
3 Posts 3 Posters 0 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.
  • Q Offline
    Q Offline
    QuinsUK
    wrote on last edited by
    #1

    I am writing a mobile device program for my university coursework but I am coming up against a few problems or limitations, I am not sure which, the two problems which I am finding is that I do not have some functionality which I normally have when writing for normal windows forms. The two problems I have is when I try and assign an Enum to a combo box, Private Enum X //Set of enums End Enum ComboBox1.DataSource = Enum.GetValues(GetType(x)) I am finding that I am not able to uses the "GetValues" or "GetTypes" of the enum functionality, which means that I can’t populate the combo box correctly. This is also found when the ImageConverter function which exists for normal windows form but doesn't exists when writing for the mobile framework. Any help would be greatly appreciated.

    T K 2 Replies Last reply
    0
    • Q QuinsUK

      I am writing a mobile device program for my university coursework but I am coming up against a few problems or limitations, I am not sure which, the two problems which I am finding is that I do not have some functionality which I normally have when writing for normal windows forms. The two problems I have is when I try and assign an Enum to a combo box, Private Enum X //Set of enums End Enum ComboBox1.DataSource = Enum.GetValues(GetType(x)) I am finding that I am not able to uses the "GetValues" or "GetTypes" of the enum functionality, which means that I can’t populate the combo box correctly. This is also found when the ImageConverter function which exists for normal windows form but doesn't exists when writing for the mobile framework. Any help would be greatly appreciated.

      T Offline
      T Offline
      TheFoZ
      wrote on last edited by
      #2

      It is annoying but that is the limitations of the compact framework - Missing properties and methods so you have to be more creative! How about using a list as the source or failing that a generic routine to populate a combo box. Try posting in the Mobile forum. They may have more for you. Regards

      The FoZ

      1 Reply Last reply
      0
      • Q QuinsUK

        I am writing a mobile device program for my university coursework but I am coming up against a few problems or limitations, I am not sure which, the two problems which I am finding is that I do not have some functionality which I normally have when writing for normal windows forms. The two problems I have is when I try and assign an Enum to a combo box, Private Enum X //Set of enums End Enum ComboBox1.DataSource = Enum.GetValues(GetType(x)) I am finding that I am not able to uses the "GetValues" or "GetTypes" of the enum functionality, which means that I can’t populate the combo box correctly. This is also found when the ImageConverter function which exists for normal windows form but doesn't exists when writing for the mobile framework. Any help would be greatly appreciated.

        K Offline
        K Offline
        kevinnicol
        wrote on last edited by
        #3

        I've been able to do it by using AddRange

        Array arr = System.Enum.GetValues(typeof(MyEnum));
        object[] oArr = new object[arr.length];
        arr.CopyTo(oArr, 0);
        combobox1.Items.AddRange(arr);

        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