VB6 Split One Picture Into Multiple Picture Boxes.
how do i open a bmp or jpeg image into two seperate pictureboxes on the form? eg. half the picture in one box and half in the other? it should be quite simple but i can't find it out. whatever method is used to do this, can it also be used to split the picture up more? eg. split into vertical quarters and put this into 4 pictureboxes?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Multiple Picture Boxes At Runtime
i am making a picture viewer program. i would like to know how to get all of the pictures in a folder and put them into pictureboxes that are thumbnails of the original picture. when you double click on the thumbnail, it will come up in a picturebox in a seperate form. (full size). i would also like to know how to put a sidebar with thumbnails of the open pictures. any help would be greatly appreciated.
just to recap:
1)open form with drive list box and file list box to select folder, pictureboxes of thumbnails of all of the pictures in the selected folder.
2)picture selected is opened in a seperate form
3)sidebar with thumbnails of all the open pictures.
Dragging Multiple Picture Boxes At Once
I can't seem to figure out how to move multiple picture boxes by clicking just one of them. I have 16 boxes in a control array. I first check to see if the index is one of the 5 i want to drag as a unit, then I set all of their dragModes to begin, but instead of all of them starting to drag together, it snaps to the last box and moves it. Here is what I have:
Code:
Private Sub picTable_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbMiddleButton And Index < 12 Then
picTable(Index).Drag vbBeginDrag
Else
picTable(12).Drag vbBeginDrag
picTable(13).Drag vbBeginDrag
picTable(14).Drag vbBeginDrag
picTable(15).Drag vbBeginDrag
picTable(16).Drag vbBeginDrag
End If
End Sub
Moving Multiple Picture Boxes - Lag?
On my form I have a control array of 239 picture boxes NOT being moved. Then I create 5 picture boxes of a new control array and move them with a timer with the interval set to 10. It moves fine, but when I load another 5 picture boxes totaling 10 the game starts to lag by the images starting to move slower then set to. The more I load and more the slower it keeps getting.
I am increasing the .top of all of the picture boxes by 25 every time the timer ticks with a 10 interval.
How can I prevent this 'lag'?
Creating Multiple Picture Boxes
hi,
i'm writing an application which creates abarcode of the given number along with an icon and the number itself in a picture box. the barcode is generated line by line and drawn into the picture box. i would like to create a page that has exact copies of this in the form of a table (5 coluomns by 30 rows say). does anyone have any idea as to how i can achieve this gol? any help is appriciated
with regards
Code To Position/Resize Multiple Picture Boxes
I have a control array of picture boxes where the boxes are the width of the form and the picture boxes are stacked such that the
height (bottom) of each picbox starts the top of the next. The width of the picboxes will not change only the height.
Need code/suggestions on track each box for resizing such that
the height (bottom) of each picbox is always the top of the next.
Consequently, if one box is invisible, the third box needs to butt up against the bottom of the first.
Test If The Picture In Two Picture Boxes Is The Same?
Is there a way to test if 2 picture boxes are equal to each other?
Ive got 2 pictureboxes.
PicCapture
PicToMatch
I have loaded in the Pic to match the picture that I want to test of picCapture is equal to. The PicCapture takes a little portion of a screen shot and then AND's a mask on top of it. Then i need to test if the 2 pictures are equal.
I know they are equal, but PicCapture.picture=PicToMatch.picture always returns false.
How can this trick be accomplished?
Thanks in advance!
Nugget
Split Picture
Hi there,
how can I devide a picture from 1 picturebox to 4 other picturebox' ?
I looked it up in msdn, but I found no clear result
Thnx in advance
Maartuh03
Split A Picture
Hi all,
I have a picture and I want to split it to many equal parts (4 or 6 parts) and then save each of split part into each file. How can I do this, please tell me soon.
Thanks a lot.
Split A Picture
Is it possible to have a picture in Picture1 be split into separate
regions of the same touching color without inputing where the colors are
(i.e. the computer determines it)
An example would be to have an american flag with a green background in Picture1.
The computer would separate all of the regions and put them into
a StdPicture array. In this case, there would be 50 stars,one blue region
minus the stars, the green background minus everything else, and red and white stripes.
Thanks
-mark
Split A Picture, Like Sprites
Hi,
Is there some module that can split a picture?
Like, when you have a 100 X 100 picture you do
call splitpicture("locationpic.jpg","25","25")
Then you get 16 25 X 25 pictures.
Iv been looking for something like that here, and on google, but i cant find any.
Can someone help?
Gr. Ron
Load Picture At Run Tme In Picture Property Of StatusBar_Panel(1).Picture
I am trying to load an picture at run time at every Form's
StatusBarPanelPicture property but it seems that it doesn't show up .
Any ideas?
Thanks Panayiotis.
Public Sub main_logo_load()
On Error GoTo Load_Other
'Connections.Arr(1) array field holds the driveletter to which I have
the folder located .
Set Forms.Controls("staMain").Panels.Item(1).Picture = _
Connections.Arr(1) & ":CharterManagerImagesLogo-Small.gif"
'Forms.Controls.staMain.Panels.Item(1).Picture = LoadResPicture(1, 1)
Load_Other:
If Err.Number = 53 Then
Set Forms.Controls("staMain").Panels.Item(1).Picture =
LoadResPicture(10, vbResBitmap)
End If
End Sub
Image Boxes And Picture Boxes
hi, when i use this coding for and 'ImageBox', it works, but when i use it for a 'PictureBox', it doesnt. Can someone please tell me why.
Private Sub Timer4_Timer()
Picture1.ZOrder (0)
Picture1.Move Picture1.Left, Picture1.Top - 40
Picture1.Move Picture1.Left + 20
End Sub
when 'Picture1' is replaced with an Image1, it works, but if i leave it at picture box, it doesnt. Someone please help
here is the coding that executes Timer4...
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Asc(32) Then
Timer4.Enabled = True
End If
End Sub
is that 'Asc(32)' (which is the space bar) cannot move picture boxes but it can move imageboxes?
someone plz help
thank you
Picture Boxes
I would like to know how to create new pictureboxes only using code.
Do I say
Dim Mypicture as PictureBox
Public Sub init()
Mypicture = new PictureBox
End Sub
I am not sure how to make a new picture box with just using code. Please help me.
I am using Visual Basic 6.0.
Picture Boxes
Hey I am using a control array of picture boxes indexed from 1 - 12 and corresponding to the number a different picutre is shown from the value of an array. I want to be able to click any two of the boxes and on the second click for a msgbox to appear with "try again'
[ vb/ ]
Private Sub Command2_Click()
Dim i2, lnArray() As Long
RandomArray2 lnArray, 12, 1
For i2 = LBound(lnArray) To UBound(lnArray)
Label2(i2).Caption = lnArray(i2)
Next i2
For i2 = 1 To 12
b(i2) = Val(Label2(i2).Caption)
Label2(i2).Caption = b(i2)
Next i2
End Sub
[ vb/ ]
Private Sub Picture2_Click(Index As Integer)
Select Case Index
Case 1 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 2 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 3 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 4 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 5 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 6 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 7 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 8 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 9 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 10 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 11 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
Case 12 'first picbox selected'
Picture2(Index) = memory_pics.Pic1(b(Index)).Picture
End select
Endsub
ive tried to use a counter in the procedure so when counter = 2 the msgbox appears but i cant get it to work for all 12 of the pictureboxes
Any help would be appreciated, thanx
Picture Boxes
I have 5 pieces of data being stored in a picture box
Any ways to align this data show it can be read easily by the reader.
Cheers
Picture Boxes
I have 9 picture boxes in a control array, Pic1. How would I make my program load a picture into a random box, but only one that is empty (no picture in it) ?
Picture Boxes
I have a form with 9 picture boxes. The names are Pic1 Pic2 and continue to Pic9. What do I do to make it load a picture into a random picture box but only load into one that is empty?
Picture Boxes
How do I make it so that if you click on a picture box it opens up a thing (like run) that lets you choose what image you put in it?
also, reply to my thread below this (a4)
be specific
Picture Boxes?
i have been doin vb for about 3 months and i have just wondered how to print in a picture box. ie
m = text1.text
picture1.print m
(this is not valid code!)
i don' know how to do this?
Picture Boxes
I think this is a simple question with a hopfuly simple answer.
Is it possible to select text inside a picturebox or is it being displayed as a picture. If it is possible, how can i do it?
Thanks a lot
Ian
Help With Picture Boxes?
I have a chess program...i want it so that when i click on a piece, it will go through an If statement and determine which type of piece it is that was clicked on, but im having some problems. Here is what i have so far inside of my function
If Square.Picture = ("Z:Pawn.bmp") Then
MovePawn()
ElseIf Square.picture = ("Z:Rook.bmp") Then
MoveRook()
ElseIf ....
I think you can get the picture of what im trying to do...but the problem is that when i run the program, i get a
Run-Time error '13':
Type Mismatch
When i hit the debug button it highlights the line of the if statement that says
If Square.Picture = ("Z:Pawn.bmp") Then
I have no idea what is wrong. With my logic, it seems like it should work...any ideas?
Picture Boxes!!!
i have two forms, m using the first one for getting the number of picture boxes from user, and then i want to display the picture boxes on next form.
suppose if user provide me 2, then 2 picture boxes should be displayed in the next form.
how can i do it plz tell me???
Picture Boxes
ok how do you make a picture inside of a picture box, that is bigger than the box, move over so that you can see some more of it. Like on a scrolling map.
Picture Boxes
I was wondering what the FASTEST way to paint one image into a picturebox
such as you can use Picture1.paintpicture <blah>
to paint one image at a certain position..
well: what is the FASTEST way?
if it is Bitblt could someone paste the code to do it..?
Thanks alot
[BTW: I need to copy an image from IMAGE LIST to the picture box]
Picture Boxes
Hi
When i try to change the picture in a picture box at run time, with the following line:
picturebox1.picture = "C:My WorkAlexStoner.bmp"
I get a type mismatch on the
"C:My WorkAlexStoner.bmp" section.
Can anyone help?
Need Help With Picture Boxes
Hello,
I am pretty good with VB but this one has me stumped. Here is what I am trying to do. I have a text box at the top of the form and a picture box at the bottom. Right now I have the code set up so that when I type the word "Bus" for example in the text box, a picture of a small bus appears in the picture box. Unfortunaly, I can only display one picture at a time. However, I would like to be able to display several pictures at a time but am not sure how. Could someone please tell me how I should go about doing this.
Thank you in Advance,
Jon_V
Picture Boxes.
Why is it that everytime i have a dialog box over a picture box, it deletes
the images inside of it?
how do i prevent this from happening?
Picture Boxes
Hi,
On my demo app' I have the one form 'Form1'.
On Form1 I have a 'SSPanel1' control that I want 'Picture1' to populate the whole area of the 'SSPanel1'.
Do I need to cover the entire area of the 'SSPanel1' control with 'Picture1' and then insert another picture box as 'Picture2' to be used to tile within 'Picture1' ?
Or is there another way in which this same thing can be achieved?
Thanks for any help,
Andrew G.
Picture Boxes
How can I make the background of a picture transparent?
Thanks in advance
Picture Boxes
Hi,
I have two picture boxes, and I would like some sort of event to occur when the picture boxes touch each other. What code would you type? Here is what I tried....
Dim score as interger
If Piccone.Top = picH Then
score = score + 5
end if
lblins.caption=score
Thanks (in advance)
Transparent Picture Boxes
Just making the final adjustments now... at the moment I have a "charting" display for the sky. Basically there is a square viewport which is a normal picture box. The stars are drawn onto this "bottom" box. There are two more boxes which sit "on top" of this one - one which contains the stars' names and another on which a grid is drawn. See the little diagram below for clarity.
| >>>>> | >>>>> | >>>>>> | >>>>>> |
screen "stars" box "names" box "grid" box user
These are transparent picture boxes, which are dedicated objects created by another VB programmer in Denmark. The idea is that the user can choose to see or hide either (or both) of the "names" or "grid" boxes.
Everything works very well - apart from what appears to be a bug somewhere. On certain rare occasions - seemingly when there is a lot of detail to be shown - the display doesn't work properly! Usually what will happen is that one of the boxes refuses to show. That is, you may be able to see the box containing the stars' names, but not the stars themselves!
The bottom line is, can I do this without using his control? I need to be able to show or hide each of the boxes except the "bottom" one with the stars on. That's always visible. I understand that there are ways to do this using the API functions, and I think it will be made easier by the fact that all of these picture boxes are stationary. In fact they have to be!
Can anyone advise? Thanks.
Transparent Picture Boxes
In my game when the user moves his object over terrain the whole terrain picture box goes gray like the background of the figures one. Only the figures picture is shown because the pic box isnt transparent! The picture of the figure IS TRANSARENT!
How can I make the box transparent, the option fillstile: transparent wont work!?
Scrolling In Picture Boxes
here's the deal, I'm working on a map editor and I'm blitting the selected tiles to a picturebox. But if I need a huge map, I'll need the picturebox to scroll. So would I do that?
Pictures In Picture Boxes
I am trying to make a macro to make the insertion of small icon images into a document easier.
If you can imagine one picture (bmp) containing all the little images, my question is how I can copy just one of these images to the clipboard through Word - i.e. through a macro.
So far, I have a small form which displays the big picture in a picture box. As the user waves the mouse over the picture, a highlight square indicates which image will be inserted. This is far as I have got.
I now need to actually grab that specific part of the picture and stick it on the clipboard.
Its a bit of a strange one I know, but the alternative is having to load up paint, zoom in (they are quite small pictures) and carefully cut out the picture I want. A single click in a picture box is a much more elegant solution.
Add/remove Picture Boxes On The Fly
I'm doing a little personal development in my spare time and I just realized that I have never attempted to create objects dynamically. I'm hoping that it's possible...
In my app, I want to be able to create copies of picture boxes on the fly. In design-time, I have two picture boxes. They're in an array. What I would like to happen is, during run-time, create a copy of one of the two boxes and add it to the array. I would also like to be able to remove this new box. It will never be in the middle of the array, rather I will add/remove to/from the end of the array.
Is this possible? Can anyone point me in the right direction?
Combo And Picture Boxes
Yet again, I have hit another problem. I have a combo box (that lists names of cards i.e. A, 2, 3, ...K) What I need to do is this:
When you select a card name from the combo box, it's picture shows in the picture box. The pictures are on my local drive so I will need to path to them right? If there is an easier way to do this, please let me know. I'm not familiar with Combo boxes and Picture boxes together like this so I have almost NO clue what I'm doing. Any help is appreciated.
Thanks in advance!
Print Picture Boxes
hi, i'm trying to print several picture boxes in one sheet, one by one, i use the printer.paintpicture method for each one, and when i use endDoc it goes to the printer but never come out.
thanx
Image/Picture Boxes
Hey is there a way in VB to keep the background out of the picture box. Like i want to use a picture of a person, but it comes with a background that doesn't look right. Is there a way to fix that.
Displaying Picture Boxes 1 After The Other
Hi ,
I have tried to do an animation with showing and hiding picture boxes.
When i cycle through them manually they are fine
when i use a timer between boxes all i get is a grey empty picture box
here is code
Private Sub Com_Click()
Dim time As Long
time = Timer
Do
pic1.Visible = True
Loop Until Timer > time + 3#
pic1.Visible = False
Do
pic2.Visible = True
Loop Until Timer > time + 6#
pic2.Visible = False
Do
pic3.Visible = True
Loop Until Timer > time + 9#
pic3.Visible = False
Do
pic4.Visible = True
Loop Until Timer > time + 12#
pic4.Visible = False
Do
pic5.Visible = True
Loop Until Timer > time + 15#
pic5.Visible = False
Do
Pic6.Visible = True
Loop Until Timer > time + 18#
Pic6.Visible = False
Do
Pic7.Visible = True
Loop Until Timer > time + 21#
Pic7.Visible = False
Do
Pic8.Visible = True
Loop Until Timer > time + 24#
Pic8.Visible = False
Do
Pic9.Visible = True
Loop Until Timer > time + 27#
Pic9.Visible = False
Although theres plenty duplication here i will put into an array once i get the thing working
thats easy part just cant get my pic bixes to display , i have tried seeting autodraw to True and false with no joy.
Im missing somthing ( apart from Brain cells) but what
billy
Removing Picture Boxes
I have an array of picture boxes with object in them the user can remove object from the picture boxes. I would like to be able to unload the picture box automatically when the user has removed all objects. In other words is it possible to know how many object are in a picture box.
Saving Picture Boxes
How do I save my picture boxes image? I want the save window to pop up. I read the Command Diloge TUT and I didn't get it?
Printing Picture Boxes.
How can I print a picture box and all of its contents, if anyone could help me it would be really great
Viperchief
|