|
No. The only changes that should be made are the ones I highlighted.
Think about it - you need two arrays: one to hold the max widths for the output, one to hold the widths for the current input file. So you also need two subs to populate the two arrays. You have to get the max widths before reading through the input files.
There's a potential problem with the output - it probably does not line up. This is because when the input is split up it includes leading/trailing spaces. If so then GetOutputLine needs tweaking.
Where did colPos come from? It should be
columnPositions .
Is this one big application that concatenates a bunch of files, then outputs a file with parent-child lines? Or are these separate apps that just happen to have same/similar input files? The reason I ask is that the problems you are finding all seem to be related.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
This is same problem as before. You need to step through and check that all the values in the column position arrays are positive and increasing. And also that the input line is at least as long as the highest column position.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
As you said, i will checkout and let you know.
Thanks for your support
|
|
|
|
|
I have a checkbox column in a datagridview.
I only want the user to be able to select one item in the datagridview.
But i don't know where to begin to get a count upon the number of checkboxes that are checked
Any help is much appreciated.
ASP all the way
|
|
|
|
|
What is the DataGridView bound to?
I mean, is it a database, a generic list a non-generic list.......
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
It is bound to a datatable populated by a database stored proc
ASP all the way
|
|
|
|
|
The only thing I can think of that might work.
Have a int field to track the row index of the 'true' row call it trueRow for illustration.
In either the OnCellClick or OnCellLeave handler, compare the row (e.RowIndex) to trueRow, if the same, return. If not the same, test if the cell (e.CellIndex) is the CheckBoxCell and if so, set the checkboxCell value from trueRow to false, store new row in trueRow.
Sorry not to be of more help.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i have that working now on the cell click event
thanks man
ASP all the way
|
|
|
|
|
hi
I am completely new to vb 6.0. I have sstab control in which i have 4 tabs
GSM,GPRS,CDMA,PSTN. Each tab contains should contain a set of controls. The problem starts there. I am not able to put controls in the tabs so that the controls are visible only when the corresponding tab is clicked.
Thanks in advance
|
|
|
|
|
Abandon vb6 and do it in .NET
Seriously why do people still program new programs in that language.
It never was any good, the language is dead and has been for several years and its no longer supported.
|
|
|
|
|
Tom's right, Get VB.Net, it is a free download.
It (VB6) is unsupported and opens you to ridicule and shame!
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
modified on Thursday, May 7, 2009 10:36 AM
|
|
|
|
|
Member 3057887 wrote: I am completely new to vb 6.0
Great! Stop while you still can and be completely new to VB.NET before VB6 teaches you a ton of bad habits you have to unlearn to move up to VB.NET!
|
|
|
|
|
But the current project is in vb6 and we have an urgent demo. So there is only one option(continue working on this till the demo is complete).So if any one knows the solution kindly let me know
Thanks in advance
|
|
|
|
|
I couldn't tell you - I haven't used VB6 in 8 years.
I'll warn you now - VB6 has been unsupported by Microsoft for quite a long time now, and its runtime will not be supported under Windows Seven. Your app will work under XP, may or may not work under Vista, and won't work at all under Windows Seven.
|
|
|
|
|
Hi,
I am not shure, but in VB 6 you have two Tab-controls (I do not remember witch is witch). There is one, that only shows you a tabbed layout on top, and not hide any controls, it you click a tab. Then it has one (in a external ocx, I think) that does what it is supposed to do. Hope this helps.
By the way, it is a good idea to change to VB.NET, you need to have some time to learn it properly, but it's worth it.
Regards: Didi
|
|
|
|
|
|
programmer1.a wrote: Please I need to help me
That's right, self help is the best way.
No-one here will code for you.
programmer1.a wrote: a simple example on a To Do List application
1 x Pencil
1 x Piece of Paper
Ta da!
A To do List.
Top of that list...
Learn to write some very basic code
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
OK..Thank you for reply
And iam sorry for the bad writing in English because I speak Arabic.
|
|
|
|
|
You language is not a problem, many here do not have English as first tongue, but never ask for code, write some code, then if there is a problem copy it here and ask for help, many people will be pleased to help or offer advice.
They might even RE-WRITE part of the code for you, but they will not just give it to you for nothing.
They need to see you have done some work.
------------------------------------
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC
|
|
|
|
|
hi ..
modified 28-Nov-12 8:17am.
|
|
|
|
|
Try changing
For fileCount As Integer = 0 To theFiles.Length() - 1
to
For fileCount As Integer = 0 To theFiles.GetUpperBound(0)
I'm assuming the error is an index out of bounds one.
If not, what is the error?
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
Then either the input line is not as expected (e.g. blank line somewhere in the file) or p(1) has not been set correctly.
I suggest setting a breakpoint on the line, pressing f5 and looking at the values of s and p(1) in the locals window.
That should tell you which it is.
I did have a problem in GetColumnPostions because of the accent in "Nom du Modèle" not matching the text in a test file - it set p(1) to -1.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|