Results 1 to 17 of 17

Thread: VB & DirectX Question

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    57

    VB & DirectX Question

    Can i insert directX Game Into VB Form(example Diablo2 In windowed mode)?
    it is possible and if yes please gimme an example.

    Thanks in advance !

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB & DirectX Question

    Moved

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    57

    Re: VB & DirectX Question

    any Ideas?

  4. #4
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: VB & DirectX Question

    You want to know if you can run an executable in windowed mode?

    One reason people are not repling to this thread is they think you are up to something.

    Do you have the Diablo 2 Source code?
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  5. #5
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: VB & DirectX Question

    Maybe if you make a seperate DX program and for the device window, use the Diablo window, and then, in your app, make it windowed.

  6. #6
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: VB & DirectX Question

    How could you do something that low level in VB?

    And How could you work out what the device context is?
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  7. #7
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: VB & DirectX Question

    Well I've seen it done before for other games that do not have windowed mode but people would like it, and I know they use DirectX. And to the best of my knowledge, that's how they did it.

  8. #8

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    57

    Re: VB & DirectX Question

    i just need to put Diablo2 Window into my application that's all .. its possible or not and say me why .. ^_^

  9. #9
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: VB & DirectX Question

    Forget about the Diablo2 window rubbish and think about what it is you are trying to achieve. You are trying to run a program inside another program in a little window. It does not matter which program you are trying to run it just matters that you are trying to run it within a little box inside a form.

    Why do you want to do this?
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  10. #10
    Addicted Member TBeck's Avatar
    Join Date
    Apr 2006
    Location
    Ontario, Canada
    Posts
    254

    Re: VB & DirectX Question

    if all you want to do is run diablo 2 in a window then just add -w to the end of the shortcut path (ie: "C:\Diablo 2\Diablo II.exe" -w)

  11. #11
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: VB & DirectX Question

    Command line arguments are handled inside the executable.. not by the operating system. Theres no way, legally, you'll get -w working (so that it runs in windowed mode).

    As for making it windowed mode.. its possible, although very 'icky' from the snippets I've seen.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  12. #12
    Addicted Member TBeck's Avatar
    Join Date
    Apr 2006
    Location
    Ontario, Canada
    Posts
    254

    Re: VB & DirectX Question

    i guess my most wasnt too clear... my solution has nothing to do with programming, i mean the actual shortcut for the game, add the -w there, not in a VB program

  13. #13
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: VB & DirectX Question

    i understood perfectly. Must be poor eyesight on their part.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  14. #14
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: VB & DirectX Question

    Quote Originally Posted by TBeck
    i guess my most wasnt too clear... my solution has nothing to do with programming, i mean the actual shortcut for the game, add the -w there, not in a VB program
    I understand that.. but how do you plan on making the game understand what "-w" means?

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  15. #15
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: VB & DirectX Question

    I believe the point TBeck is making is that it already understands - as it is a known command line parameter for the game.

  16. #16
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: VB & DirectX Question

    Quote Originally Posted by si_the_geek
    I believe the point TBeck is making is that it already understands - as it is a known command line parameter for the game.
    Oh I got confused. I thought he wanted to make -w a valid command line parameter.. in which case.. MY BAD! I thought Diablo 2 didn't have windowed mode by default.. hence the confusion

    I should probably sleep

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  17. #17
    Addicted Member TBeck's Avatar
    Join Date
    Apr 2006
    Location
    Ontario, Canada
    Posts
    254

    Re: VB & DirectX Question

    yea the -w is an 'easter egg' with the dame

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