Results 1 to 13 of 13

Thread: control For Combo box Style

  1. #1

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Cool control For Combo box Style

    hiiii every body here in this Forum ,,, i want anyone help me okkk


    i want to control for style of combo box such as :

    i want to be style about combo box be :

    0- Dropdown combo
    1-simple combo
    2-Dropdown List

    can anybody know how can i cahnge this style on Runtime plz help me fast

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: control For Combo box Style

    try this
    VB Code:
    1. Combo1.Style = 2
    2.     Combo1.Style = 1
    3.     Combo1.Style = 0
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Re: control For Combo box Style

    my dear this code is wrong and incorrect plz Find me another code becaue this tell me on error message that propertiy is read only on runtime if any one know any code plz tell me again ad thank you man for your post

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: control For Combo box Style

    I am sorry, you can not do that at runtime...combo's style property can be changed only at design time.
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Re: control For Combo box Style

    not at all my dear don't worry , but i need if any body have any idea to solve this problem plz tell me for it because i need it fast thanl you my dear again for your posting

  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: control For Combo box Style

    if you tell us for what purpose you want to change the style we might give you better solution...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  7. #7

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Re: control For Combo box Style

    okkk man i will tell you :

    i have Form which contain 2 option box , and , 1 combo box
    i need when user choise first option box which name (write on combo box ) it make him to can write on combo box and can select any data on it .

    on second option i need user when he choise this option box which name (choise on combo box ) he can choise from combo box and cant write on it also select from the list on combo box 2 .... okk man

  8. #8
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: control For Combo box Style

    you can use Forms controls' combo box and can assign the style property at runtime.
    VB Code:
    1. ComboBox1.Style = fmStyleDropDownCombo
    2.     ComboBox1.Style = fmStyleDropDownList
    To add forms controls to your project click Project -> Components and select Microsoft Forms 2.0 Object Library and then add combobox to your form...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  9. #9

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Re: control For Combo box Style

    thank you very much my deaaaaaaaaar

    you solve my problem thank you again

  10. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: control For Combo box Style

    be aware that the Microsoft Forms 2.0 Object Library (FM20.dll) is not redistributable. It is installed as part of MS Office and you are not allowed to package it with your own exe. If your target users machine does not have the dll then your program will not run.

    Have a look over at MSDN for more info - there is an ActiveX something or other that can be installed by users for free that installs the dll as part of it's install.

  11. #11

    Thread Starter
    Member Max bayne's Avatar
    Join Date
    Jul 2006
    Location
    Egypt
    Posts
    59

    Re: control For Combo box Style

    you mean that if i package my programe and sent it to any user that haven't or installed Ms Offfice on his computer the programe cant Run their okkk, but why Ms Commpany Built this Library if it Run only with MS office plz are you sure for it and tried to do it for another programe or someone told you about it ...............

  12. #12
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: control For Combo box Style

    when you come to distribute your package you distribute all the ocxs & dlls etc. that are also needed - but in order to be able to legally do this you must have the rights to redistribute those files.

    You do not have the rights to distribute the FM20.dll - only M$ do (it is installed as part of MSOffice). If the user has MSOffice already installed, then no problems, your app will run fine.

    If they don't have that dll, then your program won't run.

    Here's the MSDN article: FM20.dll

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: control For Combo box Style

    You could put multiple comboboxes on the form, each with a different style, fill them all with the same data and make only one visible at a time. It's a waste of resources, but sometimes only a bigger hammer will do the job.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width