Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A Visual Basic 2008 Question

Featured Replies

Is it possible to Divide an image into 5 or so different parts across 5 picture boxes without photoshoping the picture into 5 parts and then use 5 picboxes? I need to do this, so if a user clicks a certain part of the picture box I can program some event to go along with it.

wii_wheaton.png

[software Engineer] -

[Ability Bar Suggestion] - [Gaming Enthusiast]

Is it possible to Divide an image into 5 or so different parts across 5 picture boxes without photoshoping the picture into 5 parts and then use 5 picboxes? I need to do this, so if a user clicks a certain part of the picture box I can program some event to go along with it.

 

 

 

Hmmm... day or 2 old topic but no responses... lets see if I have any kind of insight with this...

 

 

 

I'm not familiar with VB08 so I can't be sure if anything I'm about to say works, but wouldn't it be possible to check where the click was on the picture (pixel x pixel)? If so, then simply create 1 single Subroutine for when they click on the picture and use that to establish where the click was. Then, depending on where the click falls in based on ranges you'll set up, have it execute 1 of X-many other Subroutines related to each individual area of the picture, but not actually attached to the picture directly in terms of how the program is executed.

 

 

 

 

 

So as a general layout of the code, you could have something to the following.

 

 

 

-On click of the picture-

*code to find which pixel exactly was clicked*

If (location) was between (X1,Y1) and (X2,Y2) Then

 Run (code 1)

Elseif (location) was between (X3,Y3) and (X4,Y4) Then

 Run (code 2)

etc

etc

 

 

 

So while you aren't actually "dividing" the image, you are creating a code that can determine which area, that you would have established before, was clicked in and execute the code appropriately.

 

 

 

Sorry I can't be more help, but I left all of my reference books back on my campus (Christmas holiday atm) and those are all Visual Basic 6 books regardless, so I can't really give you exact code.

f475e02ecc.png

don't worry, you are going to "hell" anyway. wanna race to see who gets there first?

Officially reached 100 Combat at 1:33PM EST, June 14, 2007

First Dragon Drop: Dragon Chain (Dust Devils) @ 10:48PM EST, July 14, 2008, lv113 combat

I would suggest using JS for this, it has some built in image mapping features. The GIMP even has a code generator for it. (Filters -> Web -> Image map)

C2b6gs7.png

I would suggest using JS for this, it has some built in image mapping features. The GIMP even has a code generator for it. (Filters -> Web -> Image map)

 

Image maps are (x)html, visual basic is not a web thingy, I don't think?

...There you see what happens when it's 6:40 am and you haven't had any coffee. :wall: Just thought of that on my way to school.

C2b6gs7.png

...There you see what happens when it's 6:40 am and you haven't had any coffee. :wall: Just thought of that on my way to school.

 

/me laughs at your screwed up timezone, I'm just about to go to sleep :P

This is pretty simple if you know where to look.

 

Double click the picture box in question.

 

Now your in the code view, there should be 2 drop down boxes just above the code.

 

Click the one on the right and select on Mouse Click.

 

Now add this to the sub

 

        Dim MouseX As Integer = e.X

       Dim MouseY As Integer = e.Y

 

 

 

Now you can simply pick off the the x and y locations you wish to use.

 

Remember 0,0 will be the top left.

[hide=Drops]

  • Dragon Axe x11
    Berserker Ring x9
    Warrior Ring x8
    Seercull
    Dragon Med
    Dragon Boots x4 - all less then 30 kc
    Godsword Shard (bandos)
    Granite Maul x 3

Solo only - doesn't include barrows[/hide][hide=Stats]

joe_da_studd.png[/hide]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.