|
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"?
|
|
|
|
|
I have a problem when sending mail with SMTP protocol, if I want to send mail and the sender address is a hotmail or yahoo I can not send only with gmail account
|
|
|
|
|
Unfortunately those are the rules of the game; if you wish to send via the gmail server then you need a gmail account.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Think about it for a second..
Why would Google waste electricity (time, money) on sending emails from competing services?
Bastard Programmer from Hell
|
|
|
|
|
i need a code for a 1 player die game..thanks!
|
|
|
|
|
Wonderful. Well good luck with that. Let us know how you get on with someone else doing your thinking for you.
Can you manage this breathing thing by yourself, or do you want some help with that?
|
|
|
|
|
Here is a link to a one player die game[^]
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Here ya go:
public static class Template
{
private static readonly System.Random randy = new System.Random() ;
private static string
Prompt
(
)
{
System.Console.Write ( "How many dice? " ) ;
return ( System.Console.ReadLine() ) ;
}
[System.STAThreadAttribute()]
public static int
Main
(
)
{
int result = 0 ;
try
{
string s = System.String.Empty ;
int i ;
while ( ( ( s = Prompt() ) != null ) && System.Int32.TryParse ( s , out i ) )
{
for ( ; i > 0 ; i-- )
{
System.Console.Write ( "{0} " , randy.Next ( 6 ) + 1 ) ;
}
System.Console.WriteLine() ;
}
}
catch ( System.Exception err )
{
System.Console.WriteLine ( err ) ;
}
return ( result ) ;
}
}
That wasn't so hard was it?
|
|
|
|
|
I am trying to bind a DataTable to MSChart using more than one Y value, I'd appreciate anyone pointing me in the right direction, an example, etc. Also, I need to bind the data not just add a point.
this.chart1.Series[strSeries].Points.DataBindXY(
dt.Tables["X"].Rows[nRec]["A"]), // X Value
dt.Tables["X"].Rows[nRec]["B"]), // Y Value
dt.Tables["X"].Rows[nRec]["C"]), // Y Value
dt.Tables["X"].Rows[nRec]["D"]), // Y Value
dt.Tables["X"].Rows[nRec]["E"]) // Y Value
);
I tried this and many other ways
this.chart1.DataSource = dt.Tables["X"];
this.chart1.Series[strSeries].XValueMember = "A";
this.chart1.Series[strSeries].YValueMembers = "B";
this.chart1.Series[strSeries].YValueMembers = "C";
this.chart1.Series[strSeries].YValueMembers = "D";
this.chart1.Series[strSeries].YValueMembers = "E";
this.chart1.DataBind();
Thanks in advance,
Michael
|
|
|
|
|
I have a project im working on, im trying to learn VS C# and i have chosen one of my old vb6 projects as a strating point.
I have downloaded the Aircraft instruments.net file
www.codeproject.com/Articles/27411/C-Avionic-Instrument-Controls
from this site as it provides me with the form controls i require. unfortunately the sporting chap who uploaded this fine code has not left any means of contacting them
my question is this how do i get from this demo program to actually adding the components from this application to the toolbox for use in my application
i have tried to google it but i dont really know what im looking for to find the solution.
If its not too much to ask could someone also please help me with parsing a text string which uses characters for heading (H) pitch (P) and roll (R) etc eg H124.5P0.1R0.0 where the first character is the start point and the next in line being the end character thus parsing the data from the string for each data block. again no look in finding a suitable example in c#
Thank you in advance
Regards
Jason
|
|
|
|
|
JTmetoo wrote: has not left any means of contacting them
Ummm, no. There is a forum for the article, which you have posted to. Whether the author responds is another matter.
Failure is not an option; it's the default selection.
|
|
|
|
|
|
how can we use #pragma omp directive in c# vs 2010??
|
|
|
|