1,857 Posted Topics
Re: try these articles as a starting point: [Click Here](http://msdn.microsoft.com/en-us/library/3z2ck8eh.aspx) [Click Here](http://msdn.microsoft.com/en-us/library/system.datetime%28v=vs.71%29.aspx) | |
Re: Wouldn't having the user input the data directly into a listview, or datagrid, bound to the database, allow passing all the data to the database with a much shorter string? | |
Re: > to remove the CMD window If you're using the Process class to start the external app, set `StartInfo.CreateNoWindow` to true. > have the output of that piped into my listbox In that class you can also redirect the standard output of the process and put it into a variable. … | |
Re: In the .doc format the text itself is stored in plain text, a hex editor should be able to let you see the control codes that signal the text. With that you can parse the file to find the text. | |
Re: The `Format` function should do the trick. Here's the MSDN [article](http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) | |
Re: You can use the below code, without passing anything to Form2. The menutstrip and the combobox is accessible without changing the default modifier,`Friend`. Form1.tsMenu.Items("tsComboBox").Name instead of Form1.Controls("tsMenu").Controls("tsComboBox").Name If you want to do more than just access the name, i.e. add more items, get selectedtext, etc., from Form2, use Dim NewComboBox … | |
Re: In VS 2010: Right-Click on the project name. Click the Compile tab. At the bottom, click the Advanced Compile Options button. At the bottom of the form that shows, is a drop down list where you can choose the .net framework target. | |
Re: Your problem is probably the last comma. If you have no more parameters to add then you shouldn't have a comma there. The last underscore shouldn't hurt anything but it is unnecessary. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Form1.Personal_InfoTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, _ Me.TextBox3.Text, Me.TextBox4.Text, _ Me.TextBox5.Text, Me.TextBox6.Text, … | |
Re: Learning about the [Timespan Structure](http://msdn.microsoft.com/en-us/library/system.timespan(v=VS.100).aspx) would simplify what you need to do. | |
Re: Here's a little simpler way, all you need is an array of 10 labels(Label1) and a command button(Command1). Each click of the button produces a new table arrangement: Dim Names() As String Dim NameString As String Dim Seat As Integer Dim Table As String Private Sub Command1_Click() ResetTable 'loop through … | |
Re: What error are you getting? When I run your code, I don't think it's doing everything you want but it doesn't return any errors. | |
Re: I think you have to show some code. try as I might I can't duplicatre what you describe. | |
Re: When the error shows up, make note of the line it's on. That information is usually pretty important. Off the top of my head, I'd say try `SelectedItem.Text` instead of `SelectedItems`. | |
Re: Dim stime As DateTime = DateTime.Parse(starttime) Dim etime As DateTime = DateTime.Parse(endtime) Since you're controlling the format of the string already I suggest using the `Parse` method. If you're unsure of the format I suggest using the `TryParse` method. | |
![]() | Re: Declare the variable with the `Public` keywaord in the top most class of your form, i.e. Public Class Form1 Public MyVariable As String = "Test String" Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Do stuff End Sub End Class Access it as a member of … ![]() |
Re: You could put the result of subtracting the 2 values into a `DateTime` variable, then you can use the `ToShortTimeString` method to display the result. Or you could use the `Format` function, with something like this,"H:mm" for a format string. | |
Re: I don't think it's really possible, unless you compare the length of each item as it's added, perhaps recording the index of the longer one. You could also do it so that the iteration is kind of hidden. Create your own sorter and assign it to the listviewitemsorter. Something like: … | |
Re: if you use LINQ, `index.Average()` I think will work | |
Re: Have you tried declaring your double as long double? Fixed the problem for me. | |
Re: This might help [Click Here](http://msdn.microsoft.com/en-us/library/hh273081%28v=vs.100%29.aspx) | |
Re: You'll probably have to be more specific. This is like taking a car to a mechanic and saying,"Fix it it's broken". What part doesn't work right? | |
Re: Hera's a [page](http://www.daniweb.com/search/query/coin-flip-c/0?q=coin+flip+c%23) that'll help | |
Re: > I wrote this class that is designed to read in a file, and return a list with each new line as a new index in the list You might want to consider these for your class: Lines of text to an array `string[] TextLines = File.ReadAllLines(@"C:\Test.txt");` or if you … | |
Re: If your system is that old it's still using floppies, I'd strongly suggest getting at least a CD burner. Many computer stores that deal in used equipment are practically giving them away, in fact alot of them send them straight to recycling. 1 cd will hold somewhere between 400 and … | |
Re: [Here's a good place to start](http://en.wikipedia.org/wiki/Federated_search) [Hear's another](http://www.codeproject.com/Articles/337549/windowsfederatedsearchphpdevs) | |
Re: perhaps a while loop around lines 138-168, and change line 138 to use getchar(). | |
Re: It seems to me that getting millisecond precision is going to be very difficult, without using external hardware. Any multitasking OS is going to screw up your timing by interrupting it for a different task. The `CLOCKS_PER_SEC` is actually a [macro](http://www.cplusplus.com/reference/ctime/CLOCKS_PER_SEC/), who's actual value changes according to the OS. You … | |
Re: While there isn't a focuslost event there is a lostfocus event. Tha handler is like this: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.textBox1.LostFocus += new System.EventHandler(this.textBox1_LostFocus); } private void textBox1_LostFocus(object sender, EventArgs e) { } } How are you coding the textchanged event handler? it … | |
Re: try this `Text1.Text = Split(Filename, ".")(0)` This splits the string using the "." as a delimeter and returns the first element. | |
Re: In case you need it here's [instructions ](http://www.ehow.com/how_7225019_mount-usb-flash-drive-cd_r_.html)on making a usb drive look like a bootable cd. Not sure how well it works but you might find it useful. | |
Re: Use the `Textbox1.Text.Length` property. Any string is basically a character array. You can read the individual characters with an index, `Textbox1.Text(0)`. The last character, without using LINQ, like this, `Textbox1.Text(TextBox1.Text.Length-1)`. With LINQ, `TextBox1.Text.Last()`. A simple conditional statement to test, `If Not(TextBox1.Text(0) = """"c) Or Not(TextBox1.Text(TextBox1.Text.Length-1) = """"c) Then`. | |
Re: Here's a [code sample](http://code.msdn.microsoft.com/surfacebluetooth) for using the 32feet.net library | |
Re: try changing the build to .net 4.0 and see if the error becomes clearer. | |
Re: what code have you got so far? and what is it doing wrong? | |
Re: private help violates the rules. The idea is to let everyone benefit if they can from the help. If you have code that has a problem then you'll usually find plenty of help. If you need access to research material to start your code, you'll have to be more specific. … | |
Re: setting up a label to click is simple. first delete the button you have, and replace it with a label, you can set the properties so that the background color, border style, etc., allow it to look more like a button. Setup the timer click event code. Then paste your … | |
A curious thing, is there a reason that you can't declare sender as a specific type? For instance, if you had a number of textboxes and you wanted each one to select all it's text when you click on it could you use : Public Sub TextBox_Click(ByVal sender As TextBox, … | |
Re: The only loops you've got seem to work fine, even after several iterations. | |
Re: I think this will work for you: Imports System.IO Module Module1 Sub Main() 'This sets up and starts the cmd window Dim MyApp As Process = New Process() MyApp.StartInfo.FileName = "cmd" MyApp.StartInfo.RedirectStandardInput = True MyApp.StartInfo.UseShellExecute = False MyApp.Start() 'This sets up the cmd window to read your commands Dim MyInStream … | |
Re: Here's an article on [FormsAuthentication.Encrypt Method](http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.encrypt.aspx) | |
Re: You could use `Math.Sign(value)` if the return does not equal 1 make the value 0. | |
Re: In my VS2010 there's a LinkLabel control in the toolbox. It appears to have been part of .net since 2.0. | |
Re: Put a break on line 57, and run your code again. When the program breaks, check the value of `AppointmentResultsDataLINQ.DataContext`. The way your code is set up if the string has an extra space or punctuation on the end it'll never read true always false. | |
Re: Here's one way: Public Class Form1 Public Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim CurrentForm As Form = DirectCast(sender, Form) MsgBox(e.KeyChar.ToString + " " + CurrentForm.Name) End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load AddHandler Me.KeyPress, AddressOf Form1_KeyPress Form2.Show() End Sub … | |
Re: What you've coded works, but from what I understand of Top Down Design, I think you might want to consider it a little differently. loop through the complete text by character to build a collection of sentences then loop through each sentence by character to build a collection of words … | |
Re: You could also use a multiline textbox, get the selected index, then select the lines you want to higlight | |
Re: Try initializing all your strings to "" in the declaration(i.e `Dim i as String = ""`). Without knowing what line is throwing the exception, it's hard to be more specific. | |
Re: The `driveinfo` class should give you what you need. Probably, the easiest to use would be the `volumelabel` property. Here's the [info](http://msdn.microsoft.com/en-us/library/vstudio/system.io.driveinfo%28v=vs.100%29.aspx) on it |
The End.