Click here to Skip to main content
15,077,054 members

Comments by Johnny J. (Top 200 by date)

Johnny J. 23-Dec-20 5:53am View
I know. No problem. Unfortunately, the open source project is in C/C++, and I don't know that... :-(
Johnny J. 23-Dec-20 5:13am View
>TBN files are just JPG with a different extension (why?).
Really good question. The link also says that you can open TBN files using any image viewer in Windows. But the file I have certainly won't open neither in any image viewer programs nor image editors...
Johnny J. 25-Feb-19 6:52am View
Thanks Richard. Those may do fine. They don't contain ALL the icons I was looking for, but with a little creativity I can make it work... ;-) (y)
Johnny J. 22-Feb-19 9:54am View
I never said it HAD to be free... But that would be an added bonus... ;-)
Johnny J. 22-Feb-19 9:12am View
Something like this, but for some reason, I couldn't get the link in the OP:
Johnny J. 23-Feb-16 11:21am View
Thanks Bill! Much appreciated!

Seeing that you can't mark comments as a solution, I posted it as such for the benefit of others who might be wondering the same!

Still wonder why the whole question has been downvoted, though. I often get the feeling that if a person thinks that "I have no need to know that", he will downvote it because then surely "nobody needs to know that"...
Johnny J. 23-Feb-16 9:26am View
Thanks again! (y)
Johnny J. 23-Feb-16 9:20am View
I didn't know that. Thanks a lot. I've used WinDiff for years, but always on single files, so I honestly didn't know it could compare folders as well... Thanks
Johnny J. 23-Feb-16 9:19am View
Thanks, I'll have a look. I actually managed to find one good contender after I posted the question:

Turns up in your search as well. I might give that a go! (y)
Johnny J. 23-Feb-16 9:17am View
Yeah, but surely not for entire project trees...
Johnny J. 10-Jun-15 9:36am View
That's ok, I understand... :-)
Johnny J. 10-Jun-15 9:25am View
I have no friends... :-(
At least no friends that know C++ ;-)

But I believe you...
Johnny J. 25-May-15 11:32am View
Interesting! Will have to look into those.... Thanks again!
Johnny J. 25-May-15 11:06am View
OK, that's an answer - not quite what I was hoping for, but I realise that there might not be any other way of doing it... :-)

You sound very sure about the Sounds Control panel - how do you know? Is there any documentation about that anywhere that I have missed?

I was really just hoping that someone might have come across a better way (pinvoke for instance), but you might be right when you say that there is no better solution.

Thanks Dave! I do appreciate you taking the time to address my question!
Johnny J. 25-May-15 10:46am View
No, I most certainly got the timewasting discussion I was so hoping to avoid, but I think there might be a lesson in it for the both of us. LOL :-D

I understand why you think you need to know the background so that you can propose better solutions. But that was exactly the purpose of my question: How to do THIS specific task in a better way - Not to find a completely different solution as this is working quite fine (which I mentioned), so you could have just accepted the question for what it was. That wouldn't have hurt you in the least bit... :-)
Johnny J. 25-May-15 10:33am View
>You hardly can get any help by trying to shut up people.

That's the problem with Q&A - everybody wants to be a wise guy. If you check comments/solutions to ANY question around here, you will see that very little of it is any help to solving the OP's question and very much a pissing contest to see who can come up with a reason that the OP shouldn't do it like that etc...

That's what I want to avoid - a timewasting and endless debate. My time is precious, yours might not be, what do I know? Therefore I posted a clear and consice question about EXACTLY WHAT THE PROBLEM WAS.

I must say that it's a first around here to be told off for asking a TOO precise question.

An no, you don't need to know WHY I want to do things a ceertain way. If you can't help answering the question at hand and just want to come up with a lot of other (to the OP irrelevant "solutions"), then you are not the expert you claim to be!
Johnny J. 25-May-15 10:24am View
No, his comment is not a solution to what I so clearly stated that I wanted to achieve...

And yes, I realise that "There is no other way to "disable" the system sound scheme other than setting the scheme to "none"." - Which is also precisely what I want to do. I just want to know how to do that without hacking the registry!

If there is no other way to do it, so be it; Then that's what I will do, but I had hoped for a better solution.

I don't mean to be rude Dave, because you're always very nice, but now I have explained the object of the question 3 times in 3 different ways, all of them very clear to me. What can I do to clarify it even more????
Johnny J. 25-May-15 10:21am View
The editing of Daves reply is my fault. I hit Edit instead of Reply. Sorry about that.... No offense intended!
Johnny J. 25-May-15 10:18am View
I've explained why below. I don't mean to be rude, but instead of trying to help, people are just wasting time...

I would never myself answer a question with something completely different that what the OP was asking, I don't understand the need to do so....
Johnny J. 25-May-15 9:36am View
How about keeping irrelevant comments out of it?
Johnny J. 8-Apr-15 6:46am View
What are you talking about? There are no minimize, maximize and close buttons in a web page. Do you mean Winforms/WPF or are you drunk? :-)
Johnny J. 9-Mar-15 5:54am View
Cool. That took care of the warning! Thanks!
Johnny J. 9-Mar-15 5:43am View
Correction: It DOES actually work with an array of string if I do ToArray(), but I get a warning from VS: Co-variant array conversion from string[] to object[] can cause run-time exception on write operation
Johnny J. 9-Mar-15 5:39am View
You're using a string array, I'm using a genereic list of strings. But even if I do a plainTexts.ToArray(), it still doesn't work for me.
Johnny J. 9-Mar-15 5:36am View
The quotes are escaped (that's what @ does), but this is only an example. I'm not entering the html text manually in code like above, I'm parsing them from a webbrowser source, and they are valid strings...
Johnny J. 5-Mar-15 10:31am View
I'm inclined to agree with you, but at the same time: AFAIK, the webbrowser control offered in .NET is merely a .NET wrapper around the COM browser component that is used in IE...
Johnny J. 5-Mar-15 9:56am View
Thanks for the suggestion, _duDe_ - Unfortunately, I might be stupid, but I can't really see how that can help me. I'm not trying to do anything with file types?!?!?

Actually, I'm not really sure that it can be done. Heck, the Webbrowser control doesn't even have anything like a SelectedText property.

But Firebug and the IE developer tool has similar functionality, so they must have solved the problem somehow... :-(
Johnny J. 17-Jul-13 1:12am View
check here:

will not shrink below the value specified by the Size property.

What happens if you dock or anchor the usercontrol on your form?
Johnny J. 17-Jul-13 0:45am View
Works fine for me. Sure you haven't set the minimum size properties.
Johnny J. 16-Jul-13 11:11am View
You're welcome!
Johnny J. 16-Jul-13 10:00am View
With what? Maybe you should check out Microsoft's Windows Azure solution or Amazon's cloud solution...
Johnny J. 16-Jul-13 9:59am View
Sorry, but I have to downvote that... You should never store a date in a varchar variable. That makes for all kinds of problems.
Johnny J. 16-Jul-13 9:46am View
>How to generate/create proffessional html mails?

Hire a proffesional!

Sorry, I'm tired - I'll go home now... Just couldn't resist it ;-)
Johnny J. 16-Jul-13 9:23am View
Maybe you should ask your boss if you're still working there?
Johnny J. 16-Jul-13 6:34am View
He's got replies here (AND marked it as solved):
I'm reporting this as a repost....
Johnny J. 16-Jul-13 6:12am View
What is NumTestCaseText.Text when you get the error?
Johnny J. 16-Jul-13 6:11am View
No, that's great - I've been looking for an email address I could forward all my spam and viagra mails to - and now I've got two of them! Mail is coming right up Thomas - you needn't look any further for viagra and cialis! ;-)
Johnny J. 16-Jul-13 6:08am View
Is Tabstop set to true?
Johnny J. 16-Jul-13 5:37am View
Also don't repost - you've asked this question several times before, received answers AND marked the question as resolved! If you don't know by now how to do it, then face it: Programming is not for you and hire somebody to do it.
Johnny J. 16-Jul-13 5:35am View
What have you done so far (apart from posting this)? You need to post a more specific question.
Johnny J. 16-Jul-13 5:08am View
Still not what the OP asked for. Did you read (and understand) his question at all?
Johnny J. 16-Jul-13 4:44am View
Yeah well, but that's not what the OP asked about, is it?
Johnny J. 16-Jul-13 4:26am View
If chimchams solution is not helping you, then we need to know what text you enter in txtInceptionDate.Text...
Johnny J. 16-Jul-13 4:06am View
I have given you question a descriptive subject line instead of just "help me" - That way you're more likely to get the right people to help you!
Johnny J. 16-Jul-13 3:42am View
Next time, try contributing with something useful instead!
Johnny J. 16-Jul-13 3:40am View
Which windows version?
Johnny J. 15-Jul-13 16:44pm View
I noticed that after I posted my reply. The links still apply, though. Thank you for the clarification.
Johnny J. 15-Jul-13 14:56pm View
It cannot be smaller than what? I don't get the problem! I tried creating a usercontrol using your instructions, and I experience no difficulties in resizing it.
Johnny J. 15-Jul-13 14:40pm View
You don't, Griff, but clearly Radhadeep12 does. I wish people would stop answering questions that are clearly meant for the OP to learn something by himself... :-(
Johnny J. 15-Jul-13 9:42am View
Yes. You can run into problems if two users attemp to change the same data at the same time. That is the constant worry with multi user databases. You have to deal with it the best way you can, and how to do that is an entirely different and much more complicated issue. You should read up on "database locking".

It should work with Sql server express, but for the best performance, I recommend that you use a "real" Sql server installation.
Johnny J. 15-Jul-13 9:22am View
If this has solved your problem (no matter that it was yourself that did it), you should mark the solution as the answer so that other people can see that the problem is solved. For now, I have put it in the subject line, but marking a solution as the correct answer is the correct way to do it.

Also, I have removed the <pre> tags from your question and answer. Pre tags are for formatting code, not your own comments
Johnny J. 15-Jul-13 9:08am View
Also, you should consider formatting your questions in a proper way. Your keyboard has a shift key - use it appropriately. Writing the whole text in lower case and abbreviating a simple word like "please" only suggest to us that you are lazy. And that is not exactly an incentive for helping you out.
Johnny J. 15-Jul-13 9:06am View
What is your problem? What have you done? Put in some effort yourself and post a more specific question when you get stuck. Nobody is going to send you completed "design and code". If you can't do anything for yourself, you should consider hiring a programmer to fix it for you.
Johnny J. 15-Jul-13 9:02am View
Please keep to the problem at matter and don't clutter the question with poorly spelled "plz" and "help". That is completely irrelevant to us.
Johnny J. 15-Jul-13 4:32am View
Johnny J. 15-Jul-13 4:26am View
Don't post the same question more than once!
Johnny J. 10-Jul-13 6:55am View
Or do you mean that you want to activate a child form when the cursor is over it and don't know how to do that?

Maybe if you explained to me in detail in plain English HOW you want the activation to happen, I would better be able to help you?!?!?
Johnny J. 10-Jul-13 6:46am View
Sorry, you can call me stupid if you'd like, but I really don't understand what the problem is. It doesn't matter the slightest that you do it inside an "if" statement, the way to do it is still the same.

In order to get somewhere, I have to ask you: Do you know WHICH mdi childform you want to activate, or is that a part of the problem to find that out?

If not, you should simply do:


where myMdiParentForm and myMdiChildForm are Form objects
Johnny J. 10-Jul-13 6:26am View
And what is the problem?
Johnny J. 10-Jul-13 5:45am View
I don't understand. What condition? Are you asking me how to write an "if" statement?
Johnny J. 10-Jul-13 3:57am View
You need to post more information about your problem. There's no way that anybody can identify your problem based on the information given. We cannot see your screen, access your system or read your mind...
Johnny J. 10-Jul-13 3:36am View
I would recommend that you hire a programmer to fix the problem for you...
Johnny J. 8-Jul-13 4:49am View
Johnny J. 8-Jul-13 3:36am View
Johnny J. 5-Jul-13 7:04am View
It's not for me to criticize, but is it really a good idea to write your account details including username and password to a non-encrypted Xml-file?
Johnny J. 5-Jul-13 4:15am View
Why do you respond to a 2 year old post? Do you really think that it's still relevant?
Johnny J. 5-Jul-13 4:12am View
Which of the fields in the BUSON_CALLLOG table are of the varbinary type? Filedata?
Johnny J. 5-Jul-13 4:06am View
Very good blog post you linked to there! (y)
Johnny J. 5-Jul-13 3:53am View
For the next time: Don't shout and don't use txtspeak. It's "please" not "plz" - show a little respect
Johnny J. 5-Jul-13 3:02am View
Johnny J. 4-Jul-13 5:10am View
And the attachment, which is what the OP wanted?
Johnny J. 3-Jul-13 4:57am View
Note: I have changed your headline to something that will actually tell people what you're trying to do. That way, you're more likely to get relevant answers.

I have also added some line breaks to make the text readable.
Johnny J. 3-Jul-13 4:39am View
OK; that was C#, I only just now saw that you're using VB. But the principle is exactly the same in VB.
Johnny J. 3-Jul-13 4:30am View
NP ;-)
Johnny J. 27-Jun-13 6:10am View
Then it's a little harder. There can be many reasons;

The dll containing the code doesn't build properly?
The control namespace has changed?
You're missing a using?

Or something completely different. You're the only one who can solve the problem because we can't see all your projects and all your code.
Johnny J. 26-Jun-13 11:22am View
I don't understand why you continue to do that; Supply a solution as a comment. Why do you continually fail to see that that makes it impossible for the OP to mark his question as solved???
Johnny J. 25-Jun-13 11:11am View
It's explained in the article I linked to. The crucial thing is this:

Add your font file (the one you want to install) into the Fonts Folder by right clicking the right hand panel -> Add -> File... You will notice that the Register property of the font file is vsdrfFont. This will automatically register your font in Windows when your application installs.
Johnny J. 25-Jun-13 9:42am View
No problem ;-)
Johnny J. 25-Jun-13 9:39am View
A solution OTHER than the correct ones??? What would that be???
Johnny J. 25-Jun-13 9:33am View
Yeah, well, you can't do it like that... Try to look at the links instead. It's not possible to write a query that can delete from two tables at once. You need to use one of the other techniques, either a constraint, a transaction or a trigger as Tiwari mentions (even though I think using a trigger for this is a too complicated solution)

Take my advice: Every minute you work to try to find a "one query solution" will be wasted. Abandon it directly and try to apply one of the other solutions!
Johnny J. 25-Jun-13 8:44am View
That's strange - I just checked and it worked fine for me. I can also see that there have been 12 other downloads. Could you try again, please?
Johnny J. 25-Jun-13 6:30am View
In that case you probably don't have an app setting named "CommonDatabaseName" - I would try to check that first.
Johnny J. 25-Jun-13 5:30am View
Won't work if the string is "Var_strVar_str" !!!
Johnny J. 25-Jun-13 5:30am View
Won't work if the string is "Var_strVar_str" !!!
Johnny J. 25-Jun-13 5:05am View
Did a demo for you. Have a look here:

(PS: It was a lot of work, so if it helps you, please upvote the solution AND mark it as solved)
Johnny J. 24-Jun-13 5:42am View
How are you doing it? We can't see your code, so without more information, we can't help you...
Johnny J. 24-Jun-13 5:34am View
If I can just make a suggestion: You shouldn't put answers that are actually solutions as a comment. That way, the OP cannot accept the solution, and the question cannot be marked as resolved (unless of course somebody else posts the correct answer as a solution)
Johnny J. 24-Jun-13 5:28am View
That is not going to help, just hide the problem...
Johnny J. 22-Jun-13 9:38am View
Try this:

Dim emptyFieldExists As Boolean = False

For Each item As ListViewItem In myListView.Items
If item.SubItems.Count > 4 Then
If Not item.SubItems(3) Is Nothing And item.SubItems(3).Text <> "" Then
emptyFieldExists = True
End If
emptyFieldExists = True
End If

If emptyFieldExists Then
'Do what you need to do!
MsgBox("Empty items")
MsgBox("No Empty items")
End If
Johnny J. 22-Jun-13 8:16am View
Winform or web apolication doesn't matter. You can download files from winforms applications too. That is actually what I've done myself in both cases I did it.
Johnny J. 21-Jun-13 5:42am View
That's why you need to check is the item is nothing before checking the text property. If my code above still fails, try nesting the conditions:

Dim emptyFieldExists As Boolean = False

For Each item As ListViewItem In myListView.Items
If Not item.SubItems(3) Is Nothing Then
If item.SubItems(3).Text <> "" Then
emptyFieldExists = True
End If
emptyFieldExists = True
End If

If emptyFieldExists Then
'Do what you need to do!
End If
Johnny J. 20-Jun-13 8:26am View
Why not? Please explain yourself!

I've used this on several occasions myself and never had any problems...
Johnny J. 20-Jun-13 4:47am View
You need to do some work yourself first - and then post a more specific question when you get stuck. If you don't even know where to start, then face it: This is not for you to do!

Apart from that: Why do you want to waste your time doing that when there are already a zillion youtube downloaders available if you just google for it???
Johnny J. 20-Jun-13 4:45am View
Just commenting on the OP's original "message" - In my eyes, it's total jibberish?!?!
Johnny J. 20-Jun-13 4:45am View
Just commenting on the OP's original "message" - In my eyes, it's total jibberish?!?!
Johnny J. 20-Jun-13 4:21am View
What message? - this jibberish doesn't make any sense?!?!?
Johnny J. 20-Jun-13 4:19am View
You can't execute a jpg image from the command prompt. It needs to be an executable file.
In this case, the system thinks that you jpg file is a folder name.
Johnny J. 20-Jun-13 4:03am View
People here don't work for free. This site might be of help to you:

Otherwise, try to do something yourself and ask when you get stuck at something specific.
Johnny J. 19-Jun-13 3:15am View
This is not what the OP wants. He said that he already knows this! Please reread the question!
Johnny J. 30-May-13 7:20am View
That's pretty harsh, don't you think. The poor guy suffers from fever and needs to leave... ;-)
Johnny J. 21-May-13 5:46am View
I hope that you were addressing the OP and not me... ???
Johnny J. 21-May-13 5:33am View
Posted this question, I'm sure... :-)
Johnny J. 21-May-13 4:46am View
I thought it was a quite interesting problem, so I did a sample for you here:

If you like it, please upvote and approve the solution... ;-)
Johnny J. 21-May-13 2:53am View
Cool, glad I could help!
Johnny J. 20-May-13 9:03am View
There are no event or methods for that. That's why you need to use userpainting and overwrite the standard painting routines to do what you want. It's not for beginners and people with heart problems.

Here's another article that shows how to customize the drop down list by painting the items with special fonts:

That's not exactly what you want either, but I doubt that you are going to be able to find an example that does exactly what you want and nothing else. You will probably have to meddle around a lot with the user painting to find the solution.

That's why I asked you if you're really sure it's worth all the trouble it's going to take to make it work.

But if you DO make it work, I really hope that you're going to write an article about it here on the CP... ;-)
Johnny J. 20-May-13 8:32am View
Sounds like a network problem. Can you ping the address of the the DB server machine?
Johnny J. 20-May-13 8:04am View
Any more information in the exception? I still think it's because some of the parameters are not set with the variable names expected (regardless of the default values in the SP) - but as I mentioned, I could be wrong...
Johnny J. 20-May-13 7:41am View
No, it's not that. I'm just unsure how the database objects (SqlCommand in particular) handles it if there are X named parameters defined in a procedure, but only added X-1 named params in the object model.

I seem to recall that I've had a problem with it generating an exception in that case (but I could remember wrong) when you execute the command.

If you put a try/catch around


do you catch an Exception then?
Johnny J. 20-May-13 7:14am View
I saw that, but I'm not completely sure it works like that...
Johnny J. 20-May-13 4:15am View
There is no difference between Show() and ShowDialog() apart from the modal aspect, so StatupPosition = CenterParent will work even for non-modal forms.

You do, however, need to supply a parent (which you don't) and call f2.ShowDialog(Me) or f2.Show(Me).

You really shouldn't use manual startup position and manual position calculation for this, that's the way it was done 20 years ago...
Johnny J. 16-May-13 11:07am View
OK, but the thing is, we don't understand what part you need guidance with...
Johnny J. 16-May-13 11:06am View
USE, yes. But the OP was writing that he has CREATED an OCX in .NET ("i am working on..." rather than "i am working with..."), and THAT sounds quite unbelievable unless he's actually using C++ rather than C#
Johnny J. 16-May-13 10:43am View
Why not what?
Johnny J. 16-May-13 10:36am View
Whilst I agree with you that Sergey has a very unpleasant way of putting things, I can somehow understand why you get an answer like that. Your question is very general, which makes it look like you have no idea what your attempting to do. It is easier to get a straightforward, helpful and pleasant answer if you try to do your development as far as you can and then post a question about a specific problem that you can't solve yourself.
Johnny J. 16-May-13 10:33am View
Look at the links I gave you above
Johnny J. 16-May-13 10:26am View
If I understand him correctly, he wants to know how he can customize the setup dialog sequence in the msi installer that he creates from a setup project in VS
Johnny J. 16-May-13 10:18am View
Have you checked this article:

It looks to me like you can just edit the templates...

Here's another article that looks interesting:
Johnny J. 16-May-13 10:13am View
Ah, ok, then I understand - I thought you were talking about some 3rd party tool or something you were in the progress of doing yourself.
Johnny J. 16-May-13 10:09am View
Johnny J. 16-May-13 10:08am View
WHAT password recovery tool? What ARE you raving about?
Johnny J. 16-May-13 10:05am View
No, no, no, you don't understand where he's from:

>I would love to be given step by step solution to this problem

That's what he needs! LOL!
Johnny J. 16-May-13 9:50am View
You're right, sorry, I didn't read the OP's question thoroughly enough...
Johnny J. 16-May-13 9:36am View
OCX? In .NET? Are you sure you're not talking about VB6?
Johnny J. 16-May-13 9:23am View
Sorry, I had to remove the <> from the subject row - it was f***ing up the layout of the Q&A forum
Johnny J. 16-May-13 2:35am View
I'm not sure if I understand you correctly, but isn't what you're looking for a ComboBox then?
Johnny J. 15-May-13 9:09am View
I don't want to be rude, but if you have no idea where to start or how to do it AND there's already an application that does what you want (probably more than one at that, try searching - WHY on Earth do you want to waste your time trying to figure it out yourself?
Johnny J. 15-May-13 8:56am View
Guess I got fooled by the notification email. I didn't notice that the OP had inserted a comment in the thread and that it was that one you replied to. Stupid me. Sorry!
Johnny J. 15-May-13 8:29am View
As I mentioned before - if you've read my comments - I didn't consider it a question of how to run an app on a virtual machine (which I agree is possible, and which I have also mentioned) - but how to host the code in the cloud and run it locally. I might have misunderstood the OP's intentions, but he has yet to inform me thereof.

As for services, I mentioned that, but it didn't seem relevant to the case either seeing that the OP talked about his already developed winforms app. There's a whole lot of things I COULD have mentioned, which didn't seem relevant, I only concentrated on trying to provide an answer for the question that was made.

It wasn't my intention to provide a complete manual to cloud computing!
Johnny J. 14-May-13 10:29am View
Threw together a quick code sample just for the hell of it:

public partial class Form1 : Form
Timer tmr = new Timer();

public Form1()

private void Form1_Load(object sender, EventArgs e)
tmr.Tick += new System.EventHandler(tmr_Tick);
tmr.Interval = 1000;
tmr.Enabled = true;

private void tmr_Tick(object sender, EventArgs e)
tmr.Enabled = false;


tmr.Enabled = true;

Johnny J. 14-May-13 10:12am View
Why don't you submit your answer as a solution? This IS a solution, not just a comment! This way, the question can not be marked as resolved.
Johnny J. 14-May-13 10:04am View
Hope you have a hell of a lot of disk space for the database!
Johnny J. 14-May-13 9:55am View
What I thought the OP wanted was to have the application files on a cloud server but run them on his local machine. I could be wrong. And sure you can run it on a remote machine in the cloud and Virtual Desktop into it, but you can have it installed on a remote machine and run it locally (as far as I know - but I could be wrong again)
Johnny J. 14-May-13 9:46am View
Johnny J. 14-May-13 9:38am View
How many more questions are there in your homework assignment?
Johnny J. 14-May-13 9:34am View
What have you got so far? Where are you stuck? You need to give us a more specific question. We don't write full applications for you...
Johnny J. 14-May-13 8:09am View
Maybe he should use noob commerce instead? ;-)
Johnny J. 14-May-13 7:56am View
You really should try doing your homework yourself!
Johnny J. 14-May-13 7:24am View
If you put a try/catch around the line, what exception does it show then?
Johnny J. 14-May-13 7:16am View
You have to provide a more specific question if you expect to get any answer here!
Johnny J. 14-May-13 7:14am View
I would say that you have to Google for this. I seriously doubt that anybody here knows what that error code means?!?!?!
Johnny J. 14-May-13 7:00am View
Apart from that, we're now getting outside of what you originally asked for. I would say that your initial question of how to read the file line by line has been more than answered. You should continue working from there, and if you have further problems, you should post them as a new question.
Johnny J. 14-May-13 6:55am View
OK; that's not a very flexible solution, but I assume that it's a requirement of the assignment. Try this:

You add a Panel to your form and make it as big as possible. Call it Panel1.

Then you adapt the given code:

Do While sr.Peek() >= 0
line = sr.ReadLine()
Dim newTextBox As TextBox = New TextBox()
newTextBox.Text = line
Johnny J. 14-May-13 6:46am View
OK, from the above code, you get each line one by one. You're not saying how you want to display them, but you have to adapt the code to display them the way you want, either in a textbox or using a MessageBox (which I wouldn't recommend).

If you add a textbox (let's say it's called TextBox1), you can display them like this:

Do While sr.Peek() >= 0
line = sr.ReadLine()
TextBox1.Text += line + Environment.NewLine

Of course, if you need to display ALL lines in the same textbox, you don't actually have to read them one by one, so you might have some other requirement as to how they should be displayed?
Johnny J. 14-May-13 6:33am View
You can't use a FOR loop for this because you don't know how many lines the file contains. You should use a "Do While" as the sample does.
Johnny J. 14-May-13 6:28am View
How hard can it be to remove the sample lines that does the writing?

Public Shared Sub Main()
Dim path As String = "c:\temp\MyTest.txt"

Dim sr As StreamReader = New StreamReader(path)
Dim line As String = ""

Do While sr.Peek() >= 0
line = sr.ReadLine()
'Do what you need to do with the line
Catch e As Exception
Console.WriteLine("The process failed: {0}", e.ToString())
End Try
End Sub
Johnny J. 14-May-13 6:26am View
No of course you should adapt the code to what you're doing - you can't just expect to copy and paste the code and everything is working. Are you a programmer or not?
Johnny J. 14-May-13 6:23am View
Console application or winform doesn't matter. The code is the same.
Johnny J. 14-May-13 5:22am View
The question is tagged Javascript/HTML. It is nowhere written that the OP is writing any code at all in C#. I maintain my downvote. Your answer is not an answer to this question. Before submitting an answer in C# you should at least check if it is relevant.
Johnny J. 14-May-13 5:02am View
Not a solution. The OP is not asking how to do it in C#, but in Javascript!
Johnny J. 14-May-13 3:25am View
You're welcome.
Johnny J. 13-May-13 14:34pm View
Ok the problem is in your "else" where you only add 2 subitems. You must add 3 when you have 4 columns. For the 3rd you Can just add an empty string: item.SubItems.Add("");
Johnny J. 13-May-13 11:38am View
I cant help you unless you post the code that adds the items to the ListView. Thats where the problem is.
Johnny J. 13-May-13 10:30am View
What you have to when you add the listviewitems is something like this:

ListViewItem itm = new ListViewItem("TestText"); //Setting the text will automatically add SubItems[0]

itm.SubItems.Add(""); //SubItems[1]
itm.SubItems.Add(""); //SubItems[2]
itm.SubItems.Add(""); //SubItems[3]

Johnny J. 11-May-13 4:16am View
You're doing it again! ;-)
Johnny J. 10-May-13 7:33am View
Just one thing: The OP will need to check that the text in the textbox is long enough, otherwise your code will generate an exception.

If TextBox1.Text.Length >=2 Then
str = TextBox1.Text.Substring(0,2)
End If

Sorry for pointing it out. It's common knowledge of course, but it doesn't seem like the OP has much experience in VB.NET...
Johnny J. 8-May-13 9:10am View
BTW: Why is the post marked as [SOLVED]? You haven't solved it yet, have you?
Johnny J. 8-May-13 9:09am View
Yes, I've done that before. Don't recall precisely how, it was many years ago. But it should be easy to Google that. I'm just worried that the print screen will take too long and make the resize slow.

Also, do you propose to resize the image along with the form? If so, then you will probably still get the flickering...
Johnny J. 8-May-13 8:53am View
Try testing this:

protected override void OnResizeBegin(EventArgs e) {
protected override void OnResizeEnd(EventArgs e) {

Do you have any custom painted controls on the form?
Johnny J. 8-May-13 8:30am View
Ungrateful b******! I take time to fink links to articles that will help the OP understand how to fix his problems, and as thanks I get a univote. :-P
Johnny J. 8-May-13 8:18am View
I'm sorry Athi, but I find your question quite incomprehensible. Could you try to explain in another way and possibly post some samle code of what you're trying to achieve?

However, I suspect that these articles might be of use to you:
Johnny J. 7-May-13 11:04am View
Try wrapping "string version = (string)product["Version"];" in a try/catch - could be that there are some objects that don't have a version...
Johnny J. 7-May-13 10:57am View
C# or VB? If it's C#, you might need to include an @:
Johnny J. 7-May-13 9:31am View
@Madhav: This is Expresso:
Johnny J. 7-May-13 9:14am View
Helpful. Why bother writing a comment at all?
Johnny J. 7-May-13 9:13am View
A few comments:
1) You shouldn't instanciate an SqlDataAdapter and a DataSet just for this - it uses unnecessary memory
2) You shouldn't concatenate the query using "+" or "&" - it makes the code vulnerable to sql injections. You should use Sql Parameters
Johnny J. 7-May-13 9:00am View
We do not supply finished code. What have you tried so far? Please post your sample code, then we might be able to help you along.
Johnny J. 7-May-13 8:57am View
You really cannot do anything if Google decides to throw an error - it's outside of your power. Sorry to have to say that!
Johnny J. 7-May-13 8:57am View
In that case it must be due to overload on Googles part. Are you sending repeating requests quickly after one another?
Johnny J. 7-May-13 8:40am View
WHY don't you want to use DISTINCT. It does exactly what you're asking about, and that's what it's made for...
Johnny J. 3-May-13 3:42am View
So, if you only selected one item (which is all you can select), the count of selected items is 1! Problem solved!
Johnny J. 23-Apr-13 3:13am View
That is MUCH more difficult. You will have to find the handle of the control (hWnd) and use windows messaging to get/set the contents. I used to do that many years ago (before .NET), but to be honest, I can't remember exactly how it's done. All I remember is that it was difficult.
Johnny J. 22-Apr-13 9:49am View
There are a lot of threads concerning this type of error. It seems to me that the most of them are because some component on the form (not always the same type) cannot be painted. If I were you, I'd try to check the designer file to see that all components are defined correctly. Also, I would try removing the components on the form one by one to see if I could find out which one is the problem (if this is possible)
Johnny J. 22-Apr-13 9:43am View
I googled a little and came up with this:

They seem to have the same problem and there are a couple of suggestions on how to find it. Maybe there's something there that can help you...
Johnny J. 18-Apr-13 8:43am View
Don't understand! Please try to reformulate your question and give some more information about what you're trying to do.
Johnny J. 18-Apr-13 8:32am View
Hate to tell you, but I doubt very much that you can do that. MAYBE: if you send "CTRL + A" to select the text and "CTRL + C" to copy it to the clip board and then get it from there using ClipBoard.GetText()
Johnny J. 18-Apr-13 8:05am View
You need to post more information about the error message you're getting. The windows version is irrelevant, and so is the VS version.
Johnny J. 18-Apr-13 5:52am View
Sridhar: See the links in Kenneth Hauglands answer
Johnny J. 18-Apr-13 5:51am View
Apart from that, I really don't understand why you want to convert a phone number to a number???? It makes no sense. How do you handle + for international numbers and () for area codes? And if the number starts with a zero, it will of course be removed by the parsing...
Johnny J. 17-Apr-13 10:21am View
You don't need to fire up a DataReader to do this. That would be poor practice. Just select Count(...) and cast the returnvalue from ExecuteScalar to an Integer...
Johnny J. 17-Apr-13 9:42am View
Thanks phantom. Missed the code tags
Johnny J. 17-Apr-13 9:22am View
This might work, but I think you have to put it in the Load event instead of the Shown event. Once the form is shown and the Shown event fired, the Splash screen will presumably already have closed. It will, however stay open during the loading of the form.

Also, you might need to put the DoEvents inside the loop
Johnny J. 17-Apr-13 9:21am View
The OP wants to use the built in splash screen functionality instead of coding his own, so this is not a solution to the OP's question...
Johnny J. 17-Apr-13 9:08am View
CP, Why are you directing him to Stack Overflow when there are at least 20 articles about it here on "our site"??? :-)
Johnny J. 17-Apr-13 8:37am View
You're welcome
Johnny J. 19-Jul-12 2:56am View
The code above doesn't render ok - I'm sorry, I don't know why. But you should get the general idea...
Johnny J. 19-Jul-12 2:54am View
I know it doesn't solve your problem, but it is an answer to your question. Even though it might be possible to tweak your project to use a winforms control in your web project, that is not something you should do. Winforms and ASP controls might look and feel the same to the programmer, but they are not the same. They render in a completely different way, they interact in a completely different way. It is not a recommendable solution.

You should use the ASP menu control, something like:

<asp:Menu ID="mnuAdmin" runat="server" DynamicVerticalOffset="2" DynamicHorizontalOffset="10" Orientation="Horizontal" StaticEnableDefaultPopOutImage="false"
Font-Names="Verdana" StaticSubMenuIndent="0px" CssClass="MAXMenu" StaticMenuStyle-Height="5px"
onmenuitemclick="mnuAdmin_MenuItemClick" >
<staticmenuitemstyle cssclass="MAXPlanningMenu">
<staticmenustyle cssclass="MAXPlanningMenu">
<dynamicmenustyle cssclass="MAXSubMenu">
<dynamicmenuitemstyle cssclass="MAXSubMenu">

<staticmenuitemstyle verticalpadding="5px" horizontalpadding="5px">
<dynamicmenuitemstyle horizontalpadding="2px" verticalpadding="5px">
<asp:MenuItem Text="Administrate users" Selectable="false">
<asp:MenuItem Text="Administrate users" Value="AdministrateUsers">

(Cut directly from a project of mine, so the CSS classes are not general, they are my implementation)

OR you should use one of the MANY Javascript/JQuery menu controls that are available.

Don't downvote an answer just because it's not what you want to hear.
Johnny J. 18-Jul-12 10:57am View
To the one who downvoted me: Don't shoot the messenger because you don't like the message.

If on the other hand, you downvoted me because I'm wrong, then it's ok, but then I also expect you to post the right solution - otherwise you're just being an a**hole.
Johnny J. 20-Jan-12 20:18pm View
I don't know about the two other, but viscomsoft's solution is an ActiveX that they have foolishly enough not been interested in upgrading to .NET. Personally, I would try to find a .NET solution...
Johnny J. 20-Jan-12 20:13pm View
Dave is correct - normally you have to send a specific control/ASCII character or series thereof to the printer. But only the manufacturer can tell you which character(s)...
Johnny J. 21-Nov-11 11:02am View
Thanks everybody - I'm very pleased with the arguments I got here... Will mark it as solved.
Johnny J. 21-Nov-11 4:30am View
That's also true - another good argument. I'd say it's 1-all now... ;-)
Johnny J. 21-Nov-11 4:21am View
That's true. That's actually a good argument for using the reference parameter style instead of my returnvalue style. Hadn't thought that far... :-)
Johnny J. 14-Apr-11 15:46pm View
Changed your subject to something more sensible and descriptive...
Johnny J. 14-Apr-11 15:32pm View
Good link. I didn't know this site existed. I propose this as solution for the question.
Johnny J. 14-Apr-11 15:24pm View
The file length in bytes haven't got much to do with the duration of the song, has it?
Johnny J. 14-Apr-11 15:24pm View
Actually, Rick, I don't think he can get the length from the tag... :-)
Johnny J. 14-Apr-11 10:05am View
Edited for understandability
Johnny J. 13-Apr-11 15:32pm View
What work have you done yourself? Where are you stuck? We don't do your homework for free here...
Get going boy, live up to your last name!
Johnny J. 13-Apr-11 9:58am View
Indeed, There are plenty of articles about global hooks here on the CP, both in C# and VB...
Johnny J. 13-Apr-11 9:43am View
This code will show "01 2011" - Not "JAN 2011"!