Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Transparent Chat Box


Rob Janes
 Share

Recommended Posts

For those wondering how to make your txtChat (the Chat-Box) transparent, so you can have an image behind it, it's quite simple.

Add this to any module, I use modConstants
```
'Declarations/Functions for Transparent Rich Text Boxs
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_TRANSPARENT = &H20&
```

Go to frmMain, on the sub frm_Load, add
```
Dim TransRichText As Long
TransRichText = SetWindowLong(txtChat.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT)
```
Voila! All Done! (This can also be used with different variables to set an entire form to have a % transparency, I think Robin posted that on someone's posts a few weeks ago, I can add it here if people want it, or you can use Google)
Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

@Dzastin:

> txtChat (the Chat-Box)
>
> how can I do to : txtMyChat?

You'd have to change txtMyChat to a RichTextBox, without Multilines, but you'll also need to modify the HandleKeypresses as it won't pick up vbKeyReturn on a RichTextBox without some minor tweaking, but easily doable.

A simple TextBox can't handle the transparency.
Link to comment
Share on other sites

I don't.

I just did a build using the semi-transparent forms, and having it basically always be ontop of the map…mimicing Alpha Blending, but it KILLS the Frame Rate as well.  There's just no easy way to get that 'look' and 'feel' without upgrading to DX8
Link to comment
Share on other sites

@SamuGames:

> I don't.
>
> I just did a build using the semi-transparent forms, and having it basically always be ontop of the map…mimicing Alpha Blending, but it KILLS the Frame Rate as well.  There's just no easy way to get that 'look' and 'feel' without upgrading to DX8

C++ powered .DLLs integrated into VB6 accessibility.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...