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

DD7 picture box rendering.


abhi2011
 Share

Recommended Posts

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

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

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

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

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 frmMain

Add 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 = False

Now 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 If
End 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

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 If
End 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

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...