Valhalla Legends Archive

Programming => General Programming => .NET Platform => Topic started by: CrAzY on July 02, 2007, 01:55 PM

Title: [VB .NET]
Post by: CrAzY on July 02, 2007, 01:55 PM
Hi, while converting from 6.0 to .NET, one of the components called UpDown did not come out in .NET.  Is there an easy way to port the Windows Common Controls SP6 i believe into .NET?  Also, I am aware that there is a NumericUpDown control, which could work in my situation, just I have a couple hundred of them and wouldn't like to make 6 changes in my code for every single one.  Thank you
Title: Re: [VB .NET]
Post by: MyndFyre on July 02, 2007, 09:35 PM
Quote from: CrAzY on July 02, 2007, 01:55 PM
Hi, while converting from 6.0 to .NET, one of the components called UpDown did not come out in .NET.  Is there an easy way to port the Windows Common Controls SP6 i believe into .NET?  Also, I am aware that there is a NumericUpDown control, which could work in my situation, just I have a couple hundred of them and wouldn't like to make 6 changes in my code for every single one.  Thank you
Have you considered using the Find and Replace feature?
Title: Re: [VB .NET]
Post by: CrAzY on July 03, 2007, 08:10 AM
Yes,  however, since the NumericUpDown component is completely different than the UpDown from 6.0, it involves several different changes.  I've thought about using Macros but the code varies too much to try and look for a simularity between it. 

Let me explain a little bit more, the UpDown from 6.0 is only an arrow that points up and down.  From there, it has code to change the value in a textbox directly next to it, and 2 others to help compute some values.

The VB.NET NumericUpDown tool has the textbox built into it so you just press the button and it automatically does half the code required just for the UpDown_change segment.

I understand that this may not sound so bad, but there are atleast 5 other places that reference either the UpDown or the Textbox next to it on the form.  To top this off, I have about 25 megabytes worth of program to deal with.

I was thinking there would be a way to link the old UpDown into .NET so I wouldnt have to change the code, just change the COM's. 

Thank you
Title: Re: [VB .NET]
Post by: MyndFyre on July 03, 2007, 01:03 PM
Quote from: CrAzY on July 03, 2007, 08:10 AM
I was thinking there would be a way to link the old UpDown into .NET so I wouldnt have to change the code, just change the COM's. 
Well, .NET and VB6 are entirely different programming models, and so "changing the COMs" isn't really an appropriate thing to say.  However, COM components are available in .NET, so just add a reference to the type library (.tlb) and you should be able to access the old UpDown control.

Why are you converting such an old program?
Title: Re: [VB .NET]
Post by: Imperceptus on July 05, 2007, 11:20 PM
I have had to trouble  in the past explaining to some company's that converting their old vb6 to vb.net app's instead of just paying the company i was with to make a newer one that it was cheaper.  Maybe same thing.
Title: Re: [VB .NET]
Post by: CrAzY on August 01, 2007, 12:16 PM
Well, 5 weeks later I am finished.  God please shoot me now. :)
Title: Re: [VB .NET]
Post by: Joe[x86] on August 01, 2007, 09:57 PM
Bang.