|
Dear All.
i want to raice Esc key(keybord) Event, without pressing the Esc button.
Regards
Rajeesh MP
|
|
|
|
|
Rajeesh MP wrote: i want to raice Esc key(keybord) Event, without pressing the Esc button.
If the event is in your application then you should abstract the functionality elsewhere so it can be called from where it is needed. If you are initiating it against another application then you might want to look at System.Windows.Forms.SendKeys[^]
|
|
|
|
|
AoA
Thanks in advance for help. Please help me if any one have some info about it.
I have made a solution with three projects a web services project , a client windows application project and a class library project.
I made a class in class library. this class library is added as reference in the client and web services project.
Now from client application, when i call some web methods of the web service they work fine.
I have a web method with an object type attribute. that method just cast it to string using ToString() and return that string. Now i made an object of a class in class library.
When i call that web method and pass this object. An InvalidOperationException generated, with error message There was an error generating the XML document.
I can not solve this, i search it on web but no solution found. I can not know how to upload the code here.
Please help me if any one can.
Will wait for reply.
|
|
|
|
|
Well I think You can see right side your project where you can see all class there will be webreference you must to update everytime you make new funcion to execute .
The error you said should be not adding correctly the reference of your webservice to your applicacion.
If you can execute your program in webservie in xml you will see the result with invoke button .
If you write details or send me your application wish could solve your problem ..
regards
jabbar
|
|
|
|
|
I wonder if anyone else has experienced this, or at least can suggest a resolution.
1) I placed a ReportViewer component on a form in my project and it didn't create the Toolbar or the Report area on the form nor did it create the BindingSource component.
I thought my installation might be broken, so to check this I:
2) I opened a different solution, added a ReportViewer to one of the forms and all worked correctly.
The only real difference between the two solutions, is that the solution in 1) already has several ReportViewer Forms in it.
Anyone got any ideas at all.
Pllzzz note this is not urgentzzzz in any way at all.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: Pllzzz note this is not urgentzzzz in any way at all.
Great. I have to think about this for a couple of weeks anyway...
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I have the problem with VS2008 on SQL 2008, I have not tried of a project with an existing viewer.
Also I cannot create a datasource so I'm pretty sure my installation is screwed. But hey I'm running on Vista (at home) so that probably explains the problem.
It's a sad day when we accept the environment with these types of bugs b/c it's not critical. I was experimenting with reports about 3 weeks ago and didn't bother following it up.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I was experimenting with reports
That's pretty much where I'm at.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am drawing a bitmap in my class that has the following things:
1) A base background loaded from a bitmap on disk
2) 6 strings generated programmatically and drawn on the bitmap
3) 25 or 50 numeric strings generated programmatically and then drawn on the bitmap
4) Possibly another bitmap drawn top of the 25 or 50 bitmaps in 3)
This is all a layered effect between 3 and 4.
After drawing these I end up with 1 bitmap that I then display to my users. All of the things above can be done in parallel, so I was wondering what might be a good approach to multithreading this? Such as, creating a thread to do each part of the bitmap, then layering them when done? Or writing them all on the one bitmap?
What might be the fastest execution way to do this? I already have it working, but want to change it to speed up the drawing if possible.
Thanks!
|
|
|
|
|
Hi,
multithreading while sharing data isn't easy to do correctly while still gaining some performance.
Is it worth it? how big is the bitmap, and how often do you need it all? how much area percentage wise is covered by (3) all the strings and (4) the second bitmap?
What is the programming language, and what kind of app is this?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
This is a winforms app in C# using NET 3.5 SP1. The bitmap is about 800x800 in the highest resolution (we support up to 1680 x 1050). The strings cover probably around 50% of the bitmap, with the other bitmap taking around 40% of the total space on the original bitmap.
This gets redrawn at least every 2 seconds, and maybe more depending on the user's preferences.
All the data/strings is known or can be calculated before the actual drawing occurs.
Basically, the way I do it now is:
Store the original disk bitmap in memory for use. Get the data, draw up to 25 or 50 of the other bitmaps, draw the 25 or 50 numeric strings, then draw the other 6 strings. Right now, this is being done through a single backgroundworker so that the rest of the app is still responsive.
Thanks!
|
|
|
|
|
OK, so the data involved takes up some 10MB (4MB for the big bitmap, 2MB for the small one, and 4MB for the composite image) which somewhat exceeds level two cache, and there is not really any input/output (disk access) involved. I would not go beyond two threads, even if your CPU would have 3 or more cores; the buses (regs-level1-level2) would choke.
So IMO you might possibly get better performance by splitting the job in two halves (say left and right half) and apply proper clipping. Not sure you would really gain much if anything though.
Here is one alternative for you to consider: use a Control (say a Panel), give it the big bitmap as a BackgroundImage once, and draw all the other stuff in the Control's paint handler (hence on the GUI thread). Make sure you obey the invalidated region, so don't repaint say (parts of) the small bitmap that you don't have to. If the small bitmap doesn't need much (depends on how often it gets replaced or moved) this may work better than anything else.
BTW: what is the CPU load right now, say one complete repaint? is it worth spending much effort with uncertain outcome?
FWIW: make sure you don't need file access and image decompression and/or resizing at all once things have been initialized, just keep the images available at the destination resolution at let it roll.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hmm, maybe it's not worth the effort. I was thinking there might be a way to layer them and then place them into a final bitmap for increased speed of the drawing. From the profiler I am using, I am getting something on the order of 140ms to draw the whole thing the way I am doing it now.
|
|
|
|
|
Hi David,
hmm. 140 msec is more than I anticipated, and it certainly would be too much to do on the GUI thread unless you apply double-buffering.
Maybe your code needs some optimization, without really changing the organizational aspects, the threading, etc. Are you creating new pens, brushes, fonts, rather than keeping existing ones around? Are you calling CreateGraphics? Are you creating any objects at all? The art of fast painting is by using existing objects, not creating new ones, as much as possible.
Also it is unclear to me what the small bitmaps are about, seems to be one for each string; do they need heavy computation?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Nice Luc, I have captured this conversation into a document. The reality of optimization is something that escapes most of the members of my group. This conversation goes into my collection of things that illustrate the subject. One of my favorites is the split loop pattern, are you familiar with it?
|
|
|
|
|
led mike wrote: the split loop pattern
I might, I might not. The name doesn't ring a bell, but I'm no good at pattern names. Show the world.
BTW: I did come up with some new patterns, the most famous one I called "upside-down programming"
which is a kind of extreme instruction scheduling at the level of very simple statements (say elementary C). Excellent for video processing and other very repetitive stuff that tends to be memory/cache latency bound.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
(answering just to test my knowledge) I believe (and hope) that Mike means changing this;
for (int x = 0; x <= 50; x++)
{
DoMethod1();
DoMethod2();
}
To something like this;
for (int x = 0; x <= 50; x++)
{
DoMethod1();
}
for (int y = 0; y <= 50; y++)
{
DoMethod2();
}
..which is counter-intuitive (for me at least), as I'm doing the loop twice in the latter example using more resources. The latter example would be easier to maintain, as it's more readable.
I are troll
|
|
|
|
|
OK thanks, I see. Yes I have been using it.
As far as performance goes, two comments:
1. "split loop pattern" makes sense if the data sets used by both halves are distinct and "locality of reference" is relevant, then the split reduces the load on the cache+memory system
2. the opposite ("merged loop pattern"?) makes much sense when both halves work on the same large data set (exceeding cache size), so merging makes the code walk the data just once. I happen to have the draft of an article (on finding primes) clearly demonstrating this. Due next month.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
how can i display mathematical equations like integral and sigma in a windows form label or any other user control?
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
Hi Experts
Pls Help Me I am Making A user Control in side That i am using Some html Script.
Me i Have To Generate The HTML Page From C#.NEt Application i append The Html
script using String Builder But It Can't Parse The Code Like
But #hhh899 is Dynamic is set from a property Color when i append it will no take
string Like ""#hhh899"". show pls Help me How To How to generate The HTML
Page From C#.NEt Window From.
Thank U
Dinesh Sharma
Software Developer
|
|
|
|
|
Hi all,
I am developing an windows application(C#) in VS2005 and in that it must have a video player with all aspects like play, Pause, Stop, Rewind, Slow rewind, Forward, Slow forward . I have tried with media player and i am able to bring only Play, Pause, Stop and i was not able to brong other functionality so please help me as soon as possible. It's very urgent.
Regards
Mohan
|
|
|
|
|
1. Its not urgent. I checked with about 15 people and nobody thinks its urgent.
2. Have you tried google, there are loads of media player controls.
3. ITS BAD TO POST TO MULTIPLE FORUMS!!!!!!!!!
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi,
I have Windows Application in which i want to read cookie set in the browser i am also attaching my code with question.
What i am doing I am creating Windows user control which i place in ASP.Net application which read a cookie value from the client machine. But The User Control Display in the ASP.Net application can't read the cookie value. I am also attaching code which i am using in User Control ,
textBox1.Text = "Hello";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://127.0.0.1");
//Uncomment the following statements to set up proxy, if have
//request.Proxy = new System.Net.WebProxy("http://yourproxyservername: portnumber");
//request.Proxy.Credentials = CredentialCache.DefaultCredentials;
//Define an empty CookieContainer class object
//before the HTTP request is sent
request.CookieContainer = new CookieContainer();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//Assign the Cookie property of the HttpWebResponse object to the original
//CookieContainer object in the HttpWebRequest object
response.Cookies = request.CookieContainer.GetCookies(request.RequestUri);
foreach (Cookie cky in response.Cookies)
{
Console.WriteLine(cky.Name + " = " + cky.Value);
MessageBox.Show(cky.Name + " = " + cky.Value);
}
Does any one have any idea about this?.. Please help
erwererewrewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
|
|
|
|
|
I have a project Developed in Windows(windows Control library) which read the data from the access database to a text box on button click.
I use the dll created from a windows application to my Web based project developed in Asp.net
I use Object tag in aspx page to call the dll to display the content of dll in my aspx page.
Applets gets loaded but when i click the button inside the applet to read the data from database it gives me an error message
Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Does anyone have any idea about it.? Please Help ...
modified on Sunday, March 29, 2009 1:06 AM
|
|
|
|
|
It looks like you're trying to use a Windows Forms control in a Web Forms app. Is this correct?? This question actually belongs in the ASP.NET forum.
Well, since the code is running in the browser (not on the server side), the browser will run the code in a heavily restricted sandbox. There are many, many things that the code will not be able to do unless the browser security is turned way down, and the .NET Framework on the machine is told to trust that assembly.
And since I've never done this, my experience is quite limited.
|
|
|
|