Rob Janes Posted February 7, 2011 Author Share Posted February 7, 2011 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 BoxsPublic Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Const GWL_EXSTYLE = (-20)Public Const WS_EX_TRANSPARENT = &H20&```Go to frmMain, on the sub frm_Load, add```Dim TransRichText As LongTransRichText = 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 More sharing options...
crzyone9584 Posted February 7, 2011 Share Posted February 7, 2011 wouldn't this also dim the text though? Link to comment Share on other sites More sharing options...
Dzastin Posted February 7, 2011 Share Posted February 7, 2011 txtChat (the Chat-Box)how can i do to : txtMyChat? Link to comment Share on other sites More sharing options...
Rob Janes Posted February 7, 2011 Author Share Posted February 7, 2011 @crzyone9584:> wouldn't this also dim the text though?No, it doesn't affect the text. Link to comment Share on other sites More sharing options...
Rob Janes Posted February 7, 2011 Author Share Posted February 7, 2011 @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 More sharing options...
shado360 Posted February 8, 2011 Share Posted February 8, 2011 Doesn't work while placing it on-screen :P Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 No, you'd need use DrawText for that, and it hinders your Frame Rate. :( Link to comment Share on other sites More sharing options...
shado360 Posted February 8, 2011 Share Posted February 8, 2011 Lol, back to using my way of doing it :D–--EDIT-----Do you have teamviewer? Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 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 More sharing options...
shado360 Posted February 8, 2011 Share Posted February 8, 2011 I have the same thing with semi-transparent forms :D I wish I knew how to upgrade to DX8 :(Regards,Païn Link to comment Share on other sites More sharing options...
mrmiguu Posted February 8, 2011 Share Posted February 8, 2011 @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 DX8C++ powered .DLLs integrated into VB6 accessibility. Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 vbDABL for example? Not a big fan, it's still slow and choppy. Heh. Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 Doesn't matter how you do it in DD7 it's still going to be slow. Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 Agreed, see Screenshots of FPS benchmarks on a large map (50x50 running with Max_NPCs) herehttp://www.touchofdeathforums.com/smf/index.php/topic,67994.msg740983.html#msg740983 Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 I was referring to doing it in DD7\. xDBut yes, abusing the API like that will slow the engine right down as well. Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 Aye, it's a damn shame.I know there is no DirectDraw in DX8, so I'm stuck having to learn to port to D3D or IDDraw7 functionality of DX8, any preferred method you'd recommend? Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 Buying it from me when I release it? ;D Link to comment Share on other sites More sharing options...
shado360 Posted February 8, 2011 Share Posted February 8, 2011 I wanna buy it too! How much would you be selling it for? Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 Heh, I'd rather pay you to convert mine to DX8…That way I don't have to port all my existing work into a new engine ;) Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 @SamuGames:> Heh, I'd rather pay you to convert mine to DX8…That way I don't have to port all my existing work into a new engine ;)No thanks. Link to comment Share on other sites More sharing options...
Rob Janes Posted February 8, 2011 Author Share Posted February 8, 2011 Pfft, going to make me port all my changes over aren't ya? You know I'll do it too, lol. Link to comment Share on other sites More sharing options...
Iann Posted February 8, 2011 Share Posted February 8, 2011 how to make the translucent box Picture ? Link to comment Share on other sites More sharing options...
saruish Posted February 11, 2011 Share Posted February 11, 2011 i think this is all client side . i think >.> is it? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted February 11, 2011 Share Posted February 11, 2011 Yes. Link to comment Share on other sites More sharing options...
saruish Posted February 11, 2011 Share Posted February 11, 2011 thought so . wow to be honest this coding stuff isnt too hard .>.> just common sense to me i guess. 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