|
How can I print to the printer some text and increment any time I print
more text.
my code:
private void printDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
ePrint.Graphics.PageUnit = System.Drawing.GraphicsUnit.Millimeter;
// this go to metoda and return an object PrintPageEventArgs e
MiddleTable mTable = new MiddleTable(e);
mTable.PrintMiddleTable();
TopTable tTable = new TopTable(e)
tTable.PrintMiddleTable();
}
/////////////////
This is the code that will be printing in any page
I want to put him (e) in an obj - because it will be not change.
but when I print I whant to take this obj and add to him another text
I want that the code will not repeat on top will not repeat.
|
|
|
|
|
Hello everyone,
My problem is that I want to -simply- write selected images to CD/DVD in my app.. I searched for the xp burn area but found nothing (you know, you can say "burn this" to any folder and XP copy this file/folder to a burn area)..
Also the nero sdk may be too complicated..
What can I do to accomplish this task
Best regards..
.:: Something is Wrong ::.
|
|
|
|
|
Would someone please help me with this problem:
I have an expando on my MainForm that takes care of my menu, and I also have a MenuBar on the same form that also provides shortcuts to the items in the expando. After using the expando for a while, I then use the MenuBar and then suddenly my system crashes and an error: "Handle is not initialized " appears. (The expando and MenuBar sometimes call DataSets)
Mvelo Walaza
Visual C# Programmer
Nelson Mandela Metropolitan University
Port Elizabeth, South Africa
+27 729264095
|
|
|
|
|
What do your try catch blocks have to say about the whole thing?
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
What is the code to find out the number of pixels contained in an image and what is the code needed to draw a histogram.
tony-yeyo
|
|
|
|
|
diddy34 wrote: What is the code to find out the number of pixels contained in an image
width * height
diddy34 wrote: and what is the code needed to draw a histogram
Loop through the pixels, calculate the value that you want the histogram for (for an example intensity), and count how many there are of each value. Draw a diagram from the count.
---
b { font-weight: normal; }
|
|
|
|
|
Simple counts don't graph nicely :p
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi All,
I am having MFC ActiveX control which gives the graphical environment
I want to build the same control in C# ActiveX control.
I can use class library with user control to implement this but the problem is that the existing control is using many supporting libraries and included some .h files.
I can rewrite the basic code written in control but what should i do about the supporting libs and .h files.
OR
Is there any way u can suggest me to convert the existing control to the user control in C# and i can use the existing .h files as it is.
Gajesh
Pune(India)
|
|
|
|
|
Hi I faced a problem when converting for VS2002 to VS2005.
'Cannot declare variable of static type 'System.IO.File', because i declare an instance variable of this Type in my Old Code.
When i look in detail, the defination of System.IO.File has been changed
Previous Defination : public sealed class File : System.Object Member of System.IO
New Defination : public static class File : System.Object Member of System.IO
Does any body have solution, i cannot change my code,because its lot of code.
I wonder Why Microsoft Did this.
Regards
|
|
|
|
|
Microsoft provides two versions of the class now. File exposes its methods entirely static and FileInfo exposes instance methods. Both provide the same functionality, just in different ways.
In any case, you'll have to modify your code. You simply don't have a choice here, since you can't create an instance of a static class.
You'll have to do a Find/Replace and change your instances of File to FileInfo.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Generally true, but both classes existed already in 1.1. The reason that MS didn't make File static in 1.1 is simply that the operator didn't exist in that version.
|
|
|
|
|
I think he's a bit confused. He says he's using VS 2002, which is .NET 1.0... He could have used 1.1 with it, but I doubt it he's got it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Why have you declared a field of type File? You cannot instantiate it (as there is no public constructor) so what are you doing with it?
|
|
|
|
|
Do we need to register everytime we install in different machine or is it enough for me to register once in one machine and then by using the same registration can i generate new registration key so as to install visual studio 2005 in multiple machine..
|
|
|
|
|
Can anybody help in getting the node name and node value from a XML to two arrays
that is nodename in one array and node value in another array. even if there is no value for a particular node then also the array of the nodename should be there in one array and the other array should be empty.
Vipin
|
|
|
|
|
Hi,
I wrote down an example with 2 array lists that contain the name and the values of the nodes. It is very important that in this case the XML should be like this:
<XMLStart>
<Node1>value1</Node1>
<Node2></Node2>
</XMLStart>
I hope it fits your needs.
<code>
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlstring);
doc.Load(xmlfile);
ArrayList nodeName = new ArrayList();
ArrayList nodeValue = new ArrayList();
XmlNodeList list = doc.DocumentElement.ChildNodes;
foreach(XmlNode node in list)
{
nodeName.Add(node.Name);
nodeValue.Add(node.InnerText);
}
</code>
-- modified at 7:24 Wednesday 9th August, 2006
Do your best to be the best
|
|
|
|
|
Hi,
Is there any way to write text from right to left with DrawString method?
I want print bill and I want align amounts of bill items to right side. The amounts length are not equal so some amount strings are not quite on right side, some strings are too long and are out of bounds.
How can I do this?
Sorry my english.
Thanks,
Jure
|
|
|
|
|
You might want to have a look at StringFormat which helps you provide the alignment of the string while using DrawString()
Every bit counts
|
|
|
|
|
got a small problem here with treeview.
i have 2 levels of nodes, servers with sub folders.
if i select a sub folder and double click on the expand/collapse node of a different server, my form thinks i'm double clicking on the subfolder.
how do i seperate this? i've tried TreeView.GetNodeAt(x,y) but this still doesnt do what i want.
suggestions?
thanks
|
|
|
|
|
how could i set a button without any border?!!
thanks
|
|
|
|
|
Hi,
From your question, it is not clear that what kind of application are you using. If it is an ASP.NET application, you can set the look and feel of the control by setting the appropriate css class. You may need to write appropriate style sheet class for this.
If it is a Windows based application, you can set any of the options available in the propertly window.
--Rakheesh
|
|
|
|
|
if it's not in the borderstyle options, I guess you'll have to do an ownerdraw on your button...
|
|
|
|
|
Hi,
Try to make FlatStyle flat and then in the FlatAppearence make BorderSize 0
.:: Something is Wrong ::.
|
|
|
|
|
Hi guys,
I have several classes in my business layer that utilize a data access class. It's always the same class.
I recently started using a superglobal (that's what they call it here), which is no more than a static variable in a static class that is initialized at startup. All classes now utilize the superglobal data access class instead of their own instance.
I know, it sounds like VB modules, but I'd really like to simplify my coding.
Could this pose a problem that I haven't seen or considered yet? Should I rather be using a Singleton?
TIA for your ideas
|
|
|
|
|
LievenDoclo wrote: Could this pose a problem that I haven't seen or considered yet? Should I rather be using a Singleton?
So all you have is something like this:
public static class SuperGlobals
{
public DalClass OnlyDalInstance;
static SuperGlobals()
{
OnlyDalInstance = new DalClass();
}
}
Personally, I'd have gone for the singleton solution because then the DalClass (or whatever you happen to have called it) will be responsible for its own creation - a much better OO solution in my opinion.
What appears above still means that something can create its own DalClass instance. The singleton pattern would eliminate rougue instances.
|
|
|
|