|
|
حقیقتش منم مشکل دارم اگه کسی بلد هست کمکم کنه
Silvervbnet@yahoo.com
|
|
|
|
|
I'm finalizing a proposal for a potential client who wants to upgrade their VB6 application to .NET. I hate to reinvent the wheel, so I'm wondering what tools or scripts exist to automate the conversion process.
I am aware of:
Microsoft's Code Advisor
Aivosto's Project Analyzer
Microsoft's Upgrade Wizard
Artinsoft's Upgrade Companion
Code Architects' VB Migration Partner
Great Migration's gmBasic
Microsoft's VB PowerPacks
Microsoft's Interop Forms Toolkit
We're planning on using 1, 2 and 4.
Are there any other tools, utilities, scripts, etc. to automate the conversion process?
|
|
|
|
|
You've pretty much hit them all, except for your own hands and eyes. No tool is going to do a 100% perfect migration, and it's still going to be VB6 code running inside a .NET wrapper.
|
|
|
|
|
Hi Dave,
Thanks. Well, if you or anyone else can thing of something that I missed let me know.
The Upgrade Wizard and Upgrade Companion don't do enough to make the source code more .NET-like, such as renaming variables prefixed with "lng" to "int".
In VB6, it was common to prefix your variables with an abreviation to indicate data type. For example:
Dim intNumber1 As Integer
Dim lngNumber1 As Long
In .NET, an integer is now called a short and a long is now called an integer. So the tool will upgrade that code to:
Dim intNumber1 As Short
Dim lngNumber1 As Integer
The problem with that code is that the prefix no longer matches the data type.
It should be:
Dim shoNumber1 As Short
Dim lngNumber1 As Integer
And actually, Microsoft recommends against using Hungarian notation so it really should be:
Dim number1 As Short
Dim number1 As Integer
The UW and VBUC do not handle changes like this. I can't be the first developer who's faced this problem. I figure that someone somewhere has already written some sort of utility or script that handles changes like this. I don't want to reinvent the wheel if I don't have to.
|
|
|
|
|
There is nothing that will rename variables during the upgrade. It's just too dangerous to the functionality of the code.
emunews wrote: I can't be the first developer who's faced this problem.
No, but you're going to end up doing what everybody else does and just re-write the code.
emunews wrote: I figure that someone somewhere has already written some sort of utility or script that handles changes like this.
Not that I've ever seen.
|
|
|
|
|
Hi,
I have a problem in invoking a method in the class
I have a Database class say DBAccess, in that I have a method to be invoked, I have created object to that class in this manner
Dim objDBAccess as DBAccess
when i used like this objDBAccess.GetData() Sometimes I am encountered with the error message "Object Reference not set to an Instance of an Object". I have overcomed by instantiating the object as
Dim objDBAccess as New DBAccess
I want to know how in some access the First statement itself worked fine and sometimes it failed on invoking that method.
|
|
|
|
|
it is very simple:
for Eg:
Dim thing as New Thing<br />
thing = Nothing<br />
<br />
‘do something at start of load event<br />
if thing = "sandwich" Then<br />
thing = "jelly" <br />
Clearly the thing object is set to an instance of on object at this point. It’s an instance of the Thing class.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
This is basic programming concepts in OOP. I HIGHLY suggest picking up a book on VB.NET for beginners.
Your first statement just created a variable that CAN contain a reference to an object of type DBAccess. When you define it, it doesn't actually reference any DBAcess object, it points to Nothing, or null in C#.
Your second statement (with the "New" in it) does the same thing as the first statement in creating a variable that CAN point to an object of type, then it creates an instance of the DBAccess class, called an object, and points the variable at that instance. Now you can call the methods and properties on that object.
|
|
|
|
|
aakkpp wrote: I am encountered with the error message "Object Reference not set to an Instance of an Object"
Because you need to use the New keyword.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
declaring an object is different from creating an instance of an object.
Unless you get an instance of an object it is not ready to be used in oo environment.
You have to go through some books and tutorials.
|
|
|
|
|
Hello
I am using VB.Net in VS2008 Professional SP1 on Vista Business SP1.
Installation was without error messages but it seems only the VB templates were installed, i.e. I don't see any 'Setup and Deployment Project' option when I want to start a new project even though the folder 'Setup and Deployment Project' does exist.
Likewise I don't see templates for other programming languages in .Net even though the entire VS2008 package was installed.
Do the templates not install automatically? Is there a place to download them and copy them manually into the template folder?
Many thanks
ccdmf
|
|
|
|
|
I've never had a problem like your describing. Perhaps do an uninstall and a reinstall of VS and SP1 (or even better, test this on a VM env if you have access to one).
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Re-installation yielded the same problem.
Looking in the C:\Program Files\Microsoft Visual Studio 9.0 folder I noticed the templates that I can correctly see in VS08 are located in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE folder and that the setup and deployment projects are located in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment\VsdProjects folder. VS2008 does not seem to look in this folder and setting the User template option to this folder does not solve the problem either.
Any suggestions?
Thank you
ccdmf
|
|
|
|
|
in the ide, it's in "other project types"
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hi, I am using a Richtextbox at runtime. and the Control added at runtime
But I face a Problem, The RichTextBox Data is Edited or Selected.
I am Using ReadOnly=true so that the Edit Mode is Off but Text is still Selecting.
If I am take Enabled=false then The Backcolor will be changed.
So, How can I a Lock this Control at run Time ?
dim rtf01 as new Richtextbox
rtf01.Visible = False
Me.Controls.Remove(rtf01)
Me.Controls.Add(rtf01)
rtf01.BringToFront()
rtf01.BackColor = Color.FromArgb(175, 175, 175)
rtf01.BorderStyle = BorderStyle.None
rtf01.Cursor = Cursors.Arrow
rtf01.ReadOnly = True
rtf01.ScrollBars = RichTextBoxScrollBars.None
rtf01.Left = fgButton.Cols(1).Left + 10
rtf01.Top = fgButton.Top + 6
rtf01.Visible = true
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Why not just have it be readonly? Any reason you do not want to allow user to select text?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Yes I want that the User only click on the Richtextbox, and I'm doing somthing of its click.
But When it click the Richtextbox edited.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
You could always try using the KeyPress event handler, and in the event handler have something like e.Handled=true . That will force it to ignore all key presses.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
In the end of your code:
AddHandler rtf01.SelectionChanged, AddressOf RichTextBox_SelectionChanged
And then create this method:
Private Sub RichTextBox_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
sender.DeselectAll()
End Sub
That´s it??
-----
LeandroAB
|
|
|
|
|
I have a user control that has a combo box in it. I've placed this user control onto a windows form that has other controls on it.
When I open a combobox on the user control at runtime, the mouse scroll wheel will not scroll the combobox.
Any combobox on the form not in the user control scrolls the combo box content.
How do I make the user control combo boxes act the same?
Thanks,
Tim
|
|
|
|
|
Nevermind. Developer error.
|
|
|
|
|
Hello,
I am trying to figure out the format of data to send over CAN bus (using PCAN) using Vb.net. How would i be encoding and decoding data.
i would really appreciate if some one can help me.
Thanks.
|
|
|
|
|
Since this is such an obscure question, this[^] is the first thing anyone is going to do to start researching an answer.
|
|
|
|
|
Hi,
I have done lots of CAN (not PCAN) stuff in C some years ago, on embedded
systems, not on PC. We used our own protocol on CAN and other networks.
What hardware are you using? Did it come with a driver? What is it the
driver expects? Does it offer a .NET interface, or are you looking into
P/Invoke? Do you have any PCAN library source code available, if so, in what
language is it?
I would expect a CAN driver wants a destination address (or CAN-ID), a priority,
and a number of data bytes. I would guess the PCAN protocol can be
implemented on top of that in whatever language you choose. And I would
try and stick to a byte array to carry the data.
Hope this helps.
|
|
|
|