.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ProcessStartInfo.WindowStyle as a hidden window - not working for PDF/DOC

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :.NET Framework

Hi All,

 I am a newbie to C#. I am trying to print multiple PDF and DOC files using "Process" component. And i would like to print these documents in a background process (that is without opening the PDF/DOC windows).

I found a relevant MSDN article (http://msdn2.microsoft.com/en-us/library/system.diagnostics.processstartinfo.windowstyle(VS.71).aspx).

And i have tried to open the PDF and DOC files in a hidden window and print it. But the relevant Acrobat Reader/Word window doesn't seem to be hidden.

Am i missing something???I am using VISUAL STUDIO.NET 2003, C#. Please find below is the test script (that i tried).

 Any help/suggestions would be highly appreciated.


public void PrintDoc()




ProcessStartInfo PDFstartInfo = new ProcessStartInfo("Acro

View Complete Post

More Related Resource Links

Menu doesn't popup when WIndow style set to AllowsTransparency="True" WindowStyle="None"

Hi,I'm facing an issue, when using Window style set to AllowsTransparency="True" WindowStyle="None", my menus in menubar doesn't popup, rather they gets hidden (not visible) and if you just click by guess then menu item will be executed, its just that menu item is not shown visisble.However, if I revert back the Window style to normal without Transparency then menus visible(popup) perfectly.I'm not sure what could be an issue?San

Indexing services on window server 2008 is not working with .net

Hi, I am useing Microsoft indexing services in windows 2008 64 bit .I am getting error like "Exception from HRESULT: 0xC0000005" while i am createing  new catlog from .net 2.0.I am using  "ciodm.dll" for adding new catlog. i am using this code for create new catelog.   Dim Admin As New CIODMLib.AdminIndexServer   Admin.AddCatalog(varContractNo, txtCatelog.Text + "\" + varContractNo) Admin.Stop() Admin.Start() AddScope(txtDocFolderPath.Text, txtSite.Text, txtCatelogname.Text)   Please help me anybody have fixed this issue on window server 2008 64 bit.  

window.open not working in IE 7

Hi All,Window.open is not working in IE 7.It is working fine in fiefox.On doing google it was found that it happens due to space between words in title of window or URL.Even after i removed space between words in window title it is still not working.Any idea or clues would be highly appreciated.thanks in advance for replying(as always).Regards,Manish.

What event (if any) is fired on calling ShowDialog on hidden window

I initialize a window at the launch of my application and hide it, so that when the user needs to launch it I can quickly show it. I am using showDialog to show the window. I use this window at multiple places. So when the user is done using the window I again hide it. My question is how does the window know that it is visible. 'Loaded' event is no longer fired when I can ShowDialog to show the window. ('Loaded' event is fired the first time I create the window and hide it). Is there any other event that is fired on calling 'ShowDialog' on a hidden window? Thanks for your response.  

click a button to pop up new window to pass a value; is working on second click onwards


Hi all,


i am facing a problem to make a button onclick to pop up a new window with pass a value. it only working on second click on onwards.

i check the checkbox from a table then pass the ID for each data to another page.

below is my coding: hope anyone can help me. this is i add in button click; the PIID is a value i want to pass


 Protected Sub btn_download_in_excel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_download_in_excel.Click


        Dim keyID As String = ""
        Dim CheckedItems As SortedList = ViewState("CheckedItems")
        Dim ChkBxIndex As String = ""
        Dim strPsId As String = ""
        Dim PIID As String = ""
        Dim rows() As DataRow

        Dim CheckedItemsKeys As ICollection = CheckedItems.Keys
        Dim keys As IEnumerator = CheckedItemsKeys.GetEnumerator

        While keys.MoveNext
            If Not IsNothing(CheckedItems) Then
                ChkBxIndex = keys.Current
                keyID = ChkBxIndex

                rows = pLookupDataSet.Tables("CCL_TB_PART").Select("PIID = " & Cmn.QStr(keyID))

                If String.IsNullOrEmpty(PIID) Then
                    PIID = keyID

Find window is hidden behind some other window when floating



I don't know what I did, but my Find dialog is hidden behind some other window when floating.   After I open find window, I can type "ffrwe2t4rtgf" and it'll come and tell me that "ffrwe2t4rtgf" is not found, but I can't see the find window.

Only way I can see it is to go to Windows then click on "Tabbed Document" then find window will show as a tabbed document.  But I'd like it to behave in its default behavior, which is floating dialog.


Anyone have any idea how to resolve this issue?


Thank you in advance!

POP up window not working properly in internet explorer


Hi ,

Developing a asp.net c# web site.

I need to open a popup new window when the user clickes a link button.

The following code is written in the click event of the link button.

ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( 'Instructions.aspx', null, 'height=400,width=600,status=yes,toolbar=no,menubar=no,location=no' );", true);

Works fine with firefox. When I try to open this in internet explorer it does not allow to maximise the pop up window ( The maximise is disabled)

I also tried without giving the height and width of the pop up window. But it also failed. Code is as follows.

ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( 'Instructions.aspx', null, 'status=yes,toolbar=no,menubar=no,location=no' );", true);

Any suggestions will be greatly helpful.


Window.open is not working in safari browser



          I m working popup window , its working well in IE and Firefox. But it is not working well in safari browser. Please see my code snippet below,

<script language="javascript" type="text/javascript">
    function CallPrint1(url) {
        var popup = window.open('', 'popup', 'toolbar=no,menubar=no,height=490px,scrollbars=yes,resizable=yes');
        return false;

 And in safari browser settings "Block pop-up windows" -

 if disable "Block pop-up windows" in safari browser,  popup is working well ,

 if i enable "Block pop-up windows" in safari browser, popup is not working well in safari browser

i wants to display popup in enable &a

window.location='test.aspx' not working on mobile website


Hello frds,

I'm having one problem in mobile website using jquery.

i have written a code on button click to redirect using window.location='test.aspx' it doesn't work event my javascript validation is also not worked. how to explain if your in other country give error 406 forbidden access is deny.



Working with Ranking Window Functions

As the name suggests, ranking functions let you rank the rows in your result set based on specified values in those rows. SQL Server supports four ranking functions:

ROW_NUMBER: Assigns a sequential number to each row in the result set.
RANK: Ranks each row in the result set. If values in the ranking column are the same, they receive the same rank. However, the next number in the ranking sequence is skipped.
DENSE_RANK: Ranks each row in the result set. If values in the ranking column are the same, they receive the same rank. The next number in the ranking sequence is then used to rank the row or rows that follow.
NTILE: Divides the result set into the number of groups specified as an argument to the function. A group number is then assigned to each row identifying which group the row belongs to.

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Tab container rendered with visibility:hidden - This was reported over three years ago.



Here is (more) code that demonstrates the issue.  If the control in the host page is removed the tab control renders correctly.  Otherwise it is rendered with the visibility attrubute set to hidden as reported in the above link.  Is this broken or am I doing something wrong?



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="S2.aspx.cs" Inherits="S2" %>
<%@ Register Src="~/SelectorPatternControl.ascx" TagName="TestControl" TagPrefix="sam" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></cc1:ToolkitScriptManager>

lossing focus from model pop up window controls


hi i using a model pop up window with some textbox but when i click on textbox of model pop up focus move to back to page textbox control plz help me 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend