|
-
Oct 3rd, 2000, 09:04 AM
#1
Thread Starter
Hyperactive Member
Please please does anyone know how this is done?
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Oct 3rd, 2000, 09:14 AM
#2
Frenzied Member
Well, if you reply here explaining what is a Crystal report, maybe I can help...
Bye,
-Jotaf98
[email protected] - ICQ#60784495 - http://jotaf98.cjb.net
-
Oct 3rd, 2000, 09:24 AM
#3
Thread Starter
Hyperactive Member
Its a report created using 'Crystal Reports 7'
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Oct 3rd, 2000, 10:43 AM
#4
Frenzied Member
Here it is!
Here's and example directly taken (and slightly modified) from MSDN Library (look for the keywords "Shell", "AppActivate" and "SendKeys" for more info).
This one will run the Calculator, type some numbers and exit it.
So you can use this to run Crystal and edit the report or something like that!
Code:
Dim ReturnValue, I
'This will open the calculator
ReturnValue = Shell("calc.exe", 1)
'Activate it (give focus to it so it can receive keys
'from the SendKeys command)
AppActivate ReturnValue
'Loop from 1 to 100
For I = 1 To 100
'Type the number I and press the plus sign key (+)
'Some keys must be sent in a different way, like
'this one (the plus sign between brackets)
SendKeys I & "{+}", True
Next I
'Send the equal key (to get the result)
SendKeys "=", True
'Copy the result to the clipboard (by pressing Ctrl + C)
SendKeys "^{C}", True
'Send Alt + F4 (to close it)
SendKeys "%{F4}", True
Try creating a new project, and pasting this to the Form_Click event. It will do exactly what you told it to do when you click the form - and you can even paste the result as a proof (remember that we told it to copy the result!).
Hope that helps! Make sure you check the VB help files for more info.
Bye,
-Jotaf98
[email protected] - ICQ#60784495 - http://jotaf98.cjb.net
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|