VS 2010 Deleting PictureBox?

Aug 29, 2010

I'm making a game for a school class on Visual Basic 2010. (Space Invaders for the ones that are curious)Everything was going smoothly until I ran nto a little problem.I shoot the missile intended to kill monsters. I use ictureBox1.Width.IntersectWith(PictureBox2.Location) or something like that to know when they intersect.

View 5 Replies


ADVERTISEMENT

VS 2010 Deleting PictureBox

May 15, 2011

I'm making a game for a school class on Visual Basic 2010. (Space Invaders for the ones that are curious) Everything was going smoothly until I ran into a little problem.

[Code]....

View 5 Replies

VS 2010 New PictureBox Located Relative To Another PictureBox

Jan 21, 2011

I am working on a small desktop form in VB 2010 and am trying to place a pictureBox with an image in it, next to another pictureBox already located on the form when the user clicks a button.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim tool As String

[Code]....

But for some reason the newPictureBox with image from "ptext" does not show up on the form. When I specify the new Point to be something like, (50,50) instead of getting the first pictureBox coordinates, the new pictureBox shows up in the right place.

Am I using System.Drawing.Point wrong? Or is there some other error that I'm making?

View 2 Replies

VS 2010 VB And Deleting From Registry

Dec 5, 2011

I have access to VS 2010 through work and I'm having a bit of a play. I'm trying to create a small program to show the installed software from GP and have the ability to delete a selected registry key from a list. Am using a checked list box and 2 buttons. Also have 2 labels on the form but just using them as a visual check as to what the string says.

The program starts alright and gives the list of installed software from Group Policy. I'm having the problem deleting the ticked item. Here is the code I'm using. I think the problem is when it comes to the .deletesubkey line and what I have entered. I want it to delete the selected item rather than have the specific key name entered.

Imports Microsoft.Win32

Public Class Form1

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

[CODE]...

View 2 Replies

VS 2010 : Deleting Records From Access?

Feb 28, 2012

I am making a program that takes Access records and moves them into MySQL then checks to be sure everything is right and deletes the moved records. But, for some reason my delete command isnt working....

Here is the

Dim deleteCommandF As New OleDbCommand
Dim deleteCommandE As New OleDbCommand
Dim deleteCommandO As New OleDbCommand

[code]....

Running the program now to get the exact error message, shouldnt be more than 5 minutes and I'll post it.It says my paremeters are wrong? deleteCommandE.ExecuteNonQuery()

View 12 Replies

VS 2010 Deleting Large Files?

Jul 6, 2010

I have a series of large files (4GB) that when I delete takes a very long time. This only occurs on a USB drive that I have attached to my PC. If I do the same thing on the internal drive the files delete quickly. It is as if the files are being overwritten before being deleted. I am looking for some guidance or other approaches.

View 5 Replies

VS 2010 Designer Keeps Deleting The Code?

Mar 11, 2012

i have several forms in my solution that have listview controls and each of those listview controls uses the ListViewColumnSorter class that's provided on MSDN. This class requires a few lines of code in the Form_InitializeComponent Method of the Designer.Problem is, each time something on the form is changed, even if it's just a property of one of the controls, the designer deletes the code that I have for the listviews and I have to go back in and add it again.

View 4 Replies

Deleting Data From Database Using Sql, Access 07 And VB 2010

Dec 6, 2011

Dim Conx As String
Dim DBx As String
Conx = "Provider=Microsoft.ACE.OLEDB.12.0; "

[Code]....

View 3 Replies

VS 2010 : Adding And Deleting Records In The Database?

Aug 8, 2011

I have records in my datagridview (from database(ms sql server 2008 r2)). What i want to do is to insert the records selected by my datagridview checkboxcolumn and IF POSSIBLE automatically delete a record if the records to be inserted are equal to the records inside the database. (Hoping you got what I want to say.) For example. I have an A,B,C(child) that is under XXX(parent) in my database and I'll be inserting the A,B(child) again but it will be under YYY(parent). The old record in XXX will be deleted except C. I just want a possible DELETE STATEMENT These are what I've done so Far :

Insertion of record to database
Try
connectionString = "Data Source=***;"
sql_connection = New SqlConnection(connectionString)

[code].....

View 7 Replies

VS 2010 Deleting Lines From Text File?

Dec 16, 2011

I have the following code to read a csv file and copy each line to another file as long as it does not contain certain strings, it seems to work a little but it leaves some lines in it shouldn't, and it's also taking lines out it shouldn't as if I keep running it again on each output file it eventually takes everything out!

Private Sub Strip_File()
Microsoft.VisualBasic.FileOpen(1, tFile.Text, OpenMode.Input, OpenAccess.Read)
Microsoft.VisualBasic.FileOpen(2, "C:AcmeIPPMaster.csv", OpenMode.Append, OpenAccess.ReadWrite)

[Code]....

View 4 Replies

VS 2010 Deleting Multiple Items In A Listbox?

Apr 23, 2012

basically i had this problem before which i fixed with this code!

'REMOVE TIME
If ListBox1.SelectedIndex <> -1 Then
Dim Box As MsgBoxResult = MsgBox("Are you sure you want to remove this time?", MsgBoxStyle.YesNo)

[Code]....

It worked perfectly, all ive done to my code since is change the way the listboc is loaded / saved, it now comes from a .txt in My Documents rather than the C drive.

It now only deleted the top value of the group selected int he listbox and not all of them as it did before.

View 5 Replies

VS 2010 Items On Form Are Gone After Deleting Data Source?

Mar 5, 2012

OK so I did a noob screw up, I was cleaning my application and delting unused data sources and unused data bindings. Now my form is blank! All code shows up for the form and all items still show in the mainFrm.Designer.VB

View 4 Replies

Get SQL Commands (adding, Updating, Deleting) To Work With A VB 2010 Database?

Feb 12, 2012

My project involves making a table database that displays student number, surname, first name, homeroom, and grade avg. Through SQL commands, there must be functions to add, update, delete, search by field, and save records to the database.I have already set the database up just fine and displayed it in a DataGridView. Through the DataGridView, I was able to go to the "Add Query" area, and I successfully made the queries necessary for searching by field. However, when I try to do anything other than a search using the query builder (ie start my SQL command with INSERT INTO or DELETE FROM), I ultimately get the message "Failed to get schema for this query"For example, this SQL code (to add an entry to the database) worked when I was in the Query Builder (and the entry that it made is still in the database), but when I finally tried to confirm it, I got the "Failed to get schema for this query" message.Being unable to add entries to the database this way, I tried to do it with textboxes on a form. Each textbox will have one of the fields, and at the click of a button, they would be put into the table. My code is below. I do not know what is wrong withit. When I run it, my fields do not appear on the DataGridView immediately, but I must run the program again to see it. The time after, the entry is gone. So I am not sure how exactly such entries are to be saved.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try

[code].....

View 1 Replies

VS 2010 : Deleting Files, Fonts From Resources, Playing Videos?

Jan 11, 2012

I am having a _ton_ of issues, and I am hoping some of you could clear it up...

1. OK So a while back someone showed me an example for fonts from resources, but I noticed if you close the window that it opens, The entire program shuts down... what can I do to fix it?Also, The fonts are not showing up on all computers, only this one....

2. I am trying to delete a image file, which the program downloads from the internet, and can change regularly, but when I try to delete it will not delete. It says its in use, and I cant figure out where.

3. I am trying to play videos using the following

vb
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Const WS_CHILD As Integer = &H40000000

[code]....

Now, I have confirmed the files it is attempting to play are in fact valid video files. It refuses to play all but the last one.

View 3 Replies

Visual Studio 2010 :: Excel Deleting Multiple Columns At The Same Time?

Feb 25, 2011

I am trying to delete more than one column in my excel sheet.

For Each lvi In ListView1.Items
If lvi.Checked = True Then
arrayLetters = lvi.SubItems(1).Text & ":" & lvi.SubItems(1).Text & "," & arrayLetters

[code]....

View 2 Replies

VS 2010 - PictureBox From Web (URL) [Smoothly]?

Nov 13, 2010

I have a VERY FAST comp/connection. I am looking for better code that runs smoothly. I'd also like if it fails to load something like error.jpg or something, not just staying blank. I don't know where to throw this in the code. I have only loaded 1 PictureBox on the interface, but in the end, I want to load 6-10 on one form at one time.

Imports System.IO
Imports System.Net
Imports System.Text

[code]....

View 2 Replies

VS 2010 Image To Fit Picturebox?

Jul 5, 2010

Ok i have a bigger image than the picturebox and when i resize the picturebox half of it gets missed off. How can i get it so the image fits the picturebox exactly??

View 2 Replies

VS 2010 Map Using Picturebox And Panel?

Oct 25, 2011

I just started using Visual Basic and I'm trying to make a mapping application.

Background: I'm basically trying to make something similar, but on a very small scale, to Google Maps. A user loads an image in to an picture box which is put inside a panel(so i can scroll the image). When the user has uploaded an image(a map) i want to allow him to add Labels on where he clicks. I've already done this part except the i get the wrong coordinates when i scroll through the rest of the image. If i don't scroll, the labels get placed spot-on.

I use e.X and e.Y on an event of a mousedown on the picture box. I get the correct coordinates in relation to the picture box. But when i use these coordinates to create the labels after i have scrolled, it places them in the wrong spots. I dont know how to compensate for the scrolling.

View 7 Replies

VS 2010 Picture From Web To Picturebox?

Mar 18, 2011

I couldn't find any handles that allow this, can anyone give me a hand?I want a Picturebox to display an image through a URL.

View 3 Replies

VS 2010 PictureBox Transparent?

Apr 12, 2010

I know that this question has already been asked million of times, but until now I haven't found a WORKING way to make this to work.I've a Media Player control, and in front of it (for a logo thing), I have a PictureBox, that I want to make transparent. I've tried million of things, but couldn't get it to work.

View 31 Replies

VS 2010 Using PictureBox As Checkbox?

Jan 16, 2010

Ok im using an image as checkbox. so when i click the label next to it it will change from Uncheck image to Check image...

If checkInj.Image = My.Resources.unchecked Then
checkInj.Image = My.Resources.checked
Else

[code].....

View 2 Replies

2010 Create A Picturebox Array

Mar 8, 2011

I am just wondering how i can create a picturebox array like i could when i copied and pasted another picturebox in VB6 and it asked me if i want to add them to an array. Doing so made them code like this:

[Code]...

View 1 Replies

Keyboard Scrolling A Picturebox In VB 2010?

May 20, 2011

I am building an image processing program. As part of this, I have a picturebox, set to AutoSize.

When I load an image larger than the size of the picturebox's container the box automatically expands and shows scroll bars. This is what I want. I can scroll the picturebox using the mouse to click on these, but I would like to be able to scroll the image using the arrow keys. This poses a couple of problems:

1) finding what properties to change or events to raise when a key is pressed. It is a property of the picturbox, or a property of the container?

2) dealing with repeated scrolling while the arrow keys are held. I know I can use keydown to detect that an arrow key has been pressed, but how do I continue to scroll as long as the key is held down?

View 2 Replies

VS 2010 - Clearing The Drawing In PictureBox

Mar 13, 2012

I've problem with clearing the drawing in PictureBox. The parts of a drawing are created with PictureBox1_ Paint Event like this: Name is one of the Subs (just part of a drawing). I've created a second event Timer1_Tick in which I want to clear the drawing created before but I can't reach it just with g.Clear(Color.White).

View 8 Replies

VS 2010 - How To Show PictureBox In Another Form

Aug 7, 2010

My two forms are: form 1: 2 picture boxes (#2 is hidden) form2: 1 button
My code for this button is:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.PictureBox2.Visible = True
End Sub
In my program I want to do the same thing, but I'm using MDI forms - for some reason it doesn't work like above. I tried the same as above as appropriate for the new project but it doesn't show the 2nd picture box.

View 3 Replies

VS 2010 A New Form With A New Panel And A New Picturebox On It?

Jun 26, 2010

I want to open a new form with a new panel and a new picture box on it when clicked a button.

I wrote:

Dim MyForm As New Form()
Dim MyPanel As New Panel()
Dim MyPicBox As New PictureBox()

[code]....

Form is opening when I clicked on the button but it is completely blank. No panel is shown on it.

View 24 Replies

VS 2010 Best Containers For Some Toolstrips And A Picturebox

Apr 14, 2012

Been doing web development for the past 2 years - so I'm a little rusty (and I just switched to VS 2010 from 2008 so maybe something new is available)... I have 4 toolstrips floated to the top of a form. And I have a picturebox below - filling the whole form. Unfortunately the picturebox is "behind" the toolstrips. I want to split the form so that the top of the form holds the 4 toolstrips and the picturebox appears below them.

What would be the proper container to put this mess into so that autosizing is the easiest? The toolstrips will most likely be "turned off and on" during the running of the app.

View 2 Replies

VS 2010 Class That Inherits From Picturebox

Apr 5, 2012

I have a class that inherits from the picturebox class, is represents a gauge. In that class I have an overriden function : [code]and I have on my screen what I expected. But in my form I have a timer that generates a new value for the gauge.[code]For some reason the refresh doesn't work. The gauge doesn't change, the overriden onpaint doesn't get triggerd again. anybody has any idea why?

View 12 Replies

VS 2010 Drawing Image To Picturebox?

Jul 20, 2011

I have 4 control 3 button and 1 picturebox

vb.net
Private sub Button1 Dim bm As Bitmap = New Bitmap("D:Trening4 - Copy.bmp"

[code].....

View 4 Replies

VS 2010 Frames Per Second In Picturebox Repaint

May 31, 2012

I'm looking for a way to limit Picturebox repaints. For example, I wish to be able to only call "repaint" a certain amount of times per second. All my searchs have come up with nothing. I could start a timer and get it to call repaint manually but that only ends up calling it more as it doesn't stop the normal form raising the event.

View 3 Replies







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