476 Posted Topics
Re: So it's actually a CSV file. Try this: [CODE] private void PopulateDataGridView() { string filePath = "<path to dat file>"; System.IO.TextReader reader = new System.IO.StreamReader(filePath); bool colAdded = false; DataTable table = new DataTable("data"); try { while (reader.Peek() != -1) { string[] tokens = System.Text.RegularExpressions.Regex.Split(reader.ReadLine(), ","); if (!colAdded) { foreach … | |
Re: Yeah. Why not look into OleDb instead? With OleDb you can treat the Excel file as a Database source, and from there import the information into DataSets and DataTables. Which in turn can be used as datasource for your DataGridView. | |
Re: I found this project on CodeProject. It's written for .NET 1.1, but it should be workable in .NET 3.5 as well. [url]http://www.codeproject.com/Articles/8501/Implement-POP3-and-SMTP-in-NET[/url] | |
Re: Run the Disk CleanUp utility. You can find it in Start->All Programs->Accessories->System Tools. And perhaps you should remove any and all unused software, like toolbars and crap like that. While you're at it, install and run SpyBot Search And Destroy. It will detect and remove any and most malware/spyware/crap-ware/tracking-cookies that … | |
Re: Have you tried searching the forum? This question has been asked and answered many times. Just replace any reference to SqlClient with MySqlClient. | |
Re: I would start with taking a look at the namespace System.IO. It contains a whole bunch of classes for reading files. System.IO.StreamReader is one of those classes, which also happens to contain a method called ReadLine(). Combine that with a While loop and off you go. :) Perhaps [this thread](http://www.daniweb.com/software-development/vbnet/threads/134617/read-textfile-line-by-line) … | |
Re: If you create and add controls through code then those controls will not have any events tied to them. When you open the second and third panels and create controls in them, you also have to use the AddHandler statement and tie that to the txbUM_KeyDown event, or use a … | |
Re: If you want instant storing of the forms position when you move it, you need to use the MouseDown, MouseMove and MouseUp events. [CODE] 'First a private member variable Private bIsMouseDown As Boolean = False Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown 'First check to … | |
Re: This will help with the moving part: http://www.daniweb.com/software-development/vbnet/threads/343625/runtime-draggable-panel And this should give you some ideas with the "snap-to-grid" function: http://www.xtremevbtalk.com/showthread.php?t=236354 And last, I think that you can create the dragging icon by simply modifying the mouse cursor. Here's an article on how to accomplish that: http://www.codeproject.com/Articles/33789/Custom-Mouse-Cursors-VB-NET | |
Re: It could be some residual service still running that's part of the game. Check the Task Manager to see if there's something that uses a lot of CPU and/or memory. | |
Re: If I remember correcly, the thing about TCP connections is that they are only actually connected during a data transfer between the client and the server. And not while idle. So my suggestion would be that you should check to see if there **is** a connection before trying to disconnect. … | |
Re: Have you tried using the image as the forms background, instead of using pictureboxes? Unless, of course, you're using the background to draw the ball. That would be the reason for why the ball is **behind** the picturebox instead of on top of it. | |
Re: If you name your picture boxes in such a way that it ends with a number from 0 to whatever, all you have to do is iterate through the rows in the table and assign each image to the pictureboxes. Something like this: Dim img As BitMap Dim picboxIndex As … | |
Re: There is no doubt that Visual Studio can create EXE files for VB. And if you perform a Release build, there is no need to go through the Publish Project wizard. The Release-compiled EXE is located in the bin/Release folder. bin/Debug contains a debug compiled version used for... debugging. And … | |
Re: Here is one way of performing that action. [CODE] Private Sub lvList_DoubleClick(ByVal sender As Object, ByVal e As EventArgs) Handles lvList.DoubleClick If lvList.SelectedItems.Count > 0 Then Dim title As String = lvList.SelectedItems(0).SubItems(1).Text 'Create a new form with a custom constructor taking the title as argument. 'Then perform any database lookups … | |
Re: 1. The connection string is the easy one. [ICODE]Provider=Microsoft.ACE.OLEDB.12.0;Data ource=<path to file>\database.accdb;Persist Security Info=False;[/ICODE]. 2. It depends. If you know that more than one record will be returned, then storing them in a DataTable would be good. From there you can browse each record by the simple use of an … | |
Re: Add **return false;** in your javascript code after displaying the alert box. That normally stops the form from submitting. | |
Re: In Internet Explorer. Go to Internet Options->Connections->Lan settings. If you enable "Automatically detect settings", you should no longer have to manually configure the proxy settings for each environment. When you laptop is behind a proxy, those settings should be detected and your browser configured accordingly. If that doesn't work, perhaps … | |
Re: I may be misunderstanding your question, but this is pretty much all there is to it to show data in a datagridview. Just call the method from anywhere and it will display the data in the DataGridView. [CODE] Private Sub DisplayDataInDataGridView() yourDataGridView.DataSource = Nothing Dim con As New MySqlConnection(<your connectionstring>) … | |
Re: When you postback a form to the codebehind, all the formatting is there (except font and color). But for some reason the database/datatype sometimes has problems retaining those. When I ran into this problem on a project once, I simply read all the text from the textbox/textarea into a string … | |
Re: If you disregard the time it takes to lift you hand from the keyboard in order to move the mouse the button. You could do this more simpler by using javascript to time the keyboard interaction from the time the first character has been typed until a button has been … | |
Re: Assuming that your DataGridView is called dgv, then this should do the trick. [CODE] Private Sub dgv_CellValueChanged(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles dgv.CellValueChanged For i As Integer = 0 To dgv.Rows.Count - 1 lblPlayerScore1.Text += dgv.Rows(i).Cells(0) lblPlayerScore2.Text += dgv.Rows(i).Cells(1) lblPlayerScore3.Text += dgv.Rows(i).Cells(2) lblPlayerScore4.Text += dgv.Rows(i).Cells(3) lblPlayerScore5.Text += … | |
Re: I cannot speak for all the webhosts in the world. However, I would say that some webhosts provide such a solution, provided that you register a domain with them. But most do not. They require that you order the full package of a webspace that includes 5, or more, email … | |
Re: It could be anything from .NET 2.0 to 4.0. You just have to run the program and see if you have the latest needed version of .NET. | |
Re: Still. To be on the safer side, it would be best to put the source files in the very permanent location of the users homefolder. Don't you all agree? :) | |
Re: The username is usually defaulted to **admin**. And depending on the manufacturer of the router, the default password (unless changed) could be one of the following: admin password 1234 123456 | |
Re: Well. It depends. What kind of proxy server are you running? MS? Linux? Hardware? There are several suggestions in [this thread](http://ubuntu-tutorials.com/2009/04/04/help-needed-auto-configure-proxy-settings-via-dhcp/), which is a linux based proxy. And you can also read up on [Web Proxy Autodiscovery Protocol](http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol). | |
Re: It's because you perform the sqlBulk.WriteToServer(excelReader) before you set the CommandText in the SqlCommand object. Use the SqlCommand and construct your query and execute the reader first, and use WriteToServer last. Examine this example: http://msdn.microsoft.com/en-us/library/434atets | |
Re: Which files would that be? If Windows start properly each time you boot up, then they aren't really missing. You just can't see them. If Windows won't start, perhaps there's a virus infecting/replacing/removing those files. | |
Re: Have you looked at the AjaxToolkit ModalPopupExtender? You can combine it with an UpdatePanel. | |
Hi. I'm currently developing a CRM in ASP.NET 4.0. It has a database connection that resides on a separate computer. The development and dev-hosting of the site is done locally. Until yesterday everything worked almost flawlessly (except for those part I'm working on), but suddenly all postbacks and redirects slowed … | |
Re: Try removing the WiFi connection on your computer and re-discover it. That has helped me many times, even if the connection worked the day before. :) | |
Re: Why not locate and remove any reference to Global.ExampleProject.My.Resources.Resources alltogether? Is it essential for either your projects or the functionality of VS2010 Express in any way? | |
Re: I'm no expert. But it could be that a certain default setting in bios doesn't agree with your overclocked graphics card. Try resetting your graphics card to factory default as well. If possible. | |
Re: Add a div and use it as a wrapper and put all the content in that. You can use either an external CSS and create a class for the wrapper and state a width and height, or use an inline-style to state width and height. <body> <div class="wrapper"> --- CONTENT … | |
Re: I'm no javascript expert, but I don't think you can. The variable **value** is an argument to the function, and can't be accessed from anywhere else. But you can probably return **value** to an outside variable and use that in your alert. var outsidevariable = variable.dosomething("evenmorebla", function(key, value) { alert("key … | |
Re: Well. There's the computer, the monitor, keyboard, mouse and a label printer. And then there's the inventory software. Could be anything, even Excel. The computer is used, among other things, to create and print labels for the books. And it's also used for checking to see if a certain book … | |
Re: I would suggest you start by grabbing a pen and paper and begin outlining what exactly your program is supposed to track, and what informaion might be needed to show and how to handle it. Beyond that we can be more helpful when you get stuck on specific problems during … | |
Re: It depends really on what language you're using for developmen of software. But most of them do support the use of command-line arguments. And no. Those are not limited to command-oriented systems, but can be used in Windows programs as well. This is how it's done in C++ int main(char* … | |
Re: Read through the text file line by line in a loop. And for each iteration, declare the two labels and add them to the forms Control collection. int counter = 0; string line; int lastKnownTop = 10; //Or whereever you want the first set of labels to be placed System.IO.StreamReader … | |
Re: What version of Visual Studio is being referenced in the book? And what version are you using? If those are not the same, that might explain the difference in what you see. | |
Re: I'm thinking that the easiest way to grab information from multiple tables is to create a view in the SQL server. And from your code you can call upon that as if it was a single normal table. All the mixing and matching using joins is handled by the server, … | |
Re: Take a look at [this thread](http://www.daniweb.com/software-development/cpp/threads/278568/splitting-and-saving-strings-in-an-array). It may be of some use to you. | |
Re: I agree with JorgeM. Those symptoms points towards a harddrive failure. It's better to be safe than sorry, backup your data while you still can. | |
Re: I'm no expert in Java. But can you really assign an **int** to an instance of Track? In the method `setTrack(int trackNumber)` you're assigning the argument to `this.track` which is an instance of Track. And also, in the method `getTrackName()` you're returning `this.trackName` that doesn't seem to be declared anywhere. … | |
Re: Add a form\_closing event to you child form. From there you can make the tab control visible while the child form is closing. Protected Sub childForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If e.Cancel = False Then Me.Parent.<tabcontrol>.Visible = True End If End Sub | |
Re: This should help you. ListView1.Items(reader.Item("PERSON")).Selected = True This will only select the VERY first item ListView1.Items(0).Selected = True | |
Re: Well. Considering that the job involves both development and system management. Perhaps the title should be System Developer. | |
Re: I'm thinking that the bottleneck in your code is that you're connecting to the URL on each cycle. Wouldn't it work if you connect just once and perform the reading of the stream inside the While loop. What I mean is, move the connection and configuration code to outside the … | |
Re: Yeah. That code seem a bit cumbersome. And you're not even using SLP, Admin or Pateint. So you can throw those away. Also, in ASP.NET you can't use MsgBox. Add a Label and direct any output that that. Try this instead. Public Sub LogIn(ByVal sender As Object, ByVal e As … |
The End.