Skip to main content
gamedev.net
🔒 Locked

DirectX problem using VB6

Started by Tom Apr 17, 2001 at 11:31 AM 3 replies 300+ views
Original Post
Tom
Tom
I''ve got this weird problem with my iso engine. It works fine in 800x600 or lower, but for some reason when I increase the resolution to 1024x768, my app loses focus. It''s quite bizarre because the engine is still rendering to the display, but my mouse cursor is interacting with my desktop. It''s like I can see the game and play with VB. What''s probably even more strange is that my app is still receiving events. That is, the app shuts down when I press escape, despite the fact that it doesn''t register mouse movements. I just don''t get it. Anyone have any ideas on how to fix this? Alt-Tab doesn''t seem to work, and neither does SetFocus. Thanks for any help.
GDNet+. It's only $5 a month. You know you want it.
Epolevne
Epolevne
Does it do it when you compile and run outside the VB IDE? It might just be a crazy VB issue...make sure you''ve got the latest service pack (5) just in case.

Epolevne
Tom
Tom
Strangely enough, yes, it still acts bizarre when run as an executable. I have discovered a partial but insufficient solution. Setting BorderStyle to FixedSingle and calling Me.Show and Me.SetFocus when the app starts at least let''s me move the cursor within a small region, but not over the entire screen.

I''m downloading the service pack right now, but I doubt it will fix anything.

The next thing I''m going to add is my DirectInput interface. Hopefully that will resolve my issue since it will alleviate Windows from handling my app''s mouse events. I''ll let you know.
GDNet+. It's only $5 a month. You know you want it.
Epolevne
Epolevne
If you have a test program I could run it and see if it''s system specific...
I can''t imagine what coding would cause the issue...but I''m no DX guru.

Epolevne
Tom
Tom
Well, I solved the problem.

For some reason, setting the WindowState to Maximized was screwing up my mouse. Changing it to normal and calling the form''s Show method during the load procedure fixed everything. Weird as hell, but hey, it works. I''m happy.
GDNet+. It's only $5 a month. You know you want it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.