I solved my own issue. So I've decided to share my technique with anyone else wanting to have a textual display with a transparent background. This also provides shadowed text.
Here is my subroutine in VS2010 (VB.NET):
1. Commback is a blank 512x256 bitmap
2. CommWindow is my foreground bitmap created from Commback
3. Commout is the captured image AFTER writing text to the CommWindow. This happens twice; first after the blank bitmap is copied, and then after text is written to it.
4. sprite_comm is deleted first before being recreated from Commout.
5. sprite_comm is then positioned onscreen.
Sub CommoutPut(textline As String)
If ControlObject = "" Then
Exit Sub
End If
Dim cleft As Integer
Dim cright As Integer
Dim ctop As Integer
Dim MyColor As Color
MyColor = Color.FromArgb(255, 20, 20, 20)
'MOVE ALL MESSAGES UP ONE LINE AND ADD THE NEXT
For I = 1 To 11
RADIOLOG(I) = RADIOLOG(I + 1)
Next I
RADIOLOG(12) = textline
sw = DarkGDK.Display.ScreenWidth
cleft = (sw / 2) - 256
cright = cleft + 512
cwidth = 512 '`bitmap width (COMMWINDOW)
ctop = staticsprite.Height
CommBack.CopyTo(COMMWINDOW)
COMMWINDOW.SetCurrent()
CommOut = New DarkGDK.Basic2D.Image(0, 0, 512, 256)
DarkGDK.Text.SetFont("Verdana")
DarkGDK.Text.Size = 20
X = 5
Y = 5
For I = 1 To 12
temp$ = RADIOLOG(I)
If temp$ <> "" Then
DarkGDK.Basic2D.Drawing.Ink(MyColor, MyColor)
DarkGDK.Text.ShowText(X + 2, Y + 2, temp$)
If Left$(temp$, 3) = "TWR" Or Left$(temp$, 3) = "COD" Then
DarkGDK.Basic2D.Drawing.Ink(Color.Cyan, Color.Black)
Else
DarkGDK.Basic2D.Drawing.Ink(Color.Yellow, Color.Black)
End If
DarkGDK.Text.ShowText(X, Y, temp$)
Y = Y + 16
End If
Next I
CommOut = New DarkGDK.Basic2D.Image(0, 0, 512, 256)
If DarkGDK.Basic2D.Sprite.Exist(sprite_Comm.Id) Then
sprite_Comm.Delete()
End If
sprite_Comm = New DarkGDK.Basic2D.Sprite(cleft, ctop, CommOut)
DarkGDK.Basic2D.ScreenBitmap.SetCurrent()
ControlObject = ""
End Sub
the key was knowing when to paste the blank bitmap.
In my example, the bitmap is centered on the screen, right below the game logo icon. The bitmap window size is 512x256. The variable "ControlObject" is derived/set by detecting sprite collisions. I am using an array (RADIOLOG) of 12 lines of text for output that appear to scroll upward out of view as new messages are sent to the routine. I created "MyColor" for the shadow. The shadow is produced by outputting the same line of text using "MyColor" at an offset of 2 pixels in both the X/Y direction. Then, the next output is using either Yellow or Cyan at the default X/Y location which is controlled by the first word being either "TWR:" or "CODE:" The word "CODE:" is used when I want to output something dealing with the programming for debug purposes. Otherwise, this display is used to show game dialog.
this is nothing new in terms of programming, but it has been troublesome using the Dark GDK.NET library. So, I wanted to share my solution with others who are trying to accomplish the same thing. Have fun!
Russell B. Davis/aerostudios