|
Dan_K wrote: and second for the whole panel which causes the whole panel to be drawn again
Are you invalidating the (entire) grid?
Can you post the painting code?
Bastard Programmer from Hell
|
|
|
|
|
i want to know remote network interface type & macaddress
|
|
|
|
|
|
Hi there,
Really stumped with being able to Print an envelope from my C# WinForms application.
At the moment we print from Word with the document size/type set up as a C5 or a DL envelope. When printed the printer will request a C5 or DL envelope to be placed into the manual document feeder before printing.
I want the application to be able to do the same but at the moment I am having no luck. Here is the code I am using:
Code:
aPD.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
if (radSizeDL.Checked)
{
aPD.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("DL Envelope", 220, 110);
aPD.DefaultPageSettings.PaperSize.PaperName = System.Drawing.Printing.PaperKind.DLEnvelope.ToString();
}
else
{
aPD.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("C5 Envelope", 229, 162);
aPD.DefaultPageSettings.PaperSize.PaperName = System.Drawing.Printing.PaperKind.C5Envelope.ToString();
}
aPD.DefaultPageSettings.Landscape = true;
aPD.OriginAtMargins = true;
aPD.PrinterSettings.Copies = Convert.ToInt16(numCopies.Value);
aPD.Print();
I am quite happy to upload the code for anyone to see if they can help me?
Please help!
Thanks.
|
|
|
|
|
Crosspost
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
|
What that means is that someone using the exact same name as you posted the exact same question Printing Envelopes from Manual Feed[^]. It's called cross posting.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Whats the point in having a site with two places to ask questions if you cant post in both of them though? Surely now with this "Crosspost" I am exposing the question to more viewers and potentially a faster answer.
I find that posting an answer of "Crosspost" is blantant vandelism of a post and would detract a user from replying to me as I appear to have broken some kind of Code Project rule.
I should admit just now and accept sentance: I have posted the same question on many different forums all over the Internet. I would imagine that this might also be punishable under your strict penal code?
Jeez! All I want to do is finish the last bit of my project...
/rant
|
|
|
|
|
tip2tail wrote: would detract a user from replying to me
As a matter of fact, you cross posting this question is more likely to get your question not answered more than my pointing out that you are cross posting.
tip2tail wrote: punishable under your strict penal code
It's not my penal code as you say. It's called being a good net citizen and having some manners. There is a god reason cross posting is frowned upon.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
It's not my penal code as you say. It's called being a good net citizen and having some
manners. There is a god reason cross posting is frowned upon.
So what is this devine reason that it is frowned apon!
|
|
|
|
|
|
|
Hi everyone! I have a panel that contains a list of panels modeled as sheets of paper. The background panel has AutoScroll set to true and scroll bars appear. However, when I try to scroll using the middle-button (mousewheel), scrolling does not occur. Any way of solving this problem? Thanks in advance.
|
|
|
|
|
Never done that, however a Panel in AutoScroll mode has HorizontalScroll and VerticalScroll properties that yield the scrollbars; these have an OnMouseWheel event, so that is the way I would go.
|
|
|
|
|
Luc, I trapped the MouseWheel event but that part of the code did not execute. I installed the event handler this way:
SheetsBackground.MouseWheel += new MouseEventHandler(MouseWheelEventHandler);
I defined the event handler as follows just to know if it will execute.
private void MouseWheelEventHandler(object obj, MouseEventArgs mea)
{
MessageBox.Show("Mousewheel event handled.");
}
However, the event handler was not called. I thougt it will even work without trapping the mousewheel event. Now trapping it does not seem to work as well.
|
|
|
|
|
There could be an issue about selection/focus: which control has focus? only the one with focus will get events delivered. That must be why clicking/dragging the scroll bars works just fine, whereas the MouseWheel doesn't. You may have to set MouseWheel event handlers (could be the same one over and over) for a lot of controls there...
|
|
|
|
|
Hello -
The LA times page has a 2 move mate problem every Sunday.
I was trying to use Jacques Fournier's chess program to solve it, but I can't get down to the initial position.
Is there another way to set that up?
|
|
|
|
|
If you are referring to this article: Chess Program in C#[^], I think you best chance to get an answer to your question is if you ask the question at the article.
Use the "Add a Comment or Question" button at the end of the article to post your question, this will cause a message to be sent to the author. He/she will be alerted that you wish to speak to them, and can choose to respond.
0100000101101110011001000111001011101001
|
|
|
|
|
That's exactly what I did - but I can't see a way to send it directly to Mr. Fournier privately.
Maybe you know a trick? Every other message system I have used has a box that says : "Reply privately."
Besides, maybe some one else might know the answer, since he hasn't been on this message board in quite some time.
|
|
|
|
|
Thay program has a "Design Mode" item in the Edit menu; use it to set up a starting position, then let the program play one or both sides and watch the show.
PS: You really shouldn't need a program to solve a two-move mate...
|
|
|
|
|
The two move mate puzzles are very complicated, and I want to use the program to verify that my puzzles have only ONE solution. Since I am not a Grandmaster, I need to rely on a program to make sure it's correct.
When I try to start the position from "design" mode, it starts from scratch with all 32 pieces, and wipes out my setup. Maybe you know a trick to get around this? I can't find it.
|
|
|
|
|
You are the composer of the LA Times puzzles?
Where can I see some of your puzzles? (I don't have access to the LA Times)
I was able to set up a position, by clicking a piece (or the empty field) in the top right pane, then clicking the board cell(s); the program solves the 2-move mate I entered.
There are a lot of free chess programs around, Rybka is one. And I expect all of them are capable of solving mate puzzles.
|
|
|
|
|
I didn't compose those, but you can get the LA times on-line under www.LAtimes.com. Today's puzzle is on page E13. Bill Cornwall writes very good articles.
The answer appears on the following Sunday, and last week's answer appeared today. You can also scroll back issues.
|
|
|
|
|
Hi
I need help in coding a login form that detects employee password and allocates them to department...I have the stock form, production form, sales form and managers form.
|
|
|
|
|
"detects"?
|
|
|
|