VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Community Off-Topic
  • Search

HELP: Image Coordinates ??

Random thoughts...

Moderator: Community Managers

Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
HELP: Image Coordinates ??
  • Quote

Post by John Adams » Mon Feb 23, 2015 7:45 pm

I've been building web pages for 15 years, and not once have I ever (intentionally) used those fancy png or jpg image files that have multiple versions of themselves inside - like a link and hover image. Example:
btn-play.png
(75.89 KiB) Downloaded 203 times
Depending on the application state, one of these colored images shows up on a button. For example, not authenticated the button might be the top one (dark) but ready to play, it's Green. If an error, it's Red. Instead of 4 jpgs, they are all in a single jpg.


Problem: I have no idea what this is called (technologically speaking) so I cannot begin to Google how to do this in C# Does anyone know the official technical term for displaying a region of an image dynamically?


~blush~ I really should know this, but embarrassingly, I do not. Thanks in advance.


Edit: If this helps, here's a CSS of what the button might look like

Code: Select all

background: url('images/wrapper/window-controls.png?h=658e8dc0') repeat-x scroll 0px 0px transparent;
Oh crap, are you telling me that all this is doing is on Hover, move the margin -27 or something? heh... ok, I'm done editing. Anyone?
Top

Glaxono
Posts: 68
Joined: Sun Apr 27, 2014 8:09 am
Re: HELP: Image Coordinates ??
  • Quote

Post by Glaxono » Mon Feb 23, 2015 10:41 pm

Here are a few links to resources on this. Is this what you needed?
http://www.w3schools.com/css/css_image_sprites.asp
http://css-tricks.com/css-sprites/
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: HELP: Image Coordinates ??
  • Quote

Post by John Adams » Tue Feb 24, 2015 6:08 am

Hah, yup. I think that's what I am talking about, thank you. Funny, for some reason I thought there was more "magic" involved than just placing width/height/margins in CSS. Either way, that won't work for me in C#, but for my web stuff it will come in handy. Thanks again!
Top

Glaxono
Posts: 68
Joined: Sun Apr 27, 2014 8:09 am
Re: HELP: Image Coordinates ??
  • Quote

Post by Glaxono » Tue Feb 24, 2015 6:54 am

You can use the System.Drawing namespace in .net if you need to manipulate the image sprites in c#
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: HELP: Image Coordinates ??
  • Quote

Post by John Adams » Fri Feb 27, 2015 3:43 pm

I need a little advice on C# in general; used it for years, but never played with User Controls. I'm using a few of them in a new app I'm designing, and the thing I'm noticing is a lot of "flashing" as the app starts - even in Release. It's faster, and practically unnoticeable in Release, but annoying nonetheless.

I've tried setting all panels to Visible = false; initially, and toggling their visibility after the main control loads - but even with everything "invisible", I STILL see flashing.

Any ideas?
Top

Glaxono
Posts: 68
Joined: Sun Apr 27, 2014 8:09 am
Re: HELP: Image Coordinates ??
  • Quote

Post by Glaxono » Fri Feb 27, 2015 6:23 pm

When do you see the flash? during the initial page load? Is the hidden panel markup still sent to the browser? Is so, set style = 'display:none;'
Top

User avatar
John Adams
Retired
Posts: 4582
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: HELP: Image Coordinates ??
  • Quote

Post by John Adams » Fri Feb 27, 2015 6:45 pm

Browser? Sorry, maybe I forgot to mention this was a WinForms app I've tried WPF and such, and it's so frustrating I cave and go back to WinForms.
Top

Glaxono
Posts: 68
Joined: Sun Apr 27, 2014 8:09 am
Re: HELP: Image Coordinates ??
  • Quote

Post by Glaxono » Fri Feb 27, 2015 7:07 pm

Heh... I only play around with WinForms for very small internal needs. I am an asp.net app developer and stick with MVC for most of my projects.

Sorry I can give any further help on this
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Off-Topic”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD