Hotspots in .Net - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 43

Thread: Hotspots in .Net

  1. #16
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,946

    Re: Hotspots in .Net

    Tried to get that to compile, but it's missing files. Post a .sln file, outside of the program folder itself. Inside, copy everything EXCEPT the BIN and OBJ folders, and we can unzip and run.

    HotSpots.sln would open .\HotSpots\My Project
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  2. #17
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    solution file

    Ya, and I couldn't frankenbuild it either.
    I am eager to take a peek though.

    __________________
    Tip
    Oh, and I've got a good tip that's slightly related to the .sln file.
    Sometimes that file ends up inside the folder along with the .vbproj file, after converting from an older solution 2003.
    It's easy to move the .sln to it's proper placement outside.
    Then open it with notepad, and on the 3rd line or so, you can modify the path to the .vbproj file.

    The line would look something like this:
    Project("{.....}") "HotSpots", "HotSpots\HotSpots.vbproj", ....
    This doesn't actually work with the HotSpots project, but it would work for converted projects, that don't conform to the vb 05-08 structure.

  3. #18
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    Yup, the MyProject folder is empty.

    But the solution file actually opens the project file, which then in turn needs the contents of the MyProject folder.

    So we don't even need a solution file, just the MyProject folder content.

  4. #19
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,946

    Re: Hotspots in .Net

    I get about 10 errors, about missing resourses. Might be something about Vista x64?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #20
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    I just got 1 error(xp), not able to open the vbproj file.
    Almost certain, it's the missing resources within the MyProject folder.

  6. #21
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Hotspots in .Net

    Sorry Guy's ..

    Not quite sure what the hell happened there, Posted it the same way i always do ... however somehow i think something got Fed.. When i check the original zip on my system, it also gave errors..

    Heres a new zip .. (tested this time, and it does have everything in it ...) [.NET 2008 (2.0 Framework)]
    Attached Files Attached Files
    Last edited by GremlinSA; January 15th, 2009 at 03:18 AM.
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  7. #22
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    Hey GremlinSA,
    The solution file is getting an error, saying that it was created by a newer version. Perhaps 2010?

    The project file seems to open fine though.

    But man, this 2008 makes everything run wicked slow.
    I had tried 2008 early last year, and gave up because of the insistently annoying intellisense, and extra junk jazz that was pre-requisite.
    I'm beginning to regret re-installing it, but I got check it out more thouroughly I guess.

  8. #23
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    Wow, that's awesome code Grem! Works perfect.

    Unforetuneatly, 2008 has got to go for now.
    It's causing all of my windows a 400-800 millisecond delay before showing.
    I mean all of them.
    I'm gonna re-re-install it after doing a 2 minute shutdown, and see what happens on my other machine too.
    If nada, then it gets the boot for good.
    Last edited by TT(n); January 15th, 2009 at 02:53 AM.

  9. #24
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Hotspots in .Net

    The basic idea about not zooming the mask image is taken from work done in the Crop/ Zoom project Thread, (VB6 forum)..

    This way you have a lot less distortion of the pixel data, and a more accurate Hotspot definition.. (If the zones are painted properly..)

    In the Grey scale image i just used a 20 pixel pen to paint over the specified hotspot regions, Freehand.. then i saved it in Jpg format, that does haze the edges, BMP is better for masks..

    I also used a 10 step color gaps as it alows you to see the different regions in the mask, however you can use 1 step color gaps, and have 255 hotspots... or you could use truecolour and have prety much unlimited hotspots..

    I'm not sure why it told you that it was created in a newer ver.. I'm using VS 2008 Pro.. (9.0.21022.8)
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  10. #25
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    It's super impressive, and very short code. I was expecting at least 3-4 pages.
    I had a hard time trying to trick it into giving the wrong hotspot at all.


    You're right, it should not have thrown that error, because my version in the about window, says 9.0.30729.1, which is actually newer than yours.
    However, I suspect it's the pro or Studio, since this is only express. Not sure how that works though.
    Last edited by TT(n); January 15th, 2009 at 03:52 AM.

  11. #26
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,946

    Re: Hotspots in .Net

    Great work, Gremmy! Finally got around to testing it out. Need a little more info about the greyscale. How did you make that again? I see tracing the hot-spots. Obviously BLACK is zero.

    Then you colored everything in the region BLACK, and then marked the LSB of all the BLACK regions?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  12. #27
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Hotspots in .Net

    I made it even easier than that ...

    Because Pic2 is a background mask, and the user does not get to see it, i used all the greyscale bits, giving me 256 different regions. (&H00 - &HFF) ..

    I used white (&HFF) as the base region, or background, non hotspot. and painted each region needed as a hotspot with a different color.

    So for the first region i used black (&H00).. For region 2, I could have used the next color (&H01) but i jumped a few to visually show the different regions in the masked image. So region 2 is color 10 (&H0A), region 3 = 20 (&H14) .. etc

    Esentually you use each available color as a region, and can have 255 hotspot regions set in the image.

    Gremmy..
    Last edited by GremlinSA; January 16th, 2009 at 01:33 AM.
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  13. #28
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,946

    Re: Hotspots in .Net

    OK. That makes sense. I've used a Mask image before, but it was two-color only
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  14. #29
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: Hotspots in .Net

    Quote Originally Posted by GremlinSA View Post
    I made it even easier than that ...

    Because Pic2 is a background mask,.....
    That is a clean and usually better approach....but, the original post:
    based on a picture
    Technically eliminated any approach where 2 images (one for display one for mask) was used.

    Once one "plays with" the two image approach and is comfortable in understanding its operation, it should not be difficult to make the jump to slight restrictions in the image colors. e.g. only even shades so that the least significant bit is not used to convey color, but rather conveys (part of) the mask.


    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  15. #30
    Join Date
    Jun 2004
    Location
    NH
    Posts
    674

    Re: Hotspots in .Net

    TheCPUWizard,
    Man, you just disagree with everything.
    Technically, the original post didn't say
    "based on one picture"
    That was your own mental restriction.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center