Results 1 to 8 of 8

Thread: App.Path

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    App.Path

    ehh any one mind if I ask these kind of stupid questions?
    What should I use instead of App.Path in VB.NET?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Thelonius
    Guest
    System.Reflection.Assembly.GetExecutingAssembly.Location

    and use the .ToString method to add into a string

    You may find it easier to import the System.Reflection.Assembly namespace

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hehe, too many dots, tnx

    I kinda forgot the difference of Imprts and Inherits, can you plz tell me the difference
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Thelonius
    Guest
    When an object inherits something it makes use of another objects methods. For example, if you create a class and build some custom properties and methods, your other code can utilize those methods/properties plus the GetType method, but you have no way explicitly removing it from memory. If you tell your class to Inherits System.Windows.Forms.Form

    you Inherit the System.Windows.Forms.Form's objects ability to destroy itself along with several other methods.

    Once you put an inheritence statement like the one above in your class you will see the Dispose() method available when you instanciate your class.

    Importing a namespace is just a way to save typing. You could theoretically build a SQL Server data-driven app, for example, without importing System.Data.SqlClient, but everytime you call up an ADO.NET object you would have to type somthing like
    Dim sConn as New System.Data.SqlClient.SqlConnection or Dim sCmd as New System.Data.Client.SqlCommand vs Dim sCmd as New SqlCommand("SELECT....
    It also makes your code easier to read. Think of it as a multi-use giant With statement.

  5. #5

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    tnx alot for the info
    I think I saw something before but I dont remember where I found it. There were a series of functions to like get the filename, format a file path and these kind of file related functions. Any idea where they are on the framework?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6
    Tygur
    Guest

    Another way....

    This is a much more straightforward (in my opinion) replacement for VB6's App.Path:
    System.Windows.Forms.Application.StartupPath

  7. #7
    Tygur
    Guest
    Originally posted by MrPolite
    tnx alot for the info
    I think I saw something before but I dont remember where I found it. There were a series of functions to like get the filename, format a file path and these kind of file related functions. Any idea where they are on the framework?
    You mean the functions in the System.IO.Path class? Try that.

  8. #8

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Tygur, that's what I was looking for!
    thanks
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width