Results 1 to 10 of 10

Thread: DX input exclusive to my app

  1. #1

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Angry DX input exclusive to my app

    How do I make DX input 7 exclusive to my application.

    I have F1 to maximise the screen but if I try it it starts VB into help mode because its not locking it to my application =(


    Its the same for the mouse. Because its windowed it allows me to click apps behind my program even though its supposed to be in my application
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  2. #2
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Re: DX input exclusive to my app

    The keyboard isn't allowed to be exclusive its a security issue . As for the Mouse just add the Exclusive flag when you initialise it:
    Code:
    Keyboard.SetCooperativeLevel TargetHandle, DISCL_FOREGROUND Or DISCL_NONEXCLUSIVE
    BTW the Foreground and background thing work like: If you use Foreground then you will only know about keys/mouse actions if your app is the active one when they happen. Background basically means no matter which program has focus your program will recieve the input as well.

    The problem with the F1 key is because your running it in the IDE and the IDE is still in focus as your program runs. This won't happen when you run it compiled so I'd suggest chnaging the key to somethign else then when you release it change it back to F1
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  3. #3

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: DX input exclusive to my app

    Cheers that work great (Even F1)

    I know have a problem switching from fullscreen to window. The primary surface cannot be set again. I unload all DX stuff and reload it but it still errors
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  4. #4
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Re: DX input exclusive to my app

    Which version of Dx are you using? You'll have to recreate the device, most the stuff doesn't need recreating but things like the device and anything that relies on the device should be recreated.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  5. #5

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: DX input exclusive to my app

    Its direct draw7 so there is no device =(


    Here is a link to the project if you are curious

    www.btinternet.com/~clanger_moon/Ants.zip
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  6. #6
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Re: DX input exclusive to my app

    I couldn't run the project cos of a sound module not included. Mind whats the error your getting and which line is it on?
    I can't remember if I ever got a program working in Dx7 that would let you switch back and forth from Windowed & Fullscreen.
    Wonder why unloading everything then loading it again isn't working, mind don't think I've tried this before either. It could be possible you've missed something out the Unload and it wouldn't normally matter apart from this way the objects are being reused and then it causes probs....I can't spot anything wrong though.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  7. #7

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: DX input exclusive to my app

    DX7 can be a bit annoying at times

    It is fine going from windowed to fullscreen but cant go from full screen to windowed for some reason. DX and DDraw seems to setup OK and the PS = Nothing before I try and run the command. Maybe if I only resetup the ddraw surface and see if that works

    Code:
    Set PS = DDraw.createsurface (ddsp)
    Looks like this evening could be long
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  8. #8
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Re: DX input exclusive to my app

    Yea if you have had to recreate the DDraw then you'd have to recreate the PrimSurface cos its used to makle it .....I think you will probabaly have to recreate your textures (offscreenDCs) too .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  9. #9

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: DX input exclusive to my app



    Just hope if I keep DX object open but close all else it will be ok
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  10. #10

    Thread Starter
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: DX input exclusive to my app

    EUREKA

    Dont unload the DDraw or DX objects just set them again (Dont ask)


    How can you do a complete screen refresh though because my screen keeps the image until another app is show
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

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