Results 1 to 10 of 10

Thread: Change form icon [RESOLVED]

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43

    Resolved Change form icon [RESOLVED]

    hi mates.

    i want to know if it is possible to change icons of a form. for example,
    i have a orange smiley icon and a blue smiley icon.

    depending on a option selected on the form, i want to switch betwenn the icons.

    il be waiting for your replies.

    BR, Crux
    Last edited by crux2002; Oct 14th, 2004 at 06:10 PM.
    This forum rocks!

  2. #2
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    VB Code:
    1. Private Sub cmdChangeIcon_Click()
    2.     If optOrange.Value = True Then
    3.         Me.Icon = picOrangeSmiley.Picture
    4.     Else
    5.         Me.Icon = picBlueSmiley.Picture
    6.     End If
    7. End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43
    thank you.

    worked perfect.

    thank you
    Last edited by crux2002; Oct 13th, 2004 at 07:02 AM.
    This forum rocks!

  4. #4
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    do u have two picturebox controls (picOrangeSmiley, picBlueSmiley) containing different images.

  5. #5

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43
    just edited my post.

    it worked matey.

    thank you.

    the problem is that i accidentally put both pictures with same icon

    lol

    thank you.
    This forum rocks!

  6. #6
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    ok then have this thread resolved . Edit ur first post of this thread and change its icon to green check arrow.

  7. #7

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43
    done.

    thank you once again
    This forum rocks!

  8. #8

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43
    one more thing matey:

    how do i share vars and funtions between forms

    example: i have a form1 with a function 'Unload'

    how do i call the same function from Form2?

    it always says 'Sub or Function not defined'

    same applies to varables.

    i saves a variable in form1 and i cant check that same variable in form2

    thanks in advance mate
    This forum rocks!

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    I don't know if you can use Unload, but you can refer to functions and variable by preceding them with the name of the form that its in, ie. form2.function() or form1.form2value

  10. #10

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    43
    thank you, but didnt work

    i try:
    Form1.Calculate ( )

    and didnt work.

    name of the form is Form1
    name of the function in Form1 is Calculate
    i want to call same function, but without having it in a module.

    EDIT: WORKED!
    need to use

    Form1.Calculate

    but function Calculate needs to be Public. not private.

    thank you!
    This forum rocks!

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