Click here to Skip to main content
15,173,311 members

Comments by William Winner (Top 200 by date)

William Winner 14-Mar-11 16:32pm View
   
You are getting what error??? We can't help you unless you tell us what error you're getting.
William Winner 11-Mar-11 16:52pm View
   
Um...ok. Thanks?
William Winner 11-Mar-11 16:36pm View
   
How is it that you've been around here for over a year and you're not familiar with good ole Dalek Dave?
William Winner 11-Mar-11 16:31pm View
   
Can I just ask....

why in the world did you write this: Convert.ToInt32("0")???
William Winner 11-Mar-11 16:29pm View
   
From OP:

and inplace of

listProduseStoc.Items.Add(new ListViewItem(new string[] { dtProduseStoc.Rows[i]["ContractNumar"].ToString(), dtProduseStoc.Rows[i]["DescriereProdus"].ToString(), dtProduseStoc.Rows[i]["PretAchizitie"].ToString(), dtProduseStoc.Rows[i]["PretVanzare"].ToString(), dtProduseStoc.Rows[i]["AdaugatLaData"].ToString(), dtProduseStoc.Rows[i]["AdaugatDe"].ToString(), dtProduseStoc.Rows[i]["Achizitie"].ToString(), dtProduseStoc.Rows[i]["AlteInformatii"].ToString() }));


what to use
William Winner 11-Mar-11 16:28pm View
   
Don't post an answer when you are commenting on an answer. There is an Add Comment link that will allow you to add a comment.
William Winner 10-Mar-11 15:06pm View
   
Well, actually, to be precise with your wording, there is not exact sample at that link that shows how to format a string with "yyyy/MM/dd".
William Winner 10-Mar-11 14:52pm View
   
Hmm...so many bad or inefficient things...

First, never do: "select id from [table name] where name='" + combobox1.Text + "'". You're setting yourself up for SQL injection attacks.

Second, if you are only pulling out one value, you wouldn't use ExecuteReader, but ExecuteScalar.

And finally, she's already pulled out the ID information, so why query that again from the database?
William Winner 10-Mar-11 12:21pm View
   
Are you asking if you can calculate the area of a square differently than a rectangle? Of course you can. And of course, you can use the same equation as for a rectangle. A square is a rectangle with the same width and height, so instead of asking for width and height and multiplying them, you can just ask for one dimension and square it...as the author did here.
William Winner 10-Mar-11 12:20pm View
   
Generally, we don't write people's homework for them. It would have been better to give them hints in the proper direction and/or asking more specific questions about what problems they are having.

Have you heard the phrase, "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."

While it was very kind of you to provide the full code, you aren't really helping him by doing so.
William Winner 9-Mar-11 13:06pm View
   
just an FYI, but people around here don't like textspeak. You'll lose a lot of respect writing like that.
William Winner 8-Mar-11 18:21pm View
   
Did you even look at his code? He's storing a single digit inside each position in the array.

So, if the user typed
75639234, it would be an array with 8 values equaling the individual components. Then, he takes that array and tries to convert it to a string equivalent by looping through the numbers. His function logic is correct. he just doesn't understand that a char is actually an ASCII conversion of an int.
William Winner 8-Mar-11 18:14pm View
   
As an FYI, in case you were curious, the reason you don't do this would be this example:

Someone types the following into TextBox1:

"something');DROP TABLE userinfo;CREATE TABLE Junk (something varchar(255));INSERT INTO Junk VALUES('I just dropped your table and created my own!"

Now, your full insert string equals:

INSERT INTO userinfo values('something');DROP TABLE userinfo;CREATE TABLE Junk (something varchar(255));INSERT INTO Junk VALUES('I just dropped your table and created my own!')
William Winner 8-Mar-11 13:53pm View
   
No. I would always open and close the connection each time. Unless you are doing a series of operations back-to-back, then you can keep it open. I just wouldn't recommend having an idle open connection.
William Winner 8-Mar-11 13:05pm View
   
Does it really take that long to connect to the database? It shouldn't take more than a couple of seconds and is that really worth all of the trouble?
William Winner 8-Mar-11 12:59pm View
   
No, a dotnet application requires the dotnet framework to run.
William Winner 18-Feb-11 12:39pm View
   
Have you stepped through your code? Are you getting what you would expect from each of the steps? Does TreeView.SelectedNode.Text return a valid file name? Does md5.Hash have what you are expecting to find in it? Does buff have anything that is contained in the scanbox.Text string?
William Winner 17-Feb-11 17:24pm View
   
Why do you create the FileStream, set it as a New FileStream in the same line and then in the next line reset it as a New FileStrem? You're just wasting memory doing that and the first FileStream you created will not get cleaned up until you exit your program!

You only need to do it once!

Also, you created the variable read as a string. You don't then need to say read.ToString. That's redundant again.
William Winner 17-Feb-11 13:12pm View
   
To add to this, see this page: http://www.mmowned.com/forums/other-mmos/warhammer-online/186390-sendinput-example-c.html

It has examples on how to do KeyDown and KeyUp
William Winner 16-Feb-11 17:22pm View
   
He doesn't say that he needs three trackbars...he says he wants one with three things to slide. Basically a range slider where you can also set a current value.
William Winner 15-Feb-11 16:59pm View
   
have you tried it without the single quotes? as in

"(&(objectClass=computer)(cn={0})"
William Winner 15-Feb-11 16:56pm View
   
We don't do someone else's homework on this site. If you are stuck on a particular bit of code or concept, ask specifically about that. Otherwise, talk to your professor and arrange for a tutor.
William Winner 15-Feb-11 15:46pm View
   
which is it? more or less transparent? Your post title says more transparent while the post text says less transparent.
William Winner 15-Feb-11 15:00pm View
   
touche!
William Winner 15-Feb-11 14:58pm View
   
Don't post an answer that isn't an answer. You can reply to comments by hovering over the comment and clicking the reply button.
William Winner 15-Feb-11 14:57pm View
   
From Op:

Thnx sir for ur Quick Response.

Actually sir, like in DAP(Download Accelerator Plus) After Downloading the files,It scan all the files if it contain any Virus then It alert.And In DAP we can also add Antivirus for scanning files from our pc.
Like DAP ,scan facility i want to embed or add in my VB.NET Application.

Plz Give Any answer related to it ,how can we implement scan facility like DAP???
William Winner 15-Feb-11 14:56pm View
   
FYI, adding a question mark to a statement doesn't make it a question.

A proper question would have been...How do I create an image and set it's color?
William Winner 15-Feb-11 14:45pm View
   
Is this supposed to be an online submission system? Or are you creating an application that everyone will have to install on their computer and it uploads to and accesses a SQL database somewhere?
William Winner 30-Jan-11 16:57pm View
   
Then you've added something to the array that isn't a Point.

Another good reason for the typed List from System.Collection.Generic. It would tell you if you tried to load something besides a point into it.
William Winner 29-Jan-11 6:34am View
   
I completely agree with you...which is why I didn't try to explain to him how to do it. But you made a blanket statement that said it couldn't be done, when in actuality, it can be. That was all I was saying.
William Winner 28-Jan-11 18:19pm View
   
Well, wouldn't that depend on the structure of the database? Realistically, since a database can have multiple tables, as long as the tables are stand-alone and don't have any joins, they could be in any number of files that you wanted them to be in.

But, yeah, he's outgrown Access if he's over 2 gigs.
William Winner 28-Jan-11 18:17pm View
   
Honestly, the only thing that I would say is that the value has to be null.

Have you added a Try/Catch block on the ExectureNonQuery or whatever you're using? And if so, are you including in the exception message what the value of tbFname.Text is when the error is thrown?
William Winner 28-Jan-11 12:47pm View
   
The not true part is where he says, "you have to loop through the values...". What would have been true would be to say, "you could loop through the values.
William Winner 28-Jan-11 12:46pm View
   
Technically, there is no question in his post. That was my point.

But, besides that, yes, I could tell him how to implement a linked list to build a "map" but, like you said, the OP needs to show some effort. Aside from that, we also don't know if he wants to allow 4 directions or 8 for the bot to move..
William Winner 28-Jan-11 12:26pm View
   
not true...ArrayList.ToArray is overloaded and has an option for specifying the type.
William Winner 28-Jan-11 12:25pm View
   
Actually, that's not true. ArrayList.ToArray() is overloaded and has an option for specifying the type.

Though, your way is still completely valid.
William Winner 28-Jan-11 12:10pm View
   
What is calling the constructor? what code are you using? Without that, we really can't help.
William Winner 28-Jan-11 12:05pm View
   
Especially since they added the "Ask a Question about this Article" button at the top of the Q&A list!
William Winner 27-Jan-11 17:59pm View
   
What exactly makes it the "right" one. As far as I can see, using SelectedIndexChanged or Selected is personal preference and therefore there is no right or wrong!
William Winner 27-Jan-11 17:53pm View
   
I agree with John...you should always make your code clear. I would prefer data.Split(" "). It makes it easier for someone who doesn't know the default to understand what's going on if they look at your code later.
William Winner 27-Jan-11 16:12pm View
   
The Selected event is under the category of Action. Or, you can switch to the alphabetical view and find it right after RightToLeftLayoutChanged.
William Winner 27-Jan-11 16:09pm View
   
Well, just like with any control, there are multiple events that one could use. If you look at the code for the TabControl, specifically the WmSelChange() method, what you will find is that OnSelected is fired immediately before OnSelectedIndexChanged. And with the SelectedIndexChanged event, you don't get anything in your arguments.

But with the Selected event, you get passed not only the SelectedTab object, but also the SelectedIndex number. This means that the SelectedTab event is a more self-contained solution and a better one.
William Winner 10-Jan-11 13:27pm View
   
Don't post an answer that is really a comment to another answer. Use the Add Comment button as I have done.
William Winner 10-Jan-11 13:27pm View
   
From OP:

Thanks, Slacker007. I checked the link you provided but don't see an answer. I'm new to programming so maybe I am missing it. Can you be more specific?
William Winner 10-Jan-11 13:26pm View
   
What else does the error message say? what function does it say is undefined? How are you calling it?

You need to provide more info.
William Winner 10-Jan-11 13:24pm View
   
I agree...first rule of these forums is

Have you googled it?!
William Winner 10-Jan-11 12:58pm View
   
I don't understand how this answers the question...if he types that into a commandline, then it wasn't using autostart...
William Winner 10-Jan-11 12:46pm View
   
Are you using Visual Studio? And are you talking VB.Net or VB6 or something else?
William Winner 7-Jan-11 15:21pm View
   
Are you getting any kind of error, or is it just not working as expected? I don't see where you start shoot in another thread, so I assume it must happen in the form itself...is that correct?

And why did you set CheckForIllegalCrossThreadCalls to false?

Also, did you ever initialize the PictureBoxes in your array? As in
golyok[index] = New PictureBox()

You would also need to add it to your form for it to be displayed...are you doing that?
William Winner 7-Jan-11 13:59pm View
   
That's an interesting difference between VB and C#. VB defaults to adding controls to forms as Friend. So, you can access them automatically within the assembly.
William Winner 7-Jan-11 13:56pm View
   
Invoke deals with cross-thread operations and you haven't mentioned that you have multiple threads. Are you working in a multi-threaded application?
William Winner 7-Jan-11 12:49pm View
   
Well, at revision 1, the post still said,

So if the TextBox text looks like this:

hello

world

implying that the carriage returns are already there. That was my point.
William Winner 7-Jan-11 12:31pm View
   
Is the field a variable length record? I'm not at all familiar with VMS, but it looks like if you use a variable length record, you can load in data with CR-LF and it will convert them appropriately. They aren't actually stored in the db, but it stores the length of each line in bytes.
William Winner 7-Jan-11 12:26pm View
   
Though it does look like the assumption is that the carriage returns are already in the TextBox, so your answer actually doesn't address the question...
William Winner 6-Jan-11 12:43pm View
   
WTF? purchasing third-party hardware is the only way that you will be able to measure nano-seconds. So, who has a problem with that answer?
William Winner 4-Jan-11 12:28pm View
   
I do not think anyone understands what you are asking. Especially since the word "Chromosome" does not mean what you think it means. From dictionary.com:

"any of several threadlike bodies, consisting of chromatin, that carry the genes in a linear order: the human species has 23 pairs, designated 1 to 22 in order of decreasing size and X and Y for the female and male sex chromosomes respectively. "
William Winner 3-Jan-11 14:28pm View
   
What exactly does the error message say? (are there any inner messages?) And what line does it say the message is for?

And are you just trying to make things more complicated? What's with the
if ((fontstyle & System.Drawing.FontStyle.Bold) == 0)?

What's wrong with
if (font.Style != FontStyle.Bold)?

That's, IMO, a lot more readable.
William Winner 30-Dec-10 17:09pm View
   
A storyboard should work fine for your needs...though I've never used one.
William Winner 30-Dec-10 13:30pm View
   
he's getting the right value for val2. And since he's specifying the specific name, then one could assume that he's using the right indices...but you know what they say about assuming!
William Winner 30-Dec-10 13:28pm View
   
are you a magician? How in the world do you know he's doing anything with columns? That's amazing that you could sense that since he didn't say anything about what he was doing!
William Winner 30-Dec-10 12:53pm View
   
Perhaps your two voter thought that your answer didn't really answer the person's question and for that matter was hard to follow to begin with. Maybe English isn't your first language (though you do list the US as your location) because your answer was quite hard to read.
William Winner 29-Dec-10 16:06pm View
   
People still use modems?
William Winner 29-Dec-10 13:36pm View
   
I wouldn't mark an answer as a solution if you haven't gotten a final solution to your problem. People looking at the board see that it has a solution and won't bother to look at it anymore.
William Winner 29-Dec-10 13:31pm View
   
SelectedItem is read-only
William Winner 27-Dec-10 18:59pm View
   
From OP:
Yer i know i just started not using namespace std and then decided to half way through
William Winner 27-Dec-10 18:22pm View
   
just a comment...you included using namespace std;

You don't need to keep writing std::cout, std::endl, etc... That's the whole point of the using namespace keyword.
William Winner 24-Dec-10 13:18pm View
   
sorry...went a bit quickly with this last time. The for loop's second part is the statement while statement. So, while that part is true, the for loop will continue, so you really want
for(i=0;i<=5;i++)
William Winner 22-Dec-10 14:49pm View
   
no, the second statement is valid.
William Winner 22-Dec-10 14:35pm View
   
You have to commit the transaction in the stored procedure. see here: http://msdn.microsoft.com/en-us/library/ms188929.aspx
William Winner 22-Dec-10 14:06pm View
   
the chances of someone reading through your code to find out where you've gone wrong are pretty slim. You need to step through your code and figure out exactly where it goes wrong. Saying "it doesn't go beyond the initial stage" doesn't tell us anything. What is the initial stage? How far does it get? Does it give you an error message?
William Winner 10-Dec-10 18:52pm View
   
Just an FYI, but classes don't have extensions. You have two files called Admin.cs and Arog.cs but you could have any number of classes inside of those files.
William Winner 7-Dec-10 15:32pm View
   
well, I would love to be able to retire to Hawaii and never want for anything, but if I want to be able to do that, I'm going to have to work hard myself to get it, not ask someone else for it.
William Winner 7-Dec-10 11:38am View
   
yep...calling BringToFront before adding it (using Controls.Add()) doesn't do anything. You need to call it after adding it.
William Winner 7-Dec-10 10:51am View
   
No, you're actually not opening a file. You are using the file dialog to select a file location, but then you are pulling out information on that file from a database. And your join statement is correct, though like was said, you may want to change it to a left join. But you don't need to select every single record to be returned. This statement would be just as valid:

"select A.dept, B.firstdegA, C.secdegA, D.thirddegA, E.dipA, F.hndA, G.phone_one from apps as A join firstdeg as B on A.FileLoc = B.FileLoc join secdeg as C on A.FileLoc = C.FileLoc join thirddeg as D on A.FileLoc = D.FileLoc join dip as E on A.FileLoc = E.FileLoc join hnd as F on A.FileLoc = F.FileLoc join contacts as G on A.FileLoc = G.FileLoc where A.FileLoc = '" + filename + "'"

You need to look up how a SQL statement works. In a select statement you tell it to return only the columns that you are interested from. In the From part of the statement you tell it from what table, so you need the whole join info, though it could just as easily be done with 5 separate sql select statements.
William Winner 6-Dec-10 18:17pm View
   
fyi, it wasn't me that down-voted you...you were right...it just seemed like you were implying an inherent property that doesn't exist.
William Winner 6-Dec-10 15:18pm View
   
where in the world did you come up with a "mouseDoneMoving" position?
William Winner 8-Nov-10 16:22pm View
   
first, this is an English forum.

Secondly, we aren't going to provide you with code for something that you could google yourself. Creating user accounts on mail servers is fairly basic stuff if you know the servers.
William Winner 8-Nov-10 15:09pm View
   
I don't know if you speak English, but this is really an English forum. You won't generally get much a reply asking in french.
William Winner 5-Nov-10 15:38pm View
   
this does work, but you're forgetting a very important part of the RichTextBox...the formatting information.

Instead of
byte[] RichBuf = Encoding.ASCII.GetBytes(richTextBox1.Text);
use:
byte[] RichBuf = Encoding.ASCII.GetBytes(richTextBox1.Rtf);

and then you'll preserve the formatting
William Winner 5-Nov-10 14:40pm View
   
looks like I may have changed your code while you were commenting...is it the line that says, "scanf(" %c" , &decision);" or the one that says, "resistance_value= (100*x + 10*y + *z)*pow(10, w);"?
William Winner 5-Nov-10 14:22pm View
   
since you posted like 6 questions...I'm assuming that this is all homework...which is not cool...
William Winner 5-Nov-10 12:31pm View
   
he said, "without changing Pen width"
William Winner 2-Nov-10 11:59am View
   
Not sure I can answer your question, but I'm curious as to what you think keeping the connection open does...that's not the standard way to handle database operations.
William Winner 29-Oct-10 17:59pm View
   
when you posted your question, there were some rules to follow below the box.

The second one is "Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with."

Being specific doesn't mean saying, "I want to implement this". It means, "I'm having problems getting my DataAdapter to work, here's my code, what am I doing wrong?"
William Winner 29-Oct-10 13:59pm View
   
either throw a messagebox in and output the name value, or step through your code in the debugger and see what value you are actually getting for name. That could be your problem.
William Winner 28-Oct-10 15:52pm View
   
you have to post some code and tell us what the exception is. It could be a dozen different problems (or more) so there's no way for us to tell you what the problem is.

For instance, how are you connecting to your database? how are you loading it into the database?
William Winner 27-Oct-10 17:16pm View
   
Properly formatted questions will get you a long way on here. However, the inverse is also true...poorly formatted questions are bound to get you no helpful responses.

Also, txtspeak is very very very much frowned upon here.

And I would hope that they question was important to you or else why would I put any time into an answer?

Finally, next time you post a question on the site, look around the page you're posting on before doing so. YOu would have found "A few simple rules when posting your question".
Number 1 is: Have you searched or Googled for a solution?
Number 2 is: Be specific! Don't ask "I need to write a booking application". Specify exactly what it is you need help with.

You didn't follow either one.
William Winner 27-Oct-10 16:14pm View
   
First, this:
e.Keychar.equals=negativeS
is not the way to allow minus signs. In fact that shouldn't even compile that way.
Second...while adding a line where you did to allow minus signs, doesn't handle it.
Someone could type "34.534-" and that's not a valid double so it will throw an error. You have to also handle the logic of what to do if the minus key is hit.
Third, don't post an update as an answer. Either update your original post, or add a comment to an answer that you're responding to.
William Winner 26-Oct-10 18:30pm View
   
honestly, I don't understand your question...what are you asking?
William Winner 26-Oct-10 15:04pm View
   
that's possible...though most likely unlikely...and it doesn't work that way if the form was created using Application.Run()...only if it was shown using Form.ShowDialog().
William Winner 26-Oct-10 14:56pm View
   
you're not asking for much are you?
William Winner 26-Oct-10 14:47pm View
   
if you provide a bit more code, we could possibly help you understand better what is going on. Like, what happens in the Form_Load event of d1 and what happens after d1.Show() is hit.
William Winner 26-Oct-10 14:45pm View
   
Setting the form's cancelbutton doesn't do what you think it does. From MSDN: "Gets or sets the button control that is clicked when the user presses the ESC key." Setting it as the cancel button doesn't close the form when it is clicked.
William Winner 25-Oct-10 12:14pm View
   
I sure hope that someone isn't paying you to do this...because they're money is just going to disappear.
William Winner 22-Oct-10 13:17pm View
   
probably because English isn't his first language...

Aside from that, you chose to answer when an answer had already been given (and most likely already been marked as the solution). And I think from the tone of your answer that you were just trying to make the point that he didn't phrase his question properly.
William Winner 22-Oct-10 12:59pm View
   
If you're going to vote me a one, you should have the courage to at least say why...
William Winner 22-Oct-10 12:58pm View
   
If you're going to vote me a one, you should have the courage to at least say why...
William Winner 22-Oct-10 12:58pm View
   
If you're going to vote me a one, you should have the courage to at least say why...
William Winner 22-Oct-10 12:24pm View
   
I like that...."what do you mean by logic?"
William Winner 22-Oct-10 12:13pm View
   
While his original question was unclear, I think it was clear that he was saying, he wants to take a date and add a number of days to the first date and get the second date.

"like in 10/28/2010 add 7 days so the next date is 11/04/2010"
William Winner 22-Oct-10 12:11pm View
   
that works for you because I assume you are accessing the link from the server itself. file:/// tells the browser to look on the local computer for the file. So if you use a browser on your server, it looks on the servers hard-drive.

However, if Joe Schmo uses his computer (not the server) and types that into his browser, it will look for that file on Joe Schmo's computer.
William Winner 22-Oct-10 11:58am View
   
gave you a 5 vote because your answer is correct and shouldn't be downvoted.
William Winner 22-Oct-10 11:56am View
   
yep...you need a lot of help. First, you're using VB6 still.

But, more seriously, you need help in learning how to ask a question. How can we help you with any code if you haven't provided it and told us what is not working?

To answer your question, no, we can't help you, because we don't know what your problem is.
William Winner 21-Oct-10 17:04pm View
   
By the way, if my answer provided you with enough information to move on, then make sure to mark it as a solution so others know your question has been solved.

If it didn't, post a comment to my answer with questions or why it doesn't work for you.
William Winner 21-Oct-10 11:45am View
   
It's seems to need us to send a cookie, but I can't even get it to download the original cookie...
William Winner 21-Oct-10 11:32am View
   
The only problem is that the links on the page he gave us don't go to a temporary URL. If you pull out the HTML of the actual links, I don't even see how they're doing the re-directing. Even the temporary url doesn't provide a link to get to the document...
William Winner 21-Oct-10 11:07am View
   
I fixed the link and added a bit to the answer...
William Winner 20-Oct-10 16:36pm View
   
I don't know how to answer your question, but I had some comments about your code. First, if you are only going to use one of the columns from your SELECT statement, why would you include more than one column in the SELECT to begin with? Second, in your SELECT where you select multiple columns, you say to select from two different tables, but you don't actually select anything from the second table, so there is no need to list ITEMPGROUP in your FROM statement. You could just as well write:
"SELECT ITEMNAME FROM ITEMMASTER WHERE ITEMGROUPCODE='" + sqlrdr(0).ToString + "'"
William Winner 15-Oct-10 17:56pm View
   
Posting an answer to reply to another answer is not the proper way. There is a link at the bottom of each answer that says "Add Comment". Click it and then whatever you submit will actually go to the author of the answer. Posting a new "answer" only lets you know that something has been done.
William Winner 15-Oct-10 16:50pm View
   
no...and I never said that I did...in fact, I believe I said that your answer was technically correct.
William Winner 15-Oct-10 13:13pm View
   
Technically this works, but really, you're not splitting based on the double quotes in this case, you just want to remove them.
William Winner 15-Oct-10 13:12pm View
   
he already know how to do the split. His problem was that the text was coming in with the double quotes surrounding the string types and he didn't want the double quotes around the text.
William Winner 15-Oct-10 13:11pm View
   
or instead of doing them one by one, you could remove it from the string before splitting it.
William Winner 15-Oct-10 12:57pm View
   
which is what I explained how to do... so what's your problem?
William Winner 15-Oct-10 11:37am View
   
Is Vb code too difficult for you?
William Winner 14-Oct-10 17:45pm View
   
look at your phone
William Winner 14-Oct-10 14:14pm View
   
So are you wanting to write some type of recursive code or are you just being asked to create new functions to do what you are already doing?
Personally, it seems like the code is not entry level and if you don't know how to do either of those options, you are probably in over your head.
William Winner 14-Oct-10 14:09pm View
   
no it won't. listBox1.SelectedItems.ToString() = "System.Windows.Forms.ListBox+SelectedObjectCollection"
William Winner 14-Oct-10 11:33am View
   
I don't have an answer because who uses mmio anything anymore? In fact, if you go to msdn and look up mmioOpen, here's what it says "Note: This function is deprecated. Applications should call CreateFile to create or open files."
William Winner 14-Oct-10 11:15am View
   
test
William Winner 14-Oct-10 11:08am View
   
what type of object is table exactly? As far as I can see, the only thing you added to table was one column, which I assume is the ID. So, how would it give you anything else?
William Winner 12-Oct-10 17:57pm View
   
First of all, I would recommend putting a description of your question along with the actual question at the very beginning. Then, include only the code that is actually giving you problems and not just all of your code.

For example, when do you "switch to GameCanvas"? and what "exit command" doesn't work?
William Winner 28-Sep-10 14:33pm View
   
Why wouldn't you want to use word automation? The Office Web Components are a free download.
William Winner 28-Sep-10 14:23pm View
   
Without seeing some code, it's a little hard for us to tell what's going on.

(That doesn't mean paste all of your code here...just what's related to the problem)
William Winner 25-Sep-10 11:38am View
   
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
William Winner 25-Sep-10 11:37am View
   
Thanks Sandeep
William Winner 16-Sep-10 12:24pm View
   
I thought the same thing the first time I looked at it. The second Try/Catch block is not within the first Catch block.

He wrote:
catch (Exception ex)
{ MessageBox.Show(ex.Message, ex.GetType().ToString() + " comboBox1_SelectedIndexChanged"); }
try

which is the same as:
catch (Exception ex)
{
MessageBox.Show(ex.Message, ex.GetType().ToString() + " comboBox1_SelectedIndexChanged");
}
try
William Winner 16-Sep-10 12:22pm View
   
That's why you're getting the error. If you are using the System.Windows.Controls Namespace, then you have to use SelectedItems, not SelectedIndices.

Though I don't know why you would declare System.Windows.Controls instead of System.Windows.Forms.
William Winner 16-Sep-10 11:34am View
   
google? what is this gibberish that you're spouting?
William Winner 16-Sep-10 11:34am View
   
Reason for my vote of 1
This isn't a question.
William Winner 16-Sep-10 11:17am View
   
Reason for my vote of 1
First, there isn't a question here.

Second, we don't do your homework for you.

Third, you need to show that you've actually tried to solve this and that you've gotten stuck on something. Then, ask about that specific something.
William Winner 16-Sep-10 11:15am View
   
That's because the standard ListBox that everyone uses comes from System.Windows.Forms.

The ListBox in System.Windows.Controls has a SelectedItems property that should do the same thing.

Oh...and you shouldn't post an answer that isn't answer...you can comment on someone else's answer just as I have done here.
William Winner 15-Sep-10 17:57pm View
   
You do realize that with your new code, you created dateplus3, but then you set tb2.Text to DateTime.Now, right?

Is that really what you wanted?
William Winner 15-Sep-10 15:05pm View
   
If you don't know how to set up individual counters, then you're going to have a very hard time in this class.

All I mean by that is:

int Cats = 0;
int Dogs = 0;
int CatFood = 0;
int DogFood = 0;
etc...

A counter is something you use to keep track of the count of something. It can be a float, int, double, long, etc...
William Winner 15-Sep-10 14:03pm View
   
Just a tip...but if it hasn't been introduced in your class yet, your professor may not like you using it. They tend to want to you stick with what they've gone over only. But, obviously, you can use it if you want and hope it's ok.
William Winner 15-Sep-10 13:56pm View
   
I don't see anywhere in the description that says a running tab needs to be displayed of purchased items.
William Winner 15-Sep-10 13:34pm View
   
Reason for my vote of 1
as has been said, there are many ways to do it without the ajax toolkit.
William Winner 14-Sep-10 12:30pm View
   
I realize that English is not your first language, but you were not very specific. The answer provided is what I would have said. Without clarification, we cannot know how to answer your question because we don't know what you are asking.
William Winner 14-Sep-10 12:28pm View
   
My vote of 1:
Reason 1: you didn't actually ask a question.
Reason 2: try google.
Reason 3: you didn't show us you had tried anything yet.
William Winner 14-Sep-10 11:45am View
   
Thomas: In the future, don't post an answer with another question or comments about responses. Either update your original post (as I have done for you) or add a comment...as I am doing now.
William Winner 14-Sep-10 11:39am View
   
My vote of 2:

They're definitely fair questions...but you need to learn how to properly write a question and how to not do it curtly. You also need to learn how to actually ask a question and write in complete sentences.

How to release... is not a question.

And "Suggest tool." is a command, not a question or request.

There's a proper way to ask for help...and then there's the way you did it.
William Winner 13-Sep-10 17:54pm View
   
@Kschuler...e.KeyChar is only available in the KeyPress event...
William Winner 3-Sep-10 16:10pm View
   
Why do you need to serialize it? Why can't you just use the Image.Save Method?
William Winner 3-Sep-10 12:26pm View
   
You need to provide some code. We can't tell how you implemented it and therefore we can't help you with your question.
William Winner 3-Sep-10 12:15pm View
   
Reason for my vote of 2
Didn't provide us with enough information for us to be able to provide you with an answer. We can't know why without seeing your code. But the others are right. You obviously added it again.
William Winner 3-Sep-10 12:14pm View
   
Reason for my vote of 1
what?

Do you actually have a question?
William Winner 3-Sep-10 12:11pm View
   
Reason for my vote of 2
it didn't appear to me that the author was trying to add methods to existing types, but wanted to be able to pass in only the types that are inherited from a specific type. I don't think extension methods are what he was looking for.
William Winner 3-Sep-10 12:08pm View
   
Reason for my vote of 5
Yeah, that was what I was going to say.

For a nice example, I wrote up a little spell checker for textboxes. It is based on controls that inherit from TextBoxBase. So, my methods are written like:
Private void DoSomething(TextBoxBase myTextBox)
{
if(myTextBox is RichTextBox)
{
//RichTextBox Stuff
}
else if(myTextBox is TextBox)
{
//standard TextBox stuff
}
}
William Winner 3-Sep-10 12:04pm View
   
Reason for my vote of 1
either this is an extremely simple question and answer or we've not been provided with the necessary information.
William Winner 2-Sep-10 18:46pm View
   
Reason for my vote of 1
pretty easy questions to google and find all you need.
William Winner 6-Aug-10 17:12pm View
   
this is a general programming forum. If you want to ask a question about a specific solution/article you need to do so on the page with that solution/article not in here.
William Winner 6-Aug-10 17:10pm View
   
You seem to be posting a question to a particular article. This is a general programming forum and the chances of the author seeing your post are pretty slim. You need to go back to that article and scroll down to the bottom of the page. There is a forum there specific to that article that this question should be placed in.
William Winner 3-Aug-10 14:59pm View
   
Reason for my vote of 1
Yeah...not gonna happen.

If you want someone to provide you with code, you're going to have to pay them.

Instead of taking on a project that you have no idea how to do, you should first learn how to do it and then agree to the project.
William Winner 3-Aug-10 13:49pm View
   
Reason for my vote of 1
not an answer but another question.

And yes, if they created it, then it's possible for you to create it.
William Winner 3-Aug-10 13:47pm View
   
Where is the database located. My guess is it's on the local machine and needs to be on the network, or if it's on the network, then the other machines may not have mapped the drives with the same drive letter.
William Winner 3-Aug-10 13:25pm View
   
Reason for my vote of 1
This sounds like he wants the application to allow for any number of cs files provided by the user and not just ones he has to begin with.
William Winner 3-Aug-10 13:22pm View
   
Reason for my vote of 5
that's what I would have said.
William Winner 3-Aug-10 13:22pm View
   
You are right in that they don't have the txt extension. But a cs file is stored exactly the same as a txt file. I can rename a word document to have an extension of "ghr" and it's still a word document.
William Winner 3-Aug-10 13:06pm View
   
you can use pre tags in an answer to format the code.
William Winner 3-Aug-10 13:02pm View
   
Reason for my vote of 1
not an actual answer but a comment to another answer.
William Winner 3-Aug-10 13:01pm View
   
First, a little advice about how this forum is meant to work.

1) You ask a question. (step 1 done properly)
2) People try to answer your question (step 2 done properly)
3) If you have a question about a specific answer or you want to post some kind of comment to that answer, use the "Add Comment" button at the bottom of the answer (not done properly).
4) When the answer is solved (meaning that you don't have the problem anymore) mark the answer(s) that helped you as solved (not done properly).

Don't post an "answer" if it doesn't answer the question and you're commenting on someone else's answer. And don't mark an answer as being the solution if it doesn't solve the problem.
William Winner 3-Aug-10 12:50pm View
   
Reason for my vote of 1
You didn't ask a question.
William Winner 2-Aug-10 15:23pm View
   
Reason for my vote of 4
technically, the OP did ask how to regain the Maximize and Minimize Properties and technically, you did provide a solution to do that.
William Winner 2-Aug-10 15:20pm View
   
don't post an answer that isn't an answer!

I went ahead and deleted your fake answer.
William Winner 2-Aug-10 15:19pm View
   
Reason for my vote of 1
I'm excited for you. It's great that you have a goal in mind. And, you've already defined your framework.

Congratulations!

But this forum isn't meant for people to make announcements.
William Winner 2-Aug-10 15:18pm View
   
yes I can. But I will not. These are things you need to find a book to read up on or pay for a class somewhere. This web site isn't meant to be as a tutorial for all wannabe programmers. If you're a starter, then you need to start with something structured, and not just trying to figure it out as you go.

As a side note, looking at the other comments, you also need to make sure that you're checking what the user is typing in the TextBoxes. I will help you with a workflow, but you need to figure out how to accomplish it on your own.

1.)Check that what was typed in the boxes is appropriate (ie. for Month that it's an integer between 1 and 12.)
2.)Create the DateTimes
3.)Compare the DateTimes
4.)Do something based on the result of the comparison.
William Winner 2-Aug-10 15:08pm View
   
Reason for my vote of 1
not an appropriate question for this forum. (It's a Quick Answers forum...emphasis on "Quick")
William Winner 2-Aug-10 15:07pm View
   
Reason for my vote of 5
that definitely answers the question. Too bad Manas.rn couldn't do a simply google search.
William Winner 2-Aug-10 15:04pm View
   
Reason for my vote of 2
You need to ask a specific question. We won't write the code to do it for you. You need to tell us what you're stuck on.

Are you wondering how to store the filters? Are you wondering how to do the filtering? Are you wondering how to do this when a new message is received?

Be more specific and you'll get more responses.
William Winner 2-Aug-10 14:56pm View
   
it may just be me, but I have no idea what you're saying. I recognize all of the words, but they don't seem to me to be a coherent question.
William Winner 2-Aug-10 13:58pm View
   
you should bind the DataGridView in the FormLoad after the DataTable was created and not every time you add a new row. It's just an unnecessary step.
William Winner 2-Aug-10 13:57pm View
   
Reason for my vote of 1
this added nothing from Sunasara's answer.

Also, you should bind the DataGridView right after the DataTable was created, not everytime you add a new row.
William Winner 2-Aug-10 13:32pm View
   
Reason for my vote of 5
"useless...absolutely useless..."

not you, but the person asking the question.

And what's with koool.kabeer?
William Winner 2-Aug-10 13:29pm View
   
Reason for my vote of 1
what's your question?
William Winner 30-Jul-10 18:23pm View
   
The point that was being made is that even though you might add the items in the same logical way and in a specific order does not mean that the first element in the dictionary is the first one that was added. It's implemented as a hash table meaning that as you add a new entry it could get placed anywhere in the list.

It really sounds like you'd be better off using a List. Why did you choose the dictionary to begin with?
William Winner 30-Jul-10 18:13pm View
   
I should also mention that if you want to avoid SQL injection attacks, then you should use parameters instead of the straight

cmd.CommandText = "ALTER DATABASE PASSWORD [" & password & "][password]"

For my purposes, no one using the database would even know what a SQL injection attack is, nor would it really matter since it's a blank database to begin with, so there's nothing they can screw up.
William Winner 30-Jul-10 13:42pm View
   
Reason for my vote of 1
um...you need to provide a bit more information than just that.
William Winner 29-Jul-10 12:37pm View
   
you got your answer, but this is a perfect example of why proper use of the Try/Catch is so important. Many, many people just add a Try/Catch to a huge block of code, when it is meant, AFAIK, to target specific statements that could throw an error.

People are using it like VB6's On Error Goto which is still available if that's what you're looking for. IMO, there should only be one line of code in each Try/Catch block aside from a few exceptions.
William Winner 28-Jul-10 12:55pm View
   
Have you checked what the query string is before running the ExecuteReader and making sure that the < and > getting in correctly?
William Winner 28-Jul-10 12:44pm View
   
You also need to check to see if the object is nothing before trying to use it. I would guess you're code is something like this:

Private Sub ActivateControls(rd As RadioButton, Optional txt As TextBox = Nothing, txt2 As TextBox = Nothing)
If txt2.Text <> "" Then
'do something
End If
End Sub

If you do that or try to access txt2 or txt anywhere in your routine without first running

If txt2 IsNot Nothing Then ...

you'll get that error.
William Winner 28-Jul-10 12:32pm View
   
your question seems very specific to the article that you referenced. This forum is for general questions, not about code written by someone and then posted on here that is giving you problems.
William Winner 28-Jul-10 12:27pm View
   
Did you actually read what I wrote? Also, you said, "i do not want the whole code, only some ideas??" so I won't provide that.

I would create a class that stores all of that information. Its constructor could be just the original word and then it could fill out a list with the synonyms. You could then have a property that would provide you with the {original|synonym1|...} syntax. Then, you replace the selected text with that syntax.

Then when you spin the word, you look for that syntax and replace it with the word that they selected. You need to look for the whole text, because what if someone on their own wrote "The list is: {23|24|25}" and you just searched for a brace with pipes in it? You wouldn't replace the write text.
William Winner 28-Jul-10 11:55am View
   
just a friendly tip. I wouldn't use your email address as your username unless you want to get a lot of spam.
William Winner 28-Jul-10 11:44am View
   
Now you've gone and deleted the "answer" you posted where I responded to your comments.

You don't put every single TextBox into a single List. You have a separate List for each type of TextBox as in:

Private txtUsrNmArr As List(Of TextBox)
Private txtPswdArr As List(Of TextBox)

Each control that you've numbered would get its own List.

Also, you don't need to write a different For Loop to iterate through each one. I know that I did that in my answer, but its unnecessary and you need to learn to think for yourself.

For i = 1 To 15
txtUsrNmArr.Add(Me.Controls.Find("txtUsrNm_" & i, False)(0))
...
cmbAdminArr.Add(Me.Controls.Find("cmdAdmin" & i, False)(0))
Next
William Winner 27-Jul-10 15:34pm View
   
Reason for my vote of 1
where is the question?
William Winner 27-Jul-10 15:03pm View
   
Reason for my vote of 1
pretty basic google search
William Winner 27-Jul-10 12:31pm View
   
First, if you post an answer to your own question the only person that knows it is you. You should post a comment instead.

Secondly, you wouldn't want a single array for all of the textboxes. That was just an example. You would want a different array for each "class" of textbox. In your case like this:

Private txtPswdArray As List(Of TextBox)
Private txtFNameArray As List(Of TextBox)
...fill in the rest.

Then you add each textbox to the appropriate array. In your case, you would have 5 TextBox Lists, 2 ComboBox Lists and 1 CheckBox List.

And I did do it in separate For loops, but actually that's unecessary. You could do it all in one for loop.

For i = 1 to 15
chkBoxArray.Add(Me.Controls.Find("chkBox" & i, False)(0))
txtUsrNmArray.Add(Me.Controls.Find("txtUsrNm_" & i, False)(0))
txtPswdArray.Add(Me.Controls.Find("txtPswd_" & i, False)(0))
...the rest of them.
Next
William Winner 26-Jul-10 14:40pm View
   
This is a great entry if you want to do a global hook...but it seems more like he just wants a shortcut for his form, not a global hook.
William Winner 26-Jul-10 14:26pm View
   
Reason for my vote of 1
you have to provide more information than that.

What is the line of code that is throwing the error?

Which parameter is not valid?
William Winner 22-Jul-10 17:41pm View
   
good god...you typed in over 18,000 individual case statements?

It seems like you should really have a database with all of that in it and then you can just run a query on the db. Plus, if you have to add something, you don't have to re-write your code.
William Winner 22-Jul-10 17:37pm View
   
Reason for my vote of 1
you need to show that you've put in some effort first. We won't just provide you with code to do what you want.

Google treeview and you'll find a lot of programs that can do what you want.
William Winner 9-Jul-10 16:16pm View
   
is it just me, or are there some extra > tags in the asp code?

Also, you said you "ran into trouble". You're going to have to describe the trouble a little more in detail. What kind of trouble?
William Winner 9-Jul-10 14:48pm View
   
personally, I wouldn't even use a regular expression to do this. I'm sure someone can write a great one to do it, but I would just write a custom function to do it.

For me, it would be a lot less headache than doing a RegEx.
William Winner 8-Jul-10 14:26pm View
   
what's wrong with VBReFormer? It has a free version.
William Winner 8-Jul-10 14:19pm View
   
Reason for my vote of 1
wow...well that is definitely not a "quick" answer appropriate question.

For that matter, it's also not a question.
William Winner 8-Jul-10 14:17pm View
   
well, your first question was solved...specifically about L being undeclared.

You appear to have other issues. With your other issues, you may want a new question with more code.

Also, as an FYI, you can comment on someone's answer, and posting an "answer" that isn't one is frowned upon.
William Winner 8-Jul-10 13:42pm View
   
Reason for my vote of 5
that does appear to be the problem.
William Winner 8-Jul-10 13:37pm View
   
Reason for my vote of 1
looks like you need to do a bit of research before asking us to do it for you.
William Winner 8-Jul-10 12:33pm View
   
Reason for my vote of 1
This is a quick answers forum. Not meant to help you design an entire project from scratch when you clearly have no idea what you're doing.
William Winner 8-Jul-10 12:31pm View
   
You don't post an answer to a question asking a question. If you want to post a question post a new one.