Click here to Skip to main content
15,071,928 members

Comments by Henry Minute (Top 200 by date)

Henry Minute 6-Jun-12 7:34am View
Judging from the title of your link that might be useful.
Two problems though:
1. I was not looking for this information so you should have added it to the comments section of the original question, not to my reply. :-)
2. The original question was over 18 months ago so if the OP hasn't solved it by now, you are probably wasting your time.

I have notified the OP about your link, so there is no need for you to do anything.
Henry Minute 6-Jun-12 7:30am View
As your problem was over 18 months ago I assume that you have solved it by now. However, if you are still interested in the subject chirag.jdk has just posted a link to a useful looking article at the bottom of my original reply (judging from the title anyway, I haven't checked it out :)). Take a look.
Henry Minute 29-May-12 14:26pm View
Thank you for taking the time. Much appreciated.
Henry Minute 8-May-12 11:35am View
Reason for my vote of 5
Well written question which you have obviously thought about and researched.
Well done!
Henry Minute 28-Mar-12 4:18am View
I think that you have posted your message in the wrong place.
Henry Minute 20-Jan-12 11:04am View
I agree with leppie.
Your title should indicate that this is a problem in SSMS only, NOT SQL Server generally.
Henry Minute 1-Dec-11 5:13am View
You do not give enough information for me to give an accurate answer, except to say that the .NET textbox will handle Bengali, as far as I know. If you need more information then you should post a new question giving full details of the problem you are having.
Henry Minute 21-Sep-11 11:26am View
Since my alternative doesn't contain a list of colours I can only assume that you have replied to me instead of to JSOP (The OP).
In any event, I think that John's code was intended to demonstrate the principal, rather than to be a cut and paste solution.

I could be wrong on any or all of these statements. :-)
Henry Minute 17-Jul-11 15:30pm View
I have created a small app (using VS2008) to demonstrate a few things. I have zipped it up and you can download it from if you wish.

It is one form that is divided into two rows each containing three user designed controls. The top row is ContainerControl based and the bottom one is UserControl based.
Top Row:
Item 1. A control derived from ContainerControl just has BackColour changed. This is added to form. After adding to the Form, in the Form Designer, a Panel was added and a Button was added to this Panel. So ContainerControl supports design-time behaviour, as Johannes suggests.

Item 2. A control derived from ContainerControl has BackColour changed to match Item 1 then has a Panel added in the Control Designer. Small amount of code to resize the inner Panel. This is then added to the Form and a Button is Dragged and Dropped onto the inner Panel (which is why it is a different colour, so that I could see where I was Dropping). The Button appears to be OK but if you select it in the designer and press escape you will see that its Parent is in fact the controlHolder(x) which the control was placed on, NOT the Panel and NOT the ContainerControl that the Panel is part of You can also discover the parent by clicking the button at Run-Time.

Item 3. Basically the same as Item 2 except the inner Panel has been replaced by another ContainerControl. So it is a ContainerControl nested inside a ContainerControl. This was added to the Form and in the Form Designer a Button was Dropped onto the Inner ContainerControl. If you have your specs on, you might notice that it is not visible :). That is because in spite of it's having been dropped onto the inner control it was added to the Controls collection of the outer ContainerControl. You can verify this by clicking the button alongside its caption at run-time (it has the up-arrow).

Bottom Row:
Item 1. This is a UserControl with just BackColour changed and your Designer Attribute added. It was then added to the form and treated exactly the same as Item 1 from the top row. It works exactly the same, so in this simple scenario the two approaches are identical except that the UserControl based one has some additional properties (BorderStyle etc.)

Item 2. The same as for the top row during its design a Panel was added (Contrasting colour, resize code) NOTE this one does not have the Designer Attribute. It was added to the Form and had a Button dropped on the inner Panel. Do the Parent test and you will get exactly the same result as the ContainerControl version.

Item 3. Same control as Item 2 but the Designer Attribute was applied. Added to Form. Button Dropped onto it. Not visible, as the one from the top row. When did you last see your parents? Same answer as the top row. The outer UserControl NOT the inner Panel.

So, point 1 the Attribute works in VS2008 .NET 3.5 as well as VS2010 and .NET 4.0.
Point 2, the Attribute does not replace all the kerfuffle in my article. What my article demonstrated was that you could design a control which contains other controls and then when you add that control to a Form you can select the inner control and therefore you can add controls to it.

Now that may not be required, after all you can build a functional equivalent of a SplitContainer by adding a Panel to your Form then adding two panels and a Splitter to that Panel and write the code that takes care of resizing, fixing one panel etc. etc. etc. and then do it again for the next form that you want this on. How much simpler to have a control ready built that will allow you to add controls to its various parts.

If you go back to my article and in the Form designer select the inner panel of the control then in the ToolBox Double-Click on Button, a Button gets added to that inner Panel. For the controls in this test app that will not work except for the first in each row.

Hope that this makes sense.

Cheers :))
Henry Minute 17-Jul-11 7:09am View
You are quite correct. You can base your own controls on ContainerControl and get design-time 'nesting' functionality when it is added to a form. However, there are two possible problems with this.
1) You cannot design your control visually, you can only set, for example, a BorderStyle or Text by writing code.
2) OK but UserControl is a descendent of ContainerControl and it has BorderStyle and I've just realized that Text was a bad example :). UserControl has a BorderStyle anyway and it can be designed visually but when you add your new UserControl based Control to a form, it no longer acts as a container.
So it's horses for courses. If your control is only for your own use and you are comfortable with the lack of visual design and you don't need the additional properties then that's fine, descend from ContainerControl.

Hope this helps. :)
Henry Minute 7-Jul-11 14:27pm View
I was about to suggest the same. Not quite sure that it will do all that the OP wants, nor that it is yet solid enough for production but it is the nearest that I am aware of. Now that "The Last One" is defunct, that is.
Henry Minute 1-Jul-11 7:38am View
This does not answer the OPs question.
Why are you reversing the string? Totally unnecessary.
Why Substring(0, 19)? the OP wanted 20 characters, not 19.
Henry Minute 19-May-11 4:55am View
This is really a totally different question and you should therefore create a new one rather than piggy back on an old answer.
Henry Minute 12-May-11 13:04pm View
I have never tried drawing on the background of an MDI parent, so I can't give you any specifics on that. However, the way that the type of program I suggested earlier draw their connecting lines will be pretty much the same as you will need for your app. So once again I would suggest that you take a look at a couple of them for ideas.
Henry Minute 12-May-11 6:33am View
If you want to ask a question about a particular Tip/Trick then please do so by commenting on it, as I am doing here, or by using the Messages Section right at the bottom of the page.

DO NOT 'Add it as an Alternate' because it is not an alternate, is it?
Henry Minute 10-May-11 16:02pm View
I am not going to download all that code and try to read through it to find a possible problem.

You really must learn to accurately describe your problems and show example code which exhibits the problem.

What I will do is suggest the most common reason for this problem:

At the top of your xaml for the window with the ribbon, you will have something like:

<window x:class="WpfRibbonTest.Window1"

change the "Window" reference for a "RibbonWindow" one like
<ribbon:RibbonWindow x:Class="WpfRibbonTest.Window1"

Note that it uses the same namespace that you assigned for the RibbonControlsLibrary (I have used 'ribbon')

Don't forget to modify the closing 'Window' tag too. Like this:

Good luck.
Henry Minute 10-May-11 14:44pm View
Judging by the most recent image, you seem to have the integration under control now.
Henry Minute 3-May-11 9:41am View
Although you marked Sandeep's answer as the solution, you appear to have voted it 1. Just in case you have misunderstood the voting system 1 is for a poor answer and 5 is for a good answer. :)
Henry Minute 3-May-11 9:39am View
Q&A is not just for technical questions, at least I don't think so. Still that was no reason to down-vote your answer. Although I suspect that the OP, given that they have marked it as the solution, has the voting scale backwards.
Henry Minute 29-Apr-11 11:58am View
I have looked at the question and the answers given so far.

They are pretty much what I would have advised. You do not appear to have stated why they would not work in your case and I am therefore not able to assist at this time.
Henry Minute 29-Apr-11 11:55am View
The question was simple enough to understand and compared to many in this forum was reasonably well written.

In any event it hardly deserves this kind of response.
Henry Minute 29-Apr-11 6:57am View
You should post this as a new question, as it is a new problem.
Henry Minute 28-Apr-11 8:37am View
There are countless C# to VB converters out there. None are perfect but most of them will do most of the work for you. All that is required is a little application.
Henry Minute 26-Apr-11 12:27pm View
If you hit problems with implementing StringBuilder I should start a new question, after all it is a slightly different topic.

Good luck. :)
Henry Minute 26-Apr-11 12:05pm View
Immediately after the closing Next of For Each ser As XElement In Records put:
ProgressBar1.Value = ProgressBar1.Max
Henry Minute 25-Apr-11 18:56pm View
Just a small point, which will probably not solve your problem but is good practice.

Try to use the 'using' construct for your StreamReader, and any other IDisposable object, as in the example on this ( page on MSDN. This will ensure that it gets closed.

Also when you ask a question about a problem where there is an exception being thrown it really helps us to help you, if you quote the entire exception message in the question. This narrows down the possible causes, leading to quicker, more accurate suggestions. :)
Henry Minute 25-Apr-11 15:57pm View
One thing I have just noticed, nothing to do with your problem, but I'll mention it now otherwise I will forget about it.
In your code you have:
strFinalString = Num090.Value & " " & strPipe & " " & DTIC856.Value & " " & strPipe & " " & ....... etc.
Concatenating strings like this is very inefficient and comparatively slow. Take a look at the StringBuilder Class and this ( article.

Right, as far as the members of your ProgressBar are concerned Min is, as you say, obvious. For Max, as you say, you do not know the value until the write completes. BUT before you start writing you do know the number of records:
Dim Records = (From datafields In xd.Descendants("record")
Select datafields)
Use Records.Count to set Max and then have the ProgressBar step for each record written, rather than for the number of bytes. This will mean changing:
BytesWritten += strFinalString.Length
BytesWritten += 1

Hope this helps.
Henry Minute 25-Apr-11 13:19pm View
If you are going to be dealing with large files then you should really do the processing in a different Thread and the easiest way is to use a BackgroundWorker.

Here ( is an example. You put the code to process the xml file in the DoWork method.

See if you can work it out for yourself but if you get stuck then ask again.
Henry Minute 25-Apr-11 11:29am View
Good one! :)
Henry Minute 25-Apr-11 11:21am View
Manfred, doesn't that just set an overall lifetime, not a 'period-of-inactivity' time?
Henry Minute 25-Apr-11 11:05am View
Please explain what this has to do with conversion between .NET languages.
Henry Minute 23-Apr-11 7:43am View
I wasn't aware of that. Good to know.

I found a possible solution although I haven't tested it. -->
Henry Minute 22-Apr-11 20:16pm View
What is the compile error that you get and which line throws it?

If you want help, you have to give complete information.
Henry Minute 22-Apr-11 19:40pm View
We are not a design studio.

Have a go for yourself and if you hit a specific problem, then by all means ask about that.
Henry Minute 22-Apr-11 10:01am View
Look at the link to the POSITION property I gave you earlier.
Henry Minute 22-Apr-11 9:01am View
This is not an Alternate, it should be a comment to whichever posting you are replying to. Please delete this one and post it in the correct place. :)
Henry Minute 22-Apr-11 8:27am View
Firstly, just checking, the new line replaces the one in your BinaryExport() method.

Secondly, does the size of the file increase when you add new data? If so, the data is being added correctly. If what you really want to do is replace an old value with a new one, even though you indicate that you want to avoid that, you haven't explained your problem very well.

You start with three pieces of text (textBox1, 2 and 3). You save those. Your file now contains 3 pieces of data. You enter 3 new pieces of text into the text boxes and save that. Your file now contains 6 pieces of data (The first 3 followed by the second three). You then read in the first 3 and display them in your TextBoxes. You will get the first three that were saved, because they are the first three in your file.

You basically have two choices.
1. Continue saving new stuff at the end of the file but you will have to read and discard the first sets of data to get to the ones you want.
2. Use the FileStream.Position property ( to set the writing position to the start of the file before saving.
export = New FileStream(Application.StartupPath + "\read.dat", FileMode.Append)
export.Position = 0
This means that you will always get the newest data and if you want to see the old stuff you will have to read and discard newer stuff to get to it.
Henry Minute 21-Apr-11 16:48pm View
I did a little more reading after answering. The 'Export Diagram as Image...' option is reserved for VS2010 Ultimate yet I have it on VS2008 Standard. Strange decision by MS.
Henry Minute 21-Apr-11 12:03pm View
That's a shame. In VS2008, right clicking on the diagram without selecting anything offers "Export Diagram as Image.." on the context menu. I only have the Express version of VS2010 and that doesn't even have a Class Diagram Item-template.
Henry Minute 21-Apr-11 11:40am View
Try instead.
Henry Minute 21-Apr-11 11:39am View
Sorry, my bad. Misread the question. :(
Henry Minute 21-Apr-11 9:10am View
Ah, OK.

Lazy little toad, ain't he?
Henry Minute 21-Apr-11 8:55am View
This makes no sense to me. It may do to others though, but you are limiting the numbers who can answer by posting such a cryptic question.

BTW: You should not post your email address on a public forum like this, unless you really, really like spam. You will get an email if anyone replies.
Henry Minute 21-Apr-11 8:51am View
See Rahul's reply, as this would be a good solution. You might also be able to use the RowDataBound event example -> (scroll down to the last code example) where the background is set to yellow you could replace the content.
Henry Minute 21-Apr-11 5:45am View
If you have problems with code from an article on The Code Project, the best place to ask your question would be the Messages section right at the bottom of the article. After all, nobody will know more about the inner workings than the author.
Henry Minute 20-Apr-11 8:28am View
Good spot! +5
Henry Minute 20-Apr-11 7:19am View
Going over very old questions and repeating previously given comments/answers is not the right way to get reputation.

If you want to help people, then help, with useful answers, on more recent postings.
Henry Minute 20-Apr-11 6:35am View
If you are trying to demonstrate your programming skills, this is not the correct place.
Post it in Tips/Tricks or write an Article about it.
Henry Minute 20-Apr-11 6:33am View
Is the TextBox Enabled?
Is it ReadOnly?
Henry Minute 19-Apr-11 14:59pm View
You should not include your email address, unless you want to get lots of spam, you will automatically get an email if someone replies. Like the one you got for this.
Henry Minute 19-Apr-11 12:10pm View
What is stopping you from doing that?
If you created the website, you must know the address, just enter it into the browser on your phone!
Henry Minute 19-Apr-11 12:09pm View
You do not give enough information for anyone to give an accurate answer.

What are you using to store the user information?
What have you tried already?
Where are you having problems?
Henry Minute 19-Apr-11 11:46am View
Runs for me.
Henry Minute 19-Apr-11 9:01am View
The OP knows what tablix is/are. They are looking for articles/blogs about using them.

Your post doesn't really help them, does it?

If the place you got that quote from has examples then provide a link to it.
Henry Minute 19-Apr-11 8:58am View
I was about to post something similar. +5
Henry Minute 19-Apr-11 8:54am View
Without seeing how your grid is currently data bound, it is difficult to suggest changes/improvements/alternatives.

Please edit your question to include, at least, the binding part.
Henry Minute 19-Apr-11 8:43am View
This is NOT an alternative tip/trick. It should either be a comment to the tip or in the Messages section at the bottom of the page.

Please move it to the appropriate place.
Henry Minute 19-Apr-11 8:37am View
This is NOT an alternative. It should either be posted as a comment to the Tip or in the Messages section at the bottom of the page.

Please move it to one of those locations.
Henry Minute 19-Apr-11 7:35am View
Do an internet search or search the articles here on The Code Project. There are thousands of examples out there.
Henry Minute 19-Apr-11 7:27am View
There are thousands of examples out there. Do an internet search, or search the articles here on The Code Project.
Henry Minute 18-Apr-11 17:36pm View
You might take a look at ILMerge. ->

I have never used it so don't know how well it works. :)
Henry Minute 18-Apr-11 17:16pm View

I misunderstood your question.
Henry Minute 18-Apr-11 16:48pm View
From ricmil42 - posted in the wrong place (see below)

"Original Poster - you may want to look at the "Winform TextBox Properties" question. Specifically the recursive answer. It can be modified to clear any control as well as controls that contain controls (panel, group box, etc.)."
Henry Minute 18-Apr-11 16:00pm View
As John has said, if you show the code you used in C# you will get more help.
Henry Minute 18-Apr-11 7:35am View
This will not help at all.
Henry Minute 18-Apr-11 7:31am View
I think that you have misunderstood what KeyUp and KeyDown do. They do not handle the Up and down keys, they handle any of the keyboard keys being pressed (down) or released (up).
Henry Minute 14-Apr-11 17:32pm View
Since you are using BlueTooth you might want to take a look at

It has sourcecode on CodePlex so it might give you some ideas.

BlueTooth uses one of several stacks and this may be where your problem lies.
Henry Minute 13-Apr-11 5:32am View
You will need to edit your question to show the code you are currently using, if you want someone to point out where you are going wrong.

If you do that, only post relevant code and remember to put it between <pre> tags.
Henry Minute 12-Apr-11 7:58am View
Can you please make it clear if this is for an MDI application or an SDI application.
Henry Minute 12-Apr-11 7:56am View
You could have the answer but the OP has not stated anywhere that their app is an MDI app. You should really ask them first to get confirmation before suggesting an answer that is so specific.
Henry Minute 12-Apr-11 7:44am View
I think that if you explain what you are trying to do you will get more useful answers.
Henry Minute 11-Apr-11 22:08pm View
The OP wants to show a MessageBox when Form x Loads not when its visibility changes.
Also the code you have posted would fire when the current form changes its visibility, not when Form x did.
Henry Minute 11-Apr-11 15:20pm View
Nice link.
Henry Minute 11-Apr-11 14:17pm View
How does this answer the question asked?

Please see the comment to mahen25s answer.
Henry Minute 11-Apr-11 14:17pm View
This would be quite slow and inefficient but is far better than your other answer as it actually answers the question.

The only problem is that it is an almost exact copy of an answer given an hour before yours.
Henry Minute 11-Apr-11 14:14pm View
How does this help the OP update from one table to another?
How is this a stored procedure?

It is excellent that you want to help others but you should try to actually answer their question, or explain why you aren't. For example "I do not think a stored procedure is the best way to do what you want. Have you tried .......?"
Henry Minute 11-Apr-11 7:08am View
Sorry, I should have spotted the possibility that this might happen. You should test for that table existing before trying to clear it..

Some variation on:
if (DS.Tables.Contains(tbl))
Henry Minute 10-Apr-11 7:24am View
When you filter a BindingSource you alter the underlying data source (usually an in memory DataTable) so you do not, in fact, want to copy the BindingSource you want to copy the DataSource and for this the answer from d@nish would probably be the quickest way to do that, with one slight modification.

MemoryStream memoryStream = new MemoryStream();
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(memoryStream, bsOld.DataSource);
memoryStream.Position = 0; // <=========== CHANGE FROM d@nish code
BindingSource bsNew = new BindingSource();
bsNew.DataSource = (DataTable)formatter.Deserialize(memoryStream);
bsNew.Filter = "LastName LIKE 'D*'"; // Or whatever

dgvNew.DataSource = bsNew;
Henry Minute 10-Apr-11 6:29am View
Did you try
Public Sub NewDC(ByRef cmd As String, ByVal tbl As String)
DC = New OleDb.OleDbCommand(cmd, conn)
DA = New OleDb.OleDbDataAdapter(DC)
DA.Fill(DS, tbl)
End Sub

as I suggested previously?
Henry Minute 9-Apr-11 23:26pm View
If the OP had stated in their question that they had searched but found nothing valid, I would not have made the answer that I did. When I got such a large result set I did not even look at any of them.

However, anything to please you. :)

From near the top of the first page (I didn't look any further) --><--.

Of course how valid that is and how relevant to the OPs requirements I do not know.
Henry Minute 9-Apr-11 16:41pm View
I have just tested it and it works on my system, but only where the DataSource of my DGV is editable. It does not work for one DGV where the DataSource is a View, rather than a table. Could this be the case in your situation.
Henry Minute 9-Apr-11 16:09pm View
Well done for posting the solution here for others to use. +5
Henry Minute 9-Apr-11 16:02pm View
Well done for finding the cause and well done for reporting it here for the benefit of others.

I have to say that this is not something that I would have thought to suggest as an answer, as it is not something that I have ever done.

Have 5 reputation points.
Henry Minute 9-Apr-11 12:05pm View
Without knowing the precise details of your data store, this is almost impossible to answer.

What DBMS (if any) are you using?
What is the schema?

Also you keep mentioning 'gridview', does this mean that this is an ASP.NET application? If so please add the appropriate tags to the question.
Henry Minute 7-Apr-11 11:09am View
For the DataReaders the only way I know to use it is:

SqlDataReader rdr = cmd.ExecuteReader();
while (
// do whatever you want to do with each row of the data

You only get this once though. The data isn't retained in memory after the DataReader goes out of scope.
Henry Minute 7-Apr-11 5:18am View
Well you could use a DataReader (example --> but it won't be very much quicker and can make the code a lot more complicated.

There could be lots of reasons that things run slowly. If you are sure that it is accessing the database that is causing the problem, then you might need to look at how your data is organized and how much data you are retrieving as well as optimizing your queries. Normally data access problems only become a problem when you are talking about Multi-Gigabyte data stores and I do not think that is the case for you. Do a search on c# sqlserver optimize query and see if any of the techiniques you will find can help.
Henry Minute 7-Apr-11 4:57am View
Good stuff!

Well done. :)
Henry Minute 6-Apr-11 12:09pm View
You could write your own but I suspect that there are several 3rd party libraries out there if you google around for something like c# read mp3 header trailer (substitute vb for c# if desired)
Henry Minute 6-Apr-11 11:51am View
I cannot help with Copyright issues except to say that it is important and that it is good that you are considering this aspect.

As for the rest, if you download the Header and trailer information/specification from here --> you will see that 'good' mp3s have a trailer record of 128 bytes which contains that stuff and I don't think just renaming the file would cause that to change. (you can also get information, with a bit of explanation, here -->

Good luck.
Henry Minute 6-Apr-11 11:30am View
If what you want to do is get the information about the mp3 e.g. Artist, track length, cover art etc then that is 'relatively' easy. There are online databases with all that information although I do not know if they are free for sure but suspect that they are. If you have a CD Ripper program it will almost certainly have in it's settings somewhere a list of the databases to search. Have a look at the list and then research those sites.

If you want to actually compare the audio/music then IMO it is almost impossible. There have been lots of questions about it here and I have not seen one answered completely. I may have missed one that was though so you should search this forum using compare audio files as the search phrase and read through the threads.
Henry Minute 6-Apr-11 8:59am View
The example page I linked to used a delegate (in the third one anyway) and tested that for null.
Henry Minute 6-Apr-11 8:49am View
Is this ASP or WinForms? i.e. is it a GridView or a DataGridView?
Henry Minute 6-Apr-11 8:42am View
Henry Minute 6-Apr-11 8:16am View
I am sorry but that makes no sense.

Could you try re-wording it.
Henry Minute 6-Apr-11 7:04am View
Please take a look at the code snippet you posted, as it makes no sense (to me at least). If it has become mangled by the CP parser then please correct it. PLEASE DO NOT DELETE THE <pre> TAGS WHICH I HAVE ADDED FOR YOU.
Henry Minute 6-Apr-11 6:26am View
How to do that in the easiest way really depends on how the incoming data is formatted. If it is something like a delimited list (csv or similar) then it can be made into an array by String.Split() otherwise you will have to convert it into some form of collection (List<string> for example).

Then it should be a simple matter of iterating over the Rows collection and inserting the data in the appropriate column.
for (int i = 0; i < myDataGridView.Rows.Count; i++)
DataGridViewRow row = myDataGridView.Rows[i];
row["thecolumnyouareinterestedin"].Value = incomingDataList[i];
or similar.
Henry Minute 5-Apr-11 20:08pm View
Sounds reasonable to me! +5
Henry Minute 5-Apr-11 16:14pm View
OP = Original Poster.
Henry Minute 5-Apr-11 14:43pm View
Well done for persevering!
Henry Minute 5-Apr-11 12:14pm View
I don't know if that comes with a project template for creating a setup project, or not. If it does then that would probably be the easiest way to go. If not then one of the open-source applications would probably be better than using VS IMO.
Henry Minute 5-Apr-11 12:12pm View
Good call! :)
Henry Minute 5-Apr-11 12:11pm View
From the OP

means no technique to do so?

actually i have developed an application that opens only Word 2003 files. but if any one makes file on Word 2007 and rename its extension from docx to doc. my application gets stuck some time.
Henry Minute 5-Apr-11 11:50am View
You are passing a DataGridViewCalendarColumn as the value, so it is no surprise that you get an error.

You haven't shown the method that your code comes from (if it is an event handler or a stand-alone method) so it is difficult to give specific advice. What you need to do is get the cell from the row you are interested in into a suitable variable (myCalCell) and use myCalCell.Value.
Henry Minute 5-Apr-11 10:32am View
I had not looked carefully enough at your code and did not realize that your data was stored as a BLOB type.

The only way I know to read BLOB data is with a DataReader, as shown here -->

Hope that helps.
Henry Minute 5-Apr-11 10:23am View
Sorry, my mistake.

Although if you are getting System.string[] you are almost certainly getting object.ToString(), even with your (Byte[]) cast.
Henry Minute 5-Apr-11 9:38am View
"Im currently working a Off duty roster system that follow the roster rules to settle a debate"

I guess you lost. :)
Henry Minute 4-Apr-11 11:49am View
Have you asked on the MatLab developer forums? If anyone knows, I'm sure they will.
Henry Minute 4-Apr-11 11:48am View
If you search through this forum you will find 100s of questions asking for the same thing.

The answer for you is the same as the answer they were given.
Henry Minute 4-Apr-11 8:27am View
If you lookup the highlighted words in MSDN you will find example code.

You should be able to get enough from those examples and my previous reply to attempt a solution.

If you are unable to do that and are that new in coding then this task is probably too complex for your current level. In that case you should bet a book on the Basics of C# and work through the examples.
Henry Minute 4-Apr-11 7:25am View
Ta very much. :)
Henry Minute 4-Apr-11 6:34am View
I think the clue here might be the last sentence. If you are creating multiple threads then the socket might still be busy processing the first one when the second one tries to connect and so on.

If it were me I would start by investigating (reading thoroughly) the REMARKS section of the page I linked to.
Henry Minute 4-Apr-11 6:17am View
Well the quote I gave tells you how to find out.

In case you are having difficulty here ( is the page it refers to.
Henry Minute 4-Apr-11 6:13am View
Sorry, I misunderstood.

Have a look at the CP Article "Simple FTP demo application using C#.Net" at

I think it will help.

Also this might be useful.
Henry Minute 3-Apr-11 19:15pm View
Have you asked this on the Matlab site, in their developers forums, where pretty much everyone is a MatLab user?
Henry Minute 3-Apr-11 14:49pm View
All of the information that you need to complete your task is in the samples I linked to earlier.

I shall not reply to any more messages, so, once again, stop being lazy, work through the sample project and apply your brain cells.

Good luck!
Henry Minute 3-Apr-11 14:18pm View
Download the samples from the link I gave earlier and run and study the DynamicChartCreation sample.

If you are unable to follow that simple example and translate it to your data, then no amount of help from anyone here will help you.

Stop being so lazy and do some work/research for yourself. All of that information is easily available if you search.
Henry Minute 3-Apr-11 13:38pm View
Have you looked at

I can't remember how easy Date/times are in them but there is a samples page at

Hope that helps.
Henry Minute 3-Apr-11 13:23pm View
What's not working!

How on earth does a statement like "it's not working" help us to help you?
Henry Minute 3-Apr-11 8:13am View
This is really one of the simplest of tasks in SQL and if you need to ask then you are attempting a task that is beyond your current capabilities. You must do more research for yourself, there are loads of examples on the internet and specifically on MSDN.

If you search for How to: Create and Execute an SQL Statement that Returns a Single Value
scroll down to the Executing SQL Statements that Return Single Values Using a Command Object section.

Replace the SQL in the example there with
"SELECT RoomTyName FROM RoomType WHERE RoomTyCode = @roomCode"
That is a parameterized query (which I advised you to research, several days ago)
You will need to do something like:
cmd.Parameters.Add("@roomCode", theTypeOfYourColumn);
cmd.Parameters.Value = UseTheValueThatYouWantTheNameFor;

Take a look at, the example there shows how to do it using a DataReader rather than executing the command. So you have a choice of methods.
Henry Minute 2-Apr-11 20:39pm View
Regrettably I've never tried it myself so I can't help.

FWIW I found that by searching on php yahoo authentication, if you want to try for yourself. There were several other promising looking hits, but that one looked most comprehensive.

Have you asked on Yahoo? Here -->
Henry Minute 2-Apr-11 10:51am View
Something like:

tbl.Name = "N'" + textbox.Text + "'";

or even:

tbl.Name = string.Format("N'{0}'", textbox.Text);
Henry Minute 2-Apr-11 10:41am View
As I explained previously, as you create each button you set it's Tag property to it's Floor Number. For this example I'll assume that your 'Floor' Table has a column called 'FloorNumber'
foreach(DataRow C3 in this.dB1_PureEyezDataSet.Tables["Floor"].Rows)
int fn = C3["FloorNumber"];
Button B1 = new Button();
B1.Tag = fn;
B1.Text = "Floor " + fn.ToString();
B1.Click += floorButton_Click;

Then there is one event handler for all of the 'Floor Buttons'
private void floorButton_Click(object sender, EventArgs e)
Button btn = sender as Button; // this gets the actual button that was clicked
if (btn != null) // this line makes sure that it was a button that fired this handler
// Put the stuff that filters the rooms here
string filterExp = "Floor = " + (int)btn.Tag.ToString(); // Get the Floor number from the Tag property of this button
//......... rest of filter setting stuff here.

CallTheMethodThatDisplaysTheRoomLabels(); // This method should clear existing Labels

BTW you really, really must stop calling things 'B1' and 'C3' and similar names. In 3 months you'll look at this code and say to yourself "what the **&^** is C3?". Use descriptive names. e.g. 'newButton' instead of B1 in this example and 'dataRow' or 'dr' instead of C3. :)
Henry Minute 2-Apr-11 6:57am View
When you create a button you add the floor number for that button as the Tag, as I demonstrated in my previous reply. All of the buttons use the same event handler for their Click event, the button_Click handler I gave you in my last reply. Just to be sure that you get it, there will only be 1 FloorButton Click handler in the whole application, even if there were 127 Floor Buttons. You hook them all up to that 1 handler.
Henry Minute 1-Apr-11 20:42pm View
When the user creates a new floor, add a button. Let's say new floor is floor 6.
int newFloorNumber = 6;
Button newButton = new Button();
newButton.Tag = newFloorNumber;
newButton.Text = "Floor " + (int)newButton.Tag;

Then when they click the button in the click handler for the button you can do

private void button_Click(object sender, EventArgs e)
Button btn = sender as Button;
if (btn != null)
string filterExp = "Floor = " + (int)btn.Tag.ToString();
......... rest of filter setting stuff here.
Henry Minute 1-Apr-11 19:35pm View
Have you asked this on the MatLab site?
Henry Minute 1-Apr-11 19:33pm View
You should not post additional information as an Answer. Use the green 'Improve question' widget below your original question and edit that.
Henry Minute 1-Apr-11 19:29pm View
This is an English speaking site. If you cannot be bothered to translate your question into English, why should anyone else?
Henry Minute 1-Apr-11 17:40pm View
You could be right.
Henry Minute 1-Apr-11 17:25pm View
As I said before if it's a file, it's already binary, so you are going to have to give more detail about your project.

Any time you start to read your file into memory prior to transmission, you are converting it to an array of bytes in memory.
Henry Minute 1-Apr-11 17:13pm View
I all depends on how you propose to send the data. Unless you intend to do some special processing on the media file you are better off just zipping it and sending it
Henry Minute 1-Apr-11 16:57pm View
All you have to do is send the array of bytes. They're already binary. :)
Henry Minute 1-Apr-11 12:14pm View

That's why I gave code rather than just try to explain.
Henry Minute 1-Apr-11 12:12pm View
That's what binary is - zeros and ones.

It is still not clear what you are trying to actually do.

Are you trying to write the binary values out to a file as text like "0001110101011010110"?

Or something else?
Henry Minute 1-Apr-11 10:31am View
You can still use foreach

foreach (DataRow dr in drArray)
Label B3 = new Label();
B3.Background = (dr["RoomStatus"] == 1) ? Color.Red :.......... // you might have to use dr.Item["RoomStatus"] here, can't remember.
Henry Minute 1-Apr-11 10:14am View
Are you saying that you do not know/understand the principles/math involved in the subject, or that you just do not know how to visualise it using OpenGL?

It would help, if you edited your question to make this clear.
Henry Minute 1-Apr-11 10:06am View
Does the code you have posted not work?

Give us a clue, for goodness sake.
Henry Minute 1-Apr-11 8:00am View
The routine would find Luve, Lave, loVe etc. which is one of the thtings you indicated that you wanted.

Still, speaking to your lecturer sounds like a good idea.

If you need to contact me, just reply to this comment. We can talk about eMail at that time.
Henry Minute 1-Apr-11 7:27am View
If you double click the Form to paste the code it will be put inside a Form_Load event handler. That is not what you want. Simply replace the whole of the code for your form with my code.

To add the SoundexLibrary.vb: Right click on the name of your project in 'Solution Explorer'. From the context menu choose 'Add' then 'Class'. When the dialog appears change the name (at the bottom. it should read 'class1.vb') to SoundexLibrary.vb and hit return. When the code window opens for that class, paste in the code and you should be good to go.
Henry Minute 1-Apr-11 7:10am View
The link given to you WAS in SQL.

Stop down-voting people that are trying to help you, or you will find that no-one will try.
Henry Minute 1-Apr-11 7:04am View
The link works fine for me.

Try it again.
Henry Minute 1-Apr-11 6:38am View
The thread at --> has what appears to be a solution to that problem.

I used AfxImageList_DrawIndirect windows xp, in case you want to look for similar postings.
Henry Minute 1-Apr-11 6:34am View
That's a shame.

Unfortunately I am not able to help you, although these comments will have moved your question to the top of the list and maybe someone who knows a solution will now see it.

Good Luck. :)
Henry Minute 1-Apr-11 6:31am View
The Form has a TextBox (txtSearch), a ListView (lvwMatches) and a Button (btnGo).
The ListView has it's View property set to Details. It has three columns with their Text set to 'Pos in File', 'Pos in Line' and 'Line' respectively.
Henry Minute 1-Apr-11 5:31am View
Thank you. The OP did say the column was NVarchar.
Henry Minute 31-Mar-11 23:15pm View
Pure guess, but try the larger publishers.
Henry Minute 31-Mar-11 20:03pm View
That method works with all versions of Visual Studio.

For example:
If you type public class MyClass : IComparable and leave the cursor immediately after the last 'e' you will see a little blue rectangle under the 'I' of IComparable. There are several ways to proceed from there.
1. Move your mouse pointer over the little rectangle and a down-arrow appears click that for the context menu.
2. Much quicker way. any time the little rectangle is visible hit Ctl-> (that's the Control key and the > (period) key). The context menu appears immediately.

There is another way Ctl-Alt-F10 (I think, but I may be misremembering that one).
Henry Minute 31-Mar-11 19:07pm View
With an Owner-Draw ListBox you can paint the lines any colour you want.
Henry Minute 31-Mar-11 18:54pm View
When you say read out do you mean audibly as in speak the names of the devices, or simply list them.

It would also help if you mentioned which article you tried, so that we don't suggest the same one.

Aaaand it would be nice to know what exactly "it will not work with windows 7" actually means.
Henry Minute 31-Mar-11 17:01pm View
Sorry for the delay in replying, I've been busy.

I have made a little demo project, you can download it from

It is VS2008 and you should be able to get the idea of how soundex works from it.

Let me know if there are any problems.
Henry Minute 31-Mar-11 11:16am View
You may already have seen it, but have you seen this ---> ? Which some claim helps in your situation.
Henry Minute 31-Mar-11 11:09am View
No. I don't think you get it.

In the code I posted, (string filterExp = "Floor = 1";) the '1' comes from the button for floor 1. If it was the button for floor 2 then it would be string filterExp = "Floor = 2";. Following the rest of the example from the link would then filter your DataSet by the Floor number.

If you do not have a 'Floor' column in your rooms table, then from what you have told us so far, I would suggest that a redesign of your database might be in order. Or, explain the structure of your database in more detail so that a more suitable answer can be proposed.
Henry Minute 31-Mar-11 7:15am View
If you download the code from the article and run it then examine it you should be able to figure those things out.

If you have tried that and are still stuck, please ask again.
Henry Minute 30-Mar-11 19:47pm View
Please tell us what you are using to display your data. Is it a DataGridView or individual controls?
Henry Minute 30-Mar-11 17:41pm View
The only thing that springs to mind is the rendering of your FilterCheckControl. If there is an easy way to substitute, say, a CheckBox or RadioButton column and see if that improves things. At least you will have identified the culprit. Other than that, as I said before a Profiler might narrow it down.
Henry Minute 30-Mar-11 9:23am View
Thanks for sharing.
Henry Minute 30-Mar-11 8:32am View
Ctl-Del is the 'standard' method for grid like controls and whether it will delete record depends on how the databinding is set up. If it works for the DataRepeater at all, it should delete the row from the in-memory datastore if you use one.
Henry Minute 30-Mar-11 7:36am View
The currently selected item can be accessed with the CurrentItem property or you can use the CurrentItemIndex also. Once selected I suspect, although I haven't tried it, that Ctl-Del will delete that item.

There are a series of 'HowTo' articles on MSDN --> You may be able to get enough information by reading/working through them.
Henry Minute 29-Mar-11 20:14pm View
Have you done an internet search? There are load of hits for a search on 4.0 outlook calendar.

If you have, you should edit your question to say so and also why you didn't like the ones you found.
Henry Minute 28-Mar-11 21:25pm View

Your answer was far more thorough than mine.
Henry Minute 26-Mar-11 19:53pm View
Reply from OP:

Moved here from answer - since deleted.
Thanks for response.
A pretty good idea you provided.
What I meant is preventing the SecondaryEXE from running if the user DoubleClicked it, not preventing the user from DoubleClicking it.
I am working on a project that is supposed to be run using parallel computing
Each Module is supposed to do a particular job and could be anywhere.
Any way. Thanks So Much.
Henry Minute 26-Mar-11 15:19pm View
Also where is the data to fill the grid coming from?
Henry Minute 26-Mar-11 12:38pm View
And did you follow my previous advice and search for it?

If you did, then you should say so right from the start, so that people know how to try to help.

If you haven't searched yet then do so and come back again if you have no luck.

The most likely thing that can cause this is a permissions problem, either for the application or the user of the application, if that might give you a clue.
Henry Minute 26-Mar-11 1:35am View
"But it does not work" will not help people to understand your problem.

You should explain in what way it does not work. Does it give an exception? If so include the message in your question. Does it run OK but fail to apply the required permission?

Please edit your question to include this information.
Henry Minute 26-Mar-11 1:01am View
Good to know. :)
Henry Minute 25-Mar-11 23:02pm View
Henry Minute 25-Mar-11 22:15pm View
The OP has asked a further question, I have moved it into the original.
Henry Minute 25-Mar-11 22:13pm View
Hi, d@nish, are you OK?
Henry Minute 25-Mar-11 20:52pm View
I believe I have found the correct link now.

I have amended the original answer.
Henry Minute 25-Mar-11 20:34pm View
Thanks SA, trying to find it now.
Henry Minute 25-Mar-11 5:07am View
Real 'Visual Programming' :)
Henry Minute 25-Mar-11 4:52am View
Henry Minute 25-Mar-11 1:31am View
Roger, if you go to this ( page on codeplex select the Microsoft SQL Server Database Engine link and then download Microsoft Database Engine Samples (CLR, Full Text, SMO). When you have unpacked them, have a look at the Samples\Engine\Programmability\SMO\ServerConnect\CS solution (it's a VS2005 but updates with no problems to 2008). It shows a Server Selection Dialog. For how to use it look at the Samples\Engine\Programmability\SMO\ManageDatabases sample. Good stuff!
Henry Minute 24-Mar-11 23:16pm View
You do not say what environments your host does support. So I imagine it will be hard for anyone to give you an accurate answer.
Henry Minute 24-Mar-11 15:23pm View
+5 for the personal note.

The rest was pretty good too. :)
Henry Minute 23-Mar-11 12:12pm View
Take a look at this blog ->

From it's title, it sounds like it might do what you want.
Henry Minute 23-Mar-11 9:08am View
I have found two more articles that may help you.
Henry Minute 23-Mar-11 8:44am View
Take a look at the following article from here on Code Project -> Particularly the section on managed strings.

Hope it helps.
Henry Minute 22-Mar-11 21:38pm View
I'm a little confused now.

If you aren't going to save this data to a Database why not use the CellFormatting() methodology?

I have never tried changing the column type in a DataTable, so I don't know if it is even possible.

Time for Plan 'C' have a look at this article from Here on CP In particular, look at the second code block it shows using a [FieldConverter(ConverterKind.Date, "ddMMyyyy")] attribute to modify data whilst reading it from a csv file. The library included in the article can read and write to many different formats so you may be able to use the attribute above AND read into a DataTable at the same time. No promises though, you'll have to study the article, visit their web site maybe to get an answer.

Sorry not to be more help.
Henry Minute 22-Mar-11 20:39pm View

You haven't shown how you are saving the data to the database, so this is only a suggestion. If there is the possibility to do it via a stored procedure or similar you could use the SQL Convert() function. Definition -> Examples ->

You will need sunglasses to handle the color scheme on that last one.

Anyway, good luck. :)
Henry Minute 22-Mar-11 8:37am View
Oh well. Worth a try.

The only other thing that springs to mind, and it is almost certainly not the problem since the debug version runs, but sometimes VS gets confused about the default data connection, what with all your installing and uninstalling of SqlServer. Check under Tools|Options|Database Tools|Data Connections.

Other than that, I'm out of ideas.
Henry Minute 22-Mar-11 7:43am View
I edited your solution because the last snippet had malformed tags and wasn't showing. Please check that I haven't cocked it up. :)
Henry Minute 20-Mar-11 21:08pm View
Pleased to help.

Good Luck! :)
Henry Minute 20-Mar-11 18:19pm View
In case you haven't seen it, I have just stumbled upon "VB EntityFramework Samples Now Available" -->
Henry Minute 20-Mar-11 10:33am View
For something on WPF and EF take a look at which contains a download in VB.Net. I haven't read all of it myself yet but it doesn't seem to use the DataGrid, useful stuff all the same. For more on the DataGrid I like the article here on Code Project. The code-behind is C#, unfortunately, but as it is mostly about the xaml you may be able to get enough from it to be useful.

Good luck!
Henry Minute 19-Mar-11 20:08pm View
5 Beautifully put.
Henry Minute 19-Mar-11 20:06pm View
Go back to the link and in the search bar at the top type file secure delete and hit return. You will get a list of stuff most of which has source code. I cannot guarantee which language though and you will have to judge for yourself, from the descriptions, which actually do what you want. Have fun.
Henry Minute 19-Mar-11 16:21pm View
How is the data sent from the branches to HO?
Henry Minute 19-Mar-11 15:40pm View
I have modified my answer to include more information. Please take a look. :)
Henry Minute 19-Mar-11 15:30pm View
I have modified my answer.
Henry Minute 19-Mar-11 9:59am View
I am busy at the moment but I'll have a look later and get back to you.
Henry Minute 18-Mar-11 22:41pm View
As my answer said
"This may, or may not answer your problem"

However it is (possibly) the first thing I would look at before looking for logical errors in any code.

Thus far no-one can be sure of anything because the OP has not deigned to honour any of us with a response. IMO if you have to call Focus(), unless it is part of a carefully conceived design, something has gone wrong, somewhere.

In the mean time, you'll have to excuse me because I have consumed a fairly large quantity of alcoholic substances and this is about as coherent as I can be.
Henry Minute 18-Mar-11 19:44pm View
You appear to have ignored the first answer that you received, which from my perspective highlighted the root cause of your problem.

Is there a reason for this?
Henry Minute 17-Mar-11 17:11pm View
It might also help if you say how the two computers are connected - local network or internet or what?
Henry Minute 17-Mar-11 15:45pm View
Further to Dave's comment, there is even a simple example in the C# Programming Guide -->
Henry Minute 17-Mar-11 15:14pm View
In addition to the code, it might help if you describe what 'it trashes the text and lines I've drawn' means. Are you able to describe in what way it gets trashed?
Henry Minute 17-Mar-11 7:01am View
You seem to be saying that the machine giving the error does not have the PowerPacks assembly installed, so surely the solution is to check for that and install it where required as part of your downloaded install.
Henry Minute 16-Mar-11 19:11pm View
Does it fail with an error message, throw an exception or just silently.
Henry Minute 16-Mar-11 17:32pm View
You have asked the same question twice within five minutes. Please delete the one you don't want.

For future reference, if you want to change a question, click on the green 'Improve question' widget (Below and right of the text).

I don't do much C++ but isn't IStream an input stream. It doesn't make much sense to me that it would have a Write() method.
Henry Minute 16-Mar-11 16:10pm View
I am not 100% sure as I have never had to do that, but if it was me I would try 'Save As'. Of course you would then need to delete the original, if the above works but I'm sure that if you dig around you might find a way to do it in Interop. If not use the plain old C# File.Delete() method.

If none of that works, then I can only suggest you ask a fresh question.

Good luck! :)
Henry Minute 16-Mar-11 11:39am View
I do not understand why you expect your 'cursor' to have moved. The code you have shown does nothing with the cursor.

Could you edit your question to, either include the code for the cursor, or explain more precisely what you mean?