I can't seem to figure out how to draw a gradient to a bitmap I created in code. I have the background fading with a crazy bouncing sort of gradient with this code (paste it into a project if U wanna see it )
VB Code:
  1. Dim m_intAntiBlueC1 As Integer = 255
  2.     Dim m_intAntiBlueC2 As Integer = 0
  3.     Dim m_blnC1GoUp As Boolean
  4.  
  5. Dim graphics As Graphics
  6.         graphics = Me.CreateGraphics()
  7.         Dim c1 As Color = Color.FromArgb(m_intAntiBlueC1, m_intAntiBlueC1, 200)
  8.         Dim c2 As Color = Color.FromArgb(m_intAntiBlueC2, m_intAntiBlueC2, 200)
  9.         Dim brush As New Drawing2D.LinearGradientBrush(Me.DisplayRectangle, c1, c2, Drawing2D.LinearGradientMode.ForwardDiagonal)
  10.         graphics.FillRectangle(brush, Me.DisplayRectangle)
  11. [COLOR=Red]        Dim TheBit As New Bitmap(295, 80)
  12.         Dim graphics2 As Graphics[/COLOR]
  13.  
  14.         If m_intAntiBlueC1 = 255 Then
  15.             m_blnC1GoUp = False
  16.         ElseIf m_intAntiBlueC1 = 0 Then
  17.             m_blnC1GoUp = True
  18.         End If
  19.  
  20.         If m_blnC1GoUp Then
  21.             m_intAntiBlueC1 += 1
  22.             m_intAntiBlueC2 -= 1
  23.         Else
  24.             m_intAntiBlueC1 -= 1
  25.             m_intAntiBlueC2 += 1
  26.         End If
I can't seem to create a graphics area from the bitmap itself so I don't know any other way to draw graphics data onto the bitmap. Anyone know how to do it?