joyrider
asked on
How to use common dialog without placing the ocx control on the form
Hi,
i made this small function that will set the backcolor of a picturebox to the color selected in the color selector dialog of common dialogs. Now i used the common dialog control and have set it on my form, but i need to use this function in multiple forms, and i can't seem to find out how i can use commondialog without using the component , i mean without putting it on the form and using that one. So how can i do this ? (referencing)
i made this small function that will set the backcolor of a picturebox to the color selected in the color selector dialog of common dialogs. Now i used the common dialog control and have set it on my form, but i need to use this function in multiple forms, and i can't seem to find out how i can use commondialog without using the component , i mean without putting it on the form and using that one. So how can i do this ? (referencing)
ASKER
that's not what i was looking for, u would still have to use the control, but i found it myself
it's :
dim cmdialog as object
Set cmDialog = CreateObject("MSComDlg.Com monDialog" )
that's what i was looking for :)
it's :
dim cmdialog as object
Set cmDialog = CreateObject("MSComDlg.Com
that's what i was looking for :)
omg, im tired as hell, spent the past few hours posting in sql and db, lol
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
for example, if your using an mdi setup, you'd put the CommonDialog control on the mdi form so that it'd be
MDIForm1.CommonDialog1
then you'd just use it like from form1
pubic sub form1_load()
MDIForm1.CommonDialog1.sho
me.backcolor=MDIForm1.Comm
end sub