|
very very nice thats exactly what i was looking for
thanks a lot
|
|
|
|
|
Hi all, Please advise from you all
I have DataGridView with only one column (use for dynamic menu)
When user press ENTER key, i want to the focus not moving down and show the content of the column
Please advise... thanks
Regards
Sandi Antono
|
|
|
|
|
If you want a dynamic menu, then why use a DataGridView? Why aren't you using the MenuStrip and dynamically constructing the list of MenuItems as needed?
|
|
|
|
|
Cause i use outlook panel too handle that;)
|
|
|
|
|
Good afternoon!
How to define the moment of connection/switching-off usb devices, its type and ID?
Thanks.
|
|
|
|
|
I'm trying to emulate the Magnify tool except it's a bit more limited. I only want to monitor a specific region of the desktop and zoom at a set %.
Here's the code I have so far...
private void GetSnapShot()
{
Bitmap bmp = new Bitmap(273, 273);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(formLocationX, formLocationY, 0, 0, new Size(273, 273));
picDisplay.Image = bmp;
g.Dispose();
bmp = null;
}
I dropped this in a timer's tick event, and it's such a ram slob. It'll use up 4-10mb of ram, then go back down, but it seems so inefficient because it's cycling the ram every 3 seconds or so. The windows magnify tool doesn't use that much ram. I've downloaded a few magnify tools (just to see how they operate) and they don't either.
What can I do to make this better?
The 273 hardcoded values are the size of the picture box. I figured it would be better to hardcode the values rather than get the height/width of the picture box everytime. formLocationX and formLocationY is the area it's monitoring.
I haven't figured out how to zoom in it yet. I set the scale transform and that didn't seem to do anything. I'd much rather get this optimized before worrying about the zoom part though (but if it's a simple task that I am overlooking, feel free to let me know).
-- modified at 13:16 Saturday 17th June, 2006
It just dawned on me that I'm creating a new bitmap everytime. I moved that out of there as well as setting it to null at the end. This stopped the ram from going nuts, I still wouldn't mind any possible ideas on how to make it better though.
|
|
|
|
|
The only big optimisation I'd suggest is to not use a timer if at all possible. For example if you're tracking the mouse then handle a mouse move event (maybe possible in managed code, otherwise the Win32 API will come into play). It all depends on whether the timer is neccessary because you're going to be performing this every 3 seconds or so regardless of whether you actually need to.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
|
|
|
|
|
The ram cycling was occuring every 3 seconds, I'm updating the area every 100 milliseconds.
I'm just looking to zoom into a specific area of the screen (regardless of mouse/keyboard input) and update my picbox with the zoomed in area.
The form won't be open all the time. Overall it's not too bad I guess. After getting rid of the bitmap creation in the function it doesn't use any extra ram. CPU load was 0-2% on a P4 3.0c.
Only problem with using the .NET framework is it doesn't capture everything for some reason. It seems to ignore certain windows for no apparent reason.
|
|
|
|
|
ThisIsMyUserName2 wrote: Only problem with using the .NET framework is it doesn't capture everything for some reason. It seems to ignore certain windows for no apparent reason.
Some programs, like the media player, uses hardware acceleration to display graphics directly to the monitor without drawing it to the screen memory.
---
b { font-weight: normal; }
|
|
|
|
|
You will probably need to hook into DirectX to get your performance up and overhead down. There you are working directly with the adapter.
|
|
|
|
|
Hmm, I thought about that, but that's a bit over my head I think. I'm still grasping .NET/c# in general. Going balls out with DX would be too much.
I wonder if it would be faster if I used the windows APIs instead of the .net classes? Use BltBit, etc. Also perhaps the APIs will let me capture certain windows?
When I load a program that's capable of hitting a screenshot or print screen, it'll pickup DX windows on my desktop, so I'm assuming it's possible to do with straight API.
|
|
|
|
|
I want to give at the user this possibility.
How can handle it?
|
|
|
|
|
|
|
You may want to look into the Memento Design Pattern as this design is exactly for the Do/Undo/Redo ability.
|
|
|
|
|
I am using Crystal Report XI for reporting. So I want to combine or integrate my own SQL queries to Crystal report. How van I make this? For Example :
My sql query is below;
"SELECT NAME,SURNAME,AGE,STR(SALARY/100,9,2) AS SALARY FROM EMPLOYEE WHERE SALARY>500 "
so I want to integrate this sql query with Crystal Report and design these (NAME,SURNAME ...) in my report designer.
For your help thank you very much.
This is my sign
|
|
|
|
|
you can get the date into a dateset, then send dateset to Crystal
|
|
|
|
|
I've create a user control for a network connection. It is basically an empty control that changes the background image based on the connection status (connected, disconnect, unknown). Right now, I only have an IPAddress property, but plan on adding several other properties in the near future.
What I am trying to do is tie an Options dialog box into the double-click event on the control. So I've got a usercontrol class UserControl and a form class UserControlOptions. There is a private field UserControlOptions declared in UserControl. How do I use the textboxes, checkboxes, etc. on the UserControlOptions form to edit to the properties of UserControl?
My initial thought was to send the UserControl as a parameter to the UserControlOptions constructor. Copy this to a UserControl field declared in UserControlOptions and populate the controls in the form with the properties. Then create a custom EventArgs that would be passed by an event fired when the save button was clicked. Something about the circular nature of UserControl->UserControlOptions->UserControl told me there should be a better way of doing this.
Thanks for any help.
BS
|
|
|
|
|
Hi,
here a rough plan of what I would do:
1. Design the options form with everything you need.
2. Place Save/Ok and Cancel button on the form and set their DialogResult properties.
3. Set CancelButton and OkButton properties of the options form to your both buttons.
4. Add a property of type UserControlOptions with both getter and setter which either fills the contained controls from the given values (getter) or creates a new instance with the respective values and returns it (setter).
5. in the double click event handler of your user control add the following:
MyOptionsForm optionsForm = new MyOptionsForm();
optionsForm.Options = _myOptionsField;
if (optionsForm.ShowDialog() == DialogResult.Ok) {
_myOptionsField = optionsForm.Options;
}
Beside the fact that this way the dialog behaviour of .Net is used also no reference (except a temporary local variable) is needed.
|
|
|
|
|
I would like to know how .Net , when creating a Web Service, creates those SOAP classes and comunicates with a SOAP client because i can't see them anywhere on the computer,those classes like in JAX -RPC (ties and stubs i think) , and when sending a mesage it must create that SOAP message ,does everything happend when executing the exe file?
If someone knows a good article about this on the internet or something short because i must know this until monday in the morning ,
Thanks!
|
|
|
|
|
.NET creates a proxy class for your webservice. Everything that needs to be done to create and read SOAP messages is done in the .NET framework.
You can checkout the proxy by adding a web reference in visual studio and expand the web reference node.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Do u know how to code for the device management in c#.net
|
|
|
|
|
That depends on what you mean by "device management".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi;
I was wondering if there is any software package that could provide team programming for .net (C#)?
I mean if I and my brother want to work on a single project but two different stations(PCs) then what do we do?
Something like the starteam for java ...
I'll be very glad if someone answers A.S.A.P
Thanks
Hadi
|
|
|
|
|
hi
try to use MicroSoft Source Safe Tool
Tamimi - Code
|
|
|
|