If you are regularly doing an operation on a common type, extension methods are a great way to create shorthand functions for this. In this post I am sharing my string extension method to convert a string to Title Case (Pascal Case):
While using PrintDocument class for printing on vb.net, It won’t allow you to change PaperSize Width and Height values. In order to set those values manually, you need to define a custom paper size first. Use the code below to create a new custom paper size and then set it to PrintDocument’s PaperSize property: Dim […]
If you are going to use an input text as a file name, you have to check if the string is an acceptable one. User inputs are the most important points of programming. If you don’t check them well enough, users will blame your software for not working. In this post, I will show you […]
This simple software gives you displacement value for draft readings abaft, and fore side. All it needs is a hydrostatic values table, positions of draft marks, and density used in hydrostatics calculations. Software automatically calculates trimmed and heeled positions using linear interpolation.
To achive this we can simply use Find method of ControlCollection Class: For each txtBoxName in draftTextBoxes Me.Controls.Find( txtBoxName , True)(0).Text = ShipData.DesignDraft Next draftTextBoxes should be a string collection, holding names of text boxes to modify.