|
-
May 15th, 2000, 12:37 AM
#1
Thread Starter
Addicted Member
How can I have my app resize the screen
to make the app fit then.. when its
done change it back??
-
May 15th, 2000, 12:59 AM
#2
Member
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!
-
May 15th, 2000, 01:26 AM
#3
Frenzied Member
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
-
May 15th, 2000, 05:59 AM
#4
Member
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!
-
May 15th, 2000, 06:39 AM
#5
Hyperactive Member
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
-
May 15th, 2000, 08:29 AM
#6
Thread Starter
Addicted Member
Cool!
But can I tell it to resize everything
acording to the screen width, and heighth?
(Its a screensaver)
-
May 15th, 2000, 09:43 AM
#7
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...
-
May 15th, 2000, 10:25 AM
#8
Thread Starter
Addicted Member
I need something to use that code.
Umm do you need a controll..
It says Custom type not defined..
What do I do?
-
May 15th, 2000, 07:14 PM
#9
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...
-
May 15th, 2000, 08:35 PM
#10
Hey Sal-
I REALLY need that OCX. Can you email it to me?
mailto:[email protected]
BTW, You never called me...
-
May 15th, 2000, 09:12 PM
#11
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|