<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.plecko.hr/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.plecko.hr/feed.php">
        <title>Eureka Moment development:net</title>
        <description></description>
        <link>https://wiki.plecko.hr/</link>
        <image rdf:resource="https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-05-16T03:17:41+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:catch_all&amp;rev=1698908576&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:clipboard&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:grid_rc&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:ipc_remoting&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:send_email&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:send_eml_from_disk&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:start&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:tcp_remoting&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:who_called&amp;rev=1572509040&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=development:net:wysiwyg_print_rtf&amp;rev=1572509040&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico">
        <title>Eureka Moment</title>
        <link>https://wiki.plecko.hr/</link>
        <url>https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:catch_all&amp;rev=1698908576&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-02T08:02:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:catch_all</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:catch_all&amp;rev=1698908576&amp;do=diff</link>
        <description>Catch and handle all unhandeled exceptions

.NET allows you to catch and handle any unhandled exception that occurs in your program. By an unhandled exception I mean one that is not caught by a Try-Catch statement.
Good error handling is critical and the best bet is to use Try-Catch-Finally blocks. However, using the current Application Domain you can catch any error that occurs outside of a Try-Catch block. An application domain is an isolated environment where an application executes. Applicat…</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:clipboard&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:clipboard</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:clipboard&amp;rev=1572509040&amp;do=diff</link>
        <description>Working with clipboard

A problem with reading the clipboard is that we don't know what data type the clipboard contains of. To check this we could use My.Computer.Clipboard.Contains... for the data types we want to check, the return value will be a boolean value which will tell us if the clipboard contains the special data type or not. The data types that we can check for are:</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:grid_rc&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:grid_rc</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:grid_rc&amp;rev=1572509040&amp;do=diff</link>
        <description>DataGridView Select Row On Mouse Right Click (VB .NET)

Most people want to reduce the number of clicks when using a GUI application. When working with DataGridView, right click opens a context menu and keeps the selected row unchanged. So, you ether have to left click to select new row, then right click to open context menu and then select some option. Here is how you reduce this by one click:Create a sub for CellMouseDown event with the following code:</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:ipc_remoting&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:ipc_remoting</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:ipc_remoting&amp;rev=1572509040&amp;do=diff</link>
        <description>IPC Remoting

Example of using IPC remoting to send messages between processes: The code needs implementation of server availability checking to see if the server application is present and listening for messages (else the code crashes)

Project: IPC_SharedInterfaces</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:send_email&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:send_email</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:send_email&amp;rev=1572509040&amp;do=diff</link>
        <description>Send an e-mail in VB .NET

Sending an e-mail is quite simple. This example saves an .eml file if sending fails


Dim msg As New Mail.MailMessage
msg.From = New Mail.MailAddress(StrSender)
msg.To.Add(New Mail.MailAddress(StrRecipient))
msg.CC.Add(New Mail.MailAddress(StrCarbonCopy))
msg.Subject = &quot;Message subject&quot;
msg.Body = &quot;Hello, &quot; &amp; vbCrLf &amp; _
&quot;This is message body&quot;
msg.IsBodyHtml = False 'Set this to True if body is HTML
msg.Attachments.Add(New Mail.Attachment(&quot;c:\temp\file.att&quot;))
Dim smtp A…</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:send_eml_from_disk&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:send_eml_from_disk</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:send_eml_from_disk&amp;rev=1572509040&amp;do=diff</link>
        <description>Send an e-mail stored on disk as .eml file in vb.net

If you have stored messages in .eml format on disk, and want to send them, the procedure is quite complicated. Luckily Peter Huber wrote some code to make this as simple as possible.

The following code uses a library based on the code written by Peter Huber, Singapore, 2006</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:start&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:start</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:start&amp;rev=1572509040&amp;do=diff</link>
        <description>.NET




	* Catch and handle all unhandeled exceptions
	* DataGridView Select Row On Mouse Right Click (VB .NET)
	* Find out who called a .NET method
	* IPC Remoting
	* Send an e-mail in VB .NET
	* Send an e-mail stored on disk as .eml file in vb.net
	* TCP Remoting
	* Working with clipboard
	* Wysiwyg printing ability on richtextbox</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:tcp_remoting&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:tcp_remoting</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:tcp_remoting&amp;rev=1572509040&amp;do=diff</link>
        <description>TCP Remoting

Example of using TCP remoting to send messages between processes: The code has a procedure that checks if server is present and port is opened, before sending the message (it might still happen that the port is opened by another application in which case the code will crash).</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:who_called&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:who_called</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:who_called&amp;rev=1572509040&amp;do=diff</link>
        <description>Find out who called a .NET method

When debugging, it is useful to know who called a method (if it is being called from multiple places)

Include these


Imports System.Reflection
Imports System.Diagnostics


Place this code on the beginning of the method being called.</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=development:net:wysiwyg_print_rtf&amp;rev=1572509040&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:04:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>development:net:wysiwyg_print_rtf</title>
        <link>https://wiki.plecko.hr/doku.php?id=development:net:wysiwyg_print_rtf&amp;rev=1572509040&amp;do=diff</link>
        <description>Wysiwyg printing ability on richtextbox

This allows you to print the contents of a RichTetBox in a WYSIWYG manner.

Create a new class that inherits RichTextBox and type in the code:


Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Runtime.InteropServices
Imports System.Drawing.Printing
 
Public Class RichTextBoxEx
    Inherits RichTextBox
    &lt;StructLayout(LayoutKind.Sequential)&gt; Private Structure STRUCT_RECT
        Public left As Int32
        Public top As…</description>
    </item>
</rdf:RDF>
