Hi all,
On a activex control in a property how do i get the button with ... on it that lets you select a path or file!
I need it to set a path to a directory??? not a file just a directory?
ANyone??
thanks
beacon
Printable View
Hi all,
On a activex control in a property how do i get the button with ... on it that lets you select a path or file!
I need it to set a path to a directory??? not a file just a directory?
ANyone??
thanks
beacon
I am not sure exactly what you are doing Beacon, but try a seacrch for SHBrowseForFolder.
That button appears when you have a special type of property. As far as I know, it only appears for font and picture ones because they have special property pages and ways to allow you to choose something. For just selecting a file/path I don't think you can actually make them come up like that. If you want the buttons to appear for properties like that, you need to use something like this:
Even though it looks weird because the properties have the same name as the objects involved, this is what lets the special buttons appear in the property window. When you use these types, you can get the premade windows property pages to appear inside the (Custom) part of the property list as well if you add any property pages to the control using the wizard. They're the Standard Font/Picture/Color ones.VB Code:
Public Property Get Font() As Font Set Font = UserControl.Font End Property Public Property Set Font(ByVal NewFont As Font) Set UserControl.Font = NewFont End Property Public Property Get Picture() As Picture Set Picture = UserControl.Picture End Property Public Property Set Picture(ByVal NewPicture As Picture) Set UserControl.Picture = NewPicture End Property 'this one doesn't have anything to do with the ... button, but it's how you get the color palette to appear for your control in the prop window Public Property Get Color() As OLE_COLOR Color = UserControl.BackColor End Property Public Property Let Color(ByVal NewColor As OLE_COLOR) UserControl.BackColor = NewColor End Property
dammit!!
How does adodc do it?
And dao?
Puzzling!!!
thanks anyway fellas!!:)