|
-
Aug 27th, 2001, 10:10 PM
#1
Thread Starter
PowerPoster
Activex Control ... button on a property
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
-
Aug 27th, 2001, 10:41 PM
#2
Registered User
I am not sure exactly what you are doing Beacon, but try a seacrch for SHBrowseForFolder.
-
Aug 27th, 2001, 10:42 PM
#3
Fanatic Member
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:
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
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.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Aug 27th, 2001, 10:45 PM
#4
Thread Starter
PowerPoster
dammit!!
How does adodc do it?
And dao?
Puzzling!!!
-
Aug 27th, 2001, 10:58 PM
#5
Thread Starter
PowerPoster
thanks anyway fellas!!
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
|