1,857 Posted Topics
Re: First off you should use copy and paste to insert your code, instead of a picture. That way someone can copy your code and make adjustments, without having to type the whole thing. The line 2 should probably use the `EOF` constant, instead of `null` Your string variables should be … | |
Re: As far as I know you can't have a negative index to an array. Also when an array is declared all elements exist. I think all you can do is check if an element equals zero or null. | |
Re: It's probably doable but, I think, quite complicated. I would think that you'd need to monitor [logon/logoff](http://www.codeproject.com/Articles/133372/Monitoring-of-Logon-Logout-in-Terminal-and-Client), [keyboard/mouse activity](http://www.codeproject.com/Articles/7466/Writing-a-Macro-Recorder-Player-using-Win32-Journa), [running processes](http://www.codeproject.com/Articles/13289/Managing-Processes-and-Shell-API-Functionality-usi), [active processes](http://activitymonitor.codeplex.com/), and maybe more. Some if not all of these would require API functions to do, which is not for the faint of heart. Buying someone elses software … | |
Re: Not sure if this is what you want but this will produce 50 random numbers, 1 < number < 10: List<double> NewArray = new List<double>(); Random NewRand = new Random(); for (int i = 0; i < 50; i++) { double NewNumber = (NewRand.Next(11,100) / 10f); NewArray.Add(NewNumber); } for (int … | |
Re: I think your instructor is trying to pull a fast on you. A typical Binary Search has to have a sorted array to search. | |
Re: try int o; for (o = 1; o <= 25; o++) { if (o % 3 != 0) Console.WriteLine(o); } Console.ReadLine(); | |
Re: try Dim strText As String strText = Form1.RichTextBox1.Text If strText = "" Then MsgBox("You need to put text in the textbox before I speak it!", MsgBoxStyle.OkOnly, "Robot") Else Dim objVoice = CreateObject("SAPI.SpVoice") objVoice.Speak(strText) End If Change 'Form1' to the name of your form. By default controls are declared as Friend. … | |
Re: If you don't absolutely have to use the mshtml interface you could try this: Imports System.IO Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Set the webbrowser control visible property to false if you don't need it for anything else. WebBrowser1.Url = New … | |
Re: instead of declaring them at the sub level Dim lblPrtNo As Label = New Label Dim txbPartNo As TextBox = New TextBox I think you need to declare them at the class level like this: Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label One of the best ways … | |
Re: There is more than one way. Here's [one way](http://social.msdn.microsoft.com/forums/en-us/Vsexpressvb/thread/2A8A2441-3926-4B0D-9D9A-4F66D7FD771E) | |
Re: > So in a way it's searching the folder Y:\0000_CCB_MINUTS\ and it's subfolders, find the file name then hyperlink to that file within the subfolder. Here's a little function that will take the filename and the root folder and find the file and return the full path of the file … | |
Re: Perhaps try: if(!int.TryParse("0"+dataGridView2.CurrentRow.Cells["invoice_ID"].Value.ToString(),out int sel)) MessageBox("0"+dataGridView2.CurrentRow.Cells["invoice_ID"].Value.ToString()); This way you can see exactly why the string is not parsing right. If there is anything in the string that isn't a digit, a comma, or a period then it will fail. | |
Re: There is code for a biginteger class, if you need it, search the posts here for biginteger. | |
Re: set a break point and check the values of the strings. | |
Re: Try this: Add to form load event 'tell each checkbox to use the same handler for the CheckedChange event For Each cb As CheckBox In Me.Controls.OfType(Of CheckBox)() AddHandler cb.CheckedChanged, AddressOf CheckBox_CheckedChanged Next Add this sub to the form class: Private Sub CheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) 'create … | |
Re: > What I want to achieve is to have the user check from the options (e.g Demo + Uru +Akai, etc..) from each categories (e.g Client, Status, Brand, etc..) and have it display on a DataGridView once the Filter button is clicked. build your query using one of the `Selected` … | |
Re: I would suggest: Use an array to accept your inputs(`int[] inputs = new int[5];`). A `for` loop with intValue accepting the `Console.ReadLine()`. Use a `while` loop inside the `for` loop to validate the input(`while (intValue < 10 || intValue > 50)`). Don't forget to re-initialize intValue after each successful input. … | |
Re: If your array is an array of strings you've already got it. Just change the '0' to the specific number of the one you want to change. We'll be more than happy to help with your tablelayoutpanel, but we need to see what you've attempted so far, to have a … | |
Re: Or if you want to make your own server, http://www.codeproject.com/Articles/3991/SMTP-and-POP3-Mail-Server | |
Re: Becuase they are both part of the .net family, pretty much anything you can do in one you can do in the other, albeit somethings will be easier and/or more intuitive in one than the other. The main differences come down to syntax. C# is more related to c/c++ and … | |
Re: When I use this, testStopwatch.Start(); myString = Convert.ToString(listCharString); testStopwatch.Stop(); I get a time about one tenth of the stringbuilder's time. | |
Re: How are you adding the reference? If you use the choose item dialog directly from the toolbox and choose Windows Common Controls 6.0(SP6) I think that should work. | |
Re: It looks to me that without an upper limit to i in line 28 you have the potential for an infinite loop | |
Re: Try this Sub GOOD_WORKS_Find_Replace_Commas_in_Emails(ColId As Variant) Sheets("Data").Activate Dim i As String Dim k As String i = "," k = "." Columns(ColId).Replace What:=i, Replacement:=k, LookAt:=xlPart, MatchCase:=False Sheets("Automation").Activate MsgBox "Removing commas in emails - Done!" End Sub I haven't been able to test this. But I think it will give you … | |
Re: Also what code have you attempted this with? | |
Re: > One, I need a simple way of rendering a GUI with minimal headache. If portability isn't an issue, the .net Visual Studio family is very good at quick GUI programming without having to see all the GUI creation code, basically it's drag, drop, resize. It includes the tools necessary … | |
Re: I think you've come to the wrong place. This is a place to help people with specific problems, mostly in code that they've already written. You need a site where you can hire a professional to do this. This is one such [site](http://www.codehire.com/). Unless of course you do have some … | |
Re: When I run your code in Code::Blocks 12.11, it seems run fine I get this output: 1 1 3 1 3 5 1 5 2 2 5 3 3 5 5 I get the same error though, when I run the code in VS2010. I think it might have something … | |
Re: I think it might depend on your OS. Here's a [post](http://www.daniweb.com/software-development/cpp/threads/22498/setting-up-the-cursor-position) that might help. And [another](http://www.daniweb.com/software-development/cpp/threads/120776/help) | |
Re: You appear to have a problem with your braces. It looks to me like you're missing a closing brace at the end. Also I'm not sure if the one at line 192 needs a semi-colon. | |
Re: All your errors seem to be because the headers aren't recognized. It can't find any of the references in the headers. This problem might be better asked at the source. On a side not here is a [free imnplementation of sending email](http://curl.haxx.se/libcurl/) | |
Re: Looks like you're missing a ")", try this, sqlCmd = New SqlCommand("INSERT INTO registered_cust_tbl([customer_Id],[customer_fname], [customer_lname], [customer_DoB], [customer_Contact], [customer_Email], " & " [customer_Address], [customer_Gender], [customer_Ailments], [customer_Username], [customer_Password], " & " [customer_Secret_Question] ,[customer_Secret_Answer],[customer_Purpose]) " & " VALUES ('" & firstNameTb.Text.Trim & "', '" & lastNameTb.Text.Trim & "' , '" & DoBdtp.Text & … | |
Re: Just on the surface, it looks like you're missing a ")", this might work, ` Dim insert1 As SqlCommand = New SqlCommand("INSERT INTO [VBP].[dbo].[Return_Total] ([RGN0],[Date] ,[Totalamount],[User_Id],[C_NIC],[Comments],[Bill_No]) values ('" & Val(TextBox2.Text) & "','" & DateTimePicker1.Value.Date & "','" & TextBox4.Text & "','" & TextBox6.Text & "','" & TextBox3.Text & "','" & TextBox5.Text … | |
Re: Try private void button1_Click(object sender, EventArgs e) { Method(textBox1); } public void Method(TextBox t) { string a = "4"; string b = "3"; t.Text = a + b; } or private void button1_Click(object sender, EventArgs e) { Method(); } public void Method() { string a = "4"; string b = … | |
Re: I would suggest, instead of 3 listboxes, use 1 listview. That way all your data is in one place and very easy to correlate. You can even use it to get the info directly from your database. | |
Re: Off the top of my head it looks like you should be using `tb.CanRedo` instead of `TextBox.CanRedo`, etc. If that doesn't fix it you'll probably have to show your code for the custom properties and methods you're using. | |
Re: If you keeps the ID's in a list and set the list as a datasource for ListBox1, any changes made to the list are echoed in the listbox. This allows you to leverage the `Find` method of the list to see if an ID exists. I've modified your code to … | |
Re: With the kind of errors you're showing, you'd be much better off with a masked edit control. That sort of thing is handled automatically. If you insist on using a textbox, try putting `txtContact_No1.SetFocus` just before each `Exit Sub`. | |
Re: Load the video in the second form through the [MediaChange Event of the AxWindowsMediaPlayer Object (Windows)](http://msdn.microsoft.com/en-us/library/windows/desktop/dd562428(v=vs.85).aspx) | |
Re: I would suggest using an exception handler([Try-Catch](http://msdn.microsoft.com/en-us/library/0yd65esw%28v=VS.100%29.aspx)) | |
Re: Here's an article on [Printing Reports in Windows Forms](http://msdn.microsoft.com/en-us/library/ms996472.aspx) | |
| |
Re: Here's one [place to start](http://en.wikipedia.org/wiki/List_of_unsolved_problems_in_physics). [and another](http://en.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics) | |
Re: Basically your code will go into the click handler of the menu item or the indexchanged handler of the combobox. One option to consider is using resx files. With these you can save whole objects with ease and load them again after. Also since you give each one a unique … | |
Re: try `lblAllowable.Caption = Format(Round(Val(lblRate * 30 * 0.4), 2), "#,##0.00")` |
The End.