Learn Windows Programs Tips Lesson 2 - Computer Tips | DaddyFile

0



21) How to Hack an EXE File
Could you edit an executable file when it has been compiled? Yes, you could. But you could only change the String data. How? Using the MS-DOS Text Editor. The String data is text, but in the file will appear different. For example, if in the application appears

22) About NotePad
in the compiled file will appear A b o u t N o t e P a d with an space between each word. Before modifying the file, make a back-up of it. If you want to modify the file, first you have to open it using the MS-DOS Text Editor and open the file as Binary. Then activate the Insert key and search for some text data in the program. But, it isn't as easy as said. You have to search it manually, 'coz the words are separated by a space between. Then replace each word for anyone you want. Example:
N o t e P a d to M y P r o g r

23) BE CAREFUL 
The file must weight the same than the original; if not, it could not work.
[Even then the file may not work. For example, it might calculate its checksum and notice that you have made changes. This is certainly a dangerous technique. So at least make a backup copy of the file before you mess with it.

24) Installing Registry Entries
Here's an easy way to set registry entries when you install a program. First, create the entries manually on your computer. Put them in their own subtree if possible. Use the registry editor to export the subtree containing the entries. This will creates a .REG file. Include this in the list of files given to the Package and Deployment Wizard. The Wizard will automatically offer to run the registry file on the target system during installation and that installs the registry values.

25) Learn ASCII Code in Visual Basic immediate window
Ever want to know what the chr number is for a character? Open the immediate window by pressing (CTRL+G) and type ?Asc("") and press enter. The result will appear right before your very eyes.
Example: the number for a double quote
?Asc("""") would come as 34.

26) Using ADO in Access 2000
To use a Microsoft Access 2000 database and ADO you have to add the correct references in your Visual Basic project. To add the references to your Visual Basic project follow the instruction's below.
Open a project.
From the Project menu, click References.
From the list, select Microsoft ActiveX Data Objects 2.1 Library. 
From the list, select Microsoft ADO Ext. 2.1 for DDL and Security. 
From the list, select Microsoft Jet and Replication Objects 2.1 Library. 
Click OK. This should let you now use an Access 2000 database with an ADODC control. However Data form Wizard will still face problems!

27) Understanding Error Handlers
When you use On Error GoTo and an error occurs, VB enters exception mode. The line you GoTo is supposed to be the beginning of an error handler. If an error occurs within an error handler, the program stops. What you need to do is leave the error handler and resume normal execution. Then you can use On Error to establish a new error handler for the next error. You do this with the Resume statement. See the help for details. In this case, you can use Resume LineLabel to make the program continue execution at a specific line.
Unfortunately, executing Resume from outside an error handler generates an error. Thus you cannot place the error handler in the flow of code the way you have. You need to jump out to the error handler and jump back with Resume.
Below is a subroutine that demonstrates two error handler.
Private Sub Command1_Click()
Dim i As Integer
On Error GoTo Error1
i = 1 / 0 ' Divide by zero.
Error1Resume:
On Error GoTo Error2
i = 1000000 ' Too big--overflow.
Error2Resume:
MsgBox "Finishing."
' Do not fall through into the error handlers!
Exit Sub
Error1:
' Resume ends error handler mode.
MsgBox "First error handler."
Resume Error1Resume
Error2:
' Resume ends error handler mode.
MsgBox "Second error handler."
Resume Error2Resume
End Sub

28) Stop your modem from frequently disconnecting
  • On the Desk Top Double click on the icon "My Computer"
  • Double click on Dial Up Networking
  • Right click on the Satyam Online icon (or the dialer that you are using) and select Properties on the menu, click on configure
  • Click on the Connection Tab and click on Advanced, in Extra Settings, type ats10=250
29) Load Outlook FasterIf you're tired of waiting the Outlook Express to start up, there's a way to make it faster. Open the RegEdit and navigate to the next path:
HKEY_CURRENT_USER\Identities\[nr of id]\Software\Microsoft\Outlook Express\[vers]
Then create a new DWORD value called NoSplash, and assign the value 1. Remember to take a backup of the Registry before doing this! For more information on how to backup your registry,

30) Convert WMF Files Into BMP Files in Visual Basic
Create a new project, add a form, then put a picture box and a command button into it. Add block of code into command button click event.
Private Sub Command1_Click()
' Load meta picture file
Picture1.Picture = LoadPicture("C:\test.wmf")
' Save meta picture to bitmap file
SavePicture Picture1.Image, "C:\test.bmp"
End Sub

31) Break an RGB color value into its components in Visual Basic Use :
r = color And &HFF&
g = (color And &HFF00&) \ &H100&
b = (color And &HFF0000) \ &H10000
There are some system colors that have funny values like &H8000000F&. Unfortunately they don't work this way. You can use the GetSysColor API function to find these color values. Use And to mask off the leftmost digit. Then use GetSysColor to see get the color value.
Public Declare Function GetSysColor Lib "user32" Alias "GetSysColor" _
(ByVal nIndex As Long) As Long
If color And &H80000000 Then color = GetSysColor(color And &HFFFFFF)
One final case occurs if you use Point to get the color of a pixel that does not exist. For example, on a form with ScaleMode = vbPixels, Point(-100, -100) returns -1 because there is no pixel at (-100, -100).
The following subroutine breaks a color into its components. If the color is -1, the routine leaves r, g, and b unchanged. Depending on your application, you may want to set them to default values such as 0 or 255.
Public Declare Function GetSysColor Lib "user32" Alias "GetSysColor" _
(ByVal nIndex As Long) As Long
' Break a color into its components.
Private Sub BreakColor(ByVal color As Long, ByRef r As Long, ByRef g As Long, _
ByRef b As Long)
If color = &HFFFFFFFF Then Exit Sub
If color And &H80000000 Then _
color = GetSysColor(color And &HFFFFFF)
r = color And &HFF&
g = (color And &HFF00&) \ &H100&
b = (color And &HFF0000) \ &H10000
End Sub

Post a Comment

 
Top