Display A CUSTOM MADE Bitmap On The Screen?

Jan 14, 2010

I created a bitmap, that is supposed to be displayed on the screen, in the middle. It will have to be on top of EVERYTHING!! Even if a full screen application is running, I want it to show. My questions are: Is it possible to even display a CUSTOM MADE bitmap on the screen?

Option Strict Off
Imports System.Drawing.Drawing2D
Imports System.IO[code]....

View 6 Replies


ADVERTISEMENT

BitBlt Copy Bitmap To Screen?

Mar 7, 2012

Edit: Fixed, I created a compatibleDC for the graphics object, and a handle for the bitmap (using b.gethbitmap), then used the SelectObject function inside GDI to select those two, and used the compatibleDC instead of hDc in the BitBlt function I've been trying to draw a bitmap to the screen (device 0), however I have encountered a problem copying the graphics using BitBlt.

Initially, I was drawing directly to the desktop using SetPixel (gdi32), but it was slow, so now I am setting the pixels of a bitmap object and then creating graphics from that object, and copying the hdc of the graphics to the screen.My guess is that I am adding the HDC of the graphics object to an intptr, which essentially gives me the HDC of the container of the graphics object, which is not what I need. However even so, I have not found any information on how I could copy a bitmap to a device other than using BitBlt.

This is my current code (Windows forms app, textbox, button) The textbox is the device to copy to, and the button starts it. For testing purposes, set the textbox text to 0, and press the button. You should see a black box (50x50px) in the top left corner of your screen. The colour should be blue if it is working correctly:

Public Class Form1
Declare Function GetDC Lib "user32.dll" (ByVal hwnd As Int32) As Int32
Declare Function ReleaseDC Lib "user32.dll" (ByVal hwnd As Int32, ByVal hdc As Int32) As Int32

[code]....

The way it works is it calls the function setpx, given a location and color from within a loop iterating through all of the pixels in a box (50x50 in my code). The setpx function will then call the setpixel fuction on a bitmap b. This part is working fine.Next, it will define a graphics object g from the bitmap, and I use BitBlt to copy g's hdc (g.gethdc) to the screen. This is not working correctly?

View 1 Replies

[2008] Find Bitmap On Screen?

Mar 2, 2009

I need to find a bitmap on the screen?

View 1 Replies

Cut Bitmap Into Smaller Files And Showing On Screen?

Jan 4, 2011

I am trying to take a png file (around 2000 x 2400) and split it into 8 smaller images of 500 x 1250 each (2 rows of 4), each of which is saved as a png file. I then which to display these smaller png files in a picture box so that they look as if they were one image.

My problem is that when I display the png files in the picture box, lines that look like grid lines show up in the picture box at the points where the png files sit next to each other.

When I view the smaller png files in Paint it appears as if the left column (x=0)and top row (y=0) of each file is set to clear (or transparent). What shows up in the picture box is the background colour of the picture box.

This clear/transparent row and column are not added on to size of the smaller png files. They are still 500 x 1250.Not every file is affected. If the smaller files are created from the original bitmap in the following order[code]...

View 4 Replies

VS 2010 - Capturing Part Of Screen (Bitmap)

May 20, 2012

I'm looking to make a program that would capture your whole screen, then have the picture display on the screen (simulating a frozen screen) to where the person handling the program could select a partial segment of the screen with their mouse and then save to a folder.
1. I have no idea how to go by doing this
2. My form is constantly minimized, so I have to do it without MouseDown on the form and whatnot.
How would I go by doing this?

View 2 Replies

Custom Made Bindable Structure?

Oct 1, 2009

As a coding exercise, I would like to know if it is possible to build a bindable data structure that would have a dynamic collection of field objects, in which each field not only would have a specific data type, but also would hold the value for that field. That is, is not like a DataTable where you can have many rows, I only want to manage a single collection of values.

View 4 Replies

Made A Mistake In Design My Form E.G Screen Resolution

Aug 2, 2011

I have designed a complaints form for my work (free of charge just for my cv). I designed the form for the resolution 1280 x 1024. My problem is when a user with a smaller resolution say 800 x 600 uses it. The form will be out of sync with the screen as shown below (tested on my on computer). So I am wondering is there a way to test the screen size of the users computer then readjust the size of my controls according to the size of the screen. By the way all of my controls are anchored so that they stay in the same place.

[Code]...

View 14 Replies

Pasting A Bitmap Data On Clipboard From Screen Capture

Nov 29, 2011

There is Bitmap data on the clipboard from a screen capture. If I paste it into a RichTextBox it works OK. That is, if I remove the first two lines below.

Dim clipboardDataO As DataObject = CType(Clipboard.GetDataObject(), DataObject)
Clipboard.SetDataObject(clipboardDataO)
RichTextBoxTxt.Paste(DataFormats.GetFormat(DataFormats.Bitmap))

However, If I capture the clipboard data and restore it before I paste I no longer get my bitmap displayed in the box. My problem is, in the real situation I need to use the clipboard before I paste which is why I save it and restore it above.

1) Do you know why restoring doesn't appear to work here?
2) I can't paste before the save/restore. Is there something else I can do?

View 1 Replies

VS 2010 Class Library - Cannot Use Form / Screen Or Bitmap

Feb 5, 2011

I'm trying to create a DLL with some useful methods and subs for my use. But when I tried declaring an object for Form or using the keyword Screen, Bitmap, etc.. gives an error saying that "The type 'Screen' is not defined" and like that..

View 7 Replies

IDE :: Importing Custom Made Controls From Another Project

Feb 26, 2009

I'm developing a solution that I'm going to split into two different directions.I've built custom controls for the first application, and now I'm creating a new solution where I'm importing all the Forms and Modules to the new solution I'm developing by using "Add Existing Item" from the Solution ExplorerWhen doing this, most of the errors I'm receiving I'm able to correct by "Find & Replace" with the new name of the new solution. (They seem to be references to the old name of the solution, that I simply replace with the new name. Example. Global.Xname..... I now replace with Global.Yname.

View 6 Replies

VS 2008 Run Java While Using A Custom Made Web Browser?

May 14, 2009

is it possible to run java while using a custom made web browser?what i mean by run java is when you play a game that is an applet, a jar file.Like runescape. When I try playing runescape with my browser, it dosen't let me, and says i don't have java. (the browser I made in VB)

View 3 Replies

Custom Colors When Creating 8bits Bitmap?

Mar 4, 2011

Is there a way in Visual Basic 2008/Framework 2.0 to create and save a 8bits bitmap(Format8bppIndexed) to a .GIF file using custom colors(about 30) instead of the standard web colors?

If not, is there a way to convert a 24bits or 32bits bitmap to a 8bits bitmap using custom colors?

View 7 Replies

.net - Not Retaining Changes Made To Values Of Properties In A Custom Class?

Jun 10, 2011

I created this function to remove vbCrLf from the values of properties in a Custom Class:(vTransaction)

Public Function ValidateTransaction(ByRef vTransaction)
Dim property1 As String
Dim value1 As String
For Each p As System.Reflection.PropertyInfo In vTransaction.GetType().GetProperties()
If p.CanRead Then

[Code]...

Throughout testing I can verify that vbCrLf is being replaced with a space as expected. When I re-examine vTransaction the changes have not been retained and the vbCrlf's are still there. What do I need to do to retain the changes being made to values in vTransaction.

View 1 Replies

Invoke Form - Custom Made Messagebox Opens But It Freezes

Apr 14, 2012

I am having Socket server, and I have two forms. One is the main form for the server and the other one is a custom made messagebox. When a request comes to the server the main form has to invoke the second form (messagebox). When the main form is open for the first time everything works fine. But when I close the main form without closing the application and open it again and request comes to the server the custom made messagebox opens but it freezes and looks like this:

[Code]....

View 1 Replies

Specify A Custom Icon For Display In The Toolbox Window When Create Own Custom Control?

Dec 29, 2011

how to specify a custom icon for display in the toolbox window when you create your own custom control? Something other than the dreaded "gearbox" icon.

View 2 Replies

Bitmap Display Red X Instead Of Image From Folder

Mar 8, 2011

When I type a file with out a path it mean he is in: BIN/DEBUG folder. When I run this program I get a big red 'X' allover here..
Imports System.IO
Public Class Form1
Dim SR As StreamReader
Dim SW As StreamWriter
Dim NumColumns, NumRows As Integer
[Code] .....

View 4 Replies

Promptly Display To A Listview All Changes That Has Been Made To A Database?

Dec 25, 2009

Way, to promptly display to a listview all the changes that has been made to a database? I notice that every time I add new records to database it seems that it doesn't quickly display to a listview, unless I close and reload the form where the listview is attached.[code]....

View 5 Replies

Display A Bitmap Image - Using Surfaceloader.Fromfile

Apr 8, 2009

I am trying to display a bitmap image and am having a bit of trouble. I am new to VB.net and its functions. Here is a few lines of code I am using REM load the bimap file

[Code]...

View 1 Replies

Display Information In A Listbox From Selection Made In Datagridview?

Jun 26, 2009

I'm curently trying to get information displayed in a listbox from a selection made in a datagridview. For example a user selects an artist from the treeview control and it displays all the albums by that artist in the datagridview. Once a user selects an album all information for that album is displayed below the datagridview in either a listbox or listview control. I've tried dragging the conrols from the datasource and it' won't drag onto the listbox. What do I need to do to get it so that it will display album, artist and track information?

View 9 Replies

Get A ListBox To Display Contents For A Selection That Is Made In A ComboBox?

Dec 16, 2009

I am currently pulling data from a database into a comboBox. My intent is to have the description of the selected option in the comboBox displayed in a listbox. How to i get this data to be displayed in a listbox?

Here is the code that I have so far:-

Imports
System.Data.SqlClient
Imports

[code]....

View 6 Replies

Display A Welcome Screen For 3 Seconds Then Close And Display Form1?

Dec 19, 2009

Im trying to make a custom splash screen , but i cant seem to get it to work. Im trying to display a welcome screen for 3 seconds then close and display form1 (main form).Heres my current code.

[Code]...

View 2 Replies

How To Display A Bitmap On Form, And Then Remove It At Times, And Put It Back Again

May 13, 2009

I want to display a bitmap on my form, and then remove it at times, and put it back again.
I have the Bitmap in my resources folder.in my form properties, it is selected as background image.

somewhere in my code I set the background image to = nothing (that makes it disappear) but every time I try to bring it back, I get file not found.I got it to display when I hard-coded the entire path and filename.[code..]

Obviously, when I publish and distribute to clients, the file won't be there.[code...]

View 1 Replies

How To Modify String - Display A Minimap Made Of ASCII Character ?

Apr 19, 2011

I am working on a text-based game and as your character moves, you get informations such as the room name and below, a description (Lorem ipsum in the example) which is an array of string. I would like to know how to append characters to it. I am actually trying to display a minimap made of ASCII character. See the second bloc code for an example.

From:

code:

Into:

Room Name Here

code;

The game itself is made in VB.NET but a solution in pseudo-code is also welcomed. Also, each line's length is aproximatively the maximum length it must be.

The desired output must be an array of strings because this data is later send to a client connected using sockets.

View 2 Replies

Program That Calculate And Display Money Made By Drive-in Movie Theater?

Jan 15, 2011

how to start my programming for my visual basic 2008 drive in movie theater personal project. This project I decided to work on will calculate and display the money made by a drive-in movie theater. I just want to make sure I started it right. This is what I started with:

Module Module1
Sub Main()
Dim TypeOfNight As Char

[Code].....

Aw yeah, another thing I wanted to ask is how would I do the input, output, and If statements?

View 2 Replies

Get A Program Made W/ Vb To Click On A Certain Part Of The Screen Outside Of The Program?

Jun 22, 2010

I was wondering can you get a program made w/ vb to click on a certain part of the screen outside of the program? and also, can you copy information from outside the program in another window and store it in the program as a variable.

View 1 Replies

Made A Listbox, And Also A Custom Class Called "Enemies"

Mar 26, 2010

So I made a Listbox, and also a custom class called "Enemies". I used a Bindingsource to Bind "Enemies" to the Listbox. "Enemies has three properties which are: "Name as String, Health as String, and Dead as Boolean".The thing I need is when I add a Enemy to the listbox, I want the BackColor of the item to either be Red or Green, depending on if the Item.Dead property is false or true.

View 2 Replies

Replacing The Tab Control's Tabs With Custom Tabs Made In Photoshop

Mar 16, 2009

I was wondering if there was a solution to replacing the tab control's tabs with custom tabs made in Photoshop. I know there are plenty of super expensive programs that can do it, but I was wondering if there was a way to do it programmatically. I was thinking that maybe it could linked in some way with a .DLL?

View 1 Replies

Custom Area In Screen?

Sep 6, 2010

In my program, there is an option for a custom size object. I want the user to be able to click on the upper-left corner and then click in the lower-right corner and save the location as integers. How can I do this?

View 3 Replies

Make A Custom Made Browser Default Browser

Feb 12, 2012

I coded a web browser over the course of a year called Nova - very advanced with tabbed browsing, bookmarks, homepage, history, etc etc etc etc. I could go on all day about how advanced it is. But.. there is one flaw. You cannot make it the default browser; I don't know the code!I already know the CommandLineArgs stuff so it actually opens the HTML file rather than just opening the program; in fact, I already can make files open with Nova completely. It's just the other stuff - you know, when a website is to be opened from a help file or something, it opens with Nova, Windows recognises it as the default browser, stuff like that.

View 3 Replies

Make A Custom Made Browser The Default Browser

Feb 11, 2012

Other topics around the Internet are all unfinished topics, so I'll ask this myself. How do I set a self-made browser as the default browser? I know it has something to do with accessing the registry and checking what the value is in some places, but I'm not quite sure. Now, I've made this browser called Nova;

very well coded and advanced, tabbed browsing, bookmarks, homepage, history, can change default search provider, uses Gecko as its engine so it's not just an IE shell, etc. It's been developed over the past year and will still continue to be developed. I'm almost ready to release the first version - but I just need this annoyance solved.

[Code]....

View 6 Replies







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