|
i want to make a program which can replace the desktop window manager in window... i want my program to handle all the open windows like the way i want it to... is it possible...
a window opens it comes to center. when it looses focus of when i'm done with it it goes to either side of screen..
Dwm does it in a different way, it minimizes the windows to taskbar until again activated..and it restores the window in the last opened place...
|
|
|
|
|
Based on this and the other post I think you need to write your own operating system.
|
|
|
|
|
Really...
doesn't any namespace can help me with this... C# has so many namespaces... u must be knowing some which can handle the windows...
|
|
|
|
|
It is likely possible, but probably very difficult, error-prone, and unlikely to be welcome to the user. All-in-all it's not worth the trouble.
|
|
|
|
|
m ready to do the hard work...
m ready to do it...
just guide me.. plz..
i wanna make this application... guide me...
|
|
|
|
|
ayandelhi wrote: m ready to do the hard work...
m ready to do it...
But are your users ready to use it?
|
|
|
|
|
He's correct. If you want a smooth version of this, you'd have to rewrite part of the Win32 API. There is no namespace or class in the .NET Framework that can do this for you. The only way you can do it is if you used a couple of the Win32 API functions, constantly polling for the foreground window and moving it when it appears. This will introduce a flicker as you have to wait for the window to show up in one spot then move it, painting the window twice in two different spots. There is no way to avoid this.
|
|
|
|
|
the problem u are mentioning... is tolerable.. i mean.. first let it be allowed to open as it opens then my program can take control of it... wat say...
|
|
|
|
|
I say it looks cheesy and is of no benefit to users.
|
|
|
|
|
m making it for myself... i wanna learn abt wat m thinking... i am wondering about this night and day... i just dont know the way..
m not goin to prove anything to anyone.. i want to make it for myself and only for myself...
|
|
|
|
|
HI!!
i was thinking abt such a program which can block the inputs from keyboard n mouse until i enter the password...
is such a program possible or m just thinking haywire...
plz guide me...
and one more thing can i control the flow of data from a USB Drive. I mean no data should move automatically (viruses) from USB to PC and vice-versa. if user initiates a copy/move operation, the data can move... Can i???
|
|
|
|
|
|
Reminds me of the POST message "No keyboard detected. Press F1 to continue."
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
that is wat i was thinking.. but what if the application in pace of blocking the input simply does nothing on the inputs until a specific combination like ctrl+p is pressed to enter password... but the mouse still remains inactive.. no other key should be able to work.. like alt+tab which is used to change minimized windows should not be able to work... win button should be deactivated... and many more like it...
so tell me...
and the USB stuff... i want to to monitor the data which moves without user involvement... viruses just copy them self from usb to pc and fro.. this is very annoying...
|
|
|
|
|
Hmm - takes no programming: Ctrl+Alt+Del, then hit Enter. I think it's called the Windows logon screen.
|
|
|
|
|
Absolute the best solution.
|
|
|
|
|
Should be pretty easy with some sort of low level hook that blocks input.
If the password is x chars long, just keep the last x chars in memory but block them from going any further. If the last x chars match the password, allow any subsequent mouse or keyboard input to go through.
This[^] article should provide a good starting point. The faq also explains how to block keyboard input.
|
|
|
|
|
How come I get a rounded number when I multiply and assign value to a double??
dbRecipeTotal = (RI.Quantity / dbRecipeTotalQuantity) * (InvItem.Price / 100);
double dbRecipeTotal = 0.0;
RI.Quantity is = 28.88887
dbRecipeTotalQuantity is = 28.88887
InvItem.Price is = 2425
I get dbRecipeTotal = 24.0 in quickview
it should be 24.25
Any help is appreaciated
modified on Wednesday, July 28, 2010 9:44 AM
|
|
|
|
|
Is InvItem.Price an integer? If so, divide it by 100.0 instead of 100
edit: or you could multiply dbRecipeTotalQuantity with 100 before dividing RI.Quantity by it, that might be a bit quicker - is that important here?
|
|
|
|
|
Your subject line claims you're multiplying doubles, I guess you are not. Assuming InvItem.Price is an integer, InvItem.Price / 100 is too.
if you hadn't used parentheses around it, the result would have been correct.
The better approach however is to use either floating-point or decimal for all quantities that aren't integer by their very nature, here Price.
|
|
|
|
|
Are you sure about the above values, I get 0.04123711340206185567010309278351(oops!)?
I mean 24.
It's time for a new signature.
|
|
|
|
|
Whenever you do math between two number types you should expect your answer will be in precision of the lowest precision operand. You should either declare the 100 as a constant of the appropriate type or use Numeric type suffixes[^].
|
|
|
|
|
Try making 100 100.0 instead.
It's taking price and dividing by an integer which forces the result of the operation to an integer. Telling it that 100 isn't an integer by adding the decimal point should give you the right answer.
|
|
|
|
|
Just adding a .0 isn't good practice. Do you know for sure what type it becomes by adding a .0? It could be a decimal, or a float, or a double. Even if you know what type the compiler chooses by default, will other people who have to read or update your code? See my previous post in the thread for how to make sure the number you are dealing with is cast as exactly the type you need.
|
|
|
|
|
According to ECMA-334 9.4.4.3 Real literals Paragraph 2:
"If no real-type-suffix is specified, the type of the real literal is double."*
*: in ECMA-334 9.4.4.3 a grammar form that excludes any number without a real-type-suffix or decimal-digits after the dot to be a real literal.
If you are on a non ECMA compilant implementation of C#, move to another compiler/interpreter.
|
|
|
|