Results 1 to 11 of 11

Thread: 800 x 600 pixel Screen

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184
    How can I have my app resize the screen
    to make the app fit then.. when its
    done change it back??
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  2. #2
    Member
    Join Date
    Sep 1999
    Location
    Gloucester, UK
    Posts
    33

    Question

    I have had this problem to deal with for a project of mine, I built a resolution changing module to do the work but I couldnt stop people from changing the resolution once the app had been activated. The code is quite lengthy so I will email it to you.

    Incidentally, if anyone knows how to 'fix' the resolution whilst my app is running I would be interested to know how!

  3. #3
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    It's probably not a good Idea to change the resolution from your app, if the users monitor can't cope with it for some reason then they'll have to try and sort it out with a blank screen. Not good

  4. #4
    Member
    Join Date
    Sep 1999
    Location
    Gloucester, UK
    Posts
    33
    I agree with you totally Sam, I dont think an application should alter with any of your windows settings as such. unfortunatly my clients dont share that view at all!

  5. #5
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    Finally I get to help someone else.

    There is an ocx that you can download which is great for this. I am out of town on my laptop, but when I get home tomorrow I will give you the information. You might be able to find it by looking up posts with my name. I had a similar problem and someone told me about this active x control.

    It is awesome, all you have to do is put it on your form, no code or anything. The user can adjust his form by just resizing it with the border, and all objects resize.

    It is magic.

    Good Luck,
    Sal

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184
    Cool!

    But can I tell it to resize everything
    acording to the screen width, and heighth?

    (Its a screensaver)
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  7. #7
    Guest

    Use DirectX

    Or you could make your app have no borders and then just resize the user's resolution, you can check to see if directx can resize or not, if something happens, for example if some kinda error happens and it doesn't resize, you could do a error checking thing in the code and tell the user that it's not able to run on their computer, cause it needs to be run in 800x600 enviorment, here's some code for ya to resize the screen.. u have to have dirextx7 and need to include it in your project.

    Code:
    Dim dx As New DirectX7
    Dim dd As DirectDraw7
    Private Sub Form_Load()
    Set dd = dx.DirectDrawCreate("")
    dd.SetCooperativeLevel Me.hwnd, DDSCL_FULLSCREEN Or DDSCL_EXCLUSIVE Or DDSCL_ALLOWMODEX
    dd.SetDisplayMode 800, 600, 16, 0, DDSDM_DEFAULT
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
    dd.RestoreDisplayMode
    Set dx = Nothing
    Set dd = Nothing
    End Sub
    and that's it.. to make them not able to set their display mode to anything else, just make your program, borderless, controlboxless.. and stuff like that... Well all of my programs are graphically rich, so doing this usually doesn't hurt me, since it looks to the user as if the 'application' is a 'game', but it usually also worx with non graphically rich application...


  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184
    I need something to use that code.

    Umm do you need a controll..

    It says Custom type not defined..

    What do I do?
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  9. #9
    Guest
    Yea, you need to have DirectX7, and if you have it, all you do is goto, Project->Refrences and add DirectX7TypeLibrary or something like that, to your project, and that way it'll work...

  10. #10
    Guest
    Hey Sal-

    I REALLY need that OCX. Can you email it to me?

    mailto:[email protected]

    BTW, You never called me...


  11. #11
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    It is called the Resize OCX and the website is http://www.lyoung.com
    The phone number for registering the OCX is United States 888-850-9911
    I think it is the best thing since sliced bread.

    Good Luck!

    Sal

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