1.

Solve : VB and Delphi help?

Answer»

Hello everybody

I am just a starter in programming

I have a code here, I think it is VB code

Code: [Select]Private Sub Form_KeyDown(KeyCode As INTEGER , Shift As Integer)
If KeyCode = vbKeyF Then End
End Sub

1. What does this code do?
2. Please give me a code does the same work in delphi

THANKE YOU This seems to be incomplete code, now if it had an END IF with it, then it would end the program.Hello

Thank you M.r macdad-

someone told me that it will do a command when I press F and here it will end it self

well, can you give me a code in delphi can do that?

ThanksmacDad- that IS complete code. a One line if statement doesn't have an end if.

When you press F, the program will end.

THANKS for the correction BC, didn't know that end if isn't required for one-lined If statements.Hello

ok GUYS thank you, what about delphi code


Hello!

This line open Acrobat Reader program.

Dim iResult As Double
Dim iPath As String
iPath = "C:\Program FIles\Adobe\Acrobat 7.0\Reader\AcroRd32.exe "
iResult = Shell(iPath, vbMaximizedFocus)

Where possible insert line, that program open optional access path.

pl: w:\MyPdf\demo.pdf

ThanksPlease post to a seperate thread.Hello!

If press command button, open AdobeReader program.

Private Sub Command10_Click()

Dim iResult As Double
Dim iPath As String
iPath = "C:\Program FIles\Adobe\Acrobat 7.0\Reader\AcroRd32.exe "
iResult = Shell(iPath, vbMaximizedFocus)

End Sub

All ok.

But I LIKE, the program not open Library "c:\Documents", open my optional Library, example "w:\MyPDF"

Thanks



Discussion

No Comment Found