User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Printing Graphic File with .net

  1. #11
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Tallmadge, Ohio USA
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Still need help with this. I'am trying to exclude user interaction and eliminate the list object and pass 1 global string (filename$) and 3 global alt variables (xPos,yPos,Width,Height)and get this to print the file. I've gotten strange results (blank pages/no pages printed) Someone care to write me an example PLEASE?

  2. #12
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Sorry for not helping earlier kungsangun.
    Copy this code into the 'script'. Put it after the 'AddImage' sub-procedure/function, which is near the top, just under its 'End Sub' line.
    Code:
     	Public Sub AddImageByString(byval filename as String, byval xPos as Integer, byval yPos as Integer, byval W as Integer, byval H as Integer)
    		Try
    			mImages.Add(new PrinterImage(filename,new Point(xPos,yPos)))
    			mImages(mImages.Count - 1).mSize.Width = W
    			mImages(mImages.Count - 1).mSize.Height = H
    		Catch
    		End Try
    	End Sub
    Then in the event editor, you can have a new Call Function action. Call AddImageByString, and you can pass 5 parameters: filename,x position, y pos, width, height. Separated by a |

  3. #13
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Tallmadge, Ohio USA
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Can anyone get the attached sample to work?
    If so PLEASE show me how!..
    Thanks!
    Attached files Attached files

  4. #14
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    You need to change it to call function "Class1.AddImageByString"
    at the moment, you haven't got 'Class1.' there.

  5. #15
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Tallmadge, Ohio USA
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Greyhill, you're a scholar and a gentleman!
    I started programming in the 80's with 8bit Hex machine code/assembly and picked up MMF a couple of years ago but haven't jumped into VB or C# so that is very unfamiliar to me.

    If you still have that project I sent you and make the correct 'Class1.' modification it seems to repeat the previous print request even though a new document is selected. Do you have any insight on that?..

    Thank you once again..

  6. #16
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    I thought you'd have this problem .
    You'll need to reset the list of things to print.
    Add this function under Class1, same as AddImageByString:

    Public Sub Reset()
    mImages.Clear()
    End Sub

    Call it whenever you want to reset the things to print.

  7. #17
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Tallmadge, Ohio USA
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Almost there!
    After applying all the modifications things print as expected
    EXCEPT the last document displayed in the View Patient section only gets the printer to "wake up" but doesn't print although I'am handling each document with a copy of the same code. For instance if there are 4 documents displayed then only documents 1,2,3 (from left to right) will print. If 2 documents displayed only 1 will print. I've poured over the code but cant' "see" it.
    Befuddled...once again I implore on your insight.

  8. #18
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    The problem lies somewhere with your program (i think) having sole access to the last image. If I try to load that image in window's image viewer, it won't let me. Similarly, the .net script can't get access to load the file.
    I'm not sure what the cause is.

  9. #19
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Tallmadge, Ohio USA
    Posts
    264
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Printing Graphic File with .net

    Greyhill your phrasing lead to the answer!...
    I was using the file time object to get and display the date created and wasn't closing afterward!...

    Once again thanks for all your help and the .net object as well as the printing script!

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Dot Net Printing Graphic file HELP
    By kungsangun in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 13th April 2008, 06:59 PM
  2. [request] Print Graphic file
    By kungsangun in forum Extension Development
    Replies: 2
    Last Post: 10th April 2008, 12:48 PM
  3. Printing Graphic File with .net
    By Ross in forum File Archive
    Replies: 0
    Last Post: 30th March 2008, 05:42 AM
  4. Printing Graphic Files
    By kungsangun in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th March 2008, 05:31 PM
  5. Printing an external file... Need some help..
    By Hristos in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 17th February 2007, 06:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •