Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 This is stock EO 3.0.Hello there, and it's me, Kemerd! With yet another question. (Yes, yes. Another one.) I've been wondering… How would I go about making my GUI and other things transparent? Here's a look at what I'm looking to make transparent.>! ![](http://img255.imageshack.us/img255/9651/finishedgui.png) I'm trying to make the .jpeg files transparent. Meaning, that I'd rather not render the WHOLE system over,(meaning the positioning and rendering the actual .png file, and since everything is already connected to the picturebox, there would be almost a total rewrite) just actually load the .jpeg files, and then make them at, let's say 50% transparency. (I'm going to probably loading a picture behind those two pictureboxes so that's not really the problem.)Also, can I make chat semi-transparent, maybe loading another .jpeg as the backround and making that semi-transparent? Or could I make the backcolor semi-transparent?Thanks, again.~Kemerd Link to comment Share on other sites More sharing options...
SkywardRiver Posted March 9, 2013 Share Posted March 9, 2013 You need a dx8 engine. If that is dx8 Then you would have to code rendering for everything as well. At least, that is my belief, I may be wrong. Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 I'm not trying to re-render everything as a .png, or render the pictureboxes all over again. I'm still trying to use .jpeg, but make them semi-transparent using the Dx8 engine. There still would be some rendering and such, but how would I go about doing that? Link to comment Share on other sites More sharing options...
Santini Posted March 9, 2013 Share Posted March 9, 2013 I am pretty sure you are not going to be able to do it that way and that you will probably have to do it the way you do not want to. Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 I am still talking about rendering, but could I render them inside a picturebox? Without having to do all that treacherous renaming of death? Link to comment Share on other sites More sharing options...
Santini Posted March 9, 2013 Share Posted March 9, 2013 Even if you did it that way it would still have the colour of the pictureboxs background behind it. So no it would not work. Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 So I couldn't make the whole form of the pictureboxes transparent? Link to comment Share on other sites More sharing options...
Santini Posted March 9, 2013 Share Posted March 9, 2013 If you want a transparent gui over the game screen you are not going to be able to do this using pictureboxes Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 When I render, could I dim the name of the thing I'm rendering picInventory.Example: Let's say I'm rendering the Inventory. Could I make the name of that new inventory named "picInventory" so I wouldn't have to mess with the other stuff? Link to comment Share on other sites More sharing options...
MadalinV Posted March 9, 2013 Share Posted March 9, 2013 If you want your GUI transparent, there's no way you can try to use JPEG format…. Only PNG format supports transparency, it was allways like that, and it will allways be. Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 No, what I'm saying NOW, (in my last post), that if I'm rendering the GUI (as a .png) could I somehow make the name of the now new rendered GUI to picInventory, etc. So I wouldn't have to modify all the other things everywhere. Link to comment Share on other sites More sharing options...
Ertzel Posted March 9, 2013 Share Posted March 9, 2013 You need dx8 for the transparency… I think there is some way to do it with dx7, but it requires heavy edits that I forget how to do now...And no Kermerd, you cannot simple make a rendered graphic act like a picturebox by naming it something.... Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 Not acting like a picturebox, just so everything would be right when I load everything inside of it… like the inventory slots. Link to comment Share on other sites More sharing options...
Ertzel Posted March 9, 2013 Share Posted March 9, 2013 No, you'd have to change all of those to work with it being based on a rendered graphic and not a picturebox anymore…If you wanted to make the GUI transparent without switching to dx8, you have to remove all the pictureboxes and make them rendered like any other graphic would be. You have to make the parts that you want transparent to all be one color on that image that isn't anywhere else on the image (like the bright pink the sprites and other graphics use in EO). Then you make that color of pixel not rendered to it appears transparent...It's going to require a lot of edits for you to change all of the GUI over to this format, and I've been away from vb6 and dx7 for far to long to show the code needed... Link to comment Share on other sites More sharing options...
Kemerd Posted March 9, 2013 Author Share Posted March 9, 2013 Thanks. Also, do you know how to lock a topic? Link to comment Share on other sites More sharing options...
dimx Posted March 9, 2013 Share Posted March 9, 2013 You can put each picture box and text box in a separate form then make the whole form translucent.On form load just type.```Transparent Me, 150```And then In any module paste this.```' Form Translucency StuffPublic Const GWL_EXSTYLE = (-20)Public Const WS_EX_LAYERED = &H80000Public Const WS_EX_TRANSPARENT = &H20&Public Const LWA_ALPHA = &H2&Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crey As Byte, ByVal bAlpha As Byte, ByVal dwFlags As Long) As LongPublic Function Transparent(Form As Form, Layout As Byte) As BooleanSetWindowLong Form.hwnd, GWL_EXSTYLE, WS_EX_LAYEREDSetLayeredWindowAttributes Form.hwnd, 0, Layout, LWA_ALPHATransparent = Err.LastDllError = 0End Function```You will get a result similar to the image attached. You will of course have to change the location of each picture box to the new form within your code so that everything works properly again.Then you will need to play around with the forum settings set the border style to none if you want. And add drag and drop code to it.But since you already have DX8 I would recommend using the features it has once you get used to it it will be a piece of cake to work with. I just think if you want to do something do it right. Link to comment Share on other sites More sharing options...
Bloo Posted March 9, 2013 Share Posted March 9, 2013 I thought you needed dx8 to make things transparent in Eclipse.. o.o; Link to comment Share on other sites More sharing options...
dimx Posted March 9, 2013 Share Posted March 9, 2013 > I thought you needed dx8 to make things transparent in Eclipse.. o.o;Well depends on what you want do do and how you want to do it. There are always different ways to achieve similar effects. I also have an example here.http://www.touchofdeathforums.com/community/index.php?/topic/129475-use-alpha-blending-in-directdraw-dx7/Now of course there are always pros and cons with one method over the other. 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