Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Direct3D in a panel makes VS Designer hang

Direct3D in a panel makes VS Designer hang

Scheduled Pinned Locked Moved C#
helpquestioncsharpc++visual-studio
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iammudman
    wrote on last edited by
    #1

    Been reading CP for over a year - great site! first post (be nice :) ) smidge of history: I've been working with C# for over a year and a half. This includes two applications with over two months of development each written almost completely by myself in use by customers in a commercial enviroment. I've converted a bunch of my friends from MFC evilness to C# Forms. My problem: I'm creating a UserControl that shows a Direct3D (9.0C) drawing. I've created the panel and had it just clear the background to blue. Built. Dropped the user control (DXPanel - my name) into the form via the Designer. It runs properly. I then added a simple 2D triangle to the DXPanel, and now the Designer hangs whenever I attempt to touch the position or size of the panel or form. It is rendering the Direct3D within the Designer. three questions (only need answer to one of them): 1. How do I tell the Designer to not show that custom panel while still allowing the built program to show the panel? 2. How do I tell the Designer to not render Direct3D stuff in general? 3. Is there a fix so that the Designer won't hang when rendering Direct3D?

    S 1 Reply Last reply
    0
    • I iammudman

      Been reading CP for over a year - great site! first post (be nice :) ) smidge of history: I've been working with C# for over a year and a half. This includes two applications with over two months of development each written almost completely by myself in use by customers in a commercial enviroment. I've converted a bunch of my friends from MFC evilness to C# Forms. My problem: I'm creating a UserControl that shows a Direct3D (9.0C) drawing. I've created the panel and had it just clear the background to blue. Built. Dropped the user control (DXPanel - my name) into the form via the Designer. It runs properly. I then added a simple 2D triangle to the DXPanel, and now the Designer hangs whenever I attempt to touch the position or size of the panel or form. It is rendering the Direct3D within the Designer. three questions (only need answer to one of them): 1. How do I tell the Designer to not show that custom panel while still allowing the built program to show the panel? 2. How do I tell the Designer to not render Direct3D stuff in general? 3. Is there a fix so that the Designer won't hang when rendering Direct3D?

      S Offline
      S Offline
      Skynyrd
      wrote on last edited by
      #2

      Use this where it applies: if (!this.DesignMode) { //Direct3D rendering code }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups