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. WPF
  4. Code only working with break points

Code only working with break points

Scheduled Pinned Locked Moved WPF
helptutorial
3 Posts 3 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.
  • D Offline
    D Offline
    Dominick Marciano
    wrote on last edited by
    #1

    I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:

    As an example of the problem, here is the code for the minimize button's MouseLeftButtonDown and MouseLeftButtonUp handlers:

    Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
    btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
    End Sub

    Private Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
    btnMinimize.Fill = CType(Me.Resources("Min_inact")

    S A 2 Replies Last reply
    0
    • D Dominick Marciano

      I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:

      As an example of the problem, here is the code for the minimize button's MouseLeftButtonDown and MouseLeftButtonUp handlers:

      Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
      btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
      End Sub

      Private Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
      btnMinimize.Fill = CType(Me.Resources("Min_inact")

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

      All GUI stuff needs to be done on the main thread. Other threads are for work only.

      1 Reply Last reply
      0
      • D Dominick Marciano

        I have a very strange issue that I have been unable to resolve. I have a window that is opened on a new thread that contains a custom control box with the min, max, and close buttons as ellipses, with handlers attached:

        As an example of the problem, here is the code for the minimize button's MouseLeftButtonDown and MouseLeftButtonUp handlers:

        Private Sub btnMinimize_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
        btnMinimize.Fill = CType(Me.Resources("Min_pr"), ImageBrush)
        End Sub

        Private Sub btnMinimize_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
        btnMinimize.Fill = CType(Me.Resources("Min_inact")

        A Offline
        A Offline
        Afzaal Ahmad Zeeshan
        wrote on last edited by
        #3

        I believe that when you set a breakpoint on this point it still doesn't work. The only change that you're feeling to be the Minimize effect, is actually the IDE taking over as Active Window (minimizing other Windows) when your code hits the point of the breakpoint.

        The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

        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