Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
what a selection szlamany
I don't know what try try first !! yum ..yum
what are you ? have Cook / have Programmer ?
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by ChrisE
what a selection szlamany
I don't know what try try first !! yum ..yum
what are you ? have Cook / have Programmer ?
I always joke that I cook because it's something you can "complete", as opposed to software which we write and enhance and fix forever and ever and ever as long as someone is using it! During covid we binge watched like 17 seasons of Top Chef - I learned techniques for foods I will never ever eat, but tricks are tricks - that's when cooking becomes fun.
,
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by szlamany
Again - nice - really nice! Forget what you hear about cooking in the UK - this is done right!
British cooking has always been extremely good - except since the war up until the 1970s. After the war was over a starving UK had to feed Germany and as a result Britain only stopped rationing in 1954. During the war all artisan production of food was forcibly ended and all food products standardised to feed an almost starving nation. So, that was the end to all unique cheeses and artisan style food products and it affected our diet and pallette.
With the loss of the upper classes (who always ate superbly) and the food that was left for the masses being mainly working class in origin, the food culture in the UK was "eat to live" rather than "live to eat" as it became in the US. We still have that mentality, ie. we like food but it is still mainly considered a fuel so we can do other things. The mindset is that we don't have to eat well, we just have to eat enough. It is now engrained in our culture. You'll see people going on holiday to eat well abroad then coming home and eating the same old crap.
Despite that, British food is now some of the best in the world (see the number of British chefs on TV and the French chefs migrating to the UK) and of course the old country dishes (pies, roasts &c) just won't die, practically every house in the country eats a roast every Sunday.
For the last 20-25 years we have been starting to love our food again and you can now eat really well here. Of course we've always had the best curries in the world! Except for India...
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by szlamany
Who else likes taking pictures?
I do, here some of the baby tiger( 6weeks old) with my wife and
cat.
she took bark of that Tree in 1 day
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I first take a screen shot with "Snipping Tool" - this makes tiny jpgs - and use those under GO ADVANCED, MANAGE ATTACHMENTS, UPLOAD - and you can only do 1 image if you want it to be INLINE with the POST like this. I might be wrong about the 1 image after seeing the multi-pic post of those tigers!
Last edited by szlamany; Nov 12th, 2021 at 10:13 AM.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by dee-u
Guys, how did you upload your images? Did you just use the "Insert Image"?
No, go to imgur/upload, load an image. Wait until it renders, then hover the mouse on the image and a "copy link" option will appear, click on the three dots ... choose "get share links".
Choose the option that suits your needs. I typically choose BBCode and paste that text straight into a post.
I never trust the forum's image attachment method as it is untrustworthy.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
The other advantage of that last technique is that you have limited uploads on the site, which means that eventually you will either run out of room, or need to remove some.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by yereverluvinuncleber
No, go to imgur/upload, load an image. Wait until it renders, then hover the mouse on the image and a "copy link" option will appear, click on the three dots ... choose "get share links".
Choose the option that suits your needs. I typically choose BBCode and paste that text straight into a post.
I never trust the forum's image attachment method as it is untrustworthy.
Thanks for that info!
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Episcopal
It sure is....but why does VB.NET need XAML?
As far as I know, it does not. WPF needs XAML, but I don't believe XAML can even be used for programs that either A) Don't have a user interface, or 2) Are Windows Forms programs or iii) Are web applications of any sort.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Episcopal
Why is VB.Net/C#/XAML + VS2019 is better than VB6?
It sure is....but why does VB.NET need XAML?
By logical comparison it should be VB.NET/C#/XAML is better than VB6/XAML (here assuming there is a xaml for vb6).
Sorry for my ignorance.
Just like in VB6 where you have different project templates, for example ActiveX EXE, ActiveX DLL etc....Modern versions of Visual Studio also have different templates all backed by .Net. Some of these templates use some flavor of XAML for defining UIs. For example, Xamarin, UWP and WPF projects all use a different flavor of XAML for designing UIs.
As for why VB.Net needs it......Well it doesn't. WinForms and Console projects don't use XAML. I'm guessing that XAML itself is inspired by HTML which allows you design user interfaces declaratively. There are a lot of advantages to designing a user interface declaratively as opposed to doing it by code like you would in WinForms or with Win32 CreateWindow calls.
Interestingly enough, VB6 also uses a declarative syntax behind the scenes in Frm files for defining UIs. The only difference to XAML based projects in .Net is that it's not exposed through the IDE nor did Microsoft provide any tooling for directly using it for manipulating the UI. They probably should have though. Might be a fun little side project to write something like that.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
As for why VB.Net needs it......Well it doesn't. WinForms and Console projects don't use XAML.
Niya... here's the move... Is pure VB.NET not enough to get into this post? VB6 is a type of winform, although vb6 can work with IIS and activex for web.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by szlamany
Thanks for that info!
I would add that you should probably create an account on one of these image sites. While some image hosts do allow you to post images without an account, they are prone to being deleted when the site decides to do some clean up. I don't think they would be so eager to delete images uploaded by registered users. I myself use Imgur.com. Very good site that's very easy to use. I highly recommend.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Episcopal
Niya... here's the move... Is pure VB.NET not enough to get into this post?
When I think of VB6, I think of more than just the language. I think of the IDE, runtime, compiler and any libraries made for VB6 applications. A fair comparison to .Net needs to consider all the development tools in the .Net ecosystem which includes the VB.Net and C# languages, UI mark-up languages like XAML, IDEs like Visual Studio 2019 and libraries like .Net 5 or the .Net Framework. All of these together can cover all the ground VB6 can.
Originally Posted by Episcopal
VB6 is a type of winform
Yes. The underlying technology is very different but it is almost exactly the same on the surface.
Originally Posted by Episcopal
although vb6 can work with IIS and activex for web.
ActiveX is dead tech. No one should be using that anymore.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Finally doing it. I just did a system reset because I needed to clean out a bunch of crap installed on my PC over the years. Decided to give to VS-2022 a try instead of going back to VS-2019. Installing it right now...
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
What struck me was how verbose a lot of the suggestions are. I'll just post one example from the thread:-
Code:
Option Explicit
Private Declare Function GetMem4 Lib "msvbvm60" (ByRef Source As Any, ByRef Dest As Any) As Long ' Always ignore the returned value, it's useless.
Private Sub Form_Load()
Dim sa() As String
sa = Split("red|green|blue|yellow|purple", "|")
StrArrShuffle sa
Debug.Print Join(sa, "|")
StrArrShuffle sa
Debug.Print Join(sa, "|")
End Sub
Public Sub StrArrShuffle(sa() As String)
Dim i As Long, j As Long, k As Long
Randomize
For i = LBound(sa) To UBound(sa)
j = Int((UBound(sa) + 1) * Rnd)
GetMem4 ByVal VarPtr(sa(i)), k
GetMem4 ByVal VarPtr(sa(j)), ByVal VarPtr(sa(i))
GetMem4 k, ByVal VarPtr(sa(j))
Next
End Sub
In comparison, this is how it could be done in VB.Net:-
Code:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim r As New Random
Dim s = {"red", "green", "blue", "yellow", "purple"}
Debug.WriteLine(String.Join("|", s))
s = (From num In Enumerable.Range(0, s.Length)
Order By r.Next
Select s(num)).ToArray
Debug.WriteLine(String.Join("|", s))
End Sub
I'm not looking to start up all this drama again but I'd actually be curious to see if this could be done as concisely in VB6.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
It can't, but it can certainly be written faster. LINQ is very concise, but it is not very efficient. That's a trade off that often doesn't matter. Still a trade off, though.
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
...I'd actually be curious to see if this could be done as concisely in VB6.
Code:
Private Sub Form_Load()
Dim a: Set a = New_c.ArrayList(vbString, "A", "B", "C", "D", "E")
Debug.Print a.Join("|")
Dim b: Set b = New_c.ArrayList(vbString)
Dim v: For Each v In a: b.Add v, Rnd * b.Count: Next
Debug.Print b.Join("|")
End Sub
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Shaggy Hiker
It can't, but it can certainly be written faster. LINQ is very concise, but it is not very efficient. That's a trade off that often doesn't matter. Still a trade off, though.
Well, I don't think anyone should be using LINQ for performance. It should be used for it's convenience in places where high performance doesn't matter. However it's very easy to get seduced by it's elegance and flexibility which can lead one to use it everywhere, including places where it shouldn't be used. I used to be guilty of this when I started using it.
Originally Posted by Schmidt
Code:
Private Sub Form_Load()
Dim a: Set a = New_c.ArrayList(vbString, "A", "B", "C", "D", "E")
Debug.Print a.Join("|")
Dim b: Set b = New_c.ArrayList(vbString)
Dim v: For Each v In a: b.Add v, Rnd * b.Count: Next
Debug.Print b.Join("|")
End Sub
Olaf
Ah ok. That's pretty concise. I really wish I'd known about RC5/6 back when I was in VB6. It would have been a whole lot less painful solving simple problems like this.
I find the behavior of your ArrayList interesting though. It seems you can add elements to it at any index without knowing or setting the size of the ArrayList which quite handy but also quite odd. I can't find any precedent for this behavior. Did you come up with that on your own or is there some "prior art" upon which that behavior is based? Perhaps some collection class in a JavaScript or Python library somewhere?
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
I find the behavior of your ArrayList interesting though.
It seems you can add elements to it at any index without knowing or setting the size of the ArrayList...
Not exactly "without knowing the size",
because the second param of the Add-method does respect "the current ListCount".
Originally Posted by Niya
Did you come up with that on your own or is there some "prior art" upon which that behavior is based?
Perhaps some collection class...
Yes, the VB6/VBA-Collection has similar support in its Add-method -
but prior to the introduction of the VB-Collection-object into the VB-runtime,
such an optional second param was present also on a "Visual-Control" (VB.ListBox):
The following code produces the same "shuffled output-sequence" of A,E,D,C,B as the RC.cArrayList-example:
Code:
Private Sub Form_Load()
Dim lb As VB.ListBox, v
Set lb= Controls.Add("VB.ListBox", "lb")
lb.Visible = True: lb.Height = ScaleHeight
For Each v In Array("A", "B", "C", "D", "E")
lb.AddItem v, Rnd * lb.ListCount
Next
End Sub
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
In comparison, this is how it could be done in VB.Net: <<big snip>>
Btw, the VB6 sample code does *not* even copy strings because it swaps pointers which is an optimization of the straight-forward VB6 solution.
I mean you could have tried to show some optimized attempt and wrap it in a reusable function (the VB6 code shuffles twice BTW). Doubt any optimization would have been shorter in VB.Net
How do you swap strings without copying their content? Is it possible in .Net at all? This next episode of the saga might turn into a *big* counter-example IMO :-))
cheers,
</wqw>
Last edited by wqweto; Feb 26th, 2022 at 12:13 PM.