When I load the projects Planet or Fibonacci I get the following error message:
You can of course go back to old installed versions but that sounds like entering in a dark cave with absolute no light.
After roughly 4 hours of testing I found the cause:
In the Visual Basic 2010 environment the building of the form from the user point of view is almost identical. You can insert a text box, a command button or a label in a form. However and that is different, at the same time the planet.designer.vb program is updated with that information. You can modify that program, you can change the position if you want, but you cannot use any mathematics. That means you cannot calculate the position on the form.
There is a difference between building the form. When you insert your first text box you this difference does not show up. IN visual Basic 2010 when you insert the second text box the system draws horizontal and vertical lines to make it easy that you place the box horizontal and vertical at the correct position. This seems an improvement but it is not. The problem becomes clear in the 3 by 3 example if you want to change the box in the middle: the lines become messy
IMO this whole new concept of Designer Mode has no advantages only disadvantages specific because of the added complexity.
Go to Visual Studio Help Viewer
And now the bad news: When you consider performance, that means if you have one application (i.e. one physical problem or simulation) and you want to improve performance by modifying that application and by adding parallel programming in the form of the backgroundworker, that whole exercise is more or less useless, because the overall performance will not increase.
See for detail: CPU performance Part 1 and CPU performance Part 2
In Visual Basic 5.0 it is easy to place Text at any place on a form by using a Picture Box.
In each application when the user implements an application two VB files are created.
VB 2010 supports the Time function by using second(Now), Minute(now) and hour(Now)
Try this MSDN document: Structured Exception Handling Overview for Visual Basic
More is written in this Microsoft MSDN document: Programming Concepts
Visual Studio 2010
David Platt also wrote a review of Visual Basic 6 Versus Visual Basic 2010 in MSDN magazine. For a review of that article go to The silent Majority
My recommendation is to use the toolbox as less as possible.
Created: 26 December 2010
Back to my home page Contents of This Document
The signer's certificate is not valid for signing.
The original Visual Basic 2010 package was loaded under the umbrella "Visual Studio 2010 Professional". As part I received a product key. However this key is not longer valid. To solve this I reloaded the package but now under the umbrella "Visual Basic 2010 " I also received a new product key.
This new key does not cause any problem for new programs written but I cannot publish my old programs any more.
Instead I get the error message:
To solve this problem I had to rebuild all my programs.
To do that you have to rename the old Fibonacci project into Fibonacci-old and create a new Fibonacci project.
Error 3 An error occurred while signing: Failed to sign bin\Release\app.publish\\setup.exe. SignTool Error: The signer's certificate is not valid for signing.
SignTool Error: An error occurred while attempting to sign: bin\Release\app.publish\\setup.exe Fibonacci
In the case of the Fibonacci project you have to copy the files: Form1.vb and Form1.Designer.vb. This whole process is a nuisance
The cause is the file: Fibonacci_TemporaryKey.pfx
Microsoft should remove this whole philosophy.
Private Sub startAsyncButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startAsyncButton.Click
The name startAsyncButton.Click should have been with a capital S.
Private Sub cancelAsyncButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cancelAsyncButton.Click
The name cancelAsyncButton.Click should have been with a capital C.
Private Sub backgroundWorker1_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) Handles backgroundWorker1.DoWork
The name backgroundWorker1.DoWork should have been with a capital B.
Private Sub backgroundWorker1_ProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs) Handles backgroundWorker1.ProgressChanged
The name backgroundWorker1.DoWork should have been with a capital B.
Program Mode versus Designer Mode
If you compare Visual Basic 5.0 with Visual Basic 2010 than one of the major differences is that the first consist of one VB program (complex) and the second of two VB program (complexes).
Suppose you have a project called planet than
In the Visual Basic 5.0 environment during the building of the form you can insert a text box, a command button or a label in a form. The information of those actions are stored as text in the form invisible for the user. The subroutines which are directly invoked as a result of operator actions (Click and double-click) are also stored in the form.
Suppose you what to place 9 text boxes and 9 labels in the form of a 3 by 3 matrix on your form. To do that you can use the subroutine Form Load to place the boxes and the labels at the position you want. What is important you can also calculate those positions. If you for example use a parameter distance and you change its value than all the new positions are calculated. All this is very user friendly.
If you want to calculate the position you have to build your own initform subroutine to do that. In fact there are two initialization subroutines: one is the designer initialization subroutine the second one is your own initform.
What you can also do is to build the whole form in your own initform subroutine. However that is even worse. See Fibonacci benchmark
Documentation
Documentation in Visual Basic comes in two colors:
My overall evaluation of the "Help" documentation is mediocre. To find the information what you want is difficult.
In short the usefulness of those document related to actual programming is rather mediocre.
What you want is an example which uses Visual Basic.
This document explains what threads and threading are from a technical point of view. The problem is that threads and threading is important for processors that have multiple core's (CPU's) but not important for the average Visual Basic user except if he or she wants to use parallel programming. But that is not explained.
In the paragraph "Threading and Application Design" the concept Backgroundworker is mentioned. That is the only important information. However .. this brings you back to the previous document which is not what you want.
The title of the document is: "Parallel Programming in the .NET Framework"
This document starts with the text:
Both MSDN documents 4 and 5 give a complete wrong impression about what is involved in parallel programming with Visual Basic.
There is one more link to study Visual Basic language Reference
but the information supplied is not very helpful
More or less the same information is supplied as above under MSDN documentation #1.
The document shows two Examples in Visual Basic: "BackGroundWorker" and "Fibonacci"
Both programs use the BackGroundworker. But they do not demonstrate Parallel Programming
More or less the same information is supplied as above under MSDN documentation #2.
What you get is a document which starts with the title: "Parallel Programming"
Select: "Parallel Programming in the .NET Framework"
The document (Which I expect resembles MSDN documentation #3) is not available.
There are two ways: (1) Via the index (2) Via the search box in the top right corner.
Select "Index". You will get a table with roughly 10000 entries (?)
Go to the Bottom. The last entry is: Zs compiler
Select the top arrow at the right side of the "Index" frame. The entries will move downwards continuous. I went until Xps
Select the bottom arrow at the right side of the "Index" frame. The entries will move upwards. However after a short time this movement stops and you have to move your pointer. stops again. stops again.
I expect this is a system error
Documentation - Help Viewer
The Help Viewer consists of two parts: A left part and a .
The Left part has 4 Tabs: Contents, Index, Favorites and Results.
The biggest problem of the Documentation is that it is a mixture of the language Basic, C# and C++ under the umbrella of Visual Studio. That is user unfriendly. I hope that when you have Visual Basic that the documentation only explains Visual Basic and nothing more
The results section shows 100 hits. Many of those are related to c++ and C# and that is not what you want.
Many of those are related to .NET Framework 3.5. The reason is not clear.
There is no relation with the Contents tab and that is also user unfriendly.
Type Timer in the top right search box. The list of options is too large and completely unpractical.
Type Timer Visual Basic in the top right search box. The first entry in the results is: "Visual Basic Runtime Library Members" That is not what you want. What you want is the time in seconds.
Parallel Programming
First the good news. Parallel programming as implemented in Visual Basic 2010 (i.e. its general structure) is very powerful tool when you use the Backgroundworker.
I expect that the writing of those two documents is not much fun. There is too much detail which should be solved by the operating system, which the backgroundworker perfectly does.
The writing of the ISA SP standard for batch processes was on the contrary a lot of fun.
See: ISA-SP88, Batch Control If you follow the links you almost get no information about the actual document. This is sad because the whole standard was developed by volunteers and IMO should be available for FREE
How to draw a point
In Visual Basic 5.0 that feature is supported by means of the PSET(x,y) statement. Using that feature you can draw any curve and is a must for almost any scientific application
In Visual Basic 2010 you more or less go in two steps:
It works. For example see Visual Basic 2010 program: Maze - Create your Maze Without Using labels
The following program shows an example:
Private Sub Command1_Click()
Form1.Picture1.PSet (130, 130), 0
Form1.Picture1.Print "Test"
End Sub
By using Printer Class (VB 6.0) or by using PrintDocument Class ?
How to use arrays with the Toolbox ?
IMO it is not possible to define the names of the tools from the Toolbox as arrays on a Form in Visual Basic 2010. In VB 2010 the name of for example each textbox is always a string.
In Visual Basic 5.0 such a name is also a string but this string can also be an array. The advantage is when you have a large TextBox array and you want to copy values becomes easy by using the loop statement of the for statement.
IMO this is a very serious omission.
How to combine text and values in Messages.
In Visual Basic 5.0 if you want to print a messages any combination of text (strings) and values is possible.
Not a Number (NaN)
Visual Basic 2010 uses the Not a Number concept. If you divide zero by zero the result becomes Not a Number or NaN. If you use that result in another calculation the result also becomes NaN. This means for a simulation of the planets around the Sun that all the positions become NaN.
The whole NaN concept is a horrible concept. IMO when in any calculation you divide one number by zero during program execution the "operating system" should declare this event as an error (Because something in the program is wrong which requires a modification) and the program should stop.
File structure
Compared to Visual Basic 5.0 the file structure is becoming too complex.
In Visual Basic 5.0 all the files for all the applications are stored in one map called USERS. Each application or project requires 5 normally files. (This number can be larger if more forms are used)
Projects (Map)
Planet (Map)
Planet.suo Planet.sln
Planet (Map)
Planet.vbproj PlanetForm.vb* PlanetForm.Designer.vb* PlanetForm.resx
PUBLISH (Map)
Planet.application setup.exe
APPLICATION FILES
PlaNET_1_0_0_0, PlaNET_1_0_0_1, .... PlaNET_1_0_0_6
PlaNET_1_0_0_7
Planet.application Planet.exe.manifest Planet.exe.deploy
BIN
PlanetForm.vb
DEBUG
Planet.application P.exe P.exe.manifest P.pdb P.xml P.vshost.exe etc
RELEASE
Planet.application P.exe P.exe.manifest P.pdb P.xml
APP.PUBLISH
Planet.application setup.exe
APPLICATION FILES
PlaNET_1_0_0_7
Planet.exe.manifest Planet.exe.deploy
PUBLISH
Planet.application setup.exe
APPLICATION FILES
PlaNET_1_0_0_0, PlaNET_1_0_0_1, ... PlaNET_1_0_0_5
PlaNET_1_0_0_6
Planet.application Planet.exe.manifest Planet.exe.deploy
MY PROJECT
appl.manifest appl.designer.vb resources.designer.vb settings.designer.vb etc
OBJ
X86
DEBUG
Planet.exe P.application P.pdb P.xml etc etc
TEMPPE
My Project.Resources.Designer.vb.dll
RELEASE
Planet.exe P.application P.pdb P.xml etc etc
TEMPPE
My Project.Resources.Designer.vb.dll
Figure 1 File Structure of Project Planet.
The names in capital letters are Maps.
The file PROJETS contains 1 Map: Planet
The file MAP contains 1 Map and 2 files.
IMO this whole structure is too complex and an overkill.
The name of the executable program is Planet.exe.
If you want to change this name than you have too build a complete new project
It is not possible to change the name of the Map "Planet" (Direct below the Map: "Projects") into this new name.
In Visual Basic 5.0 this is no problem
New Application building
Suppose you want to build a new application based on an existing application how do you proceed ?
Rename PlanetForm.VB to Planet1Form.VB
Rename PlanetForm.Designer.VB to Planet1Form.Designer.VB
Form size problem
In a "Windows Forms Application" the standard way to execute the application is via a form.
Normally the size of the form is as designed. In the VStest2 application the form was more than twice as large. I do not know exactly what caused this. The error was in the VStest2Form.designer.VB file. For more detail about VStest2 See: CPU performance
In the case of VStest2 this are the files: VStest2Form.VB and VStest2Form.Designer.VB
The central Subroutine in this file is: InitializeComponent() This file is used to build the form and contains the parameters for each control: each label, each TextBox and the Form.
When you go to the Form part you will see the three statements:
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(433, 189)
Time and Timer function
In VB 0.5 the Time function supports a time in the format Hr:Mn:Sc Accuracy is 1 second
In VB 0.5 the Timer function supports a time in seconds. Accuracy is 15,625 thousands of seconds or 1/64 seconds
VB 2010 supports the Timer function a time in seconds via DateAndTime.Timer . Accuracy is 15,60 thousands of seconds or 1/64.1 seconds
What is new in VB 2010
Read this Microsoft MSDN document: What's New in Visual Basic 2010
IMO almost all the features that are new are not necessary.
One of the new features is covariance and contravariance. For more information from Wikipedia read this: Covariance and contravariance (computer science). For more information from microsoft read this: Covariance and Contravariance in Generics. Specific the sentence: Covariance seems very natural because it looks like polymorphism. Contravariance, on the other hand, seems counterintuitive. is very helpful...
In mathematics and physics (General Relativity) a different definition of covariance and contravariance is used. For a simple introduction read this:Invariance, Contravariance, Covariance . For a more thorough discussion read this: Covariance and contravariance of vectors.
Both definitions are completely different. The first has very little practical use in general (may be in c# Variance in C#.NET 4.0 Covariance and Contravariance
, so why bother in Visual Basic?
IMO the The Try... Catch... Finally Statement is not useful to write mathematical oriented programs.
IMO far too much
Reflection - part 1
Overall evaluation: Visual Basic 2010 is mediocre, specific compared with Visual Basic 5.0
The problem is what are the design objectives of Visual Basic in general ?
IMO the primary target audience should be the single individual and the scientific community. The same audience are the people who use Fortran. In fact Visual Basic 5.0 is an excellent tool to write scientific programs.
The purpose of Visual Basic should not be to develop commercial software or system software. The people interested in developing system software should use C or C++.
I expected that Microsoft has enlarged the objectives of VB 2010.
One of the most important features of Visual Basic 5.0 and Excel Basic was that it was the same. That was very important because you could use the same program for both. Of course the user interface was different but the language part to express the mathematics was all the same. Now that has changed. This is sad.
The result is:
Please keep Visual Basic Simple
The purpose of the language is not to write a program using the least memory or to write the fastest program. If you want to do that you can better use C or C++.
Reflection - part 2
After written many programs using VB2010 the overall evaluation is the same: Not Good.
I strongly hope that Microsoft uses for all its products (Excel, Word, Visual Basic) which require programming the same programming language. That reduces a lot of learning time.
One of the most new developments in the language is the ToolBox. However most of the tools are of no use and or very are unpractical to use. IMO Microsoft should completely reevaluate the function of the toolbox.
Interupts are important during execution of the program.
In general there is what is called an interupt or event when the user of the program selects a tool from a form. This can be when he wants to modify a value or enter some text. An Interupt Handler is a piece of program that will be executed when the interupt happens.
The Button tool recognizes the following interrupts:
Each interrupt handler uses as a standard two parameters: sender and e. I think that e stands for error. The problem is that both parameters require special values. All of this makes each tool very user unfriendly.
Feedback
E-mail:nicvroom@pandora.be.
Modified: 2 September 2012
Modified: 30 January 2013
Modified: 25 April 2021