|
So you want to save each idividual frame as it's own .BMP or .JPG file?
Then just iterate through the PictureBox's, just like you added to the Form (or parent PictureBox in your case), cast a Bitmap object to the Image property of the PictureBox, then supply the filename to save it. You already have most of the code written, the rest is easy.
For x = 0 to UBound(PictureBox(), 0)
Dim imgBitmap As Bitmap = PictureBox(x).Image
imgBitmap.Save(strFilename, ImageFormat.Bmp)
'increment your filename somehow, somthing like
'MyAnimation0001.bmp, MyAnimation0002.bmp, ...
imgBitmap.Dispose()
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I can already save each individual frame as a seperate bitmap.What I want to do is save all the animation frames as a single bitmap file.So when I open up that single bitmap file in Microsoft Paint or Paintshop Pro it displays all the frames of the animation in a single bitmap file.
|
|
|
|
|
For that, you would have to make a bitmap and loop through the frames. Then, draw the current frame on to your bitmap at the ending position of the previous frame.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Yes thats what i want to do, but i don't know how to do it. Can someone help me with that please.
|
|
|
|
|
1st question
how could i move the form by the mouse ofcourse not from the title bar
or how could i make a label and by mouse down i can move the form and when up the mouse it leave the form at the new place
2nd
now i make a game and i want to make to things
first a shortcut key when i press it start a new game
like if press f2 start a new game how?
second in new game have i to clear changes i made one bye one or there is a code to load the form as it loaded in the first time
3rd
i knew how to make a control array of a control like a control array of commands when u clicked one the tabindex is ur guide and i make a notehr one how can i bound the two control arrays
Lost & Forgotten
|
|
|
|
|
ahmad_yossef wrote:
1st question
how could i move the form by the mouse ofcourse not from the title bar
or how could i make a label and by mouse down i can move the form and when up the mouse it leave the form at the new place
You would have to experiment with overriding the MouseDown and MouseUp events of the Form. During MouseDown, you would probably have to use the PointToScreen function to calculate the coordinates to use and change the Top and Left parameters of the Form to those coordinates. No, I don't have any sample code.
ahmad_yossef wrote:
2nd
now i make a game and i want to make to things
first a shortcut key when i press it start a new game
like if press f2 start a new game how?
second in new game have i to clear changes i made one bye one or there is a code to load the form as it loaded in the first time
This depends entirely on your game's engine design and can only be answered by you, the person who designed it. The key would be handled just like any other keydown/keyup event in your game. How you reset your game engine depends HEAVILY on the design of the engine.
ahmad_yossef wrote:
3rd
i knew how to make a control array of a control like a control array of commands when u clicked one the tabindex is ur guide and i make a notehr one how can i bound the two control arrays
This makes no sense what-so-ever...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a custom collection set that contain specific items and/or a set of items of that same class. (Much like a Windows folder, any collection can contain one or more "shortcut" items, as well as other "folder" items - which in turn can contain the same kind of items).
I have the class collections and representations mapped out, but I am having a heck of a time implementing XML Serialization/Deserialization around the set.
There is a very helpful article on XML ser/deser of a custom collection class, but it is not recursive.
Can someone point me to an appropriate document?
Thanks;
MR
|
|
|
|
|
I created a Class library in a multi-project solution. This library is being referenced by many other libraries in different projects in the same solution. When I compile this library I would manually remove references to this library and then reference it again. Is there another way to do this?
|
|
|
|
|
Hi,
Another way of doing this is use the Reflection Class,which dynamically
Loads the Assembly at run time. and also Unloads the Assembly.
So, you use the Assembly when ever you want at Runtime.
Regards,
Sukesh.
Sukesh.g
|
|
|
|
|
The problem is probably because you are using automatic versioning in your Class library project. Open the Assembly.vb file and change the Assembly Version attribute from "1.*.*" (auto-increment versioning) to "1.0.0.0" or whatever you want for a version number. Then, all your other projects that reference this assembly will reference the same version of the assembly.
In other words, your projects are referencing your Class assembly. When that reference is created, is it created with the version number of the last time you compiled the Class into an assembly. The '*'s in the Assembly version attribute of your Class project denote numbers where the compiler will automatically increment the version number. When your other projects that reference this assembly are run, they load the Class assembly with the same version that was used when the reference was created. If your app references your Class with the Class's version at 1.0.2039, then the app will always expect version 1.0.2039 to be there.
Now, if you set a reference to the Class assembly, you'll run into the problem that your having now. If you create the reference to the Class project, the versioning problem will go away, but you'll still have to change the Assembly version of your Class project to a static number. Otherwise, when you compile your Class assembly, you'll have to recompile all the projects that reference it to.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks. I finally got it.
|
|
|
|
|
Hello,
I'm very new to VB so maybe the solution I'm looking for is easy to find but I just can't find it...
I have an access database with companies datas; this database is read by a VB application ( prev, next, search...usual stuff ).
The fields are:
Company
Address
City
Phone
Fax
Email
Comments
What I would like to add is:
a combo box which will autoupdate itself based on the database records, so when a user is selecting an item from the combo, the corresponding record become visible on the interface fields.
It is possible to have something like this? I did the thing in Access but it looks like there are many differences between VB code and Access code...
Thanks in advance.
Axel
|
|
|
|
|
Access code is VB code, just more limited. Visual Basic for Applications (VBA) is a subset of the full language. When coding Access apps quite a lot goes on 'behind the scenes' that you can't easily see. When manipulating a db with VB directly, you have to provide that functionality yourself. If I understand your question correctly, you are trying to populate a form with data that depends on a user selection from a combo box. You need to provide a function that intercepts the user selection event and executes a SELECT query on the database, then update the form controls with the resulting recordset.
"My kid was Inmate of the Month at Adobe Mountain Juvenile Corrections Center" - Bumper Sticker in Bullhead City
|
|
|
|
|
Thanks a lot, Roger. I got the idea.
|
|
|
|
|
Can anyone point me to a class for creating an Application Task Bar in vb.net? I have a CS class, but it is incomplete and I am not having much luck repurposing it.
Either source code, or even a control that I can purchase that would allow me to dock a bar to the screen, hide it, etc.
Thanks;
M. Rich
|
|
|
|
|
Have a look at this:
John O'Byrne's
taskbarnotifier, a skinnable MSN Messenger-like popup in C# and now in VB.NET too
http://www.codeproject.com/cs/miscctrl/taskbarnotifier.asp
|
|
|
|
|
Not exactly what I am looking for, but a cool control.
I'm looking for a class that implements the Application Task Bar functionality of Docking and Hiding, etc that you get with typical XP-style toolbars on the Windows XP desktop.
|
|
|
|
|
I'm getting the following error in my app.
OutOfMemoryException' occurred in system.drawing.dll
On my Main window, I have a Listview, that has a images for the checkboxes, a outlook style bar down the side, and a picturebox that is displaying a animated gif file.
When I minimize my app to the System Tray (I also have a Notification Icon)
Me.ShowInTaskbar = False
When I go to pull it back up, I get this error, from the debugger. Now if I run the program outside of the debugger,after minimizing and restoring the form my images aren't where my checkboxes were.
Now something else I tried, was just having my program minimize to the taskbar. There was no problem at all. My images on the listview are in place of the checkboxes.
I know of course it has something to do with the drawing related stuff, but I'd like to avoid this error, and keep my images on the listview. Dave you have any suggestions..
Thanks in advance.
Gerry
|
|
|
|
|
WIthout seeing any drawing code, it's hard to tell you what's going on. But, if your drawing anything yourself, make SURE your .Dispose() any Graphics objects and release any handles you're getting from Win32 API, using the Win32 API.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The Thing is I'm not doing any drawing stuff my self. I've just got a picture box, a listview with images for the checkboxes, and a outlook side bar. I did some more playing around with it last night, When I minimize my form, i have 2 options for the user, to have it minimize to the system tray, or minimize to taskbar. If I have my progam minimize to the system tray, then restore the form,
Me.ShowInTaskbar = True
Then My images on my listview are no longer there, and all I've got is checkboxes.
Minimizing to taskbar, does everything just fine. I'm not understanding what I'm doing wrong
Thanks again for your help
|
|
|
|
|
Are your images store in an ImageList? Try to avoid it if you can.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's how I have my images, in a image list. I can avoid it if I can set the images at runtime, for when it's checked or not checked. You don't have a brief example on how to just set the image for a item in a listview - I have it on details view and checkboxes enabled.
Thanks for your help
|
|
|
|
|
Please any body who might give an opinion about my Save Data ..!
MsgBox("Is Data Correctly Right ?", MsgBoxStyle.YesNo, "Confirmation")<br />
If MsgBoxResult.Yes Then<br />
drcustoms = dtcustoms.NewRow<br />
drcustoms("cstcd") = txtcstcd.text<br />
drcustoms("cstnm") = txtcstnm.text<br />
drcustoms("cstadrs") = txtcstadrs.text<br />
drcustoms("cstphno") = txtcstphno.text<br />
conn.Open<br />
endif<br />
the procedure is after the message box appear and the answer is "Yes" the field should save in the database, if the answer is "No" abort the save.
I'am the new bies and interesting in VB.NET programming. Please give an opnion
if any body know the right and the simple code program.
Best Regards,
Ahmad Rifai Yusuf
|
|
|
|
|
Without seeing the rest of your code, like what's drcustoms , dtcustoms , and what the rest of that conn object looks like, it's very difficult to tell you what your doing wrong.
I can tell your that you set the values of a bunch of fields, then opened a connection to a database, but you DIDN'T execute any proecure to write that information to the database, nor did you close the connection to it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
First of all, try something like "Is the data correct?".
secondly, you will need to add
drcustoms("cstphno") = txtcstphno.text
--> dtcustoms.rows.add(drcustoms)
finally, this will just be storing the data in a disconnected datatable. To send the data back to the database, you will need to
a)create a database command,
build a sql string (or preferably use a stored procedure)
execute the command
or b) use the Update method of a dataAdapter
Visit my .Net blog at http://hiltong.blogspot.com
|
|
|
|
|