Re: Retieve the Size of my app (or the Name)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: MikeD (nobody_at_nowhere.edu)
Date: 06/13/04


Date: Sun, 13 Jun 2004 09:00:23 -0400


"tom" <t@inwind.it> wrote in message
news:40caf4e5.1442234@powernews.inwind.it...
> Hallo,
> I'm Using VB5.
>
> -----
>
> I'd like to detect the current size
> of my application.
>
> I use FileLen
>
> in this way
>
> MySize = FileLen (App.path & "/" & "MyApp.exe")
>
> but
>
> if the user previously changed the name of "MyApp.exe"
> into another name, in example "Susan.exe"
>
> my mentioned method no more works (obviously).
>
> Otherway I need to retrieve the *current*
> name of my executing app,
> and then go with my mentoned method.

You couldn't have looked over the App object very well. The answer should
stand out like a sore thumb. Get the file name via the App object's EXEName
property.

Just curious, what does your app do (or what could users be doing) that
would change the file size? Even more curiously, why would users rename it?

Mike



Relevant Pages

  • VB5/VB6 RS232 comm problems
    ... I have an old VB5 application running on a Win98 machine that needs to ... be ported to an XP machine running VB6. ... I wrote an app the sends the Reset, ... I posted this to another group but got no response, so, sorry ...
    (microsoft.public.vb.general.discussion)
  • RS232 comms problem between VB5 and VB6
    ... I have an old VB5 application running on a Win98 machine that needs to ... be ported to an XP machine running VB6. ... For example, with another device, a digital multimeter (DMM), I have ... I wrote an app the sends the Reset, ...
    (comp.lang.basic.visual.misc)
  • Re: Registering OCX programmatically
    ... >>replace the files that it's dependent on, you risk breaking not only your own application, but every other ... it's not often you'll find a machine without the necessary runtimes for a VB5 app. ... > - although MS lists files, one can never be sure what really applies ...
    (microsoft.public.vb.general.discussion)
  • Re: programmed myself into a corner? architecture question.
    ... is there a good book that would show good .net application design on a ... Back in my VB5 days, there was a good book for this (I ... >>the forms in the main app, ...
    (microsoft.public.dotnet.general)
  • Re: Threading in Visual Basic - Many threads
    ... This app wasn't originally designed ... I usually fire off my ... The VB6 runtime is simply not threadsafe, but in some cases VB5 can be. ...
    (microsoft.public.vb.general.discussion)