Load Game Images Without A Picturebox?

May 31, 2010

How do I load game images without a picturebox? (like in a game)I need them to be movible with the arrow keys. I am using a windows form, in VB 2008 express.

View 7 Replies


ADVERTISEMENT

Load Images From Imagelist To Picturebox Randomly In

Jun 18, 2011

i have 6 images in a listbox, and i want to show the pictures in a picturebox randomly...i'm using the following code:

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

View 3 Replies

Randomly Pick Images To Load Into Picturebox

Nov 16, 2009

I'm working on creating a very simple dice game for class (not for gambling purposes). The users has already entered their total amount of money, and are are able to wager for every round. We were supplied with 6 different picture files to represent the 6 sides of the dice. It will be located in the C:\Temp folder, and after the user clicks a play button, the form (frmDice) will appear, which has two pictureboxes(pbDice1 & pbDice2) located on it.

[Code]...

View 3 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies

Making A GDI++ Game - Monster(picturebox) To Go After The Player(picturebox)

Jan 14, 2010

Hey I am making a GDI++ game in vb.net. Now what I want is the monster(picturebox) to go after the player(picturebox). There Are No Vertical Walls. Only The Edge of map barriers. For example to get to the player the AI would have to go to the end of the ledge and either jump off and fall to the lower ledge or take the ladder down. There is no jumping, only falling and going up and down ladders and across the horizontal ledges. So How Can I make this pathfinding system?

View 18 Replies

Picturebox Transparency - App Has Scrolling Images In The Background And A Picturebox On Top

Feb 28, 2009

My app has scrolling images in the background and a picturebox on top. The image in the picturebox has transparent parts. How can It so that the transparent parts show whatever is belo the picture box, not the form background? I have tried taking screenshots and positioning them as background but this just freezes the app.

Dim ScreenSize As Size = New Size(154, 83)
Dim screenGrab As New Bitmap(154, 83)
Dim blank As New Bitmap(100, 300)

[CODE]...

View 1 Replies

VS 2008 'add Images' Button Where To Load Multiple Images

Jan 3, 2012

I need this for my program. There is "add images" button where you can load multiple images and those images should be show on listview after loading.I have been trying to make this but could not get it work.

View 6 Replies

Make Several PictureBox Images Randomly Visible = False And Then Back To Visible = True Giving The Appearance Of Flashing Or Blinking Images?

Jun 28, 2010

I have placed several PictureBox Images of different colored dots(which represent lights) on an image of a Christmas Tree. I can make the lights randomly flash using a randomGenerator and a Select case statement. However, the code is very long. There are 67 lights on this tree and the code is 71 pages long. There has to be an easier way to do this. So far I have tried the following with two images of lights just to see if it would work and it does not work:

Dim picLight(2) As
Boolean
For intX

[code]....

View 8 Replies

Load Creategraphic Into Picturebox On Form Load

Aug 24, 2009

I would like to load a default created image at start. But seems to not be working on form load any ideas.[code]

View 5 Replies

Embed A Panel Or Picturebox Containing Controls Or Images Within An Outer Panel Or Picturebox?

Mar 1, 2012

In VB6 I could embed a panel or picturebox containing controls or images within an outer panel or picturebox. If I moved the outer control then the embedded panel would move with the outer panel and stay in the same relative position, which is what I require. This doesn't seem to happen in VB.NET, the internal panel stays fixed in its location, even if I have pasted this panel within the outer container. Is there are trick to this or do I have to code to get the internal panel to move with the outer one? How does an internal container remain embedded within an outer one?

View 4 Replies

Using Images In VB For A Blackjack Game?

Apr 29, 2011

My classmates said I was crazy when I told them I was re-making my old blackjack game in VB.It's actually been going a lot easier than it was when I was doing it in C#, though. I'm hitting some snags, which are commented on in the code. The basic logic is mostly right.My main question is how would I add images to the game? Where would I put them? How would I make sure the suits are randomized, too?

New Code:
Public Class FRM_BlackJack
Private Sub FRM_BlackJack_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

[code].....

View 6 Replies

Game Programming :: Paint Images Asynchronously Using A Background Worker

Dec 15, 2010

All my paint calls are under OnPaint event of the form. my game is getting laggy so i was wondering if theres a way to paint images asynchronously using a background worker.

View 8 Replies

Changing Picturebox Images?

May 10, 2012

I want to be able to click a picturebox with an image and then load 3 other pictureboxes with images and then be able to click one of those 3 images and have it show in a bigger picturebox. How would I go about doing this? If its to confusing I will attach an example project I put together.

View 3 Replies

Fade Images On A PictureBox?

Mar 29, 2010

The title is simple and to the point: I have two images, same dimensions that I want one to fade in over the other. How do I do this without locking up the GUI?

View 16 Replies

Fading Images On A PictureBox?

Mar 29, 2010

The title is simple and to the point: I have two images, same dimensions that I want one to fade in over the other. How do I do this?

View 6 Replies

How To Save Images In Picturebox

May 12, 2011

was just wondering what i have to do to create a save button that actually works. i have a form with a picturebox. i want to create a save button called btnsave and when an image is in the picture box the user can click the save button and it will save it to a location of my choice example c drive. and the other question is how do i get the saved files to name its self in numerical order. for example: image1, image2, image3, image4 and so forth.

View 1 Replies

PictureBox Scales Up Images?

Jan 5, 2011

In this question I managed to combine two .png images into one, and then display the result in a pictureBox image.However, the pictureBox seems to scale up my image! Makes it bigger!The pictureBox size is 96x128.The two images I have combined are 96x128.The pictureBox's SizeMode is set to "Normal"

View 1 Replies

Print Images From PictureBox?

Mar 11, 2010

Well' I'm trying to print image from my PictureBox...this is my code for drawing image: e.Graphics.DrawImage(PictureBox1.Image, 0, 0)

But I need something more specified...when I print my document with this code, for some of those, I don't get the whole document. So I need to specify that...I need to stretch my image to my A4 page so that m.

View 6 Replies

Questions About Picturebox And Images?

May 6, 2011

I have made a screensaver in VB.NET. I am running into some roadblocks in the code though. The idea first was to have a ball bounce across my screens. It then evolved into spawning new balls that bounce across the screen. I then added collision detection so they would bounce off each other. Here is the problem that came up:

When said balls overlap each other, you can easily distinguish the edges of the picturebox that holds the images. I have made the background of the picturebox transparent, made the bitmap with a magenta background and made magenta transparent (for the image), but I can still see the picturebox edges when they overlap. It seems the transparency is not only making the background transparent, but giving it X-RAY vision to display not the visible area behind it, but the root background color of the form. here is a sample of the code which makes the transparencies.

Private Sub frmscr_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim bmp As Bitmap = My.Resources._smiley_face_image
Dim clr As Color = Color.FromArgb(255, 0, 128)
bmp.MakeTransparent(clr)

[code].....

I also tried to see if changing the image from background to foreground would help...no such luck.

View 4 Replies

Resizing Images In Picturebox

Feb 26, 2009

i have been troubled with my resize function, I have loaded images and when each image is selected is will be displayed on the picturebox...the problem is that when i resize the image in the picturebox it throw me an error message Object reference not set to an instance of an object. I have 4 buttons left, right, up and down..here's my code for it...

[Code]...

View 2 Replies

Concentration Game VB With PictureBox Showing Pictures

Mar 15, 2012

The project: As one of the projects for my Advanced Visual Basic course, I'm implementing a Concentration game very much like this project:(url)

The issue: I've got most of the logic working but I'm getting really weird behavior when I flip the cards. The first one flips fine. The second one is *supposed* to flip and hold for a second (I use a Thread.Threading.sleep(1000)) then flip back to covered if they're not a match.

For some reason, if they don't match it never flips the second card over so that you can see the picture underneath. It evaluates correctly but if the pics don't match, you never get to see the 2nd card.

Secondary issue (not as critical): At lines 67-79 there are some bits of code that are commented out. I'm trying to use a For Each loop to go through all my picture box controls and assign them to the array of structures and then assign the cover image without having to do it one at a time. It would save me about 250 lines of code and help me to still respect myself in the morning.

In addition to including my code, I will upload a copy of the entire project folder in case anyone wants to compile it and see the behavior for themselves.[code...]

View 6 Replies

Game Programming :: Disposing A Picturebox From A Form?

Jun 24, 2011

I've tried so many ways to get rid of picture boxes for my space invaders game, yet it's not working. The bullet hits the alien, the alien goes invisible (which it should) but it doesn't go to a new location or get disposed. And the bullet then intersects with it again but because it's invisible the user just see the bullet reset out of no where and the score gets added which it shouldn't.

Code:
If Bullet1.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet2.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet3.Bounds.IntersectsWith(AlienArray(0).Bounds) Or Bullet4.Bounds.IntersectsWith(AlienArray(0).Bounds) And AlienHitArray(0) = False Then

[code]....

So, basically my question is how do I remove aliens (pictureboxes) off the board or disabled the picture box in space invaders when they are hit. (my bullet collision works fine).

View 8 Replies

Game Programming :: Making A Picturebox For Every Pellet?

Nov 22, 2010

I'm doing a pacman game and im stuck on how to make the pellets. This is the code i have so far.I was thinking of maybe making a picturebox for every pellet and then make an if statement that if pacman goes on a pellet it disappears and he gains a point. But this would be a VEERRRYYYY large if statement and im sure there is a better way to do it.

View 3 Replies

Game Programming :: Move An Object Around A Picturebox?!

Jan 2, 2011

how to make a collision between the player object and the wall which is a picturebox

i can move the player object (which is also a picture box) with the arrow keys and i've made it move inside the form border, but the porblem is how to make it stop when it touches the wall (picture box) if im moving left and the left border of the player touched the right border of the wall then it should stop and only the up, down and right keys will be working!!!

View 12 Replies

Game Programming :: PictureBox Access Between Forms?

Jul 29, 2008

I have been working with Visual Basic 6 for over a year and have just recently to move up to .net. I have never had problems viewing picture boxes that were on one form thought another.My old code read something like:frm1.img1=frm3images.treeThis would take the image of the tree from a form that is not viable and place that image in the imagebox.

View 10 Replies

VS 2010 Concentration Game 2D Picturebox Array?

Mar 13, 2012

I am required to make a game of concentration, whereby cards are shown for x amount of seconds and then truned over. The user then needs to remember where the cards were and pick two at a time in order to win points - whilst being timed.

Any pointers on where to start, or how to make a 2D control array of pictureboxes that can display the cards into a grid of (10x10) pictureboxes randomly?

View 8 Replies

VS 2010 PictureBox To Determine Items In Game?

Jan 21, 2012

[PictureBox] [PictureBox] [PictureBox] [PictureBox] [PictureBox].

All of them have no images. Now. I want to make an item editor for the game I'm playing. To edit the items, You have to place an ini file in the game's directory with the template below:

Quote:

[ItemSet1]
SetName=Set1
RecItem1=1028

[Code]...

And untill 6 - what after the = is the item ID. Each item has a unique ID for it (I have a list containg each item name and their ID).

Now what I want to do is: I have a listview on the left with each character in the game Image and Text. I also have a listview on the bottom with all the imgaes of each item and each text for the item.

I want to make it so when the user double clicks an item from the listview, It will automatically add it to the first picturebox (If it's empty). He can choose any item to add to one of the 6 picturebox's, When it fills one after one. When all the picturebox's are full, nothing will happen.

Now what I want is: How can I determine which "item" the user chose and according to that assign the item's picture to the picturebox, and then make a new ini file to set picturebox1's image's ID to RecItem1, picturebox2's image's ID to RecItem2 - and so on.

View 1 Replies

.NET PictureBox Scroll Through Images In A Folder?

Mar 20, 2011

I have a pictureBox on my form along with two buttons (Back and Forward) but I can not find a viable method of doing what I wish to do: Scrolling through images in a folder like the default Windows Picture Viewer does with Arrow Keys.Is there an efficient way to do this?

I'm using Visual Basic .NET with Visual Studio 2010, if that matters.

View 2 Replies

Create Grid Of Images Using PictureBox?

Feb 26, 2011

I'm trying to accomplish is having a 20x20 pixel image show up multiple times as determined by the grid selected. To keep things simple, what I'm trying to do is create a 9x9 grid of a image onto a form. I'm assuming that a picture box is the way to go, but don't know how to make that happen or if it's even possible.

So it would go something like this:

2D array already assigned:
Sub ShowGrid()
For rw As Short = 0 To 8

[Code].....

But instead of using a text box with values, I want to show a grid of a small image file, like cup.png which is 20x20 pixels or whatever, so what would show up on the form in this case would be a 9x9 grid of the image file over and over to create a grid.

Then the next step I hope to accomplish is to have that 20x20 square picture hold the grid(x,y) value for a mouse click. So if the image at grid(3,5) is clicked, it will give me that value, 3-5.

View 4 Replies

Display Images In Picturebox From Database?

May 27, 2009

i'm using VB.NET 2005 and mySQL server 5.0. Can i ask how do i retrieve the image from database and display images onto picturebox? mySQL column name is pictures then the data type is varchar. and how should i write on the database? eg. abc.jpg?

View 2 Replies







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