abhi2011 Posted July 10, 2012 Author Share Posted July 10, 2012 Hello guys. Could anyone tell me how to render a picture box on picScreen at only needed times? I have tried to normally show the picture box but it wouldn't display at the proper place needed. It would just display at the side. I thought rendering might get it to work. but TBH I don't know rendering and how it works. Link to comment Share on other sites More sharing options...
Jacquelinett Posted July 10, 2012 Share Posted July 10, 2012 What do you mean at only needed time? Couldnt you use the picturebox's visible value to make it visible and not visible when needed? Link to comment Share on other sites More sharing options...
abhi2011 Posted July 10, 2012 Author Share Posted July 10, 2012 When needed that is when the player does something. For example he right clicks something and an option is visible. I have tried normally showing it up by making it visible. But it doesn't display properly. I just put it over the picScreen. Nothing more. Link to comment Share on other sites More sharing options...
Jacquelinett Posted July 10, 2012 Share Posted July 10, 2012 Ah I see.Do you know any DD7?This is how it work:First you need to create a surface. A surface is like an image. Then you blit the picture, and make it appear at the use PlayerSearch(curX, curY) and render the make the picture appear at that cursor location.Ah and look up DD7 tutorial. It will help Link to comment Share on other sites More sharing options...
aaaron Posted July 10, 2012 Share Posted July 10, 2012 Are you talking about something like the bank/shop/etc. screens? Link to comment Share on other sites More sharing options...
abhi2011 Posted July 11, 2012 Author Share Posted July 11, 2012 @YumiNo I don't know DD7\. But I have tried it. By surface do you mean a picture box? I don't know blting that is the problem.@AaronNo right click system Link to comment Share on other sites More sharing options...
Jacquelinett Posted July 11, 2012 Share Posted July 11, 2012 No. A surface, is…. a picture, but not a picture box. I dont know DD7, but i had been working with SDL and sort of dx8\. But they all are similar.Think about how robin load picture on CS:DE and dont use a single picture box, each picture in there is called a surface. Link to comment Share on other sites More sharing options...
abhi2011 Posted July 12, 2012 Author Share Posted July 12, 2012 Oh you mean declaring the surface. Well I did till there. And I also tried making a sub. After that I got confused. I don't know how to blt it. Link to comment Share on other sites More sharing options...
dimx Posted July 12, 2012 Share Posted July 12, 2012 I don't understand your question exactly but I will try to help.I am assuming you are using EO v2 I am not from around here so I don't know which version people are using.Open the client go into frmMainAdd a picture box and name it whatever you want I just left mine to default "Picture1"Make AutoRedraw and AutoSize = True this will come in handy later.Make it visible = FalseNow find```Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)```Under This```ElseIf Button = vbRightButton Then```Add``` Picture1.Left = X + 8 Picture1.top = Y + 8 Picture1.Visible = True```Changing the Picture1 to the name of your picturebox and the +8 is just if you want the picture box to appear a little further away from the cursor you can mess with those values.Now add this to the frmmain This is optional it makes the picture box dissapear when you let go of the mouse right button.```Private Sub picScreen_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbRightButton Then Picture1.Visible = False End IfEnd Sub```Now this might not be the best way of doing this but it will give you the effect I am thinking you are trying to go for.Also I am not sure what you want to display inside the picture box so if you give me more info I might be able to help. Link to comment Share on other sites More sharing options...
abhi2011 Posted July 12, 2012 Author Share Posted July 12, 2012 Okay that might work. But mouse up wont be to good. when mouse is pressed and if it is left button then the pic should disappear. Link to comment Share on other sites More sharing options...
dimx Posted July 12, 2012 Share Posted July 12, 2012 Ok so instead of using this```Private Sub picScreen_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbRightButton Then Picture1.Visible = False End IfEnd Sub```Look for```Private Sub picScreen_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)```again and right under```If Button = vbLeftButton Then```add```Picture1.Visible = False```You can also make a 'X' button inside the picturebox so when it is clicked it will set the picturebox visible = false. Link to comment Share on other sites More sharing options...
abhi2011 Posted July 12, 2012 Author Share Posted July 12, 2012 Lol I know how to do it. Link to comment Share on other sites More sharing options...
dimx Posted July 12, 2012 Share Posted July 12, 2012 Oh, sorry I didn't interpret your post well.Anyway if you need more help let me know. Link to comment Share on other sites More sharing options...
abhi2011 Posted July 12, 2012 Author Share Posted July 12, 2012 Okay. Thanks! If you know DD7 could you teach me? Link to comment Share on other sites More sharing options...
dimx Posted July 12, 2012 Share Posted July 12, 2012 Yup what do you need to know I mean what do you already know. If you give me a simple example of what you need I can do it for you and explain the code. 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