Kimimaru Posted December 11, 2009 Author Share Posted December 11, 2009 Hey! I was just wondering how you can put an image into the chat box on **frmMirage**. It's a RichTextBox, and it doesn't have an option to put in an image. Is there a way to do it without any coding? Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Robin Posted December 11, 2009 Share Posted December 11, 2009 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 More sharing options...
Kimimaru Posted December 11, 2009 Author Share Posted December 11, 2009 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 More sharing options...
Flaw Posted December 11, 2009 Share Posted December 11, 2009 You should be able to just set the text box background to transparent, then put a picturebox behind it.Now that I look at the form, I think I might be wrong. But the idea was sound? Lol Link to comment Share on other sites More sharing options...
Robin Posted December 11, 2009 Share Posted December 11, 2009 Make it transparent if you want, set the form's background as the GUI. Link to comment Share on other sites More sharing options...
Kimimaru Posted December 11, 2009 Author Share Posted December 11, 2009 I can't do any of that since I can't make it transparent. Also, I don't think I can replace the RichTextBox with anything else, since nothing else seems to have the same, required properties for a textbox that text displays on. Link to comment Share on other sites More sharing options...
Braiton Posted December 11, 2009 Share Posted December 11, 2009 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 LongPrivate 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 More sharing options...
Robin Posted December 11, 2009 Share Posted December 11, 2009 @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 More sharing options...
Braiton Posted December 11, 2009 Share Posted December 11, 2009 @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 More sharing options...
Kimimaru Posted December 11, 2009 Author Share Posted December 11, 2009 Okay, thanks a lot! I was hoping to get it done without any coding, but this is a very short code, so I'll use it. Link to comment Share on other sites More sharing options...
Robin Posted January 4, 2010 Share Posted January 4, 2010 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 More sharing options...
Kimimaru Posted January 4, 2010 Author Share Posted January 4, 2010 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 More sharing options...
Robin Posted January 4, 2010 Share Posted January 4, 2010 MyTextBox is a normal TextBox, not a RichTextBox. :PChange it to a RTB. Link to comment Share on other sites More sharing options...
Kimimaru Posted January 4, 2010 Author Share Posted January 4, 2010 Yeah, I realize that, but I believe I PMed you because I wanted to know how to do the same thing with a normal text box. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now