Hi there Everyone I am writting a program POS in which i have employees database. they get a code or we can say employee ID numbers. 100001 100002 100003 now i want to keep the recourd attached with picture ID as well file names will be 100001.jpg 100002.jpg 100003.jpg as i click the button to move in the records it should change the picture of the person whoes record in being displayed. here is my code Dim ImageFileName As String Dim ImageFilePath As String ImageFileName = LblEmpCode.Caption ImageFileName = ImageFileName & ".jpg" ImageFilePath = "App" ImageFilePath = ImageFilePath & ".Path" …

Member Avatar
Member Avatar
+0 forum 1

I'm coding in VB6. I have pictures in Picture1 and Picture2. I would like to replace the picture in Picture1 with the picture in Picture2. What code will get this done? Thanks.

Member Avatar
Member Avatar
+0 forum 3

I have just seen a resurrected thread about issues with loading images to a PictureBox and the inability to delete the file while the program is running. There was no clear explaination of the problem, only suggested hacks and apparent frustration. So I thought I would offer this explanation from [Microsoft](http://support.microsoft.com/kb/814675): > **SYMPTOMS** > When either a Bitmap object or an Image object is constructed from a file, the file remains locked for the lifetime of the object. As a result, you cannot change an image and save it back to the same file where it originated. > > Additionally, …

Member Avatar
Member Avatar
+0 forum 2

So I'm making a map editor with C# and XNA. I have currently got it setup so there is a windows for with a picture box, which the game is being displayed through. The problem is this, I want (0,0) to be the upper left corner of the picture box, not the game window. At the moment im trying to return the cursor position but its relative to somewhere in the upper-middle portion of the window...the X-coordinates will go negative if the cursor is in the left third of the screen, and the Y-coordinetes will go negative if the cursor …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone. I want to ask a question on how to show pictures (jpg files) from access database to a form I have a database called DataBase, i have some fields there. One is called picture, and the data type is attachment. and i have the following code Dim ds As New DataSet Dim da As OleDb.OleDbDataAdapter Dim sql As String Dim inc As Integer Dim MaxRows As Integer sql = "SELECT * FROM Staff" da = New OleDb.OleDbDataAdapter(Sql, con) da.Fill(ds, "DataBase") txtFname.Text = ds.Tables("DataBase").Rows(inc).Item(1) txtLastName.Text = ds.Tables("DataBase").Rows(inc).Item(2) txtJob.Text = ds.Tables("DataBase").Rows(inc).Item(3) picture.? = ds.Tables("DataBase").Rows(inc).Item(4) ??? 'How do i display picutures …

Member Avatar
Member Avatar
+0 forum 3

Did you know that you can data bind a bitmap to a PictureBox's image property, and the source image doesn't have to be in a binary format stored in a data table? Using a standard object setup for data binding (iNotify etc.) you can easily update your program's image propertie's from one place.

Member Avatar
+0 forum 0

how to resize a image thtz lager than picturebox??

Member Avatar
Member Avatar
+0 forum 6

i want to divide one picture box into two parts in equal height.. or it may be dynamic if user want 3 parts then it will divide into 3 of equal height..

Member Avatar
+0 forum 0

Hello Community, I was wondering if there is a way to get only the visible section of the image from picturebox1 and place it in picturebox2. So what I have is picturebox1 set to a certain size, and the image size mode is set to center. Picturebox2 is also set to a certain size but the size mode is set to sketch. In the example I've attached the dash line represents the border of picturebox1. So what is on the inside is what I want moved to the second picturebox. Note all the images in going in picturebox1, most of …

Member Avatar
Member Avatar
+0 forum 3

How to stretch PictureBox into Maximized screen size ? Currently the size of picturebox is exactly the size of the image, I want to stretch to the resolution screen size excluding taskbar. private void Form2_Load(object sender, EventArgs e) { Form2 f2 = new Form2(); pictureBox1.Size = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); }

Member Avatar
Member Avatar
+0 forum 3

good day! i just wanna ask if there is a way of getting the path of an image from another computer in LAN and set it as image propety of a picturebox. thanks in advance!

Member Avatar
Member Avatar
+0 forum 1

i have 4 pictureBox which are hidden, and now i want to show them one by one, how it can be done?????

Member Avatar
Member Avatar
+0 forum 3

Hi, so yeah. what i'm trying to do is load an image from my database create some graphics to it. probably just some lines and marks and save it back to my database. here's so far what I got. for creating graphics: } private void pictureBox3_MouseDown(object sender, MouseEventArgs e) { draw = true; } private void pictureBox3_MouseMove(object sender, MouseEventArgs e) { if (draw) { Graphics g = Graphics.FromImage(pictureBox3.Image); g.FillEllipse(color, e.X, e.Y, 25, 25); pictureBox3.Invalidate(); } } private void pictureBox3_MouseUp(object sender, MouseEventArgs e) { draw = false; } and for saving it: } private void button15_Click(object sender, EventArgs e) { Image …

Member Avatar
Member Avatar
+0 forum 2

I'm trying to imitate the Windows 8 Start Menu preview'. Private Sub CornerHoverMouseOn() Handles CornerHover.MouseHover Dim CHL As Integer CHL = (Screen.PrimaryScreen.WorkingArea.Height - 100) CornerHover.Anchor = AnchorStyles.Bottom + AnchorStyles.Left CornerHover.Location = New Point(0, CHL) CornerHover.Height = 100 CornerHover.Width = 50 CornerHover.BackgroundImageLayout = ImageLayout.Stretch CornerHover.BackgroundImage = My.Resources.CornerHover End Sub Private Sub CornerHoverMouseOff() Handles CornerHover.MouseLeave Dim CHL As Integer Dim NewBackImage As System.Drawing.Image CHL = (Screen.PrimaryScreen.WorkingArea.Height - 50) CornerHover.Anchor = AnchorStyles.Bottom + AnchorStyles.Left CornerHover.Location = New Point(0, CHL) CornerHover.Height = 50 CornerHover.Width = 25 CornerHover.BackgroundImageLayout = ImageLayout.Stretch End Sub I need to know how to remove the image frome the picturebox. I've …

Member Avatar
Member Avatar
+0 forum 2

Just kind of a random question. How exactly do you rotate objects in vb.net?

Member Avatar
Member Avatar
+0 forum 4

I'm having a nightmare here! I'm calling 2 different forms, one like a loading screen and the other is the working form. The trick here is placing the 'SplashScreen1.Close()' at the end of Form2 and it will automatically close the loading screen when Fom2 finish. But I could never get PictureBox inside SplashScreen1 to display nmw. Pls, help me! Here's my code: SplashScreen1.Show() Form2.Show()

Member Avatar
Member Avatar
+0 forum 9

I have trouble accesing images that are located IN the application (in solution explorer) What I want to do is theme options in one of my programs If TreeView1.SelectedNode.Name = "wood" Then main.background*.BackgroundImage= End If *PictureBox

Member Avatar
Member Avatar
+0 forum 1

Hi everyone. I'm new in Visual Basic(i work in Visual basic 2010) and i have a problem and hope u will help me. I want to load image to pictureBox depending on randomly generated number. For example if random number is 14 then i want to load image with the file name "14.gif".random number is generated when button "Generate" is clicked. how can i do that? images are in Resources folder inside the project folder. I tried this but didnt work: Public Class Form1 Dim images() As String Dim RandClass As Random = New Random Private Sub Form1_Load(ByVal sender As …

Member Avatar
Member Avatar
+0 forum 3

I am very new to C sharp programming. I have the design like as shown below attached image. My concept is i have to set some volume in "Transfer volume" text box (for example 100) and then press "set" button. It automatically sets the scale of picture box, it is working fine. Now i want to fill the picture box with colors when i click "Regenerate" button. The percentage of color to be filled in picture box should be the number in the TextBox of that regarding color or liquid. for example if i set GasPhase =5 ; Hydrocarbon Liquid …

Member Avatar
Member Avatar
+0 forum 5

excuseme :) sorry I have some problem here, I make a simple paint using vb 6.0 I already can save the image that I load, but something like brush and pencil that I draw in the image can't include :( after I save and open it, it just the image have been save. The brush and pencil is not there.. can anyone help me please ? thanks before

Member Avatar
Member Avatar
+0 forum 3

namespace play_stop { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button4_Click(object sender, EventArgs e) { timer1.Interval = 1000; timer1.Start(); Counter = 0; } public void circles() { Graphics g = panel1.CreateGraphics(); g.DrawEllipse( new Pen(Color.Red),panel1.Width / 2, panel1.Height / 2,75, 75); Graphics h = panel1.CreateGraphics(); h.DrawEllipse( new Pen(Color.Blue), panel1.Width / 2, panel1.Height / 2, 50, 50); Graphics j = panel1.CreateGraphics(); j.DrawEllipse( new Pen(Color.Yellow), panel1.Width / 2, panel1.Height / 2, 80,80); Graphics k = panel1.CreateGraphics(); k.DrawEllipse( new Pen(Color.Green), panel1.Width / 2, panel1.Height / 2, 100,100); } public int counter; public int Counter { get { …

Member Avatar
Member Avatar
+0 forum 6

Hello, I need a code that checks if a button is pressed to change the BackGround Image of Picture Box So when the button is pressed,a backgroundimage of a picturebox must be changed I tried to use PictureBox1.BackgroundImage.FromFile("IMAGE.bmp") *THE IMAGE IS IN THE PROJECT,IT'S NOT ON THE HARD DRIVE ANYMORE**but didn't work,Please Help ME !

Member Avatar
Member Avatar
+0 forum 1

I'm new to C#, I want insert or remove black X into position in picturebox. I don't know how can do this. thanks my code is here private void pictureBox1_MouseClick(object sender, MouseEventArgs e) { int x = e.X; int y = e.Y; if ((x >= 1 && x <= 20) && (y >= 1 && y <= 20)) { // I want insert black X here x = 10, y = 10 // if X exists remove it } else if ((x >= 25 && x <= 45) && (y >= 1 && y <= 20)) { // I want …

Member Avatar
Member Avatar
+0 forum 1

![cap1](/attachments/large/3/cap1.png "cap1") Hi, I'm trying to build a simulation environment where male and female individuals move randomly in a map, which have one picturebox and one label each. My problem is, I can't seem to make them transparent (see the picture attached) Person.cs: this.label.BackColor = Color.Transparent this.picturebox.BackColor = Color.Transparent does not work. Also, the png images are transparent outside of the circles. How can I make the pictureboxes and labels completely transparent? Thanks for help!

Member Avatar
Member Avatar
+0 forum 1

![Hi Daniweb forum, I've come across a problem in my panel_mousedown event. Now I initially have 3 pictureboxes Painted on panel1, and each picturebox Control is set to Visible = false; and only become visible again when using this code: private void panel1_MouseDown(object sender, MouseEventArgs e) { if (picturebox1.Bounds.Contains(e.Location) && !picturebox1.Visible) { picturebox1.Show(); picturebox2.Hide(); picturebox3.Hide(); } if (picturebox2.Bounds.Contains(e.Location) && !picturebox2.Visible) { picturebox1.Hide(); picturebox2.Show(); picturebox3.Hide(); } if (picturebox3.Bounds.Contains(e.Location) && !picturebox3.Visible) { picturebox1.Hide(); picturebox2.Hide(); picturebox3.Show(); } The problem I have faced while using this code is that when there are overlapping picturebox images, when I click one it may click the image …

Member Avatar
+0 forum 0

i'm using 4 pictureboxes and 1 textbox in one particular application. when i click on picturebox1 i need a certain value to be fed as input to the textbox, simillarly for the other pictureboxes too. how can it be done ?

Member Avatar
Member Avatar
+0 forum 3

Hey guys, I'm making a project on Image processing in C# and I have successfully implemented other controls like zooming,filters,grayscale etc. All these controls happen when user clicks a menu item. Now I'm stuck on how to skew an image in a picturebox. Please explain by taking a simple example and take any skew points. Thanks in advance....

Member Avatar
+0 forum 0

I have a project on image processing. I have a picturebox with an image loaded in it via a openfiledialog box. I was trying to zoom an image in the picturebox by certain pecentage i.e **50%, 100% 150%** and **200%** . All this is done when a user clicks on a menutool strip option. I have the following code but it is not working: private void toolStripMenuItem2_Click(object sender, EventArgs e) //coding for 50% zoom { if (img != null) { Graphics g = Graphics.FromImage(img); int zoom=50/100; int newwidth = Convert.ToInt32(pictureBox1.Width * zoom); int newheight = Convert.ToInt32(pictureBox1.Height * zoom); Rectangle r …

Member Avatar
Member Avatar
+0 forum 4

Alright so Im making this sports application where whenever the user clicks on a radio button with a designated sport a message apporiate to that sport will come up . I also want to have a 'different' picture show up for each different click of a corresponding sport . Would I just layer some textboxes and set autocheck property to false I tried doing that but nothing would display at all. also what would be te best way to store pictures to use them in this program should I grab a URL or store them in a local folder . …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone I currently have a program that imports data from an excel sheet that is already made. The data also creates a chart. I need the chart to load into the program and I think that the only way to do that is by importing it into a picturebox. If this is possible please help me Thank you in advance LNC

Member Avatar
+0 forum 0

The End.