|
Tried to look for at the LargeChange / SmallChange value properties of HorizontalScroll?
Because one "step"/"delta" of my mouse wheel is +-120 and maybe this differs from the Large/SmallChange values.
Greetings
Covean
|
|
|
|
|
The values for SmallChange (=5) and LargeChange (=995) don't seem to have anything to do with mouse wheel scrolling.
They are used for scrolling on mouse click or keyboard hit, IIRC. At least, my problem persists with both values set to 120, which equals MouseEventArgs.Delta on my system, too.
Ciao,
luker
|
|
|
|
|
Last 3 ideas of mine:
1. Take a look at the 5 AutoScroll values of your panel.
2. I would look at every place where you access the scrollbar.
3. Set a conditional breakpoint (on change) at the scroll value to find out where the gets changed.
Hope this helps.
Greetings
Covean
|
|
|
|
|
I'm afraid my code was not as clear as possible.
The behaviour I described is generated by this code, too:
protected override void OnMouseWheel(MouseEventArgs e)
{
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
{
int iHorizontalPosition = HorizontalScroll.Value;
iHorizontalPosition += e.Delta;
if (iHorizontalPosition < HorizontalScroll.Minimum)
iHorizontalPosition = HorizontalScroll.Minimum;
else if (iHorizontalPosition > HorizontalScroll.Maximum)
iHorizontalPosition = HorizontalScroll.Maximum;
HorizontalScroll.Value = iHorizontalPosition;
}
}
What could cause the described behaviour?
And how do I scroll MyPanel horizontally in a satisfactory manner?
Ciao,
luker
|
|
|
|
|
Hello again,
I did some testing. As you can see in this piece of code,
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
{
int iHorizontalPosition = HorizontalScroll.Value;
if (iHorizontalPosition != m_iSavedHorizontalPosition)
{
;
}
HorizontalScroll.Value = iHorizontalPosition;
m_iSavedHorizontalPosition = iHorizontalPosition;
}
the method remembers m_iSavedHorizontalPosition (a MyPanel member variable) after applying it to HorizontalScroll.Value. On the next call the method compares the saved member variable with the value of HorizontalScroll.Value.
They differ.
Do I have to call some "ApplyScrollSettings"-method on MyPanel for HorizontalScroll.Value to take effect?
Ciao,
luker
|
|
|
|
|
Hello!
I am using the windows context menu. My problem is that when i select multiple files the application will open as many times as selected files.
In HKEY_CLASSES_ROOT\*\shell i have a key with the shortcut to my app and %1. Should the "%1" parameter be changed?
Using the "SendTo" and creating a shortcut to the application will work as i wish, but how can i make it work the same way "SendTo" works for the context menu?
I hope i made myself understood. I know this is more of a windows problem and not a C# one.
Thanks!
|
|
|
|
|
Islorvat wrote: I am using the windows context menu. My problem is that when i select multiple files the application will open as many times as selected files.
Windows will launch a new process for each item, each process with a single parameter pointing to a file. You'd have to make sure that your application is launched just once, and collect the parameters from the other instances there.
This[^] article might help
I are Troll
|
|
|
|
|
I have a date fields on my MS Report. If the date is blank or null, I do I suppress the date so It doesn't show 01/01/0001 on my report.
Thanks!
|
|
|
|
|
What you need to do is to tweak your query so that the date field shows whatever you want in the way you want. There are built-in functions for this.
|
|
|
|
|
If the user has typed an invalid entry, so that CellValidating raises an error, and they then decide to abandon the edit and want to click the Cancel button, the form won't close because the eror still exists. Error needs to be cleared first.
I just can't work out a way to achieve that, short of teaching the user that if they click Cancel, and the form doesn't close, press Esc so text reverts to original and then click Cancel again. Not ideal.
|
|
|
|
|
I know it's pretty old but I faced the same problem and wanted to ask if you managed solve it or not?
Even setting CausesValidation property of the close button doesn't work. What have you done to work around the issue?
Thanks a lot.
|
|
|
|
|
As far as I can remember I didn't solve the problem. User must press Esc to cancel the edit before doing ANYTHING else. You notice no-one offered a solution.
|
|
|
|
|
Thanks for replying. I saw no one replied but thought you may have devised a work around.
The behaviour isn't good. Close button is close button afterall. Anyways thanks for your time.
Cheers!
|
|
|
|
|
Dear All,
I am using following statements to create a view [query] in Access 2003 but i am getting an error which states "Operation is not supported for this type of object"
query="create proc vw_getCommunityMember as SELECT CommunityMember.CommunityMemberID, CommunityMember.CommunityID, zPosition.PositionID, CommunityMember.MemberName, CommunityMember.Age, CommunityMember.FamilySize, CommunityMember.MemberName_Dari, zOccupation.Occupation, zLiteracyLevel.LiteracyLevel, zLeadershipCategory.LeadershipCategory, zIncomeStatus.IncomeStatus, zGender.Gender, zPosition.Position, CommunityMember.isSyn, CommunityMember.IncomeStatusID, CommunityMember.OccupationID, CommunityMember.GenderID, CommunityMember.LiteracyLevelID, CommunityMember.LeadershipCategoryID, IIf(IsNull([CommunityMember].[ElectionPeriod]),1,[CommunityMember].[ElectionPeriod]) AS ElectionPeriod FROM zPosition RIGHT JOIN (zOccupation RIGHT JOIN (zLiteracyLevel RIGHT JOIN (zLeadershipCategory RIGHT JOIN (zIncomeStatus RIGHT JOIN (zGender RIGHT JOIN CommunityMember ON zGender.GenderID = CommunityMember.GenderID) ON zIncomeStatus.IncomeStatusID = CommunityMember.IncomeStatusID) ON zLeadershipCategory.LeadershipCategoryID = CommunityMember.LeadershipCategoryID) ON zLiteracyLevel.LiteracyLevelID = CommunityMember.LiteracyLevelID) ON zOccupation.OccupationID = CommunityMember.OccupationID) ON zPosition.PositionID = CommunityMember.PositionID ORDER BY zPosition.PositionID;";
cmd.CommandText=query;
cmd.Connection=con;
cmd.CommandType= CommandType.Text;
cmd.Transaction=t;
cmd.ExecuteNonQuery();
the error is not that much clear for me. any idea what the error states?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
are you sure that your statement is correct? I thought it must be "CREATE PROCEDURE". But more important is that the JET-Engine (which you propably use) does not support procedures. So take a look here:
http://office.microsoft.com/en-us/access/HP010322191033.aspx[^]
So you got several options:
1. Do not use a procedure (you are doing a simple select, right?)
2. Use another database which provides support for procedures (and a bigger amount of data)
3. Do not use the JET-Engine to create your procedure
Regards
Sebastian
|
|
|
|
|
thanks alot from your answer,
i sorted it out, there is a key word in my select statement, I used to put all Column names in brackets [] and now its working.
thanks, changing data provider is not the option.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Im trying to develop an app which is kind of like a smaller custom 'taskbar' i cant seem to find a way to shrink down the desktop area, essentially reserving 32 pixels from the top of the screen so maximized apps do not hide it/app does not hide app titlebar. Any suggestions would be greatly appreciated.
|
|
|
|
|
damianrda wrote: Im trying to develop an app which is kind of like a smaller custom 'taskbar' i cant seem to find a way to shrink down the desktop area, essentially reserving 32 pixels from the top of the screen so maximized apps do not hide it/app does not hide app titlebar
Something like this[^]?
I are Troll
|
|
|
|
|
Great, just what i was looking for... ty!
|
|
|
|
|
You're welcome
I are Troll
|
|
|
|
|
Hi all, i wondering of how i can build a SSL header (either using built in or built out function) using C#, and a same for IPSec..........
Thanks...
|
|
|
|
|
Hello,
How can i draw double dash line in gdi+ ?
It should look something like this -_-_-_-_-_ .
thanks,
berlus
|
|
|
|
|
You can simply draw two dash lines , it's easy!
modified 27-May-14 4:56am.
|
|
|
|
|
I want to create a pen that can draw the bottom an top dashed lines, and pass it to external users
|
|
|
|
|
Normally pens that draw custom dashes have their DashPattern property set and their DashStyle property set to Custom. This however only works for the horizontal plane so will not work for you.
You will need to create your own Brush (possibly based on TextureBrush ?) and pass that to a Pen constructor and return the created object as the Pen class is sealed so you cannot override the Pen default behavior.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|