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 <<
4 1303
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/
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 <<
Can anyone explain me-what is DirectX??
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Paul |
last post by:
I thought this is more of an IE issue but i've had no joy on that group
perhaps somebody here will have a clue.
If i click a link to a web page embedded in Excel (97 OR 2000) i get the
standard...
|
by: Michael Evans |
last post by:
First, we rely on a stable update rate so that our physics and dynamics
calculations and integrations are based on a known interval and
therefore are true-to-life.
Second, the graphics positions...
|
by: Michael Evans |
last post by:
Has anyone come across a way to sleep (suspend execution of current
process while releasing CPU resources in the meantime) for less than a
millisecond in Windows? I know it has been done by third...
|
by: Matt Mercer |
last post by:
Hi,
I have a asp .net/VB web app that does the typical submitting and
retrieving from a SQL database. I am lost as to how I should create a
print friendly page for the data. Here is the...
|
by: tim |
last post by:
can someone tell me which function returns the screen resolution in
java script?
|
by: Maxi |
last post by:
I have a 30X16 cells table in my html page. Table height and width are
set to 100%. I have set size of every cell inside the table to 24
pixel.
When I open the html page in maximize state in...
|
by: Sandy Pittendrigh |
last post by:
I have a fishing related site with a billion photos,
where 600 pixels as a maximum photo width looks OK
at both low resolution and high resolution,
but spectacular in neither. Browser stats sites...
|
by: Dave Rado |
last post by:
Hi
A while ago I discovered a way of creating css pseudo-frames, that
offer users the important benefits of real frames (i.e. the navigation
remains visible when you scroll down the page), but...
|
by: Prisoner at War |
last post by:
Okay, I'd like to create a print-friendly website, so I've been
reading up on how to create print-friendly pages (without duplicating
my site, of course, by having separate versions of each...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |