CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    Jan 2007
    Posts
    33

    invalid property value

    i want to add a icon in the form title bar. i add by using the form property -icon. it came out an error "invalid property value". Why and how to solve this problem.

    i have attach the file (icon which i want to add).
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2006
    Location
    Pune, India.
    Posts
    579

    Wink Re: invalid property value

    I haven't seen you zip file but I hope you used SET keyword before setting the icon.

  3. #3
    Join Date
    Jan 2007
    Posts
    33

    Question Re: invalid property value

    Quote Originally Posted by Shaikh.Riyaz.a
    I haven't seen you zip file but I hope you used SET keyword before setting the icon.
    how to use "SET keyword"?????

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: invalid property value

    Do you want to change the form icon? Just set the form icon in the IDE before you run the program. The program will use the startup form's icon as it's own. You can check the program properties to change the startup form, or use Sub Main instead.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Apr 2009
    Posts
    2

    Wink Re: invalid property value

    Icon file creator/editor here:

    http://www.freevbcode.com/ShowCode.Asp?ID=3367

    and life is good.

  6. #6
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: invalid property value

    Quote Originally Posted by junlo View Post
    i want to add a icon in the form title bar. i add by using the form property -icon. it came out an error "invalid property value". Why and how to solve this problem.

    i have attach the file (icon which i want to add).
    When I extracted your icon my Icon reader told me invalid file. This is not a valid icon.
    So simple the question is who has created this icon and what program was used for it. Microangelo cannot read it, so it is also not possible to use it as your icon in VB
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  7. #7
    Join Date
    Apr 2003
    Posts
    1,755

    Re: invalid property value

    Based on the header, the file is actually a BMP file. They only changed the extension to .ICO

  8. #8
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: invalid property value

    Quote Originally Posted by rxbagain View Post
    Based on the header, the file is actually a BMP file. They only changed the extension to .ICO
    That is right. Someone has only changed the extension thinking that this changes the format Thisway the file was only corrupted
    OK I repaired it and used my tools to creat a small icon with the given material.
    A bigger picture like 256x256 would have given much better results
    Attached Files Attached Files
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  9. #9
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: invalid property value

    2 year old thread

  10. #10
    Join Date
    Apr 2009
    Location
    kuala lumpur
    Posts
    7

    Re: invalid property value

    i try to run my code it is work but suddenly an error came out saying: Run-time error '380' Invalid property value.

    i use progress bar together with timer control to show next frame after user press certain button

    the code as follows:

    Private Sub Timer1_Timer()
    ProgressBar1.Value = ProgressBar1.Value + 2 ' here appear the error "invalid property value"
    If ProgressBar1.Value = 100 Then
    If Timer1.Interval >= 1 Then
    fra8.Visible = False
    fra5.Visible = True


    End If
    End If
    End Sub

    Really hope someone can help me to fix this.....

  11. #11
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: invalid property value

    In a TWO YEAR OLD THREAD about Re: invalid property value of ICONS?

    Doubtful, even for a Monday morning. Start a NEW thread with a meaningful title...

    ps: use code tags so we can read your code
    Code:
    ' Like this!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  12. #12
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: invalid property value

    The whole thing about this tread seems strange. how comes this up to the top page in CG, where I'm normally reading posts. ?

    To your problem
    simple before adding 2 to your ProgressBar1.Value Property test if this will not exceed 100 in total
    so do
    Code:
     
    Private Sub Timer1_Timer()
    If ProgressBar1.Value <=98 Then
        ProgressBar1.Value = ProgressBar1.Value + 2 
    else
        ' we had been at 99 so we have reached our goal ( 99+2 = 101)
        ' so we do without checking of progress =100
        If Timer1.Interval >= 1 Then
             fra8.Visible = False
             fra5.Visible = True
        end if
    end if
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  13. #13
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: invalid property value

    Also must not forget to set the max value of the progress bar => the max value you will be using and do so beforehand.

    As to why the thread popped up on top it would be because poster #5 dug it out and added a new post. Threads with most recent posts always come to the top no matter how long they had been dead.

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

Featured