|
hi all,
i need to create the report document in landscape or in portrait format...
and i need to print this document according to this document type.....
that is if the document is in landscape format then the printout shout be in landscape....
else if it is portrait then the printout should be in portrait...
i need to do it with asking the user...by print preview...is it possible....
ayyp
|
|
|
|
|
printFont = new Font("Arial", 10);
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
pd.PrinterSettings.PrinterName = printer;
// Set the page orientation to landscape.
pd.DefaultPageSettings.Landscape = true;
pd.Print();
If I am not getting you wrong than this will solve your problem....!!!!
Enjoy
<marquee>nishu
|
|
|
|
|
is it possible to create the document in landscape formate...if so how...?
ayyp
|
|
|
|
|
i want to draw rectangular on a picture box but it goes back the image!!!
how could i draw rectangular on fire with mouse that comes on the image ???
|
|
|
|
|
You're probably using CreateGraphics ? Don't.
You have two options.
1 - draw your own image and draw a box over it
2 - draw a box onto the image itself
If you're trying to draw a selection rect with the mouse, then you need option 1, so you can draw above the image, instead of onto it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I did it , but it goes back of the image.
could u please send a Sample Code about it?
private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
<br />
this.X2=e.X;<br />
this.Y2=e.Y;<br />
<br />
Graphics dc = this.CreateGraphics();<br />
Pen BluePen = new Pen(Color.Blue, 3);<br />
dc.DrawRectangle(BluePen, X1,Y1,X2-X1,Y2-Y1);<br />
<br />
Brush obj_brush=Brushes.Blue;<br />
<br />
dc.FillRectangle(obj_brush,X1,Y1,X2-X1,Y2-Y1);<br />
<br />
<br />
<br />
}
|
|
|
|
|
Please, go back and actually READ my response. NEVER use CreateGraphics unless you know exactly what it does, and it's what you want it to do. CreateGraphics could be used for this selection box, IF you didn't use a picture box. But the picture box is being invalidated, and so your box is being deleted. Either way, I prefer not to use such expensive hacks, I draw it all in my paint method.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
the upper one is the JavaScript code and the lower one in HTML code that I am using in ASPX file for applying the onmouseover functionality on the login button.
Now I would like to use this button (login) as to navicate to some other page (main.aspx ) after clicking it.
Can somone please tell me the function that I should write in the codebehind page (*.aspx.cs) for doing as above................
|
|
|
|
|
You can't. You're using HTML, not server controls, so there's no postback and no event being generated for the code behind. You can do it all on the client, or you can change it to use server controls.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi all, I want to make a tap control on web application, there is a tap control for windows ones but I don't know how 2 do it on web ones,
you can see a sample on www.yahoo.com
thanks allllll
Thanks alot
Hamody
|
|
|
|
|
There isn't one, but it's easy to write one, it's just a control that sets which tab is selected and draws it differently, and draws the others as links. There's probably one on CP.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks a lot for trying to help me, but i didn't understand what you meant by cp, and how i can get a sample for this asked thing ... please try to send me a code sample
Thanks alot
Hamody
|
|
|
|
|
CP == Code Project
this[^] is just the first of many hits I got by searching 'ASP.NET tab' on this very site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello, thanks a lot, it worked well.
But please, i want to enable the client to resize each box -containing the text of each tab- by clicking a button that will resize the appeared selected one,
sorry 4 asking u more questions
Thanks alot
Hamody
|
|
|
|
|
hello,
I try to convert a matlab file into dll
but I can't installize the dll;
my questions are:
1) how can I convert a matlab file to dll that can be installize?
2) can I convert a matlab file into C# file?
|
|
|
|
|
Isn't matlab C++ ? Your best bet for .NET interop would be C++/CLI, there's no way to convert C++ to C#.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I have a datagrid in my form (winform).
I want to add a drop down to few of the columns in that grid.
and the source of all the drop downs is to be XML.
Please help to generate the drop downcombo in the datagrid and to bind that dropdown with a xml.
Thanks ,
Vaishali
|
|
|
|
|
Are u using VS 2.0?
if yes u can use the DatagridView and set a column of type as DropDown.
But i don't know how to bind the column to a xml.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi,
Sorry we are working on VS 1.
can you suggest something else so that
I can add a combobox in the grid,
Thanks,
Vaishali
|
|
|
|
|
ok, then u have to create a datatablestyle in which u have to create a column of type BoolColumn and add that column to the tablestyle and then add this tablestyle to the datagrid.Tablestyles
Hope that works for u.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
hi,
sorry but that is not working,
i mean i not able to generate a combobox in the datagrid.
can you please send me the code snippet..
hoping for a reply..
Thanks,
Vaishali
|
|
|
|
|
I am sorry Vaishali,
actually i thought u want to add a Checkbox column
the earlier post was to add a checkbox column to a datagrid.
I will surely send u the code for the CheckBox column, don't worry
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Here u go,
U cannot directly create a DropDown column in the datagrid, u have either extend the datagrid or create the ComboBox using the template columns.
Here are some links that will help u.
http://www.c-sharpcorner.com/winforms/ComboBoxInDataGridSKJ.asp
http://www.codeproject.com/cs/miscctrl/DataGridZen.asp
http://www.codeproject.com/aspnet/ASPNET_DataGrid_creation.asp
the second one is good and simple
Hope this helps u.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi,
ya thnx....i wll see which one helps me out..
but seems needs to work out on it...
Thanks,
Vaishali
|
|
|
|
|
how i can create a mobile application project in C#?
plz somebody give me an idea with the help of a demo project.thanks
|
|
|
|