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

Changing a picture box based on Map


Ruins of Hell
 Share

Recommended Posts

@Robin:

> Wtf is:```
> Me.Map.Picture
> ```
> Name your controls properly. You don't need "Me." if the code is on the same form as the control is.
>
> Also, you can't just directly try and load a PNG file without converting it.

When I try to remove it I get an error, so I'll just keep it.

If by converting it, you mean changing the file type, then I've tried .bmp too, no dice.
Link to comment
Share on other sites

Well what Frm do you have the picturebox in, and whats the name of the picturebox you want to display.. Also why is it GetPlayerMap(1), The code to find a players map in the Client is GetPlayerMap(MyIndex)
Also just .Picture is for the background im pretty sure.

And```
= "\GUI\Maps\" & GetPlayerMap(1) & ".png"
```
would not be the proper format to load the picture.
I think it should be ```
= LoadPicture(App.path & "\GUI\Maps" & GetPlayerMap(MyIndex) & ".bmp" & Ending)
```
Then it would go in modHandleData under
```
Public Sub Packet_PlayerData(ByRef Parse() As String)
```
Once you give me the name of the frm you want to load it in (Im guessing its frmMirage or frmStable if its the gamegreen you want to load it on) and the name of the PictureBox you want it to load on, then I can fill in the rest.
Link to comment
Share on other sites

@[SB:

> Ertzel link=topic=54909.msg581553#msg581553 date=1259884467]
> Well what Frm do you have the picturebox in, and whats the name of the picturebox you want to display.. Also why is it GetPlayerMap(1), The code to find a players map in the Client is GetPlayerMap(MyIndex)
> Also just .Picture is for the background im pretty sure.
>
> And```
> = "\GUI\Maps\" & GetPlayerMap(1) & ".png"
> ```
> would not be the proper format to load the picture.
> I think it should be ```
> = LoadPicture(App.path & "\GUI\Maps" & GetPlayerMap(MyIndex) & ".bmp" & Ending)
> ```
> Then it would go in modHandleData under
> ```
> Public Sub Packet_PlayerData(ByRef Parse() As String)
> ```
> Once you give me the name of the frm you want to load it in (Im guessing its frmMirage or frmStable if its the gamegreen you want to load it on) and the name of the PictureBox you want it to load on, then I can fill in the rest.

Just found that out, and there's a reason why I don't want it to load for MyIndex.
Link to comment
Share on other sites

i figured out your solution.. your trying to find the player map then taking a picture. So your problem is .. but this is just my opinon.. but vb cant read code then desplay a picture.. but what you can do is make screen shots of the map store it in a folder then have vb call that picture… not sure if thats what your doing but.. yea..
Link to comment
Share on other sites

That is what he's doing. He's not loading a map. He's loading a file named "#.bmp" where the number is the map number. Try this

```
Map.Picture = LoadPicture App.path & "\GUI\Maps\" & CStr(GetPlayerMap(1)) & ".bmp"
```

Assuming that the folder is called "Maps" and the file is "#.bmp", which I figured is the case, this should work. If not, then the folder is "GUI" and the file is "Maps#.bmp", which is what you already had. Dunno if that's what you were trying to do.
Link to comment
Share on other sites

@Tdogthedog:

> i figured out your solution.. your trying to find the player map then taking a picture. So your problem is .. but this is just my opinon.. but vb cant read code then desplay a picture.. but what you can do is make screen shots of the map store it in a folder then have vb call that picture… not sure if thats what your doing but.. yea..

You fail at logic.

Soul, we can't bloody help you because we don't know what you're trying to do.
Link to comment
Share on other sites

Tell us the name of the frm the picture is one, and the name of the picture box and then we can tell you how to code it.

The code I posted is what you need to use, its just not the full code because you posted random information thats not what is needed to finish the code.
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...