Printer Dialog Box through SDK creating problem

Hello Experts,
I have created a addon for printing Invoice Report in which i have given the option of Printer Dialog Box .
Through sdk i have called that printer dialog box in the addon .It's running well in the server showing the Printer Dialog Box
but while running the addon in client machine first two to three times printer dialog box appears after that while pressing the
print button of my addon form Printer dialog box is not appearing .
Then after restarting the machine Printer dialog box shows which is creating problem for the client use .
Suggest the right way to sort out the problem .
If anyone need to see the code which i have written i can post that code.
Thanks
Amit

Hello Janos,
Following code i have write for prrinter dialog box to open
Public Sub ShowPrintDialogBrowser()
Dim MyProcs() As System.Diagnostics.Process
FileName = ""
Dim PrintFile As New PrintDialog
Try
PrintFile.AllowSelection = True
PrintFile.ShowNetwork = True
MyProcs = Process.GetProcessesByName("SAP Business One")
Dim UserName = Environment.UserName
             For i As Integer = 0 To UBound(MyProcs)
                If GetProcessUserName(MyProcs(i)) = UserName Then
                    GoTo NEXT_STEP
                End If
            Next
            sbo_application.MessageBox("Unable to determine Running processes by UserName!")
            GC.Collect()
            Exit Sub
NEXT_STEP:
For i As Integer = 0 To MyProcs.Length - 1
Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)
Dim ret As DialogResult = PrintFile.ShowDialog(MyWindow)
If ret = DialogResult.OK Then
File_Directory = PrintFile.PrinterSettings.PrinterName
PrintFile.Dispose()
ElseIf ret = DialogResult.Cancel Then
File_Directory = ""
System.Windows.Forms.Application.ExitThread()
Else
File_Directory = ""
System.Windows.Forms.Application.ExitThread()
End If
Next
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
FileName = PrintFile.PrinterSettings.PrinterName
Finally
PrintFile.Dispose()
End Try
End Sub
Imports System.Management
Private Function GetProcessUserName(ByVal Process As Process) As String
        Dim sq As New ObjectQuery("Select * from Win32_Process Where ProcessID = '" & Process.Id & "'")
        Dim searcher As New ManagementObjectSearcher(sq)
        If searcher.Get.Count = 0 Then Return Nothing
        For Each oReturn As ManagementObject In searcher.Get
            Dim o As String() = New String(1) {}
            'Invoke the method and populate the o var with the user name and domain                        
            oReturn.InvokeMethod("GetOwner", DirectCast(o, Object()))
            Return o(0)
        Next
    End Function
Regards,
Amit

Similar Messages

  • CS6 Photoshop: One newly-created PSD filewon't print because the print dialog box won't appear altho the file properties appear to be the same as other files that do print.

    CS6 Photoshop: One newly-created PSD file won't print because the print dialog box won't appear after selecting File > Print.  Then "Print" becomes grayed out. The file properties such as permissions, are the same as other PSD files that do print.  This file also cannot be converted to Adobe PDF, which is not offered as choice under "Save as", whereas other can be.  I've exited, reopened Photoshop, restarted computer, checked out other CS6 PSD files which do print, nothing changes.  The 52 MB file has been flattened. OS is Windows 7.  Thanks for any suggestions.

    Sounds like the printer driver is having some problems.
    Try holding the space bar down when you select Print (which makes the print dialog NOT load previously used settings).

  • My CUPS printers bleed their settings into both printers when selected through Print Dialog Box

    I currently have 2 printers setup through CUPS. One printer has printing options set as 100x230 page size and one as A4.
    When the FF printer dialog pops up, the default printer has its settings displayed fine and printing by clicking print produces the correct output to the printer.
    If however when I go into the print dialog box from scratch(default is displayed) and select the other printer and check the printer "Page Setup", it has inherited the Paper Size(100x230) from the default printer and not the settings for this now selected printer which should be "A4".
    This is quite frustrating as when my users go in and select the correct printer for the print job, they need to make sure that they select the printer, then the page size and then click print.
    It might not sound like a big deal but they are printing using both options simultaneously throughout the day and one printer is fine, but the other one requires this messing with on every print.
    What I think needs to be done, is every time the printer is selected in the dialog box from the list, firefox should request the full printer info from CUPS and completely refresh the printer settings thus overwriting the previous selected printer settings.
    After all, these settings are only applicable at the point the user wishes to hit the print button.
    Is there anything I'm missing here?
    It seems this has always been a problem.
    Help me as it's driving me mad :-(
    Thanks in advance
    Regards
    JASON

    Is this on one sole PC that has multiple printers available to it? <br />
    Or are you printing to multiple shared printers across a network from multiple PC's?
    Also if that is from multiple PC's, do they all run the same operating system? <br />
    ''As all Windows or all Mac or all Linux.''

  • Print Dialog Box for Addon is not showing in Terminal Server

    Dear All,
    I have created a addon for Automatic Sales Invoice printing that prints the crystal report directly to the printer bu opening a
    print dialog box for printer selection through SDK code.
    The Same addon works fine on the server with print dialog box being showing through SDK code.
    But while running on Terminal Server , print dialog box is not showing any printer though printers are redirected to that
    terminal server.I am not getting whether the problem is in my addon or in the terminal server printer settings.
    Please suggest as i need to know the reason urgently.
    Thanks
    Amit

    Hello Edward,
    Thanks for your reply .
    But the problem is that while running on normal server the print dialog box appear with the printer name in my addon for printer selection .
    But while using terminal server , the print dialog box is not getting any printer in the dialog box .That's the major concern for me
    is their any way to check that why the printers are not showing in print dialog box.
    Thanks ,
    Amit

  • How to suppress print dialog box from popping up under a condition

    Greetings...
    There may be a better way to accomplish what I'm trying to do, so I'm open to outside-the-box suggestions.
    I have a pretty simple page which lists a set of statuses and descriptions of each. The user can edit these status flags and their descriptions on the page as well. When I view the page in "printer friendly" mode, I see a nice simple report of what the statuses are and their descriptions. Everything works great so far.
    In our work request system built in ApEx, there's a page where someone can view the details of a work request, including the current status. When someone clicks on the help of that item, what I'd love to do is simple show the "printer friendly" version the status page mentioned above in a pop up window. My problem is that the print dialog box automatically shows up when a page is displayed in "printer friendly" mode and I do not want this to happen in this case.
    I see the javascript code in the Printer Friendly page template which causes the print dialog box to show up automatically, but I don't want to remove it in the template just for this one case. This would suppress the print dialog box on all "printer friendly" page views and the users are used to it showing up when they ask to print the page.
    I guess I could create a custom request to pass to the master status page which would pretty much do everything that the "printer friendly" mode is doing, but that seems like a lot of work when I'm so close to using something that is built in.
    Am I not seeing some simple other way of doing it or perhaps asking too much? Any suggestions?
    Shane.

    Hi,
    I think you have to call the FM GET_PRINT_PARAMETERS and pass NO_DIALOG = 'X'.
    Something like:
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog      = 'X'
        IMPORTING
          out_parameters = ls_params
          valid          = lv_valid
        EXCEPTIONS
          OTHERS         = 1.
      NEW-PAGE PRINT ON PARAMETERS ls_params NO DIALOG.
    * Display Table
      lr_table->display( ).
    add: Spool numbers can be found in TSP01 or in system field SY-SPONO available in the submitting program...
    Hope it helps,
    Kr,
    m.
    Edited by: Manu D'Haeyer on Sep 28, 2011 10:02 AM

  • KB2909210 on Server 2008 R2 breaks my intranet sites and print dialog box

    Let's try this again.  I have been asking the following question of Microsoft and every time I do, I have only been told to try another forum.
    I have several intranet sites that my users use for various data entry and querying purposes.  I installed Internet Explorer 10 onto my 2008 R2 Terminal Server over this past weekend (10/18/2014) which also installed the Security Update KB2909210
    and rebooted the server.  On Monday morning (10/20/2014), when my terminal users logged into the sites, the sites began malfunctioning.  All the dropdown arrows turned into question marks.  Some fields which normally have a small "x"
    on the right-hand side used to erase the data entered in the text field were also displaying as question marks.  The objects still functioned but it was disconcerting to my users.  The update also slowed down these same intranet sites to where it
    began interfering with productivity.  I activated Compatibility View for all intranet sites, but it did not resolve the problem.
    I also found that when my terminal users tried to print a pdf document from the intranet sites, the print dialog box was jumbled and no fields were pre-populated with data like they always are when printing.  I updated to the latest Adobe Reader, but
    the print dialog box remained jumbled. 
    All of my users with stand-alone PCs have IE 10 installed and the intranet sites work fine.  The sites display properly and process quickly, and the print dialog box is not jumbled.  It is only my terminal users who log in from a thin client
    to their profiles on the server and use the IE version installed on the server who have the problem with IE10.  The KB2909210 Update is not installed on, and does not come up as, an update for any of my stand-alone Windows 7 PCs.
    I uninstalled IE 10 from my server, but since this was one of my production servers, I could not restart it until after the plant was shut down for the evening forcing my users to suffer with the slowness for the day.  This morning (10/21/2014) the
    intranet sites are working fine through IE 9.  I also had to revert back to Adobe Reader v9.5 as the v11 (and v10) print dialog box does not display properly in IE 9.
    I do not want to stay on IE 9 on my server as IE9 gets more un-secure by the day and we've found IE 11, on any of our machines, to be too buggy.
    How can I install IE 10 with its security updates and prevent it from breaking my intranet sites and print dialog box?  What is so different about Server 2008 R2 and Windows 7 that IE 10 causes this corruption of intranet sites and the print dialog
    box on the Server but not on the Win 7 machines?
    The bulletin here:
    https://technet.microsoft.com/library/security/ms14-011
    is useless for determining why it breaks my intranet sites. Nor does it explain why the update destroys the print dialog box.

    Hi,
    In my opinion, it's hard to say your problem caused by KB2909210. Have you tried to uninstall this update for test if your intrant site's problem resolved?
    If your problem truthfuly caused by this updates, you can choose to hid the update as a workaround method.
    Roger Lu
    TechNet Community Support

  • Printer dialog box does not appear in Photoshop CS.5

    I use Photoshop CS.5.1 with a Macbook 2013 using version 10.9.5. The printer works perfectly with all other applications but in Photoshop no printer dialog box comes up and the print job does not appear in the printers queue. Anyone the same issues?

    First, try nuking (deleting them and letting the application create new ones) your Photoshop preferences:
    To re-create the preferences files for Photoshop, start the application while holding down Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop Settings file?"
    Note: If this process doesn't work for you while you're using a wireless (Bluetooth) keyboard, attach a wired keyboard and retry.
    Important: If you re-create the preferences by deleting the Adobe Photoshop CS6 Settings file, make sure that you only delete that file. If you delete the entire settings folder, you also delete any unsaved actions or presets.
    Reinstalling Photoshop does not remove the preferences file. Before reinstalling Photoshop, re-create your preferences.
    NEW Video! Julieanne Kost created a video that takes you through two ways of resetting your Photoshop preferences. The manual preference file removal method is between 0:00 - 5:05. The keyboard shortcut method is between 5:05 - 8:18. The video is located here.
    Mac OS
    Important: Apple made the user library folder hidden by default with the release of Mac OS X 10.7. If  you require access to files in the hidden library folder to perform Adobe-related troubleshooting, see How to access hidden user library files.

  • InDesign CS3 Print Engine Error and Corrupt Print Dialog Box

    We are a networked office working on various files off of a server. After setting print settings in the print dialog box and saving the file, when another user (or the same user) reopens the file, the Print dialog box settings are changed in a bizarre, corrupted way, and the file will not print. We get the following error:
    Printing Error: The Adobe Print Engine has failed to output your data due to an unknown problem.
    and printing fails to the HP LaserJet 4240 PS (64 MB RAM).
    We all use Windows XP, SP2, Dualcore 3 GHz Pentium Processors with 3.5 GB of RAM.
    Specifically, the Print dialog box shows these strange settings:
    Scaling gets set to 0%, copies are set to 0
    Spreads are turned on
    Print Visible Guides and Baseline Grids are turned on
    All printers marks are turned on, offset is set to 0
    Use document bleed settings is turned on, include slug area is selected
    Output Text as Black is turned on
    Omit for OPI has all 3 file formats selected (EPS, PDF, and Bitmap)
    Usually resetting the Print dialog box and saving the file allows us to print but then the next time we open the file, the Print settings are corrupted again.
    Any solutions? Or any fixes in the works?
    Thanks for your help!

    We currently only notice this problem with files associated with one project. The project is a book of many chapters, each with it's own file. The problem affects multiple files and multiple users (4 out of 5 people working on these files have experienced the problem). It may very well be a problem caused by a different user opening the files after another has closed them.
    We have a LAN with multiple Dell servers running Windows 2003 and many end-user PCs using Windows XP. All printers are on the network but printing occurs locally, meaning that data sent to a printer does not go through a server.
    We could test the problem by copying a chapter to one person's computer and making them the only person who works on it for a day or two. It's just hard to do so because different people have different duties to perform on all files.
    Thanks for your help!

  • WARNING: NEW-PAGE PRINT can no longer be used to print dialog box

    i am getting a warning as 'NEW-PAGE PRINT can no longer be used to print dialog box'. Please suggest what method can i use otherwise

    Please create a screenshot of the problem you're seeing by following the guide mentioned at [[How do I create a screenshot of my problem?]].
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Incomplete print dIalog box when printing PDFs

    During the past several weeks, whenever I try to print a PDF, the print dialog box (when Copies & Pages is selected in the pull-down menu) is blank ... I can't select how many copies or which pages to print. This only started happening recently, before that everything was fine. It doesn't matter how the PDF was created ... by OS X, by InDesign, by Photoshop, or arriving in email, the result is the same ... incomplete dialog box. My workaround so far when I want more copies or only certain pages, is to "place" the desired pages in InDesign and do the printing from there ... big pain and not an acceptable long-term alternative.
    Anyone know of anything that might have happened with recent software updates?

    Karen....I found this thread while looking for some help with the same problem. Did you ever find a solution? I have Acrobat 7 and 8 running on a Mini with 10.4.11 and am having the same problem in Acrobat 7 only, Acrobat 8 behaves fine. When going to the Print dialog, the area below the "Copies & Pages" button is blank. I can change the "Copies & Pages" button to other settings but the dialog box does not hold the change, it reverts back to "Copies & Pages". I have replaced Acrobat 7 without any luck.

  • InDesign CS5 crashing from print dialog box

    Using CS5, multiple computers, some on Leopard, some on Snow Leopard. Printing to a Xerox Phaser 7500. When we set up to duplex print in the print dialog box, the application shuts down when we hit the "print" button. I've searched all through these forums, and the Xerox site, and can't find anything that sounds like this problem.
    Brand new printer, latest drivers, all Mac OS updates applied.
    Any ideas?

    There are also reports that there are many other types of issues which causes the hang ups, not just printing issues. What I have found is that one of the problem is font related. I found that I had multiple versions of the Times font and that the documents which I had hanging the most would contain the Times font. I deleted the font and replaced it with Cambria. Now those documents seldom will hang. My guess is that neither the latest version of OSX or CS5 works well with older fonts.
    I still get an occasional hang which requires me to force quit IDCS5. When I do, about 3 out of 5 times, it sends an crash report to Apple but not to Adobe so I still think their is some conflict between IDCS5 and the operating system.  I am currently running OSX 10.6.5. 
    The problem I find is that I am getting the occasional hangs randomly. Sometimes its when packing a file, sometimes it when selecting the type tool. But I've also run into the problem when opening another document. 

  • Print Dialog-box Pop-Up while doing Post Good Receipt in VL32N

    I have created Inbound delivery for a Purchase Order. When i try to perform Post Good Receipt operation, the material is getting posted to the respective storage location, but the print dialog-box appears immediately. I faced this problem in only one plant.
    Output Conditions are maintained for the specific output type, in that medium is print output and time of output is Print with own application.
    Why the system is giving print dialog box when we perfrom Post Good receipt operation?
    How to avoid this print pop-up dialog box?
    Edited by: Paul Pandian on Mar 21, 2009 3:27 AM

    Hi Pawan,
    As sheer conincidence I should say, I just posted question on this topic just 1 hour back. And based on the comments in your question my problem is also solved. Thanks for that.
    BTW, I can confirm that the settings you have mentioned are correct. As I have tested it.
    Do you want to consider setting for auto GR?
    Logistics Execution -> Warehouse Management -> Interfaces -> Shipping -> Define Shipping Control -> Define Shipping Control at the Movement Type Level -> For movement type 101 we have put the Copy WM quantity as 'Copy WM quantity as delivery quantity and post GR/GI'.
    I hope this helps.
    Kind Regards,
    Prakash

  • Printing from FLASH without "Print dialog Box" Pop-up window?

    hi guys,
    i got a flash + OSX question, maybe someone can help me,
    i'm working on a Adobe Flash (Flash version 9, actionScript
    3) project, running on a MacOS X 10.4, on a core2duo iMac, it is
    connected to a printer (Xerox Phaser 6360).
    - the flash will be displayed in full screen.
    - it is a "create your own postcard- &- print it out"
    flash-based multimedia project.
    - so Flash will need to print stuff.
    issue is:
    - everytime when something need to be printed, macOS X will
    prompt a "Print Box" pop-up window say Cancel or Print (see my jpeg
    below).
    - so it might overlap on top of my Flash project, which is
    running full screen (so having the pop-up window overlapping my
    flash is no good).
    so i need a solution to avoid this, any idea?
    what i can think of are:
    A- is there a way to avoid/by-pass this step? meaning a way
    not to show this?
    or
    B- or is there a shareware/way to "auto-click RETURN button"
    so even this screen appear it will be "auto-click" away.
    or ..C?
    i knew there is a Plug-in (or Xtra) for Macromedia Director
    called: Print-o-matic,
    the URL is:
    http://www.printomatic.com/products.cfm/
    it work well on the Director on Mac OS7, but they only made
    it for Director & Authorware, not Flash :-( do you know
    something similar for Flash?
    this
    is the pop-up Print dialog box i meant (which i want to avoid),
    click to view
    or u can copy the URL to view there:
    http://photos-g.ak.facebook.com/photos-ak-sf2p/v193/184/11/743997016/n743997016_546542_881 6.jpg
    about the printer URL:
    [url=http://www.office.xerox.com/printers/color-printers/phaser-6360/enus.html]High
    speed color for high volume printing - Phaser 6360[/url]
    hope i'm able to get a solution here.
    thanks guys,
    cheers,
    tintoy

    quote:
    Originally posted by:
    actiontintoy
    so does anyone got any solution for this issue?
    which is:
    able to print without showing the "print dialog box" pop-up
    window,
    pr any other way to by-pass the pop-up window,
    thanks.
    BTW, i'm adobe Flash + mac OS X 10.4
    Hi...did you solve the problem?
    Would you mind telling me how to disable print dialog?
    Thanks!!!

  • Supress Printer Dialog box (Operating System) in Payslip Printing

    Hi All,
    I have design the smartform to print the payslip. In the main window i have created the loop and then  desing the templates to display the details of employee and the wage types.I have only one page in it. I have develop the print program to call the smartfform. But when i try to print the payslip for number of employees the printer dialog box (Operating system Level) is appearing for the number of times the employees i have selected.I am able to suppress the Print Preview dialog box from SAP it is not showing and i have given the parameters to print immediately.But the Problem i am facing is if i select 3 employees the printer dialog box is coming 3 times. i have to click 3 times to print the payslips .
    Mustafa

    Hi,
    Please find the code below. I have made the changes but agian it is asking for the printer dialog box for the number of times the employees i have selected.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
       formname                 = 'ZHR_F_MMG_PAYSLIP'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = V_FM_NAME
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    loop at i_payslip_details.
      gv_control-no_dialog = 'X'.
      gv_control-no_open   = 'X'.
      gv_control-no_close  = 'X'.
      I_SSFCOMPOP-TDDEST = 'ZMMG_Print'.
    I_SSFCOMPOP-TDNEWID = ''.
    I_SSFCOMPOP-TDNOPREV = 'X'.
      AT FIRST.
        gv_control-no_open = ''.
        endat.
        AT LAST.
          gv_control-no_close = ''.
          ENDAT.
    CALL FUNCTION V_FM_NAME
    EXPORTING
       CONTROL_PARAMETERS         = gv_control
       OUTPUT_OPTIONS             = I_SSFCOMPOP
      TABLES
        I_PAYSLIP_DETAILS          = I_PAYSLIP_DETAILS
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endloop.

  • Where do I find the printer dialog box to change the setting that asks me to save a file before printing

    Where do I find the printer dialog box to change the setting that asks me to save a file before printing

    Hi Sara,
    The problem is every time I try to copy a page from a website or attachment sent to me or anything that I don't create, the dialog box says I have to save it before I can print -- there are no other options on the dialog box.  Very frustrating -- one of the girls in my office is having the same problem and we can't find a way around it.
    Hope you can help
    Thanks
    Carol Laskos
    "Sara.Forsberg" <[email protected]> wrote:
    Sara.Forsberg  created the discussion
    "Where do I find the printer dialog box to change the setting that asks me to save a file before printing"
    To view the discussion, visit: https://forums.adobe.com/message/7070517#7070517
    >

Maybe you are looking for

  • How do I remove the padlock from my mailbox so that I can receive mail?

    We recently got a new computer and our mail server was changed from outlook express to Thunderbird. For some reason there is a padlock on our mail page, and is not allowing mail to come in from our provider oct.net. when we click the padlock it takes

  • Error message while creating Overwrite exit for a standard class method.

    Hi,    I was trying to create an overwrite exit in class CL_HRTMC_AC_TA_DASHBOARD for method GET_DEVPLAN_ASSESSMENTS. I created an Enhancement Implementation first. But when I tried to insert Overwrite exit method, I got error message that "The class

  • Raise an event from do_prepare_output

    Hi All, I have a requirement where I need to raise an event after having defaulted a value in a dropdownlist field. I'm working on component BT120H_CPL/NewComplEF. Here I have to default a value in the field REFOBJECTTYPE (context node NEWCOMPL). Thi

  • My menu bar is hidden in Safari.  how can I unhide it?

    Recently did a reinstall of Lion and restored with Time Machine.  My menu bar is hidden.  How can I make it show all the time?

  • Out of Memory with InDesign CC

    I have a new computer (ASUS-Windows 8 (I hate it), Intel Core i7-4700HQ [email protected], 16 GB DDRS, 64-bit OS, x64-based processor, 1024 GB 5400 rpm Hard Drive, 256 GB Solid-State Drive). While working in InDesign CC on a 24 page newsletter, I get