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

Putting an Image in the Chat Box (SOLVED)


Kimimaru
 Share

Recommended Posts

I got this working a while back for an emoticon feature in Mirage.

![](http://i38.photobucket.com/albums/e112/Kite_Minase/fas.png)

I think someone tutorialised it… let me check my Mirage backups...

Here you go.

[http://miragesource.com/old-tutorials/temporary_archive/Emoticons%20In%20Chat.html](http://miragesource.com/old-tutorials/temporary_archive/Emoticons%20In%20Chat.html)
Link to comment
Share on other sites

Thanks, but I don't think I explained what I want to do well enough, sorry. I basically want to be able to set the background of the chat box to an image. For example, instead of having a plain colored background, maybe the chat box can have an image of a grassy field or something.
Link to comment
Share on other sites

What are you talking about? Making it transparent is so ducking simple. Go to your frmMirage and:

```
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const MAKE_THAT_TXT = (-20)
Private Const DUCKING_TRANSPARENT = &H20&
```
Just add that shiz to declarations and make sure frmMirage loads the following:

```
SetWindowLong txtChat.hwnd, MAKE_THAT_TXT, DUCKING_TRANSPARENT
```
There. Problem solved. Now add an image behind the text box and there you have your uber chatbox.
Link to comment
Share on other sites

@Braiton:

> What are you talking about? Making it transparent is so ducking simple. Go to your frmMirage and:
>
> ```
> Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
> Private Const MAKE_THAT_TXT = (-20)
> Private Const DUCKING_TRANSPARENT = &H20&
> ```
> Just add that shiz to declarations and make sure frmMirage loads the following:
>
> ```
> SetWindowLong txtChat.hwnd, MAKE_THAT_TXT, DUCKING_TRANSPARENT
> ```
> There. Problem solved. Now add an image behind the text box and there you have your uber chatbox.

Renaming your variables to crap like that is fairly pointless.
Link to comment
Share on other sites

@Robin:

> @Braiton:
>
> > What are you talking about? Making it transparent is so ducking simple. Go to your frmMirage and:
> >
> > ```
> > Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
> > Private Const MAKE_THAT_TXT = (-20)
> > Private Const DUCKING_TRANSPARENT = &H20&
> > ```
> > Just add that shiz to declarations and make sure frmMirage loads the following:
> >
> > ```
> > SetWindowLong txtChat.hwnd, MAKE_THAT_TXT, DUCKING_TRANSPARENT
> > ```
> > There. Problem solved. Now add an image behind the text box and there you have your uber chatbox.
>
> Renaming your variables to crap like that is fairly pointless.

I know. Its like the most retarded thing anyone can do. But it relieves stress. I need that; specially in this time of the year. God dammit >.<
Link to comment
Share on other sites

  • 4 weeks later...
Add this to frmMirage's Form_Load:
```
SetWindowLong txtChat.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT

```
Add these to modConstants:
```
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_TRANSPARENT = &H20&

```
Add this to modDeclares:
```
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

```
Link to comment
Share on other sites

Thanks; however, I've added this in, and I've changed the statement in frmMirage's Sub Form_Load to the following because I want it to take effect for the text box:

```
SetWindowLong txtMyTextBox.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
```
Unfortunately, it didn't work for whatever reason.
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...