Select A dir
|
|
Thread rating:  |
JR - 26 Jul 2004 19:00 GMT Hi,
I neeed to select a directory in my program. How can i do that. I work with a commondialog and I use for a filename
.ExportFile.ShowOpen or .ExportFile.ShowSave
What can I do for selecting a Folder
Jan
Rick Rothstein - 26 Jul 2004 19:09 GMT > I neeed to select a directory in my program. How can i do that. > I work with a commondialog and I use for a filename [quoted text clipped - 4 lines] > > What can I do for selecting a Folder I think this link will show you what you want to do...
http://vbnet.mvps.org/code/browse/browsefolders.htm
Rick - MVP
JR - 27 Jul 2004 21:32 GMT thanks
> > I neeed to select a directory in my program. How can i do that. > > I work with a commondialog and I use for a filename [quoted text clipped - 10 lines] > > Rick - MVP Lindsay - 27 Jul 2004 23:44 GMT Try this:
www.microcreate.co.uk/vb6sourcecode.htm
...and browse to the bottom of the page to: Folder & File toys.
Steve Gerrard - 28 Jul 2004 03:00 GMT | Try this: | | www.microcreate.co.uk/vb6sourcecode.htm | | ...and browse to the bottom of the page to: Folder & File toys. Is some of that your stuff? Just curious...
Lindsay - 28 Jul 2004 10:36 GMT Some of it, yeah. Some is from the API Guide software.
Lindsay - 28 Jul 2004 10:37 GMT I just realised. Are you talking about the ActiveX controls? If so, it is all mine.
J French - 28 Jul 2004 12:04 GMT >I just realised. Are you talking about the ActiveX controls? If so, it is >all mine. My, you have been busy - IIRC in Jan 2004 you were new to Usercontrols
Good to see a convert - they are wonderful things - one of the best things about VB5/6
However I am not keen on OCXing them as I detest OCXes - I can see why you do it
Good Luck
Steve Gerrard - 29 Jul 2004 03:37 GMT | I just realised. Are you talking about the ActiveX controls? If so, it is | all mine. I thought they might be. I agree with J. French, it is nice to see someone get somewhere after asking a parade of questions :)
I am particularly interested in the menu extensions, I may have some comments on that once I check it out.
I too am a little wary of more OCXs. Isn't it possible to put several controls into a single OCX file? That would cut down on the possible setup issues.
J French - 29 Jul 2004 07:46 GMT >| I just realised. Are you talking about the ActiveX controls? If so, it >is [quoted text clipped - 9 lines] >controls into a single OCX file? That would cut down on the possible >setup issues. I just include all UserControls in my project, and do not bother to OCX them
There is a nasty wrinkle if you have one UserControl within another, but so far that is the only downside I have found.
Lindsay - 29 Jul 2004 08:28 GMT Thanks for your comments guys. Much appreciated. :-)
2 reasons for OCXing: 1: Protects my code, 2: Gives end users something to download before (hopefully) they decide to part with some money for the code itself.
And, I would have no problem combining any combinations of these controls in OCX form (free of charge) if anyone wanted that. I will eventually make it a little clearer on my website what my intensions are. I don't use OCX files in my projects either (unless it's some-kind of experiment). I can see why people would want the code.
I spend a lot of time programming VB6, and if someone can help me find a way to do something, I tend to get straight on with making something, no matter how trivial. I have a regular job (to pay the rent), but outside that, I try to put as many ideas into working code as quick as possible.
Could you explain to me the problem with UserControls embedded in another, please? It sounds interesting. I had actually thought of doing it with one particular control I want to develop.
J French - 29 Jul 2004 12:14 GMT <snip>
>Could you explain to me the problem with UserControls embedded in another, >please? It sounds interesting. I had actually thought of doing it with one >particular control I want to develop. Don, Lindsay,
This is the problem Here is part of a UserControl :-
VERSION 5.00 Begin VB.UserControl ucSelect ClientHeight = 4575 ClientLeft = 0 ClientTop = 0 ClientWidth = 8040 FillStyle = 0 'Solid FontTransparent = 0 'False ForwardFocus = -1 'True KeyPreview = -1 'True ScaleHeight = 4575 ScaleWidth = 8040 Begin HSWin.efField efField1 <----- Height = 285 Index = 0 Left = 2040 TabIndex = 4 Top = 3180 Width = 645 _ExtentX = 1138 _ExtentY = 503 HSWin.efField efField1
HSWin is the Internal Project name of the EXE - as set in Project/Properties - first tab below Project Type
efField is the name of another UserControl
If I add this UserControl to another VB Project with the Internal Project name 'Fred' then the data within this UserControl gets /changed/ from : HSWin.efField efField1 to : Fred.efField efField1
When I open up my first App in the IDE it finds a reference to 'Fred' and starts converting my UserControls into blasted PictureBoxs
This is, of course, idiotic design, the UserControl should know NOTHING about the Internal Project name of its parent App
Note: this is the case for VB5 I very much doubt that it was altered for VB6
As far as I can see the Internal Project name is only used for the AX name of DLLs and AX EXEs
My workaround is to try to avoid having nested UserControls, and if I do have them, then give all the EXEs the same Internal Project name.
Of course this does not matter if you do not nest UserControls, but it is still utterly stupid.
Don@home.com - 29 Jul 2004 13:06 GMT ><snip> > [quoted text clipped - 6 lines] >This is the problem >Here is part of a UserControl :- <snip> Thanks JFrench I think I still have the prototype UserControl(s) and I'll have to check this one out... Maybe all is not lost after all... LOL
Have a good day...
Don
J French - 29 Jul 2004 14:07 GMT >><snip> >> [quoted text clipped - 11 lines] >one out... >Maybe all is not lost after all... LOL Don, do you have the same idiocy going on in VB6 ?
Steve Gerrard - 29 Jul 2004 15:56 GMT | <snip> | [quoted text clipped - 22 lines] | When I open up my first App in the IDE it finds a reference to 'Fred' | and starts converting my UserControls into blasted PictureBoxs I was wondering what the problem was, and was going to say, "hey, I have a project with nested User Controls and don't have a problem." But I don't use the nested controls in more than one project. And now I have a good reason not to.
I guess I think of "non-OCX" user controls as project-specific, not for general use. I still like the old fashioned method of reusing code - copy and paste. So a new project starts with its own forms, modules, classes, and user controls, and then I paste in all the good stuff from other projects.
Lindsay - 29 Jul 2004 17:00 GMT So I guess then, if I use multiple copies of a user control (one for each project), there would be no problem. The problems only exists if I use shared controls?
J French - 29 Jul 2004 17:37 GMT <snip>
>I was wondering what the problem was, and was going to say, "hey, I have >a project with nested User Controls and don't have a problem." But I [quoted text clipped - 6 lines] >classes, and user controls, and then I paste in all the good stuff from >other projects. I come from a different school of thought
It is called the 'Library Approach'
Whenever I write a routine that looks Generic, it goes into a library area. It then gets re-used in other Apps (obviously with care, and if one is going to seriously 'enhance' it a local copy is used)
However the objective is to have /exactly/ the same code working in as many EXEs as possible, problems show up, ... fine, but once a bit of code gets 'Universal' status, it is regarded as an extension to the language.
Basically it is building a toolbox of re-useable 'resources', so that each project 'leaches' of the last one, and enhancements from Project2 eventually (when trusted) turn up in Project1
It is an approach that I learnt a long time ago, and one I am not going to sacrifice on the 'Altar of MS Knowledge', because, as I keep saying more and more often, they have no idea of Application Development.
Steve Gerrard - 30 Jul 2004 03:25 GMT | I come from a different school of thought | [quoted text clipped - 6 lines] | |etc. I was overstating a bit, I do have a few modules and classes that are reused extensively as is. But I find that the file level is often not the level at which I want to share code. Certain procedures, yes, but whole files, less often.
Also, I have found that trying to write a procedure to cover all possible variations and flavors often gets too cumbersome. I would rather have a clean simple version of QuickSort, for instance, i.e. Randy Birch's version, and adapt it to the required use, than to have a "universal" version that supposedly works for everything.
To each his own.
J French - 30 Jul 2004 13:15 GMT >| I come from a different school of thought >| [quoted text clipped - 11 lines] >the level at which I want to share code. Certain procedures, yes, but >whole files, less often. Interesting, back in the DOS days one just used LIBs to store all the OBJ files, and the linker would fish out only what it required. I am aware that this still exists, but sadly not in the languages I use
However VB is supposedly pretty good at discarding unused routines /within/ modules
Consequently I just include my main 'language extension' file which contains pure general purpose utilities, then start adding in the generic Classes and UserControls that do what I need.
>Also, I have found that trying to write a procedure to cover all >possible variations and flavors often gets too cumbersome. I would >rather have a clean simple version of QuickSort, for instance, i.e. >Randy Birch's version, and adapt it to the required use, than to have a >"universal" version that supposedly works for everything. There is a trade off point, I am not sure that sorting is one of them, but generally I try to make a 'routine' grow to cover all cases - actually slightly untrue, as I'll front routines to re-use existing code - rather than use the dreaded optional parameters
When it comes to Classes and UserControls, those beasts are pretty adaptable - sometimes they split into two generics, mut mostly (subject to internal complexity) I prefer to re-use code
>To each his own. Absolutely, I prefer pragmatic 'Jackson Structuring' - I detest having identical modules in different directories, unless they are in 'development quarantine'
Don@home.com - 29 Jul 2004 09:31 GMT >>| I just realised. Are you talking about the ActiveX controls? If so, it >>is [quoted text clipped - 15 lines] >There is a nasty wrinkle if you have one UserControl within another, >but so far that is the only downside I have found. JFrench... If you are commenting about 'Not getting them to load WITHOUT Error' after something, somewhere, someway, etc... , etc... Breaks I'd love to hear how to get it FIX'D!!!!
Have a good day...
Don
Don@home.com - 29 Jul 2004 09:34 GMT >>>| I just realised. Are you talking about the ActiveX controls? If so, it >>>is [quoted text clipped - 17 lines] > >JFrench... If you are commenting about 'Not getting them to load WITHOUT Error' Wow!!! Did I say that??? LOL It should have read 'Getting them to load into the IDE WITHOUT ERRORS'
>after something, somewhere, someway, etc... , etc... Breaks I'd love to hear how >to get it FIX'D!!!! > >Have a good day... > >Don Have a good day...
Don
CajunCoiler (http://www.cajuncoiler.tk) - 30 Jul 2004 21:11 GMT Jan, I have an ActiveX control for this exact purpose. It's simple to use, as well as free. Write me if you want me to e-mail you a copy. --- C.L. Mayeux Owner, MSB Data Systems o w n e r at m s b d a t a s y s t e m s dot c o m
> Hi, > [quoted text clipped - 8 lines] > > Jan
|
|
|