VS 2008 Abnormal Picturebox Bakground?
Dec 29, 2009
i have a picturebox with a background image...above it are drawn images and shapes.... i want to save this as a jpeg image.. i use the following code
SavefileDialog1.ShowDialog()
PBoxf.Image.Save(SavefileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg)
where pboxf is the picture box. but the image saved always has a black background..
View 14 Replies
ADVERTISEMENT
Dec 19, 2011
After pressing a button Private Sub btn1_Click(sender As System.Object, e As System.EventArgs) Handles btn1.Click
[Code]...
It works, just that there is any "white flash" when the appearance of the form .... I also tried on another computer (both powerful processor and graphics) ... It 'can be improved?
View 2 Replies
Mar 31, 2010
I have a PaintEventHandler connected to a picturebox via AddHandler.
In PaintEventHandler I have coded this for writing the drawing to PictureBox1.Image:
Dim PictureBox1 As PictureBox = CType(sender, PictureBox)
PictureBox1.Image = New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim bmp As Image = PictureBox1.Image
Dim g As Graphics = Graphics.FromImage(bmp)
... drawing something ...
PictureBox1.Image = bmp
Everything works fine but after running through the paint event handler and showing the picture on the screen it calls the painthandler again and again. It does not stop.
Replacing the code above with
Dim g As Graphics = e.Graphics
Makes it running. But then I cant save the Image to a file.
View 6 Replies
Feb 8, 2010
i'm doing a simple form tat could add picturebox during runtime and i could add several picture into it.
View 5 Replies
Jan 4, 2011
I am trying to draw a line on top of a picturebox but it keeps going behind the picturebox, even when I do Line.BringToFront()
View 10 Replies
Jul 13, 2009
I was wondering how could I drag an image from a picturebox to another picture box. Anyone knows? Any tut or something.
View 10 Replies
Sep 11, 2009
click on a picturebox and get a 'mark' to appear. (This currently works just fine using the code below.)I would like to have only one mark on the picture box at a time, i.e., I need to remove the previous mark on each mousedown event and I am unsure of how to get this done.Once the user has placed the mark correctly on the picturebox they will fill out a few extraneous textboxes of information and press a 'save' button. This will update a table (currently access) with that extraneous data plus the x and y of the mouse position when it was clicked.What I would like to do at this point in the process is remove the mark from the picture box and in it's place add a premade 'pin'. Sort of the thing you do in google earth. This would be a jpg or bmp or png file. The type does not matter.
Private Rectangles As New List(Of Rectangle)
Public Sub New()
InitializeComponent()
[code].....
View 2 Replies
Jan 27, 2010
when adding picture to dynamic picturebox from my.resources in .dll a duplicate semi functional picturebox is added too, behind the picturebox i intended to add. has anyone seen this happening before or can provide any insight into this?
View 1 Replies
Jul 17, 2010
In VB6 I used some pattern of programming..I passed the picturebox as parameter to some procedure in some class and inside this procedure paint all needed graphics using this class methods.Now I want upgrade my application to vb.netBut all samples for line drawing show me how to draw inside paint event.[code]
View 2 Replies
Oct 3, 2009
I made a program with an invisible form and a picturebox that follows my mouse around the screen, the problem I'm having is the I cannot click anything, is there a way I can make it where I can see the picture in the picturebox and still not click on it?
View 17 Replies
Jul 6, 2009
How in my form1 can I make it so everywhere I move my Mouse the picturebox is right under it? So my mouse would be pointing in the middle of the picture box everywhere I moved it. I tired making my own code but this isn't working the way I want it to
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim mouseLocation As Point = Windows.Forms.Cursor.Position
TextBox1.Text = mouseLocation.X.ToString
TextBox2.Text = mouseLocation.Y.ToString
PictureBox1.Top = TextBox2.Text
PictureBox1.Left = TextBox1.Text
End Sub
View 3 Replies
Jun 13, 2010
I'm studying Visual Basic (using Visual Studio 2008) as part of an all-round IT foundation degree...I must confess that programming is becoming my weak spot! Unlike the C++ I was taught last year, I'm not finding VB too easy...probably becasue I've never programmed this way before and I've missed a couple of lessons.
View 1 Replies
Apr 2, 2010
i get mouse position of a picturebox in this way
mposition = pBox.PointToClient(Cursor.Position)
textbox.Text = "x " & mposition.X & " y " & mposition.Y
and i put this into pbox mousemove event
but when i move on picturebox this sets the right position but don't refresh on every mouse movment
how can i do this refresh?
View 4 Replies
Jan 19, 2010
1. is it possible to have a picture in a picturebox and then drag it to another so it gets placed there? if so, how? 2. can you assign a picture a name? because if i move it a cant use a code like this: picturebox1... = whatever. if so, how?
if i want to check for 2 variables thats right, do i use "textbox1.text & textbox2.text = 8" or "textbox1.text && textbox2.text"?
View 1 Replies
Aug 13, 2010
how to rotate a picturebox , my picturebox wont have an image in it it' just colored in i want to rotate it a little cause im making a little game?
View 6 Replies
Oct 27, 2010
My user needs to be able to cut an image from another application and paste it into somthing (Picturebox) in my application. I just dont know where to start with this one so
View 4 Replies
Jul 17, 2009
So using webbrowser, I created a browser. It's tabular and the tabs show the documenttitle of the site. My question is, is it possible to create a picture box in the tab control, to ad the favicon image? Like modern browsers which show the favicon before the document title.
View 3 Replies
Jun 18, 2009
How can I make the picturebox animate gif files?
Like, I have an image that has a few frames of animation, but the picturebox only shows the first frame, how can i make it continually loop the gif?
View 4 Replies
Dec 29, 2009
I've rotate pictures using code like this vb.net Picture.Image.RotateFlip(RotateFlipType.Rotate90FlipNone)
How can I remove any rotation? I have a code which rotates images but and saves the roation to a database.For example I save a value such as
1 = 90
2 = 180
3= 270
4 = 0 (no roation)
Now looking at the MSDN on this topic if I wanted a user to rotate the image by clicking a button i could rotate 90 or 180 or 270. However, If I load the image location and rotation from a DB and the rotation is "2" I want it to roate 180. But using the same code If a user clicks a button (which goes through the options 1-4) and they are on "1" then click it and it goes to 2 i would only want to roate another 90. As at one it's already moved 90 so another 180 would mean it's rotated 270 in total.
For this reason I can not load a image and move it 180, I thought okay if I'm at "1" going to "2" I'll move it back 90 then forward 180 but if a image loads at 4 what does it do? does it go back thinking it's come from 3 or load at 4?
View 2 Replies
May 15, 2012
= DirectCast(Picturebox1.Image, bitmap)--I keep getting this stupid error after i debug!! it's driving me crazy.
View 7 Replies
Dec 19, 2009
I am trying to save an image as a jpg or bmp file but it keeps giving me errors here is what I have
View 2 Replies
Feb 4, 2009
What i wanted to do is tell the Tool to display me a picture from the Web so lets say this is the Picture:
[URL]
I want that to load in to the Picturebox how does that work ?
View 2 Replies
Sep 27, 2009
I have a program I'm working on that, for one of the features, allows the user to drag an image from a picturebox, into the main form space, anywhere they want. [code]...
When trying to drag the image from the CurrentTilePicBox, the very moment I move the mouse while dragging the cursor becomes a circle with a cross and won't drag and drop into the new picturebox.
View 1 Replies
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
Feb 28, 2012
I have a panel, which contaisn two Pictures.When the panel is mousehover the Pictures appears. When the panel is mouseleave the Pictures disappears.However, when I'm trying to pass the mouse between the Picturebox and Panel, the Picturebox disappears, because the panel doesn't detect that as panel area.
Private Sub Panel_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel.MouseHover
Me.NextIMG.Visible = True
Me.PrevIMG.Visible = True
End Sub
Private Sub Panel_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel.MouseLeave
Me.NextIMG.Visible = False
Me.PrevIMG.Visible = False
[code].....
View 3 Replies
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
Jan 31, 2011
I need to plot some analog values read from the serial port.I plot them in a picturebox starting from left. When I reach the end of the control at the right side I shift all values to the left of a point and I plot the new point at the right, (I have some flickering but it could be acceptable). This is my plotting control.My problem is that I have to clear the control (picturebox) in order to plot the shifted graph, but the method Clear of the Graphics class clears everything inside the picturebox, even my grid.How can i make always visible a grid "in" my picturebox?
1.a transparent image with a grid over the PB? (the clear method cannot remove it)
2.an image with a grid below the picturebox that must be with a transparent background to make visible the grid?
3.multiple layers on the same picturebox?
View 5 Replies
Aug 27, 2009
How can I insert text into a PictureBox in VB 2008. I would like to add text to graphs which I have been able to generate, but I cannot find the equivalent method to use with text,
View 3 Replies
Apr 23, 2010
I am a grade 11 student in high school and am struggling with a project in my computer programing class. in the project we are to create a mario game, where you have 2 pictureboxes (the player and the enemy) one picturebox, the player, is moved using the keypad, the goomba isn't moved at all. the object of the game is to 'kill' as many goombas as quick as possible. I need to make the game so that if the boundries of the player intersect witht he boundries of the goomba, the goomba will move to a random location.
I can't get the goomba to move to a random location, here is my code. I highlited and bolded the part of the code that I am having the prolem with.
Public Class FrmQ4
Dim intLocation As Integer
Dim intCounter As Integer
[Code].....
View 1 Replies
Jan 7, 2010
I have a picturebox with controls on it. I wanna save it as a pic with controls. I have seen a getimageofcontrol() func. on vbforums earlier that does exactly this. But I am not able to find it now...
View 3 Replies