|
Sorry Mika, I accidentally clicked on your message instead of the offending one. Cheers.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
No harm done
|
|
|
|
|
I just thought I'd let you know that your account is about to be deleted. Hacking isn't a supported activity here.
Buh-bye...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "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
|
|
|
|
|
Hi, during handle the datagridview's rowvalidating event, if the cell's value did not pass the validation, I set the e.cancel = true. But if at this time I want to cancel add this new row or cancel editing the row, how can i do? the system did not allow me to leave this row, and I even can not close this application. please help me. thanks in advance.
|
|
|
|
|
|
Setting e.Cancel = true in the Validating event handler locks the user into edit mode and your observation about not being able to close the application is correct.
Editing can be cancelled by
1) The user pressing the ESC key.
or
2) In the Validating handler leave e.Cancel = false and call the DataGridView's CancelEdit() method.
Alan.
|
|
|
|
|
thanks.
Edit mode can be cancelled by press ESC key but the focus still limited in the datagridview. can not click anything else.
where to put the e.cancel =false? I want to validate the input but when the user give up and want to cancel insert such row, how to cancel it?
need more help. thanks.
|
|
|
|
|
Hi everyone,
I have "unlimited" processes (let's say 5 to 20 is a realistic number)
What I need is the following:
From time to time one of the processes has to signal the others that they have something to do.
There is no master, so I won't create some server which passes arround events for all interested processes.
There is also no message/content, so I would favor some low-level signalling. But without a master process IPC is not very handy at all.
WaitEventHandle seemed to be a good choice; even though it also works on process-level, it does not always work properly.
Every listening process has a thread whichs calls WaitOne(); when the event is sent it starts some action, calls Reset() and loops back to WaitOne().
The process which wants to indicate something creates a WaitEventHandle with the same name and calls Set().
In a simple hello world application this worked pretty well; but in some other application exactly the same approach never passes the second WaitOne(). Just as if noone would call Set anymore (but the other process still does!)
Is there any other useful low-level signalling? I am also not happy about the background thread with the do-while around the WaitOne().
Why are there no monitors or counters that simply fire an event when some equally named object in a different process/thread raises an event. :p
Cheerio,
Roland
|
|
|
|
|
Is it a requirement that there is no server? I would create a hub service (whether as an actual service or just an app which gets started with any process if it isn't already up) which each process connected to over TCP, and then you can use classic client/server notification and broadcasting. Peer-to-peer networks are notoriously a pain and that's essentially what you're suggesting, even if all the processes are on the same machine. (The other big bonus of using TCP and a hub process is that it makes it really easy to scale the problem to several machines in future.)
|
|
|
|
|
It's actually really a requirement.
We are working on local machine only (also in the future) and want to avoid the network stack.
As mentioned before, we only need some trigger, there is no information to transfer.
If we'd be using the network stack anyhow, I'd reather prefer to broadcast something on UDP instead of starting some server/hub along with the first process.
But since it is really just a trigger without any content, I cannot imagine that there is no simple signalling on OS-level...? Although, maybe there is really nothing. 
|
|
|
|
|
Well, if you don't like the Wait On Event solution (come on, that has to work, everybody uses it) and you don't want to use network functions, the only other thing I can think of is file change notifications or registry change notifications.
|
|
|
|
|
Don Rolando wrote: In a simple hello world application this worked pretty well; but in some other
application exactly the same approach never passes the second WaitOne(). Just as
if noone would call Set anymore (but the other process still
does!)
I bet you were doing work in there.
Do this instead.
1. Create a thread safe notify queue (just a queue which moves a flag)
2. Create a thread that does NOTHING but wait for the notification and post to the queue. For safety use a timeout.
3. Create another thread that does the work. It does the work when something shows up on the queue.
You can implement 1/2 completely independently from the real version of 3 using whatever simulated work load you want.
|
|
|
|
|
jschell wrote: I bet you were doing work in there.
You are right, I did. For testing purpose I was calling a dispatcher to show in the UI that the EventWaitHandle's thread received the signal.
When removing the line with the dispatcher call, it works.
Ahm, but why does the dispatcher corrupt the whole EventWaitHandler?
To be honest, your suggested approach is also some kind of custom dispatcher, isn't it?
Could you enlight me why this has influence on the EventWaitHandle at all?
|
|
|
|
|
I wasn't commenting on your specific implementation since I didn't know what it was.
Rather your description of why it failed suggested that a timing problem of some sort was involved.
|
|
|
|
|
Hi, when I insert Datagridviewcell.errortext = "message", the cell do not show the exclamation mark.
Could somebody tell me why this happen? thanks in advance.
|
|
|
|
|
Are you inserting it in the right place?
private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "NO!";
} Works for me...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Same place, same words, but did not show anything
Strange
|
|
|
|
|
i got Error when i try to connect to my WebService (on Windows-XP)
this the error:
Server Error in '/WS_MyWebService' Application.
--------------------------------------------------------------------------------
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS:
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HostingEnvironmentException: Failed to access IIS metabase.]
System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +637
System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath) +9
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +174
System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath, Boolean permitNull) +51
System.Web.CachedPathData.GetConfigPathData(String configPath) +341
System.Web.CachedPathData.GetConfigPathData(String configPath) +234
System.Web.CachedPathData.GetApplicationPathData() +38
System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +8809743
System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +117
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618
thanks in advance
|
|
|
|
|
Did you install IIS after the Net framework?
If so, do a repair install of the net framework and all will be fine.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
1) Go to Start | Control Panel | Add and Remove Programs
(2) Click on the entry titled Microsoft .NET Framework and select Change/Remove. The Microsoft .NET Framework Setup dialog box opens up.
(3) Select the option titled Repair and the setup automatically performs the required repair work.
(4) You will be prompted to reboot the system after the completion of the process.
(5) Run the affected ASP.NET application once again and the application should work fine without any problems.
|
|
|
|
|
i am working on microsoft ink sdk. or the tablet pc. using C#
i have some strokes which i want to modify mathematically. in GIF format or ISF format i dont know how to retrieve the pressure information of the modified stroke. the other way if i store the stroke in point form the pressure information is lost already.
what to do to get the pressure values for the modified stroke and in which format to handle ink.
|
|
|
|
|
In a standard image format (like GIF) there will be no pressure information. I can't find any information about 'ISF format' but if you have the definition of that file format you should be able to work out if there is pressure information retained in it.
|
|
|
|
|
Hi
modified on Friday, August 19, 2011 5:11 AM
|
|
|
|
|
I'm sorry, but you have posted this in the wrong forum. This is the C# forum, not the C++ one.
[edit]I see that you have been cross posting. Please don't do that - it's considered bad form.
|
|
|
|
|
Please don't cross post. In addition, this seems like a question which could be answered with a simple search.
|
|
|
|