Seach this Blog

Biyernes, Disyembre 16, 2011

VB.NET 2005 Debugging and fixing error issue

I' was a vb 6.0 programmer for about  year 7 but since I know that the application in vb 6.0 although can be installed in a new version windows operating system like Windows Vista, Windows 7 but eventually the compatibility issue will be a problem since Microsoft already drop its support in Visual Basic 6.0 last 2001 if I not mistaken, then the application written in vb 6.0 will become isolated eventually. That's why I decided ship from vb.net. Obviously is different environment although most of the vb 6.0 functionality are still intact in dotnet framework, but i can say that its different.

My first application I built in vb.net is a customized accounting system of a certain company, but during my development I encounter problems during debugging. and it cost me a lot of this type of error as a new to the framework.

in this picture a sample error generated during the build of my application, and it is intentional for the sake of illustration. this will occur if you made some changes in your code and windows form vice versa, that doesn't much each other. for instance I accidentally deleted the textbox name P_unit_idTextBox, that still used in my application then the error generate as shown here:


the problem is how do i fixed the error, and then restore the textbox on my form. if  I can't open the form. some suggested to edit the "designed.vb" of the form or the .resx but as a novice its to dangerous to do.

what I do in this problem is that i always make a backup of my application from time to time that I make changes to it. so that if that error occurred I simply delete the module or form that is affected, and then from the back-up file I enable to restore it, the time this type of error occurred again.

Huwebes, Disyembre 15, 2011

function code that convert number to words(vb6 to vb.net)

Public Function NumToText(ByVal dblValue As Double) As String
Static ones(0 To 9) As String
Static teens(0 To 9) As String
Static tens(0 To 9) As String
Static thousands(0 To 4) As String
Dim i, x, y As Integer, nPosition As Integer
Dim nDigit As Integer, bAllZeros As Integer
Dim strResult As String, strTemp As String, strTemp1 As String
Dim tmpBuff As String


ones(0) = "zero"
ones(1) = "one"
ones(2) = "two"
ones(3) = "three"
ones(4) = "four"
ones(5) = "five"
ones(6) = "six"
ones(7) = "seven"
ones(8) = "eight"
ones(9) = "nine"

teens(0) = "ten"
teens(1) = "eleven"
teens(2) = "twelve"
teens(3) = "thirteen"
teens(4) = "fourteen"
teens(5) = "fifteen"
teens(6) = "sixteen"
teens(7) = "seventeen"
teens(8) = "eighteen"
teens(9) = "nineteen"

tens(0) = ""
tens(1) = "ten"
tens(2) = "twenty"
tens(3) = "thirty"
tens(4) = "forty"
tens(5) = "fifty"
tens(6) = "sixty"
tens(7) = "seventy"
tens(8) = "eighty"
tens(9) = "ninty"

thousands(0) = ""
thousands(1) = "thousand"
thousands(2) = "million"
thousands(3) = "billion"
thousands(4) = "trillion"

'Trap errors
On Error GoTo NumToTextError

'Get fractional part
strResult = Format((dblValue - Int(dblValue)) * 100)
'Convert rest to string and process each digit
strTemp = CStr(Int(dblValue))

'Iterate through string
For i = Len(strTemp) To 1 Step -1
'Get value of this digit
nDigit = Val(Mid$(strTemp, i, 1))
'Get column position
nPosition = (Len(strTemp) - i) + 1
'Action depends on 1's, 10's or 100's column
Select Case (nPosition Mod 3)
Case 1 '1's position
bAllZeros = False
If i = 1 Then
tmpBuff = ones(nDigit) & " "
ElseIf Mid$(strTemp, i - 1, 1) = "1" Then
tmpBuff = teens(nDigit) & " "
i = i - 1 'Skip tens position
ElseIf nDigit > 0 Then
tmpBuff = ones(nDigit) & " "
Else
'If next 10s & 100s columns are also
'zero, then don't show 'thousands'
bAllZeros = True
If i > 1 Then
If Mid$(strTemp, i - 1, 1) <> "0" Then
bAllZeros = False
End If
End If
If i > 2 Then
If Mid$(strTemp, i - 2, 1) <> "0" Then
bAllZeros = False
End If
End If
tmpBuff = ""
End If
If bAllZeros = False And nPosition > 1 Then
tmpBuff = tmpBuff & thousands(nPosition / 3) & " "
End If
strResult = tmpBuff & strResult
Case 2 'Tens position
If nDigit > 0 Then
strResult = tens(nDigit) & " " & strResult
End If
Case 0 'Hundreds position
If nDigit > 0 Then
strResult = ones(nDigit) & " hundred " & strResult
End If
End Select
Next i
'Convert first letter to upper case
If Len(strResult) > 0 Then
strResult = UCase$(Left$(strResult, 1)) & Mid$(strResult, 2)
End If

EndNumToText:

'Return result
y = Len(strResult)
strTemp1 = Mid(strResult, 1, y - 1)

NumToText = strTemp1 & "only"
Exit Function

NumToTextError:
strResult = "#Error#"
Resume EndNumToText
End Function

Manipulate Your MS Word 2007 Document Using Shortcut Keys

Sometimes it is more comfortable to navigate and manipulate Microsoft Word Document using Keyboard instead of mouse specially if you're accessing tools that contained inside the menu and sub-menus and so on, but even the very accessible command buttons like bold, italic, underline etc. to be honest it is really comfortable to Press CTRL+B for bold, CTRL+I for Italic and CTRL+U for Underline. Much more for Copy, Cut and Paste command if you will not used each shortcut keys for it like CTRL+C for Copy, CTRL+X for Cut and CTRL+V for Paste you need to right-click select from the menu every time you will impose a command and its very tiring process but thanks for shortcut keys it helps a lot.

But despite of the benefits some users choose not to use this shortcut keys because it's difficult to remember the combination keys in the keyboard and it is true from the previous version of Microsoft Word like 1997, 2000, 2003, but for 2007 version up this problem were solved, so no need for the user to remember those all keys combination only one key to remember the Alt, Press the Alt key and all those shortcut keys will be visible at the toolbar menus above.

here is will happen when you press Alt key and the shortcut keys will be revealed from main menu.


say for instance you press Alt+H for Home, notice that another shortcut keys were revealed  


and if you choose particular tools like what I did I press the key Alt+FC then from the tools has another shortcut keys as we see.


try to practice some shortcut keys combination so we can use it confidently.

How To Reference Cells in Other Excel Files

Here is the problem if we maintained lots of data and report in Microsoft Excel, and we use several files to handle that data say for instance we use separate file for the list of inventory in the previous period or quarter and want to sum-up the inventory of the previous figure to the current figure using the two excel files.

Here is the formula that will help you.  

Like my previous post about How to Reference Cells in Other Sheet http://toxiod.blogspot.com/2011/12/how-to-reference-microsoft-excel-cells.html their is also a way on How To Reference Cells in Other Excel Files by using the formula similar to the previous example we just add the path where the excel files reside plus the name of the particular file. here is the formula ('The Path of the File\File Name\[Sheet Name]Sheet Name' Exclamation Point Cell Name)

Say for instance if we want to get the sum of the figure that contained from two separate excel files named Book1 Sheet1 Cell A1 and Book2 Sheet1 Cell A1 and want to display the result to other excel file named Book0.

here is the actual formula assuming that our file resided from Drive C

=SUM('C:\Book1\[Sheet2]Sheet2'!A1+'C:\Book2\[Sheet3]Sheet3'!A1)

How To Reference Microsoft Excel Cells into Other Worksheets

Here is the formula on how to reference cell in other worksheets:

Name of Sheet exclamation point Name of Cell. How can we use it?

Its like for example you have three sheets in your excel file called Sheet1,Sheet2,Sheet3 and we need to sum-up the figure from Sheet2 cell named A1 and Sheet3 cell named A1 from Sheet1 cell named A1. the actual formula would be like this =Sum(Sheet2!A1+Sheet3!A1)









 this is the result
 

How to Check Spelling in Microsoft Excel 2007

Microsoft Excel is not a Word processor so it's probably the main reason why it's not automatically perform spelling checked during encoding time like the Microsoft Word does, but their is still a tool in Excel that allows you to check the spelling of unfamiliar words that you may suspect that is not in correct spelling.

The tool can be found at Customized Quick Access Tool Bar at the upper left corner of Microsoft Excel Interface, show in the picture below.



If not available yet from the Tool Bar you can add it by clicking the small arrow down at the end of the Tool Bar, as shown below then just check the spelling to add from the Tool Bar.



To use it for checking the spelling just select the cell you want to check or highlight the particular word then click the ABC with check icon from the menu show in the picture. The tool will suggest the possible right spelling like the word machene it will probably machine so just select the right one then click the change button.

Download -Toxiod Library Management System(TMLS)

This library system are for those libraries who can't afford to buy an expensive library system, but want to computerized their collection. it can handle multi-libraries transactions set-up in a campus.
 (Snapshot)


info:

-using mssql 2005 backend database; download express edition a free distribution: http://www.microsoft.com/downloads/en/d ... 02b5e48a40

features:

-barcode support
-run in network(LAN)
-print OR for book overdue
-handle multi-libraries setup

module:

-books cataloging entry
-thesis/dissertations cataloging entry
-special material cataloging entry
-periodicals cataloging entry
-vertical files cataloging entry
-in/out transactions
-client's data entry
-user accounts
-opac (online public access catalog)
-inventory
-reports
-system configuration

user friendly and easy configure.

Download the application please post a comments below by indicating your name and email address, and i will send it to you personally.

Purchasing Management Sysem-PMS (Point of Sale Program-VB6)

A full functional point of sale program written of Visual Basic 6 using MS-Access Database

(Cashiering)

(Product Data Entry)



(Password Utility)
(System Settings)
(System Security)
(Reports)
(Sample Reports Generated)







Features:

-network support using DSN connection

System Modules:

-Cashiering
-Products Data Entry
-Reports
-Security
-Product Refunds
-System Settings

Other specification

-able to print Official Reciept(OR)
-product pricing can configured to retail and wholesale
-able to determined sales status of individual products
-able to generate total sales dynamically eg. per day, week, month etc.
-able to generate inventory report in real time dynamically, eg. per product category, supplier, product status, etc.
-able to generate report products acquired in particular date
-able to generate report products expired
-easy to configure according to customers need
-have a simple design and easy to used.



Download Links: https://drive.google.com/file/d/0B1Mxo9gB1ezjZ1JXLTExSUctdDA/view?usp=sharing

Download Micro-Finance Loan System (VB6 w/ Source Code)

This program is for educational purposes you may encounter minimal bugs because it's not the final product. but on this program you can learn more of the functions and techniques in vb6 programming:



(Snapshot)


Module Name:

-Security module
-Customer Data Entry
-Loan Payment
-Customer Ledger
-Reports
-Customer Query

- making report
- password decrypt/encryption
- database manipulation
- implementing basic accounting concept
- other usable code




Download Link: https://drive.google.com/file/d/0B1Mxo9gB1ezjZ1JXLTExSUctdDA/view?usp=sharing

Download Civil Registry Archiving Management System Source Code

A Civil Registry Archiving Management System, written in vb.net 2005 allows to store client data and print such as Birth, Marriage and Death Certificate and more. Using MSSQL 2005 Back-End Database.


 (Main Menu)

 (Birth Module)

 (Birth Certificate Sample)

Module:

-Birth
-Marriage
-Death
-Reports
-System Settings
-Security


Reports:

-Statistics
-Birth Certificate
-Marriage Certificate
-Death Certificate
-Birth Not Available Certificate
-Birth Destroyed Certificate
-Marriage Available Certificate
-Marriage Not Available Certificate
-Marriage Destroyed Certificate
-Death Available Certificate
-Death Not Available Certificate
-Death Destroyed Certificate
Download the source code please post a comments below by indicating your name and email address, and i will send it to you personally.

Download Toxiod's School Registration Management System

A fully functional School Registration Management System written in VB6 using MS-Access Database back-end

Features
Can detect conflict subject and faculty load schedule
Can Run over Local Area Network using DSN Connection

Module:

-Scheduling
Subject Setup by course per department
Faculty Subject Loading

-Assessment

Subject Verification
Subject Loading
Enrollment
Miscillanos Fee Config.

-Archiving
Student Info. Entry
Student Grade Entry per Subject Enrolled

-System Settings
-System Security


Reports

Print Class Schedule per course
Print Curriculum per course
Print Subject Load per faculty
Print Summary of faculty Load
Print Class Adviser and Room Assignment
Print Summary of Assessment of Fees per Year Level
Print Summary of Assessment of Fees per course
Print Certification of Good Moral Character
Print Transcript of Record
Print Certification of Grades
Print Students Permanent Record
Print Evaluation of Grades
Print List of Officially Enrolled per School Year / Semester
Print Enrollment Summary

Thing to learn from the source code:

-Aside from system technical processes you be able to familiarized building complicated database queries.
-Build complicated reports
-How to implement data shaping
-How to save and retrieve Image from database and many more


Download: https://drive.google.com/open?id=0B1Mxo9gB1ezjRU83RDRCMVRzMnM&authuser=0

Toxiod Puchasing Management System (POS) Program

A fully functional Point of Sale(POS) program written in vb.net2005. Using MSSQL 2005 database.

 (Cashiering Module)

(Products Data Entry Module)

(Reports Module)

features:

-network support
-barcode support

modules:

-Login
-Cashiering
-Products Data Entry
-Reports
-Refund
-System Settings

Other specification

-able to print Official Reciept(OR) and Delivery Reciepts(DR)
-product pricing can configured to retail, wholesale and able to add discounts.
-able to monitor and determined sales status of individual products
-able to generate total sales dynamically eg. per day, week, month etc.
-able to generate inventory report in real time dynamically, eg. per product category, supplier, product status, etc.
-able to generate report products acquired in particular date
-able to generate report products expired
-easy to configure according to customers need, have a simple design and easy to used.


Note: I'm selling the source code for only "$350" negotiable. if you are a programmer student you can learn so much about it, or if you are a store owner and not a programmer I can modify the program to suit your needs.

Interested just contact me at toxiodo@yahoo.com

Miyerkules, Disyembre 14, 2011

How to Setup Database DSN Connection

How to Setup Data Source Name (DSN) Connection in WinXP using MS-Access Database?

1. go to control panel
2. performance & maintenance
3. administrative tools
4. data source ODBC





click add button.



select driver for Microsoft Access.



Type Data Source Name, for instance we use MYDSNCON as shown from the picture below, then point your microsoft access database file that we are going connect with, at this time we used the AAS.mdb database, by clicking select button. after it done click ok



notice that MYDSNCON are now available from the list and ready to use as the name of your DSN connection. if you use it in Visual Basic just copy the name and paste it in your code.


Download toxoid's daily time record system (TDTRS) w/ source code

TDTRS are written in Visual Basic 6.0 using Microsoft Access Database, it can be setup as standalone or it can be run in a network using DNS connection as file based system.

Note: this program is "Under International Copyright Law" and intended for educational purposes only, anyone distributing this product commercially without proper permission from the author will be punishable by the law.


Free to Download including the source code for educational purposes.

TDTRS MODULES

LogIn LogOut

It considered the main module of the system that captures employees log and authenticate using employees ID and password.

Security Tool

A module of the system use to add, edit and delete system password. but only the system admin. and the like have only the privileged to accessed this module.

Employees Data Entry

This module use to add, edit and delete employees basic info. Like the security tool the system admin and the like only have an accessed with this module.

System Settings

The Date Entry of Company Name and Company Address.

Reports
This module use to generate reports out of the data being stored during employees logged.

List of Added Features, and fixed Errors From Previous Version:

The picture of the employees were now added to the data entry module and it will populate their own personal picture during login and logout.

Has its own employees Time settings of the beginning and end of time work.

The system will automatically subtract 1 hr. if the employee failed to log-out and login during lunch break.

It trace now the total late hrs of an employee's and by monitor daily and periodic bases.

The employees itself has a privilege to accessed and monitor his/her own attendance by daily and periodic basis.

The login error and summary report has already been fixed.

Minimum System Requirements:

HARDWARE
128 mb memory
20 gb hard disk
900 mb processor


OPERATING SYSTEM
Win98, WinMe, Win2000, WinXP, Win2003, Windows 7


Download Link: https://drive.google.com/file/d/0B1Mxo9gB1ezjZ0xFUURHRndkT00/view?usp=sharing