|
I think I have said several time that I will have a windows service running which i want to client to talk to. There are no other computers involved, no security issues etc. All I want is the fatest possible performance. The article looks to be doing that but it's very complicated. Another good article is:
http://www.codeproject.com/KB/threads/fast_ipc.aspx?fid=322183&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2314676[^]
From that article:
IPC (Inter Process Communication) has been covered by many other articles, so there is no real need for 'another' IPC article to show how to implement IPC. However, there was a severe lack of information of how to implement a fast IPC class. This is the purpose of this article.
Due to the availability of information already out there on IPC implementation, I will not dive too deeply on the inner workings of how to implement IPC, but will concentrate on how to make them very fast.
There are several ways to implement an IPC, here are just a few:
Shared memory
Named Pipe
TCP
MSMQ (Microsoft Queue Solution)
File Mapping
Mailslots
With so many choices, how is one to know the fastest? The answer is simple, there is no ideal fastest solution to the problem. Each has its advantages and disadvantages, but one most definitely stands out above the others....... Shared Memory.
---------------
I am just after someone to point me in the right direction. It's pretty obvious what I want... ideally a single instance of the DLL shared by all applications from clients to server... maybe this shared memory example is basically the same thing...
modified on Wednesday, March 25, 2009 6:16 AM
|
|
|
|
|
Checking back you did say that you wanted a windows service - but just once, not 'several time' [sic].
However, you're referencing an article which is written in c++ which has direct memory management unlike 'vanilla' c#. You've not answered the questions I posed about load or the question about benchmarking of other implementations so you're obviously either not prepared to do the research yourself or lack the necessary skills to perform such a task.
You're on your own.
It definitely isn't definatley
|
|
|
|
|
Hi,
I got my webservice running at Apache server and that got certificate integrated.
I want to access from C# windows application as a https call but it is saying
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
How can i by-pass this and make to work.
Thanks in advance ...
|
|
|
|
|
Hi,
How to open a NEW web browser from windows application?
Thankyou
YPKI
modified on Tuesday, March 24, 2009 6:47 AM
|
|
|
|
|
you can start an application with...
System.Diagnostics.Process.Start("filepath");
so you can specify the web browsers filepath.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Do as musefan said - additionally, you can specify a url or even about:blank and it will open it with the default web browser.
System.Diagnostics.Process.Start("about:blank");
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hmmmmm.... says modified but silly me forgot to take a screen shot of your OP so I dont know what has changed. Is it the 'NEW'? If your problem has not been solved why dont you try replying to one of the other posts specifying your requirements?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi all!
I have a little question.
I have c# working program, and i want to localize it. I read about the localization and language properties, but it's not useful for me. i don't want to do it hard coded.
I want to support many languages and that the user can choose his language. I thought to do that with XML files.
Is there any way to get all the static strings from all the forms in one click?! Or an other easy way?
my program is with lots of forms.
Thanks,
Guy.
|
|
|
|
|
1. Set the language property of form to desired language
2. Change the strings on the forms to chossen language.
3. New language specific resource dll will be created and used if the language settings are set in windows enviornment
|
|
|
|
|
thanks for ur answer.
there is a faster way to get all the strings without pass all the forms?
|
|
|
|
|
Hi,
I have texts such as the following...
"EUR50,000 (Wholesale)"
or
"USD 1,000 - Retail"
...
...
...
How do I just pull out the text i.e. (Wholesale)
or Retail ?
I am using this at present and it seems to work if there is brackets around but not if there is "-"
_strRetailWholeSale = strValues.Substring(intPos, strValues.Length - intPos).Trim()
Thanks
|
|
|
|
|
Use Regular Expressions, it will help you out.
|
|
|
|
|
Check this out this regular exp:
@"(\([a-zA-Z]+\))|(\s?-\s?[a-zA-Z]*)"
This might help u out.
|
|
|
|
|
well if your two examples are the only types it could be i would split the string with spaces, then get the last string in the resulting array. Then you just need to remove brackets if need be. Something like...
string[] results = inputString.Split(' ')'
string result = result[result.Length-1].Replace("(", "").Replace(")", "");
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hello everybody.
I hope some of you can help me with this problem with CSV Reader. I have a text file contains
"USER\FIRSTNAME";"DOMAINNAME"
"User1";"USER\Admin"
I am using LumenWorks.Framework.IO.Csv (CSV Reader) to "read" my text file, but I got the output wrong. The CSV reader removes the \ from my text file.
the output is like this
USERFIRSTNAME;DOMAINNAME
User1;USERAdmin where it should be
USER\FIRSTNAME;DOMAINNAME
User1;USER\Admin
If i remove the double qoute from my text file, then I get the right output. Has any of you run in to this issue, or could any one explains to me how I can fix this issue??
Any advice will be grateful. Many thanks in advance!!
|
|
|
|
|
Hey again,
I found a solution for my problem. It to have " and ' in CSVReader class, then it works
|
|
|
|
|
I have a problem, I use PictureBox es to display a source image in 32x32 pixel chunks.
The are added to a FlowLayoutPanel 's Controls property.
Now I want the user to be able to select several at the same time (up to 25), I try to do that by using the MouseDown and stopping the seletion at the MouseUp event (miraculously it fixed itself and the MouseUp even works right now).
My problem is that the user can still select not neighboring PictureBox es, but can hold the mous button down, move around to completely unrelated PictureBox es on the other edge of the FlowLayoutPanel and add these to the selection, because the MouseUp event didn't get fired yet.
How do I prevent the user from selecting PictureBox es that are not next to each other?
I tried it with the MouseLeave event both, but the PictureBox es' event fires the moment you leave a single of them, preventing any selection of more than 1 and the FlowLayoutPanel 's event is inaccessible when I fill all of it with PictureBox es.
I also tried to check the Cursor position, but that fires seemingly randomly and I can't debug it (during debug the cursor position isn't fixed at the last position the cursor had in your program, but will change according to the position in VS).
|
|
|
|
|
OK so for the sake of argument lets say you have a 3x3 grid of these pictureboxes numbered from 1 (top-left) to 9 (bottom-right).
If im correct what you are saying is that if you mouse down on (1) then move out the grid round to (3) then (2) does not become selected? obviously this should be the case.
Well to solve you could simply write you own algorithm to detect which boxes are selected and then fill in the gaps. Or, more simply, you can create a rectangle object using the mouse down position, and the mouse up position (i.e. a selection rectangle) then you can do a collision detection with the selection rectangle on all the pictureBoxes, any collisions should make the picturebox selected
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Not quite.
My problem isn't that things don't get selected, this seems to work.
My problem is that multiple PictureBox es can be selected while the mousebutton is held down (all are fine, if you let go of one it's MouseUp event shoul fire and stop the selecting).
While the mousebutton is held down, (during the MouseDown event), you practically can only select neighboring TextBox es, to select one that isn't next to a previously selected one, you'd have to let go of the button and thus the slection would be stopped (and started from new).
Now the problem is that if you exit the area where the PictureBox es are displayed, while still holding the mousebutton down and then move to a far away PictureBox and it would get added to the selection, making it inconsistent.
I somehow want force the user to be able to only select up to 25 neighboring PictureBox es, preferrably with a limit of 5 boxes horizontally and 5 boxes vertically.
|
|
|
|
|
As Musefan said u need to write your own collision detection logic or u can use the following...
1.Use a toggle flag to set the status of each picture box selected.
like
public void PictureBox1_Click(<arguments>)
{
if(pictureBox1.IsSelected!=true)
pictureBox1.IsSelected = true;
else
pictureBox1.IsSelected = false;
}</arguments>
((Note: IsSelected is a custom built property what you need to code...))
then check the IsSelected property while adding the selected pictureboxes....
Have a Happy Coding.....
|
|
|
|
|
I thought I had it by making the FlowLayoutPanel slightly larger then the PictureBox es covering it
But if you hold the mouse button down none of the events get fired, they only fire when you don't press the mouse button.
That's is useless to me.
Colision detection is kinda out of the question, the mouse coordinates are different from the control sizes (events get fired at the wrong time) and I can't debug it because during debug the mouse coordinates still change every time I move the mouse.
An IsChecked property wouldn't really help me.
I need to detect if the user moves away from the PictureBoxes while holding the mouse button down
modified on Monday, April 6, 2009 3:06 AM
|
|
|
|
|
to run my application i need to install .net but when i try to install it telling invalid Win32...may i know y??? and solution?
A S E L A
|
|
|
|
|
- What version of .NET?
- What OS-version?
- Have you run a virus-checker on your installation-package?
Download .NET 2.0 here[^].
I are troll
|
|
|
|
|
hi
Here is my code in this i use a file dialog box from which i open the excel file but here is one problem i read only one sheet in datagride view when i select some another file then it shows the error PLZ CHECK THE FILE NAME OR FILE IS NOT EXIT NEED A Help
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog FD = new OpenFileDialog();
FD.Filter = "Excel|*.xls";
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
string filename = textBox1.Text;
String connectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filename + ";" +
"Extended Properties=Excel 8.0;";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
OleDbCommand selectCommand = new OleDbCommand("SELECT * FROM [xyz$]", connection);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter();
dataAdapter.SelectCommand = selectCommand;
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
System.Data.DataTable dataTable = dataSet.Tables[0];
dataGridView1.DataSource = dataSet.Tables[0];
// textBox1.Text = "";
MessageBox.Show(dataGridView1.RowCount.ToString());
connection.Close();
}
|
|
|
|
|
<repbot engaged=true>
1) Please use punctation, it helps make sense of gibberish.
2) DO NOT SHOUT UNLESS YOU WANT TO BE FLAMED!
3) Spelling helps. It helps a lot.
4) Format your code, see the buttons on this page for <code></code> in line or
<pre>blocks of code</pre>
Compare:
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
and
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
</repbot>
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|