|
@OriginalGriff: Dont be jealous.
Also show the previous posts...
The thing is you don't know the answer and I am done with my task.
|
|
|
|
|
But you apparently know the answer - instead of sharing you deleted the question so now we have this pointless thread on the forum.
If you hadn't deleted the question and had posted the solution you found then many others in the future may have benefited. This is what the CodeProject community is all about.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
I have a .NET project (written in C#) that is a plug-in for Outlook. For this to work, I need VSTO installed on the machine. This is why I would like VSTO to be a prerequisite to my Setup, but it's not listed. Help, anyone?
Thanks in advance.
|
|
|
|
|
i have encountered this error in my program, i don't know how to solve it
pls can someone help.
Error 1 The type 'Sosinpw.SheetStatus' exists in both 'd:\projects\necoscan\necoscan\obj\Debug\Interop.Sosinpw.dll' and 'c:\Program Files\DRS\SKW\Interop.Sosinpw.dll'
thank you.
|
|
|
|
|
It looks like you are trying to include two versions of the same library into your project. Remove the one that you do not need.
It's time for a new signature.
|
|
|
|
|
thanks you for your reply,
I have only added refrence to one, but when
the project is compiled, the dll is copied to the debug folder,
and then the comflict.
is it something i'm not doinh right.
thank you
|
|
|
|
|
Do you have this DLL referenced in the gac, and are you attempting to add a local copy of the same?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
All i did is to add a reference to it from the
add reference dialogue of the project menu item.
|
|
|
|
|
Can you clean the debug folder and then try again.
|
|
|
|
|
I have done this, and still getting the same
error after first compilation attempt.
thank you.
|
|
|
|
|
Dear All
I'm .Net developer. In my project, When I compile a DLL in Vista PC and run it from the same PC It didn't response. When I disable DEP it responded but took too much time. But the same DLL which is complied in Xp machine response very quickly in Vista PC.( Complied in Xp and run in Vista)
What might be the reason for this greater performance issue?
Thank you,
RSumanan
|
|
|
|
|
Not knowing what the assembly does, how it does, how its used, what hardware configuration you have, what other processes are running, etc., don't you think this is a difficult question to answer?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark
The purpose of the application is to cut a Autocad .Dxf file in to small several sections. One Exe and several DLLs are in my application. Exe and some Dlls refer other Dlls.
hard ware configurations :
Operating System: Windows Vista™ Business(6.0, Build 6002) Service Pack 2
System Manufacturer: INTEL_
System Model: DG965RY_
BIOS: Default System BIOS
Processor: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz (2 CPUs), ~2.4GHz
Memory: 2020MB RAM
Page File: 1269MB used, 3009MB available
I don't think the reason for this problem is either hardware configurations or other processes since both binaries were executed at same machine. I tested this again and again but result was same. Since all environments were identical and only compilation is done in different Operation Systems, I guess this problem is some thing related to compiling binaries in Vista and XP.
Is there anything like DEP (Data Execution Prevention) that We need to attend in vista? I have disabled the DEP too.
Thank you,
Regards,
Rsumanan
|
|
|
|
|
You completely missed the point. Without seeing your complete code base there is no way to determine what is happening. Perhaps there are threading issues, perhaps a Windows API issue. Many things could be issues. There is no way to determine from the information you have given.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Dear Mark
I'm a fresh graduate and new to this field. some time I may be wrong. But What I guess is, If this is due to the reasons that you mentioned above, How does the XP complied one performs well in the vista PC? Threading/API issue should affect both DLLs, Isn't it? Could you suggest any areas like DEP which affect the binaries at build time?
Thank you,
|
|
|
|
|
Hey everyone, I'm sorry I'm asking this kind of question but I completely lost my logic today and need your help on this..
You see, it's a simple bouncing ball application, how can I make the ball bounce randomly and freely in the screen and still look natural.. Many thanks guys, here's what I'm doing now:
if ((y + h) >= ScreenH)
CurrentDirection = BallDirection.Right;
if ((x + w) >= ScreenW)
CurrentDirection = BallDirection.Top;
if ((x) <= 0)
CurrentDirection = BallDirection.Bottom;
if ((y) <= 0)
CurrentDirection = BallDirection.Left;
switch(CurrentDirection)
{
case BallDirection.Bottom:
x += step;
y += step;
break;
case BallDirection.Top:
x -= step;
y -= step+7;
break;
case BallDirection.Left:
x -= step;
y += step;
break;
case BallDirection.Right:
x += step;
y -= step;
break;
}
pb.Left = x;
pb.Top = y;
Invalidate();
}
|
|
|
|
|
|
Thanks Eddy, unfortunately it doesn't help me!! I need a free bouncing behavior of one ball against walls.. Would you be a dear and look at my code?? I'm sure someone like you can figure out something I didn't
Thanks Ed.
|
|
|
|
|
|
Muammar© wrote: unfortunately it doesn't help me!!
I was guessing that you were stuck on the gravity-part, adjusting speed when you hit a wall. What are you exactly stuck with, and how can I help?
Muammar© wrote: Would you be a dear and look at my code?? I'm sure someone like you can figure out something I didn't
I did honey, and you stated that it didn't help.
I are Troll
|
|
|
|
|
Thanks Ed. I just wanted the angle of the movement to change randomly each time I hit the walls.. and I'm not a honey
BTW: I felt sorry yesterday for your world cup loss, you did wonderful nevertheless
|
|
|
|
|
Muammar© wrote: I just wanted the angle of the movement to change randomly each time I hit the walls..
That would give an unnatural effect, a bounce needs to be the opposite of the approaching direction and speed. Then there's acceleration, unless you want the ball to bounce at a constant speed.
To translate this to your code; the current speed of your picturebox is determined by the Step variable?
Muammar© wrote: and I'm not a honey
Hehe, point taken.
Muammar© wrote: I felt sorry yesterday for your world cup loss, you did wonderful nevertheless
Thanks for the sentiment - I don't understand even the basic rules of the game, so I can't have an opinion really. The only part that I saw in the reruns this morning is a karate-kick in the chest of a soccer-player.
I are Troll
|
|
|
|
|
You're doing it the hard way, why not just store a speed vector? (and don't create a struct/class for it, just store two ints or floats somewhere)
Speed can be negative, depending on the direction.
It will also make it much easier if you decide to do "other funny physics things", like gravity or other accelerations; you could just add the acceleration vector to the speed vector every update. (or scaled by time, if your steps are not fixed)
To bounce that way, you can do something like
until no change
{
if (ball outside of horizontal range)
mirror speed horizontally and mirror ball around the edge it hits
if (ball outside of vertical range)
mirror speed vertically and mirror ball around the edge it hits
}
Muammar© wrote: y -= step+7;
That is a little odd.
|
|
|
|
|
That is all wrong. You have a position p (with x and y components), a speed v (with x and y components), and an acceleration/gravity a (possibly with x and y components).
For small time steps, you could evolve like this (apply to each component individually):
p+=v;
v+=a;
where a probably is just a gravitational constant (which happens to be positive since the y-axis is pointing downward in GDI+).
And collisions would invert the relevant speed component, so floor/ceiling would do v.y=-v.y; and left/right walls would cause v.x=-v.x;
ADDED
optionally you could also reduce the speed by some factor (say v*=0.9) on each collision to mimic non-elasticity.
/ADDED
|
|
|
|
|
Luc Pattyn wrote: a speed v (with x and y components)
Was I the only one paying attention in school physics classes? You there at the back, boy: what is the difference between speed and velocity? No cheating by looking it up in the text book.
Luc Pattyn wrote: where a probably is just a gravitational constant
"A" gravitational constant? When I was at school, there was only one. I suppose it does make the simulation more interesting if you can adjust the fundamental nature of the universe.
http://en.wikipedia.org/wiki/Gravitational_constant[^]
|
|
|
|