|
This seems more like a demand than a request for assistance and is very rude.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The user decides what should be run as administrator, not the application.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Think about what you are asking: would it not defeat the purpose of having Administrator / User priviledges in the first place?
Oh, and don't post your email in any forums - spambots do have such fun with them!
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Oh, and I forgot.
DON'T SHOUT!
It doesn't make anyone want to help you any more, or any quicker.
It does annoy people, though.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Hi,
I'm just beginning work on an assembly which, amongst other things, will perform some transformations and other operations on objects passed from COM. I've created a stub assembly to receive these objects to see what they look like in the debugger. However, because they're passed as "Object" I am not able to see any of their methods or properties.
Can someone advise me on how I can get a view of the methods and properties of these objects so that I can better understand what I'm dealing with?
All help and advice will be warmly received.
Kind Regards,
Dave
Regards,
Dave
|
|
|
|
|
You can use oleview.exe to explore COM types registered on your computer. I assume that you know at least name of the COM type that is passed to your assembly. Use the name to look for the type inside oleview.exe.
|
|
|
|
|
Hi Experts,
I'd like to enable my MyPanel:System.Windows.Forms.Panel to
- scroll vertically on mouse wheel move
- scroll horizontally on [Shift] + mouse wheel move and
- zoom on [Ctrl] + mouse wheel move
Scrolling vertically is Panel's built-in functionality. It's enough to use
base.OnMouseWheel(e); for that purpose.
To achieve horizontal scrolling I tried this one:
protected override void OnMouseWheel(MouseEventArgs e)
{
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
{
m_iMouseWheelDeltaAccumulator += e.Delta;
int iHorizontalPosition = 0;
while (
m_iMouseWheelDeltaAccumulator < -m_iMouseWheelDeltaThreshold
|| m_iMouseWheelDeltaAccumulator > m_iMouseWheelDeltaThreshold
)
{
iHorizontalPosition = HorizontalScroll.Value;
if (m_iMouseWheelDeltaAccumulator < 0)
{
iHorizontalPosition -= m_iMouseWheelDeltaThreshold;
m_iMouseWheelDeltaAccumulator += m_iMouseWheelDeltaThreshold;
}
else if (m_iMouseWheelDeltaAccumulator > 0)
{
iHorizontalPosition += m_iMouseWheelDeltaThreshold;
m_iMouseWheelDeltaAccumulator -= m_iMouseWheelDeltaThreshold;
}
if (iHorizontalPosition < HorizontalScroll.Minimum)
iHorizontalPosition = HorizontalScroll.Minimum;
else if (iHorizontalPosition > HorizontalScroll.Maximum)
iHorizontalPosition = HorizontalScroll.Maximum;
}
HorizontalScroll.Value = iHorizontalPosition;
}
}
And it does work.
Nearly.
But there are two unexpected points:
- The movement of content and scroll bars differs.
- The panel doesn't scroll the same distance every time I scroll one mouse wheel step. The distance gets bigger at first. Then, after ten or so steps, it gets smaller for the same amount of steps. And then it gets bigger again. The scrolling distance seems to oscillate (without the negative alternation).
How do I achieve a "normal" behaviour, like in OpenOfficeOrg, for example?
Ciao,
luker
|
|
|
|
|
I didn't understand your complete code but maybe thats the problem:
while (condition)
{
iHorizontalPosition = HorizontalScroll.Value;
...
}
HorizontalScroll.Value = iHorizontalPosition;
Maybe you meant:
while (condition)
{
iHorizontalPosition = HorizontalScroll.Value;
...
HorizontalScroll.Value = iHorizontalPosition;
}
Because you recalulate iHorizontalPosition every while iteration but you also overwrites it in the next iteration.
Greetings
Covean
|
|
|
|
|
Hello Covean,
this is indeed a mistake.
Both assignments should be either within or outside of the loop, not one inside and the other one outside.
But unfortunately, that doesn't solve my problem (see my first answer to the original post).
Ciao,
luker
|
|
|
|
|
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
|
|
|
|