|
Making a Property part public and part protected
|
|
Author:
| |
ptaylor
|
|
Views:
| |
261
|
|
|
This is how to write a property that is partly Public and Partly Protected/Private
In the example the Read/Get property is Public and the Write/Set property is Protected/Private
|
|
|
|
|
Print RAW data to Network Printers
|
|
Author:
| |
ptaylor
|
|
Views:
| |
875
|
|
|
Send prints to a Network printer
Originally designed to send ZPL commands to Zebra S4M using an HP Jet Direct this code will send RAW print jobs to and network printer, Including Dot-Matrix and Thermal Transfer Printers
|
|
|
|
|
Custom Text in a Crystal Report
|
|
Author:
| |
ptaylor
|
|
Views:
| |
1895
|
|
|
A Crystal Report shows all the data from a criteria and allows you to print or save the report
But if you look at the report a few weeks later, you will not know what criteria was used to generate the report, making the data worthless.
This is how to show custom text in a Crystal Report (i.e. Report Date not Printed Date)
|
|
|
|
|
Get Alphabet Letter from Number
|
|
Author:
| |
ptaylor
|
|
Views:
| |
3262
|
|
|
How to get a Letter of the alphabet from a number and increment.
It will Loop and get each number between 0 and 25 with the associated letter then the Message Box will show the FULL Alphabet
|
|
|
|
|
Add Combo to Datagird
|
|
Author:
| |
ptaylor
|
|
Views:
| |
1184
|
|
|
Programmatically add a combo to a Datagird
In this example the database has a column called "StartDay" set as an Int32
|
|
|
|
|
|
|
|
|
How to Multi-Thread
|
|
Author:
| |
ptaylor
|
|
Views:
| |
3225
|
|
|
Multi-Threading allows you to have multiple runs of code at the same time.
i.e.
Run a long calculation and allow for it to be aborted.
Thread 1: Handles form Controls (Abort button) and abort code
Thread 2: Handles the calculation run
|
|
|
|
|
Accessing Form Controls from another Thread
|
|
Author:
| |
ptaylor
|
|
Views:
| |
8078
|
|
|
Accessing Form Controls from another Thread (Multi-Thread)
This example has:
1 Progress Bar = ProgressBar
1 Command Button = cmdAbort
Error:
Cross-thread operation not valid: Control 'ProgressBar' accessed from a thread other than the thread it was created on.
|
|
|
|
|
|
|
How to use SQL
|
|
Author:
| |
ptaylor
|
|
Views:
| |
3414
|
|
|
How to use SQL statments in Visual Basic.NET
Read (SELECT)
Write (INSERT, UPDATE, DELETE)
|
|
|
|
|
Control Arrays
|
|
Author:
| |
ptaylor
|
|
Views:
| |
710
|
|
|
Control Arrays were removed from VB.NET
This is how to simulate them.
|
|
|
|
|
Using Classes
|
|
Author:
| |
ptaylor
|
|
Views:
| |
1938
|
|
|
Classes can be used as a method of removing large amounts of code from the form
Code that normally would be in modules
Except this code can only be accessed by required forms not all form like modules
The advantage is you can use the same Function/Variable/Sub names for different
Jobs in different classes where as in a module the same names cannot be used in
Another module
|
|
|
|
|
Send SMTP E-Mail
|
|
Author:
| |
ptaylor
|
|
Views:
| |
4215
|
|
|
Send an E-Mail using an SMTP Server
No E-Mail client required
|
|
|
|
|
Boolean Like Variables
|
|
Author:
| |
ptaylor
|
|
Views:
| |
790
|
|
|
When you type a Boolean you get a selection of Answers
This is how to create your own Multi-Choice Variable like a Boolean
Example:
Dim Boo as Boolean
Boo = True
False
|
|
|
|