473,698 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conversion Problem

Hi

This .net is driving me crazy!!

In VB6 I had a type which contained a couple of multi-dimentional arrays
which i used to create and read records:

Type AAA
:
Array1(10,10,2) as Integer
Array2(20,20,4) as Integer
:
End Type

I'm trying to get vb8 set up so that i can use the same files and use the
fileopen method to randomly access the file data etc

vb8 won't let me use <vbfixedarraywi th more than 2 dementions so i cannot
declare it correctly in the structure declaration.

What i have done is:

Structure z
:
dim Array1(,,) as short
dim Array2(,,) as short
:
End Structure
Dim x as z
I have then tried to Redim in an initialation so:
redim x.array1(10,10, 2)
redim x.array2(20,20, 4)

But when i go to get the record length Len(x) it is totally wrong

Is there any way out of this mess so i can use my original record structures
with openfile and random access? Why does vbfixedarray only allow 2
dementions?????

Cheers
John

Jul 10 '08
43 2370
"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:3r******** *************** *******@comcast .com...
On 2008-07-10, John <no************ ***@nothing.com wrote:

LOL... The problem is John, that you are not familiar enough with the
framework and .NET. Once you become so, on the whole things are MUCH
easier
....and he's not familiar with the framework because the help system sucks
like a hoover.
then VB6. I know, I spent years doing VB work. I'm not claiming every
thing
is easier, just most.

Your example of control arrays is pretty funny - I
don't even miss them. First off, the main reason in VB.CLASSIC for
control
arrays was 1) common event handling and 2) avoiding the 256 unique control
names per form limit (or was it 255?). 2 doesn't apply in VB.NET and 1 is
256... and we can see "2 doesn't apply" from the over-bloated, "feature
rich" (aka bug fest) apps people create with dotNet.
handled by the fact that VB.NET events allow an event to be assigned to
multiple controls (heck, they don't even have to be the same type)...
....and, you're saying that's not possible in VB5/6? If so, you may not be as
"great" as you assume.
>
Public Class MyForm
Inherits System.Windows. Forms.Form

Private buttons() As Button = new Button() {Button1, Button2, Button3}
Too bad that's not VB syntax. It's B#... I've been using basic and assembler
since 1981 and basic has *never* used curly braces. That's "C".... plus,
when the app is done, the code is readable in basic (and assembler)... not
that framework/linq/xml crap.... guess what... linq or any variant of SQL is
*NOT* part of any basic language that makes sense. That's SQL syntax and
should stay as such. No use adding hundreds of keywords to an already
over-bloated environment
..

Private Sub DoCoolStuff(ByV al btnIndex As Integer)
Dim theButton As Button = buttons(btnInde x)
Very readable.... NOT
>
As for your file issue, I only was half joking about your file access -
the
fact is that .NET is a different target platform then VB6. VB6 targeted
COM
....so, it worked. Which version(s) of the framework do your users need to
download? Microsoft surely doesn't make things easier on the developer. That
went away when VS6 did... and, if the whole mess is so freaking "wonderful" ,
why do they have to give it away free? You can still buy legit copies of
VS6, but be prepared to pay more than VS2008 costs... but, if you want what
you pay for, grab VS6

Even after... what... 7? 8 Years? No one knows what to call this "B#"... is
it VB.Net? is it VB#? How about B#? or maybe it's VB8? VB9? What ever. Have
fun.
and so it has a lot of COM'isms - such as SafeArrays - and so in some ways
is
not compatable. Personally, if I were you I would create a VB6 component
that
would be able to convert the files into a more .NET friendly format and
then
Yeah... or maybe just write the thing in VB6 and go on to the next job, eh?

But, like I said... you guys can have these freaking groups.
Jul 11 '08 #21
OK i've got it to read a record in now, i'll play around with it and see
where the data is actually being held and can be written and read

"John" <no************ ***@nothing.com wrote in message
news:uH******** ********@TK2MSF TNGP04.phx.gbl. ..
The actual text of the failure is: Offset and length were out of bounds
for the array or count is greater than the number of elements from index
to the end of the source collection.

"Patrice" <http://www.chez.com/scribe/wrote in message
news:e0******** ******@TK2MSFTN GP06.phx.gbl...
>Works here . Are they fixed array VB 6 side ? I've seen in the doc that a
prefix is written or not depending on the exact type of the variable. For
example if you write a single record using VB6 what is the exact size of
your file in bytes ? (mine is 48 that is 2 elements*3 elements *4
elements*2 bytes).

Byte alignement could also come in to play and it's also possible to
control this
(http://msdn.microsoft.com/en-us/libr...e(VS.80).aspx).

Also be aware of your "option base" (do I remember ?). Are VB6 array 1
based or 0 based. They are always 0 based in VB.NET....

I'm quite confident it can be done, I'll try to give this a closer look
later with your structure layout...

--
Patrice

"John" <no************ ***@nothing.com a écrit dans le message de groupe
de discussion : OR************* *@TK2MSFTNGP03. phx.gbl...
>>I've already tried to do something similar, but for some bizzar reason
the record lenghts in the vb are different to the so called equivalent
in the net and without knowing the reason why the chances of getting the
correct data back (even if it doesn't give an error) are pretty remote

"Patrice" <http://www.chez.com/scribe/wrote in message
news:BA****** *************** *************@m icrosoft.com...
So for the array issue I tried the following :

VB6 side Ive got a x(1,2,3) integer array...

VB.NET side I've got the following structure :

<VBFixedArray(2 3)Public _x() As Short

Public Property x(ByVal i As Integer, ByVal j As Integer, ByVal k As
Integer) As Short
Get
Return _x(i + j * 2 + k * 2 * 3)
End Get
Set(ByVal value As Short)
' TODO
End Set
End Property

That is :

- the _x array is a single dimension array whose size is the same as
the 3D array VB6 side. It allows to read the array using FileGet

- I expose this array as a 3D array using a property so that x looks
like a 3D array... (each cell is at a position so that each index uses
the number of elements for all the previous indices as an offset)

It should be similar enough to VB6 to be usable while watijgn perhaps
to switch to something better if another idea or a later update gives
better support...

--
Patrice

"John" <no************ ***@nothing.com a écrit dans le message de
groupe de discussion : #6************* *@TK2MSFTNGP03. phx.gbl...
Hi Patrice
>
My overall intent is to convert an existing VB6 application into
vb.net so I can still use multiple records I created in the new
application . I have managed to handle all the other type conversions
so vb net handles then using the fileopen, fileget, fileput but the
following record as stopped the conversion in its tracks because of
the multidementiona l array aspect.
>
The vb6 type structure is as follows:
>
Type satlocation
>
origin As Integer
>
locationfixed As Boolean
>
timefixed As Boolean
>
numberofsets As Integer
>
xcoords(100, 10, 2) As Single
>
ycoords(100, 10, 2) As Single
>
stamp As Date
>
End Type
>
What I need to do is to be able to read and write to randomly to
existing data in the above record set that was created under vb6 - as
you can see there are literally thousands of cords that I certainly do
not want to input again, so basically I need to use the this same
record set.
>
>
>
"Patrice" <http://www.chez.com/scribe/wrote in message
news:9F**** *************** *************** @microsoft.com. ..
>What is the overall intent ? It's true that VB.NET is different. For
>example the way to persists data is totally different so if you need
>to read legacy data, it might be usefull to consider the other
>options that .NET could bring to the table ("serialization " i..e the
>ability to persist data structure to disk or using datasets that are
>a in memory db representation (suitable only for small amouts of
>data) or a real db.
>>
>Let me know if you are still heading to VB.NET I'll try to give this
>a closer look with a working sample...
>>
>>
>--
>Patrice
>>
>>
>"John" <no************ ***@nothing.com a écrit dans le message de
>groupe de discussion : uF************* @TK2MSFTNGP04.p hx.gbl...
>>OK forget it - there is a more serious problem with this, it seems
>>that vb8 does not support arrays declared like arr1(10,10,10)
>>because when you try to do the Fileput it just gives an error saying
>>only 2 dimentional arrays are supported - what a load of tat!!!
>>>
>>i think i'll go back to vb6 that was a true RAD piece of kit, my
>>only other option it seems is to scrap all my hundreds of records
>>and then design the structure in vb8 so that it is something like
>>>
>>dim arr1(100,2)
>>dim arr2(100,2)
>>:
>>:
>>dim arr100(100,2)
>>>
>>>
>>just to get the same thing as dim arr1(100,100,2)
>>>
>>"John" <no************ ***@nothing.com wrote in message
>>news:%2** **************@ TK2MSFTNGP06.ph x.gbl...
>>>Ok i've got the Runtime.Interop Services.... bit to work
>>>>
>>>I've done it on all the elements of the structure and added them
>>>togeth er but i'm 4 bytes out?
>>>>
>>>I suppose i could just hard code the record length - but it seems a
>>>very poor way of doing things.
>>>>
>>>>
>>>"John" <no************ ***@nothing.com wrote in message
>>>news:e%* *************** @TK2MSFTNGP03.p hx.gbl...
>>>>thank s Patrice for that - i considered doing a fudge but the
>>>>value s are out so there seems to be an overhead in the array
>>>>structu re differences in the vb6 and vb8 - the 2 values do not
>>>>come out the same anyway- they are a few hundred bytes different
>>>>so the chances of reading and writing correctly into the old
>>>>recor ds is zero, and i don't fancy spending the rest of my life
>>>>just trying to fudge something that works.
>>>>>
>>>>i tried
>>>>Runtime .InteropService s.Marshal.SizeO f(GetType(Short ))*x.Length
>>>>but it just gives me an error saying length is not a member of x
>>>>so i don't know whether this would work or not!!
>>>>>
>>>>god i really hate this vb.net stuff - why is everything such a
>>>>pain? - nothing seems logical (for example, why have a
>>>>vbfixed array statement that is limited to 2 dimentions?) and why
>>>>they call it vb god knows, i've used vb since the 70's without any
>>>>probl em everything i try to do in this turns out to be a
>>>>nightma re - perhaps i'm just too old and fixed in my ways
>>>>>
>>>>>
>>>>"Patric e" <http://www.chez.com/scribe/wrote in message
>>>>news:51 *************** *************** ****@microsoft. com...
>>>>>An array is basically a pointer so the Len is not correct.
>>>>>>
>>>>>A trick could be to use <VBFixedArray(1 0 * 10 * 4)x() As Short
>>>>>to read your data and possibly to copy in the final array (it
>>>>>migh t be needed anyway as I'm not sure if .NET arrays and VB
>>>>>arra ys are storing data using the same ordering).
>>>>>>
>>>>>Anothe r option would be to compute the record length
>>>>>(Runti me.InteropServi ces.Marhsl.Size Of(GetType(Shor t))*x.Length)
>>>>>>
>>>>>Anothe r option could be to read each member, you can add a method
>>>>>to your structure to do add (youll need just the overall size, is
>>>>>this a constant in your case ?) and AFAIK datta are read based on
>>>>>the length of the receiving object (depends also how is was done
>>>>>in VB I suppose).
>>>>>>
>>>>>Your best bet would be likely to create a small test case using
>>>>>VB and reading use VB.NET wiht easy checkable values to test and
>>>>>diagno se possible read/write problems more easily...
>>>>>>
>>>>>--
>>>>>Patric e
>>>>>>
>>>>>"Joh n" <no************ ***@nothing.com a écrit dans le message de
>>>>>grou pe de discussion : uh************* *@TK2MSFTNGP05. phx.gbl...
>>>>>>Hi
>>>>>>>
>>>>>>Thi s .net is driving me crazy!!
>>>>>>>
>>>>>>In VB6 I had a type which contained a couple of
>>>>>>mul ti-dimentional arrays which i used to create and read
>>>>>>recor ds:
>>>>>>>
>>>>>>Typ e AAA
>>>>>>:
>>>>>>Array 1(10,10,2) as Integer
>>>>>>Array 2(20,20,4) as Integer
>>>>>>:
>>>>>>End Type
>>>>>>>
>>>>>>I'm trying to get vb8 set up so that i can use the same files
>>>>>>and use the fileopen method to randomly access the file data etc
>>>>>>>
>>>>>>vb8 won't let me use <vbfixedarraywi th more than 2 dementions
>>>>>>so i cannot declare it correctly in the structure declaration.
>>>>>>>
>>>>>>Wha t i have done is:
>>>>>>>
>>>>>>Struc ture z
>>>>>>:
>>>>>>dim Array1(,,) as short
>>>>>>dim Array2(,,) as short
>>>>>>:
>>>>>>End Structure
>>>>>>>
>>>>>>>
>>>>>>Dim x as z
>>>>>>I have then tried to Redim in an initialation so:
>>>>>>>
>>>>>>>
>>>>>>red im x.array1(10,10, 2)
>>>>>>red im x.array2(20,20, 4)
>>>>>>>
>>>>>>But when i go to get the record length Len(x) it is totally
>>>>>>wro ng
>>>>>>>
>>>>>>Is there any way out of this mess so i can use my original
>>>>>>recor d structures with openfile and random access? Why does
>>>>>>vbfix edarray only allow 2 dementions?????
>>>>>>>
>>>>>>Cheer s
>>>>>>Joh n
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Jul 11 '08 #22
The record holds spacial (2d and 3d) information on objects, i nearly put
the date time in as well as the 4th dimension. I will try your method of
accessing to see if that works ok - thanks for your help by the way. I may
use this as a temporary fix and use vb6 to read and write the information
into a different structure so i can use the vb8 more sensibly
"Patrice" <http://www.chez.com/scribe/wrote in message
news:AE******** *************** ***********@mic rosoft.com...
Try :

Structure SatLocation
Public origin As Short
Public _locationfixed As Short 'Boolean
Public _timefixed As Short 'Boolean
Public numberofsets As Short
<VBFixedArray(1 01 * 11 * 3 - 1)Public _xcoords() As Single
<VBFixedArray(1 01 * 11 * 3 - 1)Public _ycoords() As Single
Public stamp As Date

' Expose _ members as properties (see previous post for 3D arrays)
' TODO
End Structure

If I write a single record in VB6 and in VB9 it produces the same size on
disk. Members beginning with _ should be exposed using a property (seems
the cullprit were boolean values that are not using the same size)...

BTW I'm not sure what exactly are xcoords and ycoords but they could be
perhaps replaced by something that would be the same overall size but that
could be more handy such as an array of structure especially for the later
component. What are those 3 last values. Are they more handy addressed by
an index array rather than by a name (i.e. it could be MyCoords(100,2) .x,
MyCoords(100,2) .y, MyCoords(100,2) .z and could be exposed also as
MyCoords(100,2) .XYZ(0) if really needed the you would likely fit the 2 D
array limitation and wouldn't need any more the "exposed as a propery"
workaround....

Hope it helps.

--
Patrice
Jul 11 '08 #23
However when i do a FileGet(fileno, gamecoords, 1) on this record it
fails.
Have you tried the first step that would be in my view to write a single
record and check the size of the resulting file is 26680. It's a bit weird
you don't seem to have the boolean issue (are you still using Boolean rather
than Short ?)...

You could add some code such as

Debug.Assert(Fi leLen(File) Mod 26680 = 0)

So that it will fails in debug mode if the file size is not a multiple of
the record size...

I tried reading and it looks fine here... Do you have a single record in
your file ? Is the file size 26680 ?

--
Patrice

Jul 11 '08 #24

"Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.comwrote in message
news:eQ******** ******@TK2MSFTN GP06.phx.gbl...
"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:3r******** *************** *******@comcast .com...
>On 2008-07-10, John <no************ ***@nothing.com wrote:

LOL... The problem is John, that you are not familiar enough with the
framework and .NET. Once you become so, on the whole things are MUCH
easier

...and he's not familiar with the framework because the help system sucks
like a hoover.
>then VB6. I know, I spent years doing VB work. I'm not claiming every
thing
is easier, just most.

Your example of control arrays is pretty funny - I
don't even miss them. First off, the main reason in VB.CLASSIC for
control
arrays was 1) common event handling and 2) avoiding the 256 unique
control
names per form limit (or was it 255?). 2 doesn't apply in VB.NET and 1
is

256... and we can see "2 doesn't apply" from the over-bloated, "feature
rich" (aka bug fest) apps people create with dotNet.
>handled by the fact that VB.NET events allow an event to be assigned to
multiple controls (heck, they don't even have to be the same type)...

...and, you're saying that's not possible in VB5/6? If so, you may not be
as "great" as you assume.
>>
Public Class MyForm
Inherits System.Windows. Forms.Form

Private buttons() As Button = new Button() {Button1, Button2, Button3}

Too bad that's not VB syntax. It's B#... I've been using basic and
assembler since 1981 and basic has *never* used curly braces. That's
"C".... plus, when the app is done, the code is readable in basic (and
assembler)... not that framework/linq/xml crap.... guess what... linq or
any variant of SQL is *NOT* part of any basic language that makes sense.
That's SQL syntax and should stay as such. No use adding hundreds of
keywords to an already over-bloated environment
> ..

Private Sub DoCoolStuff(ByV al btnIndex As Integer)
Dim theButton As Button = buttons(btnInde x)

Very readable.... NOT
>>
As for your file issue, I only was half joking about your file access -
the
fact is that .NET is a different target platform then VB6. VB6 targeted
COM

...so, it worked. Which version(s) of the framework do your users need to
download? Microsoft surely doesn't make things easier on the developer.
That went away when VS6 did... and, if the whole mess is so freaking
"wonderful" , why do they have to give it away free? You can still buy
legit copies of VS6, but be prepared to pay more than VS2008 costs... but,
if you want what you pay for, grab VS6

Even after... what... 7? 8 Years? No one knows what to call this "B#"...
is it VB.Net? is it VB#? How about B#? or maybe it's VB8? VB9? What ever.
Have fun.
>and so it has a lot of COM'isms - such as SafeArrays - and so in some
ways is
not compatable. Personally, if I were you I would create a VB6 component
that
would be able to convert the files into a more .NET friendly format and
then

Yeah... or maybe just write the thing in VB6 and go on to the next job,
eh?

But, like I said... you guys can have these freaking groups.

Me.StatusStrip1 .Items.AddRange (New System.Windows. Forms.ToolStrip Item()
{Me.SongCounts, Me.CurrentlyPla yingTxt})

some code out of a designer.vb file. Now it may only be me the I see curly
brackets. Before you harangue people it would be best to check what you
say. This forum should be constructive not a place to thump your chest.

LS

Jul 11 '08 #25
"Lloyd Sheen" <a@b.cwrote in message
news:uN******** ******@TK2MSFTN GP05.phx.gbl...
>
>Too bad that's not VB syntax. It's B#... I've been using basic and
assembler since 1981 and basic has *never* used curly braces. That's

Me.StatusStrip1 .Items.AddRange (New System.Windows. Forms.ToolStrip Item()
{Me.SongCounts, Me.CurrentlyPla yingTxt})

some code out of a designer.vb file. Now it may only be me the I see
curly brackets. Before you harangue people it would be best to check what
you
Yeah... a B# designer file. How does that relate to my statement? I said
BASIC, in case you missed that... not this "C Wannabe"
say. This forum should be constructive not a place to thump your chest.
boo hoo. How about *you* reading more carefully before jumping in, eh?
Jul 11 '08 #26
On 2008-07-11, Ken Halter <Ken_Halter@Use _Sparingly_Hotm ail.comwrote:
"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:3r******** *************** *******@comcast .com...
>On 2008-07-10, John <no************ ***@nothing.com wrote:

LOL... The problem is John, that you are not familiar enough with the
framework and .NET. Once you become so, on the whole things are MUCH
easier

...and he's not familiar with the framework because the help system sucks
like a hoover.
Please! And VB6's doesn't? MS help has sucked for years - fortunately,
there's this thing called the Internet....
>then VB6. I know, I spent years doing VB work. I'm not claiming every
thing
is easier, just most.

Your example of control arrays is pretty funny - I
don't even miss them. First off, the main reason in VB.CLASSIC for
control
arrays was 1) common event handling and 2) avoiding the 256 unique control
names per form limit (or was it 255?). 2 doesn't apply in VB.NET and 1 is

256... and we can see "2 doesn't apply" from the over-bloated, "feature
rich" (aka bug fest) apps people create with dotNet.
As opposed to the "feature rich (aka bug fest)" apps in VB6? You know, VB in
general has a bad rep for a reason. It has more to do with the quality of the
coder, then tool.
>handled by the fact that VB.NET events allow an event to be assigned to
multiple controls (heck, they don't even have to be the same type)...

...and, you're saying that's not possible in VB5/6? If so, you may not be as
"great" as you assume.
Duh, I said that was one of the reasons for control arrays? In VB.NET, they
don't have to be a control array and they don't have to be the same type. Or
are you claiming that you can have the same event procedure handle the
TextChanged event of a combobox and a textbox in VB6?
>>
Public Class MyForm
Inherits System.Windows. Forms.Form

Private buttons() As Button = new Button() {Button1, Button2, Button3}

Too bad that's not VB syntax. It's B#... I've been using basic and assembler
since 1981 and basic has *never* used curly braces.
VB never had array or variable initialization on the same line before
either... A feature was added, and a syntax was chosen. Get over it.
That's "C".... plus,
when the app is done, the code is readable in basic (and assembler)... not
that framework/linq/xml crap.... guess what... linq or any variant of SQL is
*NOT* part of any basic language that makes sense.
You don't like LINQ - don't use it.
That's SQL syntax and
should stay as such. No use adding hundreds of keywords to an already
over-bloated environment
Your oppinion.
> ..

Private Sub DoCoolStuff(ByV al btnIndex As Integer)
Dim theButton As Button = buttons(btnInde x)

Very readable.... NOT
What? As opposed to:

Dim theButton As Button
theButton = buttons(btnInde x)

Sorry, but I think I like the one line rather then two bit.
>>
As for your file issue, I only was half joking about your file access -
the
fact is that .NET is a different target platform then VB6. VB6 targeted
COM

...so, it worked.
Didn't say or imply that it didn't.
Which version(s) of the framework do your users need to
download?
Which ever version my app needs. That's sort of a stupid question - how many
Visual Basic runtimes are there? Oh, yeah one for every version.... And,
well were at it lets have a discussion about binary compatability, and dll
hell.
Microsoft surely doesn't make things easier on the developer. That
went away when VS6 did... and, if the whole mess is so freaking "wonderful" ,
why do they have to give it away free? You can still buy legit copies of
VS6, but be prepared to pay more than VS2008 costs... but, if you want what
you pay for, grab VS6
They give it away for very good reasons. VS's current competition is almost
all FREE. It's a market difference, and not a reflection on the quality of
the product.
Even after... what... 7? 8 Years? No one knows what to call this "B#"... is
it VB.Net? is it VB#? How about B#? or maybe it's VB8? VB9? What ever. Have
fun.
>and so it has a lot of COM'isms - such as SafeArrays - and so in some ways
is
not compatable. Personally, if I were you I would create a VB6 component
that
would be able to convert the files into a more .NET friendly format and
then

Yeah... or maybe just write the thing in VB6 and go on to the next job, eh?
LOL... Yeah right. VB6 was a great tool in it's day, but compared to .NET
it's a toy. To do anything of more then average complexity requires jumping
through some major hoops, which often if not done properly lead to crashes and
hard to find instabilities. I can't tell you how often I read posts over in
the classic group that have long complicated answers delving deep in to the
API, that are solved in .NET apps in a couple of lines of code. But, if you
like dealing in complexity (aka bug riddled apps) then by all means, keep
clinging to your out of date toy environment...
But, like I said... you guys can have these freaking groups.
Thank you, your too kind.

--
Tom Shelton
Jul 11 '08 #27

"Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.comwrote in message
news:uL******** ******@TK2MSFTN GP04.phx.gbl...
"Lloyd Sheen" <a@b.cwrote in message
news:uN******** ******@TK2MSFTN GP05.phx.gbl...
>>
>>Too bad that's not VB syntax. It's B#... I've been using basic and
assembler since 1981 and basic has *never* used curly braces. That's

Me.StatusStrip 1.Items.AddRang e(New System.Windows. Forms.ToolStrip Item()
{Me.SongCounts , Me.CurrentlyPla yingTxt})

some code out of a designer.vb file. Now it may only be me the I see
curly brackets. Before you harangue people it would be best to check
what you

Yeah... a B# designer file. How does that relate to my statement? I said
BASIC, in case you missed that... not this "C Wannabe"
>say. This forum should be constructive not a place to thump your chest.

boo hoo. How about *you* reading more carefully before jumping in, eh?
As far as I know this is a VB.NET group and curly brackets are part of the
syntax. Grow up.

LS

Jul 11 '08 #28
"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:j-*************** *************** @comcast.com...
On 2008-07-11, Ken Halter <Ken_Halter@Use _Sparingly_Hotm ail.comwrote:
>>
...and he's not familiar with the framework because the help system sucks
like a hoover.

Please! And VB6's doesn't? MS help has sucked for years - fortunately,
there's this thing called the Internet....
Yeah... in dotNet, the internet is required. Not so for VB6 and its version
of MSDN.... but, it makes sense the internet's required since MS
specifically added .NET to the name. It's a web app generator. Now, if I
were creating web apps, or even apps for a mobile device, I surely wouldn't
use VB5/6... but for desktop apps I surely wouldn't want to use dotNet.
Duh, I said that was one of the reasons for control arrays? In VB.NET,
they
don't have to be a control array and they don't have to be the same type.
Or
are you claiming that you can have the same event procedure handle the
TextChanged event of a combobox and a textbox in VB6?
ummm... yes I am... I'm not sure why this is such a surprise. Have you never
coded a sub to be called from multiple places? What difference does it make
where the change event's coming from, or even what control fired it? If
that's so important, pass the control to the sub. No big deal. geez.
>Too bad that's not VB syntax. It's B#... I've been using basic and
assembler
since 1981 and basic has *never* used curly braces.

VB never had array or variable initialization on the same line before
either... A feature was added, and a syntax was chosen. Get over it.
Yeah, because it makes the code unreadable. My enter key works perfectly and
I use it all the time.

Dim i As Integer : I = 10 'is perfectly valid code in VB3,4,5,6 but no one
uses that syntax because it's unreadable and (or should I say AndAlso) leads
to bugs.

While I'm at it, this "+=" and similar crap they've added to make C
programmers more comfortable. What a mess that is. I can't believe people
would rather save 2 freaking keystrokes than have easy to read code... but,
I guess when you're in dotNet, every keystroke you can save counts, right?
>*NOT* part of any basic language that makes sense.

You don't like LINQ - don't use it.
Thanks for the option... Don't like dotBloat either... so I don't use it.
HTH
>That's SQL syntax and
should stay as such. No use adding hundreds of keywords to an already
over-bloated environment

Your oppinion.
Mine and about 5 million others, yep.
>>
Very readable.... NOT

What? As opposed to:

Dim theButton As Button
theButton = buttons(btnInde x)

Sorry, but I think I like the one line rather then two bit.
If that was supposed to be VB syntax, you forgot the Set keyword.. the code
you posted would attempt to pass the default property of those controls back
and forth.

Set theButton = buttons(btnInde x)
>Which version(s) of the framework do your users need to
download?

Which ever version my app needs. That's sort of a stupid question - how
many
Visual Basic runtimes are there? Oh, yeah one for every version.... And,
well were at it lets have a discussion about binary compatability, and dll
hell.
Check these groups. How many people say they've set their app for 2.0 but
the installation forces them to install 3.5?

If you're having problems with Binary Compatibility and DLL Hell after all
these years, I'm very sorry. Most of us have figured out how to deal with
those problems.
>Microsoft surely doesn't make things easier on the developer. That
went away when VS6 did... and, if the whole mess is so freaking
"wonderful" ,
why do they have to give it away free? You can still buy legit copies of
VS6, but be prepared to pay more than VS2008 costs... but, if you want
what
you pay for, grab VS6

They give it away for very good reasons. VS's current competition is
almost
all FREE. It's a market difference, and not a reflection on the quality
of
the product.
In your opinion.
>>
Yeah... or maybe just write the thing in VB6 and go on to the next job,
eh?

LOL... Yeah right. VB6 was a great tool in it's day, but compared to
.NET
it's a toy. To do anything of more then average complexity requires
jumping
A toy... yep. One that helped MS "rule the world" in the 90's. btw, try
pasting a block of text in anything resembling an immediate window... what
do you see? What ever it is, it's not what you pasted... now try selecting
that block and pasting into the code window... didn't work at all, you say?
Didn't think so.

Now, try looking at only one procedure in your app.... collapse everything
yet? Can you name a single app in the world that requires its users to edit
text in a treeview? Without an option to turn it off? How about an option to
view a single procedure at a time, without jumping through those dreadful
hoops. Ain't gonna happen? That's because the design team doesn't care. It's
their way or the highway.
through some major hoops, which often if not done properly lead to crashes
and
hard to find instabilities. I can't tell you how often I read posts over
in
Hard to find instabilities.. . and you're questioning someone elses coding
abilities? mmmkay. What ever... btw... in the computer world, if *anything*
isn't "done properly", you'll get the same results.
the classic group that have long complicated answers delving deep in to
the
API, that are solved in .NET apps in a couple of lines of code. But, if
you
like dealing in complexity (aka bug riddled apps) then by all means, keep
clinging to your out of date toy environment...
Thanks for that. I appreciate that you've allowed me to continue to work in
VB6... what happened when Vista was released? Oh yeah... people were forced
to throw their pre-2005 dotNet stuff away... VB6 still has support until
Win2008 server dies... what is that... 12 more years?

Wasn't Vista supposed to be "The dotNet OS"?... yeah, 2% dotNet, if that.
>But, like I said... you guys can have these freaking groups.

Thank you, your too kind.
You're welcome... ya' know... after all of the dotNet trolls going to the
VB6 groups and spouting their "evangelist " crap, I thought you guys might
want some of the same medicine... I'll pop in and rattle a few cages now and
then.... that is, if you don't mind... if you do mind, I can show you how to
block senders, if that helps.

It still cracks me up that Delphi and COBOL code can run nearly unchanged in
dotNet, yet VB code can't.... shouldn't really be a surprise though, since
Anders Hejlsberg had probably never seen VB and Paul "I'm the father of VB"
Vick has never touched pre-dotNet VB code at all. The blind leading the
blind. Simple as that.

Have fun... check in next week... same time, same channel.
Jul 11 '08 #29
"Lloyd Sheen" <a@b.cwrote in message
news:uc******** ******@TK2MSFTN GP03.phx.gbl...
>
As far as I know this is a VB.NET group and curly brackets are part of the
syntax. Grow up.
Way to sidestep the fact you misread my post. Great job.net
Jul 11 '08 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3940
by: Vladimir Khvostov | last post by:
Hi, We have some DB2 table on the host that has varchar(3200) columns that are used to store binary data (I know that "varchar(3200) for bit data" should have been used, by modifying host table is not an option at this time). I wrote a Win32 application, which is using DB2 Connect and ODBC to pull the data from the host. I am passing SQL_C_BINARY as a 3rd parameter in SQLBindCol() call, ::SQLBindCol(hStmt, nColNo + 1, SQL_C_BINARY,...
31
6631
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one variable becomes 364 and the other one becomes 365. Does anyone have any insight to what the problem is? Thanks in advance. Bjørn
11
7610
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type Test. I expected the same error from the following line, but it compiles fine. The double is silently truncated to an int and then fed in to the implicit conversion operator. Why does this happen? Is there any way that I can keep the implicit...
3
4448
by: Steve Richter | last post by:
here is a warning I am getting in a C++ .NET compile: c:\SrNet\jury\JuryTest.cpp(55) : warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied while calling the constructor 'MyString::MyString(const wchar_t *)' c:\SrNet\jury\JuryTest.h(21) : see declaration of 'MyString::MyString' The class "StringData" uses a, whatever you call it, operator const
0
1186
by: VB Programmer | last post by:
Simple ASP.NET 1 site. Opened solution in beta 2 of 2.0. Ran thru conversion wizard and it states: "Conversion Complete. There were some errors during conversion." I view the conversion log and for the project there is 1 error... http://localhost/Watersmark/ Conversion Issues - http://localhost/Watersmark/: ERROR: Failed to backup website http://localhost/Watersmark/
4
2902
by: Påhl Melin | last post by:
I have some problems using conversion operators in C++/CLI. In my project I have two ref class:es Signal and SignalMask and I have an conversion function in Signal to convert Signal:s to SignalMask:s. The reason is I have a free function called WaitSignal that accepts av SignalMask where Signals parameters are supposed to implicitly be converted to SignalMask:s. I'm using the SignalMask class because I want to be able to supply a logic...
14
2219
by: Richard G. Riley | last post by:
Would it be wrong to use "implicit casting" instead of the standards "implicit conversion" when talking about implicit conversions between certain data types. The standard mentions "explicit conversion" for a cast operation
6
2803
by: Dhirendra Singh | last post by:
Hi, The following C++ program is not compiling on my system. #include <iostream> using namespace std; class complex { double re, im; public: complex( ) :re(0), im(0) {}
4
2175
by: Coleen | last post by:
Hi All :-) I'm new to this site. I've been trying to convert several .Net 2003 web applications and getting tons of conversion errors. I found this site to help walk me through the conversion process: http://webproject.scottgu.com/VisualBasic/Migration2/Migration2.aspx which is great, however, when I follow the steps in this tutorial exactly, I get 102 conversion errors! Almost all the errors have to do with ambiguous file names, but...
8
5093
by: Nikola | last post by:
Hello, I'm writing a String class for C++ and I'm getting the following error message when using operator: test.cpp: In function ‘int main()’: test.cpp:7: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: string.h:19: note: candidate 1: char Types::String::operator(unsigned int) const
0
8676
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8898
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.