@bobnoordam

Month: February 2020

Determine response time from an ip ping

‘ — ping the ip adress in the string s_ipaddr, and get ‘ the response time in the int32 n_response ‘ imports system.net.networkinformation Dim ping As New System.Net.NetworkInformation.Ping Dim reply As System.Net.NetworkInformation.PingReply reply = ping.Send(s_ipaddr) If reply.Status = IPStatus.Success Then ‘ — handle reachable here MsgBox(“ping time ” & reply.RoundtripTime) Else ‘ — handle non […]

Enumerating the active forms within an application

VB.NET Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ‘ — Build a list of all active forms, and display it to the user Dim activeforms As String = String.Empty For Each item As Form In Application.OpenForms activeforms = String.Format(“{0}{1}{2}”, activeforms, item.Name, vbCrLf) Next MsgBox(String.Format(“The names of the active forms are:{0}”, […]

Changing a field into a date editor

The following example shows the markup for a DATETIME field from a database bound to a ASP.NET DetailsView before and after converting it into a templatefield and binding it to the ASPxDateEdit control. Default markup after converting to a template field: <asp:TemplateField HeaderText=”GebDat” SortExpression=”hrGebDat”> <EditItemTemplate> <asp:TextBox ID=”TextBox2″ runat=”server” Text='<%# Bind(“hrGebDat”) %>’></asp:TextBox> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID=”TextBox2″ […]

Next Page » « Previous Page