473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Saving Forms at runtime

hihi have been racking my brain over this

I have a program that draws rectangles , boxes , prints text on listbox and labels on the form based on the similarity of the
sequences from my results( taken from another program) . All this are added as I go.

As i have alot of such sequences whereby each sequence wil give me different images ( those drawings , the form is refreshed everytime a new sequence is acesss, i will have to save each drawings at the end of each sequences.

I thought of saving it to mircosoft word but it seems quite a hassle since the program is printing rectangles at different segment of codes as the program goes along

Dim objWordApp As New Word.Application
.....

Print screen is out because the sequences can be very long and there will be scrollbars as such.

So i would like ask whether i can save the built form to anything that can be viewed later automatically?

This is the example of the output :

Jun 28 '07 #1
6 1507
kadghar
1,295 Expert 1GB
hi

i can come to a simple example where you have 20 rectangles that may be white, red or blue, so make an array

dim myArray(1 to 20) as integer

then put 0 if white, 1 if red and 2 if blue for each of the 20 integers.
then save them into a string

dim str1 as string
dim i as integer
str1=""
for i = 1 to 20
str1=str1 & myArrya(i) & " "
next
str1 = str1 & chr(10)

and after that write down the string into a txt file, so you'll have each combination in each line... then make a code for reading them from the txt file..

That has helped me with similar problems

Good Luck
Jun 28 '07 #2
and after that write down the string into a txt file, so you'll have each combination in each line... then make a code for reading them from the txt file..

That has helped me with similar problems

Good Luck
Hmm i dont quite understand.. I do not need to read the rectangle from any files. The pictures shown is the output i get from my program. I will have to save the output in the form so that i will be able to view it when i am not running the program.
Jun 28 '07 #3
kadghar
1,295 Expert 1GB
Hmm i dont quite understand.. I do not need to read the rectangle from any files. The pictures shown is the output i get from my program. I will have to save the output in the form so that i will be able to view it when i am not running the program.
what i ment was that if you really need the information as an image?

Maybe there is some text format or table format that could be usefull as well and easier to save into a file.
Jun 28 '07 #4
Killer42
8,435 Expert 8TB
What version of VB are you using? (Sorry if it was obvious from the image - my work server blocks them for some reason).

In VB6, you should be able to use the SavePicture statement. Note that it may come out blank unless you have AutoRedraw set to True when you do the drawing. I've always found it takes lots of trial and error to get things right when dealing with .Image or .Picture properties.
Jun 28 '07 #5
oops sorry to mention. i'm using VB 2005 Express Edition.

what i ment was that if you really need the information as an image?

Maybe there is some text format or table format that could be usefull as well and easier to save into a file.
I understood what u meant and it make sense haha.. I think the easier way out is to make it into like some text format.. cos like what killer42 said, " it takes lots of trial and error to get things right when dealing with .Image or .Picture properties." Its true !


I added in the menuscript but was not very clear on the code for saving. It is able to save the form?
Jul 2 '07 #6
Killer42
8,435 Expert 8TB
I really think you are going to have to save it as a JPG or GIF image (or even, heaven forbid, a BMP image). In VB6, that would be via the SavePicture function. In VB 2005, I have no idea.
Jul 2 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
1
by: SJH | last post by:
I have been given an older database and asked to make upgrades and what not. One interesting thing I have come across with the database is that it was at one time set up so one of the tables would...
3
by: cdj | last post by:
Hi all, I've got a picturebox on a form, and a save button. When I go to save, the app craps out with the following error: ================== An unhandled exception of type...
4
by: melanieab | last post by:
Hi, I'm trying to save a bitmap file so I can print it later. I have Image.Save("sImage.bmp",System.Drawing.Imaging.ImageFormat.Bmp); The file sImage.bmp shows up in the bin\debug folder but...
15
by: Dan DeConinck | last post by:
Hello, I want to save the position of all the controls on my form. I would like to write them out to a preference file. I have done this in DOS BASIC like this: TO WRITE the preference...
1
by: M Keeton | last post by:
I currently have a picture which is stored in a "System.Drawing.Image" variable and I want to save it as a bitmap file. I have tried 2 different approaches and both give me the following error: ...
3
by: Peter Oliphant | last post by:
Trying to save/load a class instance to a file is tough. The reason is because there is no way to preserve its type other than by conventon. For eample, one can save all the states of the members...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
1
by: romcab | last post by:
Hi guys, I would like to ask your help about saving in ado.net. I was able to update it only on the display but when I check the database, it is not updated. I paste below my code and hopefully...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.