Determine If Image Is On Screen

May 11, 2010

I am trying to detemine whether an image is currently displayed on the screen or not, even if only in a given location on the screen since I will know the exact pixels it will display it & everything but I am having a hard time trying to determine whether an certain image is there or not.

View 1 Replies


ADVERTISEMENT

Determine An Image's Screen Coordinates?

May 11, 2012

I have an image resembling a chessboard inside a picturebox displayed on the screen at runtime. I am using Visual Basic in Visual Studio 2008. I need to determine when a user clicks on a particular part of the image. I am able to do this without a problem when debugging on my computer, where I can experiment with trial-and-error clicking to get the screen coordinates of the portion of the image of interest. Everything changes, however, when the program is run on a screen with a different resolution and coordinates.

I can easily get the coordinates for the picturebox that contains the image using PointToScreen. However, there seems to be no such property for the image within the picturebox, which is what I need.

View 8 Replies

.net - Determine Which Screen The Taskbar Is On?

Sep 17, 2011

Screen.PrimaryScreen doesn't always work because on a multi-monitor setup the user may move his/her taskbar to a screen other than the primary. Finding the screen with minimum working area doesn't work too because there may be monitors with different resolutions.

View 2 Replies

Determine If ANY Control On Screen Was Clicked?

Jun 6, 2011

Is there a way to determine is any control at all on a form has gotten focus? I know you can individually determine if a single control has focus or has been clicked, etc. but is there an event that can tell you that some/any control has been clicked?

i.e.
Private Sub myFrm_Magic(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.SomethingClicked
Msgbox(Me.ActiveControl.Name)
End Sub

View 1 Replies

Determine Local Screen Resolution When Using Multiple Monitors?

Feb 4, 2011

I have an application that produces a form whose objects are scaled to the width and height of the primary monitor whose parameters are obtained from:

Dim ScreenWidth As Integer = Screen.PrimaryScreen.Bounds.Width
Dim ScreenHeight As Integer = Screen.PrimaryScreen.Bounds.Height

So far, the program works fine. A possible problem arises when multiple monitors are being used that do not share the same resolution. For example, if the 2nd monitor has a low resolution, then the form is cut-off.

I'd like to:

1.) determine that more than half the form has been moved to another monitor

2.) determine the resolution on the second monitor.

I suspect that the following command will give me all the dimensions that I need:

Dim ScreenWidthUsed As Array = Screen.AllScreens

In which case I just need to determine the screen that is hosting more than 1/2 the form.

View 3 Replies

Determine Programs Build (or Compile Or Publish) Date For Splash Screen?

Jul 16, 2009

I have a "ClickOnce" application and on the Splash screen I display the Version. I am also displaying the "CreationTime" (see below) that I thought was when the Build or Publish was done. Today I realized it is displaying the date/time when the application is actually installed on the PC. How do I pull the date when the this version was compiled, Built, or Published? I really do not care which -I just want a constant date the sticks with that version. I'm using VB 2005.

[Code]....

View 7 Replies

Way To Capture Screen Image And Then Read Data (OCR?) From Image

Feb 13, 2010

I play a game and in the game you acquire skills which you can display on the screen in a box very similar to a data grid. The grid has 3 columns and X number of rows.Column 1 is the name of the skill, column 2 has a descriptive term like "Beginner" and column has the number of points you have acquired in that skill. So it would look something like this:[code]Remember that it is in a data grid so it has cells like an Excel spreed sheet.The program that I use is able to parse the skill name and the points and save that information outside the game to a n area in the program.My question is, is this possible to do something similar in VB? That is something like, Press a hot key, with will get a screen shot, parse the data and save to a data grid in my VB program.

View 2 Replies

Image Magick - Determine If It's Been Installed?

Jun 1, 2010

so my application (Visual Basic 2010) is making use of Image Magick, via the COM object. If the COM is not installed then my application crashes (not surprising). How can I detect if the COM has been installed, so abort and tell the user to install it?

View 9 Replies

VS 2008 Determine If An Image Is In A Directory Or Not?

Feb 2, 2010

Is this possible ? Im creating a desktop wallpaper changer using a timer to set a delay between images. the images im my directory folder is numbered from 1-15. If you look at the pic below theres an option to select how many images the user wants to display on the slideshow, if a user selects up to 15 thats fine. But what can i do if the user enters a number that exceeds the number of images in the directory.

View 3 Replies

Programmatically Determine Background Of Image (logos, Etc) And Make Transparent?

May 20, 2011

I'm attempting to write a solution so that my user's can "watermark" their Images with their Company Logo. I've got the actual watermarking part done and working so now I'm creating the "upload logo" feature so that they can provide me with the Logo they wish to appear watermarked onto their Images.I'm using VB.NET and this will probably end up in a Web Service that accepts the Logo JPG file, and returns the "altered" Logo. What I need to happen in this Web Service is:

1) Gray-scale the image. Which I have working as well, thanks to this article.

2) Make the background transparent (so the logo looks clean when watermarked onto an image). This is where I'm stuck.

I think for the most part, any logos that are uploaded will have a generic white background but I can't assume that. Is there a way to somehow detect the background of an image or the background colors, so that I may make those colors transparent?So basically what I need is just a way to determine the background on an Image or even just the background colors so that I may make them transparent.

View 3 Replies

Take An Image Of Screen Every Second Or So

Feb 19, 2009

I want my program to take an image of the screen every second or so acording to a timer i have the screen capture code but Im not sure on how to get the program to save the image to a directory without showing the save file dialog.[code]this is the code for putting the image in the image box if possible could i have some help so that i could go straight form this code to the save without using a separate sub for it.[code]picturebox1 is the box that the image is held in but i would prefere not to have it there and like i said before as soon as the screenshot is taken i would like it to be saved to a directory of the users choice.If possible i would like each image to be named after the time it was taken.

View 7 Replies

Find Image On Screen?

Sep 12, 2009

I have been trying to make a image recognition function for a program I am making. I am having a hard time getting it to work. It does find the image, but it says pixels don't match after going so far.

The Code below works partially. It will output the program screen as Print.bmp

Will load prizes.bmp

But when it compare the images it exits after half way through like it doesn't match and ouputs test2.bmp as part of the prizes.bmp with a black area in it.

Module ImageFunctions
Public Declare Function PrintWindow Lib "user32" Alias "PrintWindow" (ByVal hwnd As IntPtr, ByVal hDC As IntPtr, ByVal nFlags As UInt32) As Boolean
Sub Print()

[Code].....

View 4 Replies

Look For Image / Pixel On Screen?

Jul 7, 2009

I was wondering if their is a way to set my program to search for a certian image or a set of pixels on the screen every 5 seconds, and if the specific image is on the screen, click it.

View 3 Replies

Sizing Image To Fit Screen?

Oct 27, 2010

Having many thousands of pictures, I made a screen saver with the functionality I want. If the LAN path goes away it reconnects later, bad pics can be deleted, rotated and saved, etc. Sometimes the pics don't size correctly and expand off the screen. The problem may be reuse of the same picturebox. What I might do is have a dedicated picture box with autosize left on, use that to obtain raw image size, then reload again into the picture box that will be displayed.

Private Function loadimage(ByVal pic As PictureBox, ByVal lab As Label, ByVal fname$) As Boolean
With pic
.SuspendLayout()

[Code].....

View 12 Replies

Comparing GIF Image With Certain Part Of Screen

Nov 7, 2011

How I can compare a gif image I have with a certain part of the screen. For example lets say I have the gif for the Close window button (top right hand of the window incase your confused). I would want the program to check the top right hand of the screen in the exact coordinates and see if the pixels match. if so return a variable true.

View 7 Replies

Fit A Large Image On Screen Keeping Its Ratio?

May 4, 2012

The title asks it all, if i have a form with a picturebox (dock = fill), and it loads a bigger picture than the screen bounds, and i want that form to resize so it fits the screen but having the same ratio as the picture size. How shall i do this?

View 4 Replies

VS 2008 - How To Check If Image Visible On Screen

May 16, 2012

I am trying to code something that will check if a png image is visible on your screen. So lets say the image is a purple square with yellow circles in it (random example). It will keep checking to see if the same purple square with yellow circles is on your screen. What I'm trying to say is, instead of checking for one pixel color, check to see if the actual image is on there (maybe multiple pixels?)

View 10 Replies

VS 2008 - Screen Capture (Cropped Image)

Aug 31, 2010

I'm trying to save a screen-shot from a FlowLayoutPanel without the desired success. Here's the code I'm using to same the panel as image:

vb.net
Dim bmpScreenshot As Bitmap = New Bitmap(FlowLayoutPanel1.DisplayRectangle.Width, FlowLayoutPanel1.DisplayRectangle.Height, PixelFormat.Format32bppArgb)
Dim gfxScreenshot As Graphics = Graphics.FromImage(bmpScreenshot)
gfxScreenshot.CopyFromScreen(Me.PointToScreen(SplitContainer1.Location), New Point(0, 0), FlowLayoutPanel1.Size, CopyPixelOperation.SourceCopy)
bmpScreenshot.Save("C:FlowLayoutPanel1.Emf", ImageFormat.Emf)

Problem is, when the panel is full of controls and using scrollbars the hidden controls are not captured, since I'm using the CopyFromScreen().

View 6 Replies

VS 2010 Floating Splash Screen Image?

Jan 31, 2011

I have an image on a transparent background. This is my "splash screen" for my project. I want it to basically show up in the middle of the screen for 5 seconds and then load my frmMain Form.

Here's the image: (removed)

I can't seem to get the gray form's background off it.

View 7 Replies

Screen Blanks After 1 Min Of Processing (of Excel File) / Refresh Or Freeze Screen To Avoid Blank Screen?

Jun 29, 2011

BTW this issue occurs in any MS office program when the VB.Net (or even VBA) is processing information.Example: In Excel, a worksheet is displayed on the screen. I start either, a VB.Net or VBA procedure and within 30 seconds the Excel worksheet (previously displayed) blanks out. In both VB.Net and VBA,ScreenUpdating = False. My expectation is that the previously displayed screen would stay static as if I left my desk to get a cup of coffee; came back and the same ole Excel worksheet was still there?Of course, setting VBA Screen Updating = False accomplishes two goals: 1) speeds up processing and 2) saves the user from seeing unnecessary "garbage-processing" steps.Why does VBA or VB.Net ScreenUpdating = False not freeze the screen at the time of its invoking?

View 11 Replies

Compress Or Resize Bmp/jpeg Image Immediately After Screen Capture?

May 21, 2011

This is my code to get screen captures every certain interval of time. But each image is being around 150kb and I want to make it smaller. what matters is the image size in kb to be around 70kb ( almost the half ) .

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)

[code]....

View 9 Replies

Invalidating Splash Screen - Picture Box Doesn't Refresh With Image

Jun 21, 2010

I have a splash screen and want to test the loading bar. The % of loading are in 11 stages (0-100% in 10% intervals) and I have 11 different images. What i'm trying to do is set my picturebox.image = to the resource image and then wait 1 second then set picturebox.image to the next resource image. What i was doing is on the SplashScreen.Show method [Code]. What happens is that the picture box doesn't refresh with the image until the last image has been loaded from the procedure and the end of making the thread sleep completes. (this worked fine in VS2005). How can I make it load up the image, redraw the picturebox and then make the thread sleep for 1 second in VS2008.

View 4 Replies

VS 2010 Compare Pixel Range On Screen To A Saved Image?

Dec 1, 2011

We stream the BBC news channel through a laptop hooked to a PC in reception for our clients. Annoyingly the stream is interrupted randomly (the line isn't dropping, it's the BBC's problem). Therefore when it's interrupted we get an error screen appearing which we have to go and manually refresh to get the stream back playing.

My intentions are to build an app which will be run alongside (silently) the stream monitoring intermittently a range of pixels. If the range matches the error screen that I mentioned previously then I'd call "Esc" to exit the full screen and then "F5" to refresh the browser and finally a double click on a specified coordinate to bring it back to full screen.

Problem: I've been doing some googling and so far have only seen related posts where the comparison is between two saved images. Due to this I expect the answer to be "Take a screenshot every now and then, compare, return result".

View 5 Replies

VS 2010 Saving Print Screen Image To File With Numbers

Aug 22, 2011

I'm making a simple little program. It's going to save the image in the clipboard (from pressing Print Screen) to the folder that the .exe is in. My problem is trying to find out how to save the image file with a user-specified name, such as "Image", then adding numbers to it. So it would be like Image_00001, Image_00002, etc. I would like to make the name be specified using a textbox (pretty easy). I know how to get it to save as different image formats and all, and I know how to get it to save as a hardcoded name in a hardcoded location, but that it isn't what I'm aiming for. If you've ever used the screenshot function of Fraps or MSI Afterburner, then that's basically what I'm trying to make here.

I've already searched these forums and did some Googling, but couldn't find anything that I was looking for. Not even a sample program with something like this. I found something in the CodeBank, but it's all the stuff I've already gotten implemented.

[Code]...

View 8 Replies

Determine The Pixel Width And Pixel Height Of The Largest Image?

Jul 4, 2010

How do i determine the pixel width and pixel height of the largest image i can paint onto the graphics object of a printer while inside a printpage event?

Imports
System.Drawing
Class

[Code]......

View 2 Replies

Interface And Graphics :: Image Previewing - Run VB And Select To Preview Through USB Webcam Shows Dark Screen

Jan 11, 2009

I have develop VB 2008 that can preview the image through 2 webcams. However, when i run my VB and select to preview through my USB webcam, it display dark screen. But i select to preview through my built in webcam, it works.So, can anyone can the code attached for me?For your information, the USB webcam can function properly using other video/image software.

VB version: VB 2008
OS: Windows Vista
Webcam brand: LifeTec

View 1 Replies

VS 2008 Make From Image To Make It Loading Screen

May 19, 2010

Can i make from this image to make it Loading Screen I mean i put this in Form1 [URL] And i want when the program start the progressbar (the white line to load)

View 1 Replies

Center Image / Pbject In Center Of Screen?

Jun 11, 2012

i found this video today and its a simple vb game but made me wonder how they kept the charater centered during movement.url...Anyone have a simple snippet to demostrate how they made a larger resulution then vewable and kept the picturebox centered and only moved the viewable area?

View 2 Replies

.net - Taking Photo Of Screen - Take A Picture Of The Entire Screen, Not Just The Focused Window?

Jul 6, 2011

Currently I have the following VB.NET code to make a screenshot of my desktop, but it only takes a picture of the active screen:

Public Function SaveScreen(ByVal theFile As String) As Boolean
Try
SendKeys.Send("%{PRTSC}")[code].....

The following code is how I execute the above function, if it makes any difference, which I don't think it does:

SaveScreen("C:Lexer_tracescreen.png")

Now, I need to be able to take a picture of the entire screen, not just the focused window.

View 4 Replies

Putting VB Content In The Center Of A Full Screen With Variant Screen Size?

Feb 2, 2012

Now I'm creating at app in VB (Microsoft's, Visual Basic 2010) which will be in full screen but I want to know if I can put all my content in the centre of the screen. At the moment it's at the far top, left of the screen. When the screen size varies I want it will stay in the middle for all shapes and sizes. Like :

<div style="margin: 0 auto; width: 500px;"></div>

But this is for web pages using HTML and CSS.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved