Results 1 to 7 of 7

Thread: Replacing startup screens with VB prob

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    21

    Replacing startup screens with VB prob

    Hi, I'm wanting to replace the logo.sys startup and close screens on windows using a VB prog.

    I'm new to VB only done the most basic things with it so bear with me please.

    I just want to run the prog, press a button and the prog will replace the existing logo.sys file with one stored inside the prog. I don't even know if this is possible, I'm thinking it is though.

    Is this easy to do? How do I go about coding this ?

    Any advice, tips, information - anything really would be much appreciated.


    thanks in advance


    Captain Chainsaw

    P.S. Thank you to all who have already helped me with other matters, with your recommendations I have managed to find useful books

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    store the images in a resource file, when the user click the button, u save the file, overwriting the existing.

  3. #3
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Links to usage of a resource file: http://www.vbforums.com/search.php?s...der=descending

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    21
    Hi Peet, sorry, I'm THAT ignorant but what is a resource file ?

    I feel like a microbe for asking that, I guess we all have to start somewhere though.

    Thank you again

    Captain Chainsaw

  5. #5
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    don't feel bad

    This is a resource file :

    MSDN

    A resource file allows you to collect all of the version-specific text and bitmaps for an application in one place. This can include icons, screen text, and other material that may change between localized versions or between revisions or specific configurations.

    Adding Resources to a Project
    You can create a resource file using the Resource Editor add-in. The compiled resource file will have a .res file name extension. Each project can contain only one resource file.

    The actual file consists of a series of individual strings, bitmaps, or other items, each of which has a unique identifier. The identifier is either a Long or a String, depending on the type of data represented by the resource. Strings, for example, have a Long identifier, while bitmaps have a Long or String identifier. To retrieve resources in your code, learn the identifier for each resource. The function parameters referring to the resources can use the Variant data type.

    To add a new resource file to your project

    Choose Resource Editor from the Tools menu. An empty resource file will be opened in the Resource Editor window.
    Note The Resource Editor add-in must be installed. For information on installing add-ins, see "Using Wizards and Add-Ins" in "Managing Projects".

    Select the Save button on the Resource Editor toolbar to save the resource file. The file will be added to the Project Explorer under the Related Documents section.
    To add an existing resource file to your project

    Choose Add New Resource File from the Project menu. Any existing resource file in your project will be replaced.
    Caution If you make any modifications to an existing resource file it could affect other projects that use that resource file. Make sure that you save the file under a new filename.

    Note The Resource Editor add-in must be installed. For information on installing add-ins, see "Using Wizards and Add-Ins" in "Managing Projects."

    Note Windows resource files are specific to 16-bit or 32-bit applications. Visual Basic will generate an error message if you try to add a 16-bit resource file to a project.

    Using Resources in Code
    Visual Basic provides three functions for retrieving data from the resource file for use in code.

    Function Description
    LoadResString Returns a text string.
    LoadResPicture Returns a Picture object, such as a bitmap, icon, or cursor.
    LoadResData Returns a Byte array. This is used for .wav files, for example.


    For More Information See the appropriate function topic.
    now, the link I posted in my prev. post, show u several ways of using a resource file.

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    think I should add this,

    A resource file can contain any kind of data: music, text, graphics....

    When u'r program is compiled, all the resources u have added to u'r project is compiled into the exe.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    21
    Peet, I found your post on resource files, I should hopefully be able to find my way from there, looks quite deep

    Thank you Peet


    Captain Chainsaw

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