Results 1 to 6 of 6

Thread: [RESOLVED] [2008] Main Form Shown Event and Draw in a textbox

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Lasering's Avatar
    Join Date
    May 2006
    Location
    Lisboa
    Posts
    559

    Resolved [RESOLVED] [2008] Main Form Shown Event and Draw in a textbox

    Hi!!

    I have several textboxes on my only form in my project. And inside the Shown event of my form I have a piece of code that Draws numbers into each every textbox using this (only part of the code is here):
    Code:
            If NumerosPossiveis.Contains("1") Then g.DrawString("1", Me.Font, New SolidBrush(Me.ForeColor), 3, 1)
            If NumerosPossiveis.Contains("2") Then g.DrawString("2", Me.Font, New SolidBrush(Me.ForeColor), 13, 1)
            If NumerosPossiveis.Contains("3") Then g.DrawString("3", Me.Font, New SolidBrush(Me.ForeColor), 23, 1)
            If NumerosPossiveis.Contains("4") Then g.DrawString("4", Me.Font, New SolidBrush(Me.ForeColor), 3, 13)
            If NumerosPossiveis.Contains("5") Then g.DrawString("5", Me.Font, New SolidBrush(Me.ForeColor), 13, 13)
            If NumerosPossiveis.Contains("6") Then g.DrawString("6", Me.Font, New SolidBrush(Me.ForeColor), 23, 13)
            If NumerosPossiveis.Contains("7") Then g.DrawString("7", Me.Font, New SolidBrush(Me.ForeColor), 3, 25)
            If NumerosPossiveis.Contains("8") Then g.DrawString("8", Me.Font, New SolidBrush(Me.ForeColor), 13, 25)
            If NumerosPossiveis.Contains("9") Then g.DrawString("9", Me.Font, New SolidBrush(Me.ForeColor), 23, 25)
    So when I run the program I should see all the drawn strings, instead I get this (See attachment)
    Its like he draw the strings correctly but then something draw over the strings.
    Why does this happen?
    Attached Images Attached Images  
    Controls: XPCC|Quantum
    Windows API'sLINQ to XML SamplesRegex Tutorial

    Albert Einstein:
    "Imagination is more important than knowledge."
    "Everything should be made as simple as possible, but not simpler."
    "Great spirits have often encountered violent opposition from weak minds."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width