By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Resolution Friendly App.

Ali Rizwan
100+
P: 927
Hi all,
i m having a problem i have made my app in 1152 x 864 resolution. Now i want to make it resolution friendly the only problem i m having is with Start menu, and other menus. If user sets the screen resolution to 800x600 the start menu doesnot appears full. Some of contents hided...
Plz give some suggestions.

Thanx
>> ALI <<
Jun 8 '08 #1
Share this Question
Share on Google+
4 Replies


vdraceil
100+
P: 236
Hi,look whether the link below is of some help..
http://bytes.com/forum/thread766616-resolution+VB.html
Jun 8 '08 #2

jamesd0142
100+
P: 469
Just forget trying to use the API to change the display mode. Instead:

1. Add a COM reference to 'DirectX 7 for Visual Basic Type library'

2. At the top of your code for your main form, before the class declaration, add 'Imports DxVbLib'

3. After the class declaration, add:

Dim dx as New DirectX7

Dim dd as DirectDraw7

4. Add the following code to your Form_Load event handler:

dd=dx.DirectDrawCreate("")

dd.setDisplayMode(800,600,16,0,CONST_DDSDMFLAGS.DD SDM_DEFAULT)

Note: Change '800' to the desired width of the display mode, '600' should be the height, and '16' should be the color depth.

Example



Imports DxVBLib

Public Class frmMain

Dim dx As New DirectX7

Dim dd As DirectDraw7

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Show()

dd = dx.DirectDrawCreate("")

dim Height as Integer

dim Width as Integer

dim Depth as Integer

Height=600 ' Change this to the correct number

Width=800 ' Change this to the correct number

Depth=16 ' Change this to the correct number

dd.SetDisplayMode(Height, Width, Depth, 0, CONST_DDSDMFLAGS.DDSDM_DEFAULT)

End Sub

End Class



SOURCE: http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/347be7c2-3851-4775-bad5-4b9b7cd06677/
Jun 9 '08 #3

Ali Rizwan
100+
P: 927
Just forget trying to use the API to change the display mode. Instead:

1. Add a COM reference to 'DirectX 7 for Visual Basic Type library'

2. At the top of your code for your main form, before the class declaration, add 'Imports DxVbLib'

3. After the class declaration, add:

Dim dx as New DirectX7

Dim dd as DirectDraw7

4. Add the following code to your Form_Load event handler:

dd=dx.DirectDrawCreate("")

dd.setDisplayMode(800,600,16,0,CONST_DDSDMFLAGS.DD SDM_DEFAULT)

Note: Change '800' to the desired width of the display mode, '600' should be the height, and '16' should be the color depth.

Example



Imports DxVBLib

Public Class frmMain

Dim dx As New DirectX7

Dim dd As DirectDraw7

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.Show()

dd = dx.DirectDrawCreate("")

dim Height as Integer

dim Width as Integer

dim Depth as Integer

Height=600 ' Change this to the correct number

Width=800 ' Change this to the correct number

Depth=16 ' Change this to the correct number

dd.SetDisplayMode(Height, Width, Depth, 0, CONST_DDSDMFLAGS.DDSDM_DEFAULT)

End Sub

End Class



SOURCE: http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/347be7c2-3851-4775-bad5-4b9b7cd06677/
Thanx a lot...
I was using API to change the screen resolution..
Now i think i should change it by direcx.

Thanx
>> ALI <<
Jun 12 '08 #4

vdraceil
100+
P: 236
Can anyone explain me-what is DirectX??
Jun 14 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.