我正在尝试从代码打印到网络打印机,但打印对话框中的网络打印机状态显示Access denied, unable to connect并且打印按钮被禁用.但是如果我从另一个应用程序打印,我可以打印到该打印机.而且,如果我从打印对话框中选择"打印到PDF",那也可以正常工作.我只是无法打印到网络打印机.我有某种权限问题吗?
if (File.Exists(previewDocument))
File.Delete(previewDocument);
PrintDialog printD = new PrintDialog();
printD.PageRangeSelection = PageRangeSelection.AllPages;
printD.UserPageRangeEnabled = true;
if (printD.ShowDialog() ?? false)
{
XpsDocument xpsDoc = new XpsDocument(previewDocument, FileAccess.ReadWrite);
XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
xpsWriter.Write(((IDocumentPaginatorSource)messageFlow).DocumentPaginator);
FixedDocumentSequence fixedDocSeq = xpsDoc.GetFixedDocumentSequence();
printD.PrintDocument(fixedDocSeq.DocumentPaginator, "Hello!");
}
Run Code Online (Sandbox Code Playgroud) 为什么菜单下拉隐藏在jQuery按钮后面?

div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
position: relative;
z-index: 9999;
}
Run Code Online (Sandbox Code Playgroud) 我正在研究WPF应用程序,我需要一种方法来获取应用程序中的所有打开的窗口,包括从另一个线程打开的窗口.我尝试过,Application.Current.Windows但这并没有给我从另一个线程打开的窗口.甚至可以访问另一个线程打开的窗口?不应该所有窗口都在同一个应用程序域中吗?
谢谢.
我正在尝试将Web应用程序部署到Windows 2012 Server,但Crystal Report Viewer无法在服务器上正确呈现; 但它在当地工作得很好.
我的web.config文件有正确的晶体标签:
<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"></section>
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true" />
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="/crystalreportviewers13" />
</crystalReportViewer>
</crystalReports>
</businessObjects>
Run Code Online (Sandbox Code Playgroud)
我在用: