.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

I cant adjust e.pagesetting.papersize

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Windows Application

In my project there are three options for papersize...


first A4

second A5

other: custom...

I set up this  value for A4 option in PrintDoc... like this

if radiobutton_a4.checked=true then

W = 826
H = 1169


text to here (for w and h)

text2 to here

end if


I tried this one for second option:

if radiobutton_a4.checked=true then

W = 826 / 2
H = 1169 / 2


end if


It doesnt not change pagesetting, only printble area changehed and texts are messed up.

How i set up papersize in my project unuse pagesetupdialog?






View Complete Post

More Related Resource Links

Mobile Apps: Adjust Your Ring Volume For Ambient Noise


Here's an overview of designing and installing a Windows Mobile app that monitors the noise level in the surrounding environment and adjusts the ring volume of a Pocket PC accordingly.

Chris Mitchell

MSDN Magazine October 2007

SharePoint Excel Web Services - How do I adjust the Zoom Level

Hello, My Organization is using SharePoint 2010 and the Excel Web services module is installed.  The spreadsheet I am using loads perfectly on the page exept for one problem, the zoom level is at about 150% and I can't figure out how to zoom out.  Is there somebody out there that can please help me with this.  Thank you  

Cant adjust Box size in Custom view with Box style implemented in sharepoint



i have a sharepoint view which has boxed style implemented to it. It displayes information in form of two boxes adjacent to each other on the site. the issue i am facing is that the two boxes are of unequal size. The left size box takes enough space and hence the box adjacent box has to squeez in the left over space.

how can i customise those according to  my needs. any help would be appreciated.

Thanks in advance



How do I adjust the word/character limit in Announcement web parts?


So In 2007 there was a default limit of 250 characters in annoucement web parts, that could be adjusted via the "Limit Len=" in designer, but I do not see anything close to that in 2010 and that limit is simply too small for real use.

I have the following text "Items focused on helping you develop and implement strategies are included on this page.  If you are looking for either the Strategic Solutions Team (SST) or the Sales Resource Hub...you found it!  We will continue to refine and add materials to Strategy to help you win...period!"

That gets cut off with half a sentence to go.  Honestly, who is the genius who put such a small limit on this web part and then removed the only way to adjust it via designer? 



Where to adjust Utils Project app.config



I have a work flow exposed as service (developed in WF4 vs2010) which calls a method from "Utils" project (a c# class library) in same solution. This "Utils" project calls a webservice exposed by client for entities Upsert/Get method. It works fine on local machine when i deploy it on iis. But when i deploy it on another machine and test it in SOAPUI it gives not found 404 error.

When i added client service reference in my local dev env it generated a app.config in "Utils" project and when i made deployment package it was not included in it. Is it due this that my service is not working.


This is the exception i get in SOAPUI after deployment:


               <StackTrace><![CDATA[at System.ServiceModel.Activities.WorkflowOperationContext.HandleEndResumeBookmark(IAsyncResult result)
   at System.ServiceModel.Activities.WorkflowOperationContext.OnResumeBookmark()
   at System.ServiceModel.Activities.WorkflowOperationContext.ProcessRequest()
   at System.ServiceModel.Activities.WorkflowOperationContext..ctor(Object[] inputs, OperationContext operationContext, String operationName, Boolean performanceCountersEnabled, Boolean propagateActivity, Transaction currentT

How do I adjust the # of posts visible on the main page of a blog? Summary view?


So while I love the basic summary view used by the blog, I would like to limit the main page to showing just the 5 most recent updates.  Most views this is easy to edit by adjusting the item limit on the list, but since the Summary view of the posts list doesn't show up anywhere I am unsure where I can set the limit.

I have looked at the editable views in designer but again I do not see the Summary view listed anywnere.  Help


Does Dictionary adjust initial Capacity to a quantum value


Dictionary<K, V> will automatically resize when needed. Presumably, the Capacity values it uses are in monotically increasing values determined by some algorithm, and thus one can assume that all dictionaries size up on these boundaries. Our system uses lots of Dictionaries, some of which get quite large and end up in the Large Object Heap. But because they all currently grow from 0, I assume (based on memory profiling) that I am allocating always exact sized chunks from LOH. so in practice, this never leads to a seriously fragmented LOH because all the allocated blocks are exact even multiples of some basic value.

I want to enhance the system by using the initial Capacity constructor based on an estimated capacity. But my big worry is that it will allocate that exact amount, and that this will therefore lead to serious fragmentation of the heap. List<V> provides an explicit Capacity property, so I could experiment with that collection to determine its behavior, but Dictionary does not provide any access to its current capacity. Does anyone know about this? Basically I want to know if when I request the initial Capacity in the ctor, will it actually round that up to one of its magic values that I would have hit had I increased its contents one by one; or is it going to just request that exact amount of capacity?

How to adjust distance between lines in FlowLayoutControl


In designer:

I put two group boxes into a FlowLayoutPanel and set first group box as 'FlowBreak'.

I found the distance is to long between to controls after I set FlowBreak property.

How can I solve it.


How to adjust distance between lines in FlowLayoutControl


In designer:

I put two group boxes into a FlowLayoutPanel and set first group box as 'FlowBreak'.

I found the distance is to long between to controls after I set FlowBreak property.

How can I solve it.


Adjust document permission based on custom property-field (owner person or group)


I would like to setup a workflow so everytime a user adds a new document to a document library the workflow adjusts the documents permissions.

I've added a new field to the document library settings which I called "Owner". This field searches persons or groups in the active directory. The person of group that I fill in here has to get contribute-permissions for this document. This process needs to be automatic so I think I have to build a workflow.

Who has got experience with this? Who can help me? Can I do this with the Sharepoint Designer?

The system we use is a sharepoint server WSS3.0

WPF Rich Text Box Width size adjust to text?


I am hoping to adjust the width of a custom watermarked rich textbox to match the length of the text. So, basically as you type the border area around the textbox grows also. (very similar to when you share a message on Windows Live messeenger). The only idea I can think of is have a custom converter to keep modifying the width on text change. In this apporach how do I measure the width of the text. Any suggestions how to make this easier or possible. Code snippets of XAML are shared below.

I am hoping to keep the textbox and small dropdown menu use auto and not size to content.


     <Style x:Key="UserRoleCommentBoxStyle" TargetType="{x:Type local:MyRichTextBox}">

            <Setter Property="SnapsToDevicePixels" Value="True" />

            <Setter Property="OverridesDefaultStyle" Value="True" />

            <Setter Property="AllowDrop" Value="True" />

            <Setter Property="Margin" Value="0" />

            <Setter Property="FontSize" Value="10px" />


PageSetupDialog does not keep PaperSize



I have a solution in C# and I open PageSetupDialog. No matter what paper size I choose after I close the PageSetupDialog in PageSettings the PaperSize is the default one for the printer. Is this a bug? Can I do something besides creating my own PageSetupDialog?



Adjust application window size per screen resolution on different computers


I have built an  application which calls two dialog boxes defined in a .rc file.

When this application was run on a computer with a screen resolution of 600 x 800

the dialog boxes were not fully displayed.  How can I automatically adjust for different screen resolutions?

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