RSView32 printing a textbox in VB

jonsina72

Member
Join Date
Mar 2010
Location
Middlesbrough
Posts
15
Hello all,

does anyone know how to print the contents of a textbox on a form that is generated in RSView32?

the standard VB print options do not seem to exist in RSView32 (not that I know anything about it - except for spending the day trawling the net).

A quick synopsis of what I'm doing:

I have a form with a listbox which displays the contents of a directory holding all the daily reports.
You can select one of the reports in the listbox,
there is then a "load" pushbutton which loads the contents of the daily report into a textbox object.

I then need a "print" pushbutton to either:
1) print the contents of the textbox
OR
2) print the already existing text file (.txt)

any help would be greatly appreciated.

Regards,
Jon Sinclair
 
Hi Jon,

Have you noticed that not very many people are helping with your questions... I would love too but most people stay away from the VBA (myself included)

I have made/edited a few programs, I also tried to get the 'print' to work and did not have very much luck.

I will look over a few programs that I have to see if any did get it to work and or if they have it.

Good luck
Mark
 
Hello,

I do not know how to do it in VBA. But, maybe you can explore the commands that launch external applications. Normally, this is done using the windows 'shell' commands. ShellExecute is the normal function used.

This site seems to have some info.

http://www.vb-helper.com/howto_shellexecute.html

Now, the thing is it will launch the default application for the file type to print the file. But you might be able to populate the parameters so the application launches, prints to the default printer and quits. Or...

I have not tried any of this in RSView32 or VBA.


Good luck,

Mark
http://www.peakhmi.com


 
shell execute

Hello all,

just a quick update, the shell execute suggested by Mark above works a treat, the code is as follows off a pushbutton:

Private Sub CommandButton3_Click()

Dim r As Long
Dim lRtn As Long
Dim Action As String
Dim fname As String
fname = "c:\Daily Reports\" & FileList1.ListBox1.Value
Action = "print"
r = ShellExecute(hWnd, Action, fname, vbNullChar, vbNullChar, SW_HIDE)

End Sub


Cheers for the assistance,
Jon
 

Similar Topics

I'm importing an RSView32 project into FTView SE. I'm using Legacy Tag Database Conversion on a virtual machine with Windows XP, I did the first...
Replies
0
Views
372
Hi everybody, I have a rsview32 application, when I try to run it it loads upto 80% system settings and the crashes saying Rsview32 Project...
Replies
3
Views
1,908
Hi Guys I'm having trouble assigning a tag to an activex label on a Multipage Tab. I can assign the tag to an active x label on a normal display...
Replies
0
Views
596
I have followed the procedure below to convert RSView32 project to FactoryTalk View...
Replies
5
Views
1,431
I have converted RSV32 to FTVSE Distributed. pretty straightforward... I cant seem to figure out how or find any documentation to migrate RSV32...
Replies
4
Views
2,304
Back
Top Bottom