|
-
Oct 13th, 2004, 04:11 AM
#1
Thread Starter
Member
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!
-
Oct 13th, 2004, 04:17 AM
#2
VB Code:
Private Sub cmdChangeIcon_Click()
If optOrange.Value = True Then
Me.Icon = picOrangeSmiley.Picture
Else
Me.Icon = picBlueSmiley.Picture
End If
End Sub
-
Oct 13th, 2004, 06:58 AM
#3
Thread Starter
Member
thank you.
worked perfect.
thank you
Last edited by crux2002; Oct 13th, 2004 at 07:02 AM.
This forum rocks!
-
Oct 13th, 2004, 07:02 AM
#4
do u have two picturebox controls (picOrangeSmiley, picBlueSmiley) containing different images.
-
Oct 13th, 2004, 07:04 AM
#5
Thread Starter
Member
just edited my post.
it worked matey.
thank you.
the problem is that i accidentally put both pictures with same icon
lol
thank you.
-
Oct 13th, 2004, 07:13 AM
#6
ok then have this thread resolved . Edit ur first post of this thread and change its icon to green check arrow.
-
Oct 13th, 2004, 07:28 AM
#7
Thread Starter
Member
done.
thank you once again
-
Oct 14th, 2004, 05:31 PM
#8
Thread Starter
Member
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
-
Oct 14th, 2004, 05:51 PM
#9
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
-
Oct 14th, 2004, 06:09 PM
#10
Thread Starter
Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|