• Advertisement
Sign in to follow this  

Full-screen DirectX Mobile (HTC Touch Pro)?

This topic is 3307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just going crazy trying to get full-screen mode to work with the Touch Pro. Windowed mode works as expected (black screen, or whatever color I Clear to), but full-screen just does nothing at all. No exceptions are thrown (all the calls are supposedly working fine), but all I see on the screen is the white form background. I'm using C# and DirectX Mobile. The project is targeting Windows Mobile 6 Professional. Here's the entire code of the only source file in the project:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.DirectX.Direct3D;
using Microsoft.WindowsMobile.DirectX;

namespace Tilt {
    public class frmMain : Form {
        static void Main() {
            frmMain f = new frmMain();
            while (f.Created) {

        public Device device;
        public bool Created;

        protected bool InitializeGraphics() {
            Created = true;

            PresentParameters p = new PresentParameters();
            p.SwapEffect = SwapEffect.CopyVSync;
            p.Windowed = true;

             * For some reason, these settings allow the device to be created,
             * but nothing gets drawn (the form's white background is just shown
             * full-screen).  WTFmate?

            DisplayMode dm = Manager.Adapters.Default.CurrentDisplayMode;
            p.Windowed = false;
            p.BackBufferWidth = dm.Width;
            p.BackBufferHeight = dm.Height;
            p.BackBufferFormat = dm.Format;

            device = new Device(0, DeviceType.Default, this, CreateFlags.None, p);

            return true;

        protected void Render() {
            device.Clear(ClearFlags.Target, Color.Black, 1.0F, 0);


        protected void DisposeGraphics() {
Any help would be greatly appreciated!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement