Development Blog : C# Code Samples,.NET Tips and Tricks
Post con tag sub
[VB.NET] : Individuare tutte le stampanti installate
20 mar
1 2 3 4 5 6 7 | Protected Overrides Sub ChargeImpresoras() Dim lPrintDoc As New Printing.PrintDocument Dim lPrinter As Object For Each lPrinter In PrinterSettings.InstalledPrinters cboPrinters.Items.Add(lPrinter) Next End Sub |
VB.NET : Come Invertire una stringa
20 gen
Module RevString
Sub Main()
Dim inputString As String = Console.ReadLine()
ReverseOrder(inputString)
End Sub
Private Sub ReverseOrder(ByVal textInput As String)
Dim text2Rev As String = textInput
Dim reversed As String
Dim charArray() As Char = textInput.ToCharArray()
Array.Reverse(charArray)
reversed = charArray
Console.WriteLine(“”)
Console.WriteLine(“Testo originale: ” + text2Rev)
Console.WriteLine(“Testo invertito: ” + reversed)
End SubEnd Module
VB.NET : Come contare le linee di un richtextbox
20 gen
private sub countlines(byval rtb as richtextbox) dim count as string count = rtb.lines.count msgbox(count) end sub