Re: Shell Execute Associations...




Thank you everyone who responded!

>Howard Henry Schlunder Oct 27, 7:46 pm:
>Dat implies data, which is almost always binary (otherwise the
>programmer should have used the .txt extension to imply that it is not
>binary). In your case, the .log file extension may be appropriate.

I guess the general consensus is that a *.dat extension is a bad
idea for textual data. I must be one of those rarer examples of
people who deal with massive exported table data in comma(and many
other)
delimited formats. To me, data is data. I can see a *.bin or *.hex
extension being refused to open in a text editor, by default, but
apparently MS doesn't see it that way with *.dat either.

>Frank Adam Oct 27, 8:15 pm:
>Another option is to just a hidden form of your own with an embedded
>multiline textbox. Load the dat file into the textbox with standard VB
>file commands, then pop the form up. No need to Shell anything then.
We utilize 'high-end' 3rd party text editors such as "TextPad" and
"UltraEdit32" that can handle massive text files and come with amazing
text manipulation tools. The lowly text box wouldn't compare to them.

Steve Gerrard Oct 27, 8:47 pm:
>As H.H.Schundler pointed out, using .log or .txt for your file type
>would be much safer, as well as more reliable.
This may be my last resort (easy way out!)


Frank Adam Oct 27, 8:15 pm:
> ---Frank's AirCODE----------------
>dim s as string, hFile as integer
>s = space$(260)
>hfile = freefile()
>open "t.txt" for output as hfile 'create a dummy
>close hfile
>call findexecutable("t.txt",vbnullstring,s)
>kill "t.txt" 'kill the dummy, clowns etc..
>s = trim(s)
>if s <> "" then
> intReturn = ShellExecute(Me.hwnd, "OPEN", s, App.Path & _
> "\TextData.dat", "", 1)
> else
> msgbox("No associated executable")
>endif
Frank - That looks to be a pretty cool approach. I will play
with this. This would appear to force the desired (associated) app
to open the text file [even with my ill-advised extension]. I am
stubborn, so I will give this a shot before resorting to the
*.log extension.

Thanks All !

-Steve Gdula

.



Relevant Pages

  • Re: Missing previews in My Pictures
    ... Northerntravel.net and Northerntravel.co.uk is a premier online travel ... "DAT" files. ... But the .dat extension is confusing to other ... actually a .jpg, then rename the file changing the extension to .jpg ...
    (microsoft.public.windowsxp.general)
  • Re: Cant open .dat file
    ... Many, many programs use .dat as an extension for data files, so there is often ... not an association set for .dat files, ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Missing previews in My Pictures
    ... Northerntravel.net and Northerntravel.co.uk is a premier online travel ... "DAT" files. ... But the .dat extension is confusing to other ... actually a .jpg, then rename the file changing the extension to .jpg ...
    (microsoft.public.windowsxp.general)
  • Re: Missing previews in My Pictures
    ... show up in My Pictures and I can't use them as a background. ... You might look at the properties of a .dat file and maybe figure out its actual type. ... Change the extension accordingly; if it's actually a .jpg, then rename the file changing the extension to .jpg e.g. ...
    (microsoft.public.windowsxp.general)