Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Common Dialog control methods

Status
Not open for further replies.

gillianm1

Programmer
Sep 8, 2000
26
0
0
IE
Does anyone know do the methods associated with a common dialog control differ depending on the version of vb being used?
I have an application created with an earlier version of VB and when I try to compile it using v5 or 6, the common dialog methods in the code aren't recognised. Examples are:

CommonDialog1.Filter
CommonDialog1.DialogTitle
CommonDialog1.ShowOpen

I'm guessing it has something to do with different versions but don't know how to get around the problem.

Thanks for any help
 
Did you add the dialog component to your project?
Go to the project menu, select components, add
Microsoft Common Dialog Control x.x _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Yes, I've added the component. My references all seem to be in order too.
I've looked into it some more and I think that the problem might be that I am using commdlg.dll instead of commdlg32.dll. Do you know where I can get a copy of commdlg32.dll? My vb setup disks seem to have disappeared.

Thanks
 
you should indeed use comdlg32. (Only one "m"). Try to
locate it by going to Project ... Components ... Browse.
look for comdlg32 and add it to your project. _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Thanks. I've found comdlg32.dll (the extra m was putting me off) but it's not visible in the References Browse file list. I can see it in Explorer as I got rid of it's hidden attribute but still can't see it in References. Quite annoying when I know it's there and still can't reference it.
 
When looking for components add comdlg32.ocx rather than comdlg32.dll _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
I had comdlg32.ocx loaded. I tried to reference comdlg32.dll (can see it now) but get a message "can't add a reference to the specified file".
If I try to register comdlg32.dll I get an error message concerning the DllRegisterServer entry point not being found and that my file may be corrupt. I've found out that if the file isn't a COM dll then I can't register it. I don't think it is a COM dll as DllRegisterServer doesn't appear in the files export table.
I think the next step might be to reinstall VB in case the file is corrupt. Otherwise I could use the Declare statement to refer to the dll instead of referencing it. The only problem is I don't know what functions to declare. It seems like problem after problem.........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top