Anyone can comment, so leave your views

Saturday, December 22, 2007

IE print set up not to show URL and title

Problem : when we print the pages it is printing with the url on bottom and the words sealed by santa preview on top
that u need to change browser settigns
Solution: you are using IE?
- yes
in the menu - File
Page set up
there is a header and a footer text box?
Cut and paste that into an email
send it to your ther id with subject as IE Print - page set up
so you have it if you want it later
anyway keep
these 2 boxes empty and Print
 
 
___________________
 
 
my new web site http://sel2in.in/
 
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back
 


Source code, testing article - one stop shop Software applications written in Java for cell phones, PHP, Java Dot net, PHP & Perl for the web and Vb6, Java, VB6, Perl and Excel VBA for the desktop.

http://sel2in.in
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back


Volunteer computer Cancer cures www.worldcommunitygrid.org
Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html

Tuesday, December 18, 2007

Windows API mouse move and click, VB6 source code

_ Windows API Mouse Move & Click, VB6 Source Code  _

Option Explicit
Declare Function SetCursorPos& Lib "user32" (ByVal X As Long, ByVal Y As Long)
Declare Function mouse_event Lib "user32.dll" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal dwData As Integer, ByVal dwExtraInfo As Integer) As Integer

Const MOUSE_EVENT_F_LEFT_DOWN As Integer = 2
Const MOUSE_EVENT_F_LEFT_UP As Integer = 4
Const MOUSE_EVENT_F_RIGHT_DOWN As Integer = 8
Const MOUSE_EVENT_F_RIGHT_UP As Integer = 16
'


Public Sub MouseClick()
   Dim X As Integer
    Dim Y As Integer
    X = 400 ' where to move and click the mouse
    Y = 300
   
Call SetCursorPos(X, Y)

'if slow PC need to add sleep or is it a blocking call ? - works so not an issue
Call mouse_event(MOUSE_EVENT_F_LEFT_DOWN, X, Y, 0, 0)
Call mouse_event(MOUSE_EVENT_F_LEFT_UP, X, Y, 0, 0)

End Sub


 


Regards
Tushar Kapila
http://sel2in.in
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back

tushar.kapila@gmail.com yahoo : tushar.kapila@yahoo.com msn : tgkprog3@hotmail.com GTalk : tgkprog@gmail.com

Volunteer computer Cancer cures www.worldcommunitygrid.org
Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html

Friday, December 7, 2007

Java midlet help - PM2

 Can try to download the application on your phone from http://t7.x10hosting.com/prjs/pm/r01/cert6/i.wml
you need to go to that page on your phone, click the link. It will should then prompt you with a message about installing application PM2, Vendor: Sree Sarvamangala Developer Private Ltd, Description: Private Message by tgkprog at gmail , etc
You need to accept and then it should download and ask you if you want to start or tell you its been installed and possibly inform you of install location.
If this happens then let me know. In case something else happens - let me know.
Thank-you much.
 
or to your PC from http://t7.x10hosting.com/prjs/pm/r01/cert5 - download and then transfer to your phone via cable/bluetooth
 
the Jad and Jar are there and its a signed application.

All the app does is allow you to send SMS and to other phones that have the same application installed (else they cannot open it )
 
I don't want you to send an SMS (you can if you want to - just clear the existing number and search your phone book or enter other number) - I just want to know if it installed or not and you could run it.
And if you can tell me what steps you took to install it.
 
On installing
 

To install MIDlets from a PC

You can install the MIDlets/MIDlet suites on your device from a PC using the USB sync cable, the optional cradle, infrared, or Bluetooth. MIDlets copied to your device using infrared, Bluetooth, or e-mail attachments are automatically saved in the My Documents folder. However, you can copy the MIDlet file(s) from a PC to any of the following temporary folders on your device from where MIDlet Manager can install them.

Device memory: ../My device/My Documents/My MIDlets

Storage card: ../My device/Storage Card

Note If the My MIDlets folder does not exist in My Documents, you can create one with the same folder name. However, a folder named Storage Card automatically appears after you insert an storage card into your device.

To install a MIDlet/MIDlet suite

1. Tap Start > Programs > MIDlet Manager > Menu > Install.

2. Select the MIDlet/MIDlet suite from the list.

3. Tap Install from the shortcut menu.

4. Confirm to complete the installation.

Note To remove the MIDlet files from the temporary folder, tap Delete from the shortcut menu.

To run MIDlets on your device

1. Tap Start > Programs > MIDlet Manager.

2. Tap a MIDlet to run.

To view the MIDlets currently running

On the MIDlet Manager screen, tap Show > Running.

To stop running a MIDlet

1. Tap Start > Programs > MIDlet Manager.

2. Tap Show > Running.

3. Tap and hold a MIDlet on the Running MIDlets screen, and tap Stop.

Note To stop all MIDlets currently running on your device, tap Menu > Stop All.

To uninstall a MIDlet/MIDlet suite

Before you uninstall a MIDlet/MIDlet suite, make sure that it is not running.

1. Tap and hold the MIDlet/MIDlet suite on the MIDlet Manager screen, and tap Uninstall.

2. Tap OK to confirm.

 

To configure MIDlet security

You can adjust security settings for each MIDlet/MIDlet suite.

1. Tap and hold a MIDlet.

2. Tap Security from the shortcut menu.

Note that some features may not be available for all MIDlets/MIDlet suites. Following are the security options that you can set for a running MIDlet/MIDlet suite.

Security Option

Description

Net Access

Determines whether a MIDlet/MIDlet suite can access the Internet.

Local Connectivity

Enables a MIDlet/MIDlet suite to access services, such as infrared and Bluetooth.

App Auto Run

Enables a MIDlet/MIDlet suite to run at specified times, or any time.

Messaging

Determines whether a MIDlet/MIDlet suite can send and/or receive SMS messages.

Multimedia Recording

Enables a MIDlet/MIDlet suite to record sounds and images

 
 

Regards
Tushar Kapila
http://sel2in.in
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back

Windows Command Prompt - copy


How to copy text from the Windows Command Prompt which is used to make quick operating system commands and run some programs like console java programs.

1. open command prompt by typing Cmd in the menu or clicking 'Command Prompt' in the Start / Programs/ Accessories menu .

2. Right click on the caption (title) of the Command Prompt (or MS-DOS) window to bring up its popup menu. Then select Edit then press Mark in the popup menu.


3.Place the mouse over the Command Prompt (or MS-DOS) window. Press and hold the left mouse button. Use the mouse to drag out an area of the window to select. When the correct area is selected release the mouse button. If you make a mistake, you can release the mouse button and repeat this step to try again until you get the correct area.
In image the word data in the 3rd line will not be copied as its not selected (need to drag the mouse more to the right - if you started from the left)


4. After marking, the text should remain selected, now again right click on the caption (title/ top part) of the window to bring up its popup menu. Then select Edit then Copy in the popup menu. The text will no longer be selected.


5. Go to your text editing program or notepad/ email editor and choose menu Edit- Paste (Ctrl+V on the keyboard- quicker).



Tushar Kapila
http://sel2in.in
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back


Volunteer computer Cancer cures www.worldcommunitygrid.org
Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html

Thursday, December 6, 2007

File I/O - VisualBasic Dir old api

from http://mc-computing.com/Languages/VisualBasic/VBFileIO.htm

File I/O - VisualBasic Examples


File Manager Commands

Change Directory ChDir "c:\path"
Make Directory MkDir "c:\path"
Remove Directory RmDir "c:\path"
Change Drive ChDrive "d"
Rename a File Name "test.txt" as "string.tst"
(May fail if directories are not specified)
Delete a File Kill "c:\*.tst"
Search for File temp$ = Dir ("c:\*.tst")
Current Drirectory temp$ = CurDir ("d") ' Drive letter is optional
Get File Attributes temp = GetAttr ("c:\filename.tst")
Get File Mode temp = FileAttr ("c:\filename.tst", attributes)
Set File Attributes SetAttr "c:\filename.tst", vbReadOnly
Get File Length FileLen ("c:\filename.tst")
Get File Date/Time tempDate = FileDateTime ("c:\filename.tst")
Set File Date/Time ????


File I/O Commands

Open File for I/O Open "c:\filename.tst" For Input As 3
fn = FreeFile ' next unused number
Open "c:\filename.tst" For Input As fn
Get File Mode temp = FileAttr (3, 1)
Write to File Write 3,
Write to File Print 3,
Read From File Input 3,
Read From File Get 3,
Read From File Line Input #FileHandle, TextLine$
Current Location tempNum = Seek (3)
Current Location tempNum = Loc (3)
Length of File tempNum = LOF(3)
End of File Do While Not EOF(3) .. Loop
Close File Close 3
Closes All Files Reset

Write places strings in double quotes, separates values with commas, and adds a CR/LF pair at the end of each command. Read the data back with Input.

Print does not add extra delimiters, but does concatenate a final CR/LF to each line. The CR/LF can be suppressed by ending the command with a semicolon (;). (This trick has been available in every Basic I've used, but it is not documented in the VB 6.0 Help.) Read it back with Line Input. (Line Input assumes a DOS type ASCII input file where each line is terminated with CR/LF. It does not recognize the unix line termination character.)


File Access via a FileSystemObject

VB 6.0 provides a poorly documented FileSystemObject for File I/O. Help on these commands was found be basically "stumbling" onto them. This is the only File I/O method supported via VBScript. The basic syntax is
  Set fs = CreateObject("Scripting.FileSystemObject")   Set a = fs.CreateTextFile("c:\testfile.txt", True)   a.WriteLine("This is a test.")   a.Close 
See the help for additional details.


Standard Open File Dialog

Based on the provided help, there is no way to open a file using the provided components. For instance
  • The Common Dialog installation instructions tell you to install the wrong file. (Commdlg.dll - a 16-bit dll !!!)
  • The Filename property is missing from the help.

Selecting a File to Open

First install the Common Dialog ActiveX Component - comdlg32.ocx - in the ToolBox.
  • Right click on the ToolBox and select Components...
  • Scroll down and check Microsoft Common Dialog Controls
  • Place the component on your form and name it CMDialog
  • Attach the following code to a menu selection
  Dim TestFile$  ' String variable   CMDialog.Filter = "Test (*.tst)|*.tst"   CMDialog.InitDir = "C:\SomePath"   CMDialog.Action = 1 ' VB 4.0 way to select FileOpen                       ' Still works in VB 6.0   CMDialog.ShowOpen   ' VB 6.0 way to select FileOpen     TestFile$ = CMDialog.FileName ' = "" if the Cancel button is pressed    If TestFile$ <> "" Then     Main_UIForm.Caption = _        "Application Name or Function - " + CMDialog.FileTitle     Call SomeProcedure(TestFile$)   End If 
CMDialog.FileName File name and path
CMDialog.FileTitle File name without the path

Notice that by default, CMDialog changes the default path! Setting a bit in the flag property will prevent this.

The help for the common Dialog FileName property says to use the Path property to get the related path. However, if you use CMDialog.Path you get an

    Method or data member not found
Compile error because there is no such property.

Specifying a Drive and Path

The File Open control is worthless for specifying a path. Instead you should use the DirListBox control. Notice that the Path property does not reflect the currently selected item. Therefore, I use
  Select_Directory_UIForm.Tag = UIDirListBox.List(UIDirListBox.ListIndex) 
to return the selected directory. Null means that Cancel was selected.

Use the DriveListBox control to change drives. The following code is adequate.

  Private Sub UIDriveListBox_Change()     UIDirListBox.Path = UIDriveListBox.Drive   End Sub 


Opening and Reading a File

  Dim TextLine$, Filename$   Dim FileHandle as Integer    Filename$ = "test.txt"      ' Test if the file exists   If Dir(Filename$) = "" Then Exit Sub    FileHandle = FreeFile ' This is safer than assigning a number    Open Filename$ For Input As #FileHandle    Do While Not EOF(FileHandle)        ' Loop until end of file    Line Input #FileHandle, TextLine$  ' Read line into variable     ' Your code here   Loop    Close #FileHandle 
Line Input assumes a DOS type ASCII input file where each line is terminated with CR/LF. It does not recognize the unix line termination character.

File SaveAs

First install the Common Dialog ActiveX Component - comdlg32.ocx - in the ToolBox. (See above)
  Dim fs 'As FileSystemObject   Dim OldPath$   OldPath$ = CurDir   ' CMDialog will change the current path   Set fs = CreateObject("Scripting.FileSystemObject")   If Not fs.FileExists("Test.txt") Then Exit Sub      CMDialog.Flags = cdlOFNHideReadOnly + cdlOFNExplorer   CMDialog.Filter = "Test (*.tst)|*.tst"   CMDialog.FileName = "" ' This is the value returned if Esc/Cancel    CMDialog.Action = 2 ' VB 4.0 way to select FileSaveAs   CMDialog.ShowSave   ' VB 6.0 way to select FileSaveAs    TestFile$ = CMDialog.FileName ' = "" if the Cancel button is pressed    If TestFile$ <> "" Then       ' If OverWrite, ask if ok     If Dir(TestFile$) <> "" Then       Select Case MsgBox("Overwrite existing file?", vbOKCancel)         Case vbOK           Kill (TestFile$) ' of course, this is wrong                            ' re-name the old file and erase it                            ' after the new file is written         Case Else           Exit Sub       End Select     End If          Name OldPath$ & "\Test.txt" As TestFile$   End If 
Notice that CMDialog changes the default path!


Testing for a Legal Filename

' Directory and file names can not contain the following '      \ / : * ? " < > | ' Though allowed, the ampersand will also cause problems in NT ' Paths can contain  : \ '   Dim crlf$, badChars$, badChars2$, i, tt$   crlf$ = Chr(13) & Chr(10)   badChars$ = "\/:*?""<>|"           ' For Testing, no spaces   badChars2$ = "\ / : * ? "" < > |"  ' For Display, has spaces        ' Check for bad characters     For i = 1 To Len(tt$)       If InStr(badChars$, Mid(tt$, i, 1)) <> 0 Then         temp = MsgBox("A directory name may not contain any of the following" _                & crlf$ & crlf$ & "     " & badChars2$, _                vbOKOnly + vbCritical, _                "Bad Characters")         Exit Sub       End If     Next i 


Testing for the Existance of a File

There are 2 ways to determine the existance of a file
  Dim fs ' The help does not say what type this should be          '   therefore, I tried a variant   Set fs = CreateObject("Scripting.FileSystemObject")   If Not fs.FileExists("Test.tst") Then Exit Sub 
Scripting is a keyword which is not documented in the help outside this one example.
Use the Dir function to check if specific files and directories exist. The first call to Dir should contain a path and any wild cards. Subsequent calls without parameters will return the next matching filename or a null string if there is no match.
  Temp$ = Dir("*.tst")             ' Get the first tst file   Temp$ = Dir("c:\", vbDirectory)  ' Get the first directory name                                    '  in the indicated path   Do While Temp$ <> ""             ' Loop till there is no match     ' Place main routine here     Temp$ = Dir                    ' Get next matching filename   Loop 
Both Dir and Dir(, vbDirectory) ignore the file attributes and return the next "file" in the last referenced directory. (Under DOS, sub-directories are simply files with the Directory attribute set.) Use GetAttr to test specific attributes. Remember that all sub-directories contain references to files named "." and ".."


Testing for the Existance of a Drive

The following code is not generally acceptable for checking the existance of a drive.
    ' Returns null if the drive does not exist     '   or if the root directory is empty   a$ = Dir ("C:\") 
A better solution is
(Source: Trevor Daniel at British Telecom via comp.lang.basic.visual.misc)
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA"               (ByVal sDrive As String) As Long   Private Function DriveType(DriveStr As String) As String   Dim DriveTypeLong As Long   Dim aa As String   Const DRIVE_TYPE_UNDETERMINED = 0   Const DRIVE_ROOT_NOT_EXIST = 1   Const DRIVE_REMOVEABLE = 2   Const DRIVE_FIXED = 3   Const DRIVE_REMOTE = 4   Const DRIVE_CDROM = 5   Const DRIVE_RAMDISK = 6   aa = DriveStr & ":"   DriveTypeLong = GetDriveType(aa)   Select Case DriveTypeLong     Case DRIVE_TYPE_UNDETERMINED         DriveType = aa & " is not a recognised drive type"     Case DRIVE_ROOT_NOT_EXIST         DriveType = "The drive " & aa & " does not exit"     Case DRIVE_CDROM         DriveType = aa & " is a CD-ROM driver"     Case DRIVE_FIXED         DriveType = aa & " is a Hard Disk"     Case DRIVE_RAMDISK         DriveType = aa & " is a RAM Disk"     Case DRIVE_REMOTE         DriveType = aa & " is a network drive"     Case DRIVE_REMOVEABLE         DriveType = aa & " is a Floppy Disk"   End Select End Function 
In order to see all the Windows API file functions, search the MS Visual Studio help for GetDriveType and click on File Functions.

It is not clear why the Windows constants need to be manually defined.


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Languages / VisualBasic / VBFileIO.htm
href="http://sel2in.in">http://sel2in.in
http://tk.celladmin.com Mobile and regular computer web site for back pain and Exercise timer application
http://ksoft7.tripod.com/g2.html a good search page that allows you to search within any website uses google works best in Internet explorer and opera
http://minutes-alarm.sourceforge.net free ware windows minute alarm, easy reminder for back ache - stand up or meeting or call back

tushar.kapila@gmail.com yahoo : tushar.kapila@yahoo.com msn : tgkprog3@hotmail.com GTalk : tgkprog@gmail.com

Volunteer computer Cancer cures www.worldcommunitygrid.org
Click: www.thehungersite.com , and www.bhookh.com feed hungry , its free. www.ecologyfund.com
Please add these to your start-up how to: http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html
Google :
 


Thursday, August 23, 2007

Create a blog :step 1/5

hi

Welcome to my tutorial on creating a web blog

(log with your photos, thoughts, events ...)
 First go to
 
This is the best blog site (fast, can post by sending a email, templates easy)
 
Log in with your google a/c create one of you don't have one.

The images on this blog can be seen in full size by clicking them. Click back in your browser to come back to the page.

 
    Help with research, genitics, history. Volunteer your computer www.worldcommunitygrid.org today!
Click: www.thehungersite.com , and www.bhookh.com , feed a hungry soul, its free. www.ecologyfund.com
Please add these to your start-up how to -
http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html

Google
 

 


Ads by google:






- Tushar G Kapila e-mail
Bangalore India 2007 ©

Create a blog :step 2/5

Enter a title like:
My pages on world problems
 
Enter a short address-part for blog, only letters, underscores and dashes
like:
Ram01
 
enter the word verification (its case sensitive)
 
Click continue
 
________________________
 

Help with research, genitics, history. Volunteer your computer www.worldcommunitygrid.org today!
Click: www.thehungersite.com , and www.bhookh.com , feed a hungry soul, its free. www.ecologyfund.com
Please add these to your start-up how to - http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html


Google
 

Create a blog :step 3/5

Choose a template
the default will do you can change it later
 
 
 
Help with research, genitics, history. Volunteer your computer www.worldcommunitygrid.org today!
Click: www.thehungersite.com , and www.bhookh.com , feed a hungry soul, its free. www.ecologyfund.com
Please add these to your start-up how to - http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html


Google
 

Create a blog :step 4/5

Your blog has been created ... click
 
Start Posting

Create a blog :step 5/5

 
Make yur first post!
 
publish it (you can edit it later)
 
 
 

Ads by google:






- Tushar G Kapila e-mail
Bangalore India 2007 ©

thoughts on govt

why cant we have a goverment made of MBAs only ... and we vote like 10 of them in ... each gets to run things for 2 years but there are 2+1 peopel at the help all the time why --> less elections

G
 
Forum
Ads by google:











Source code, testing article - one stop shop Software applications written in Java for cell phones, PHP, Java Dot net, PHP & Perl for the web and Vb6, Java, VB6, Perl and Excel VBA for the desktop .

- Tushar G Kapila
Bangalore India 2007 © Remaining page can be removed if you save on your pc or server.

Contributors