419 Posted Topics

Member Avatar for ScarWars9

Try using the CellClick event not CellContentClick event handler. Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvEmployee.CellClick TextBox1.Text = dgvEmployee.Rows(e.RowIndex).Cells(0).Value.ToString() TextBox2.Text = dgvEmployee.Rows(e.RowIndex).Cells(1).Value.ToString() TextBox3.Text = dgvEmployee.Rows(e.RowIndex).Cells(2).Value.ToString() End Sub

Member Avatar for ScarWars9
0
2K
Member Avatar for samish

I take it that you are using VS2008 or ealier when we still had deployment projects. The only way that I know that the "Add Project Output Group" dialog would be empty is if the startup project is the only one in the soultion that holds the setup project. ![6eebd281bde234385681d372e56de8aa](/attachments/large/3/6eebd281bde234385681d372e56de8aa.jpg …

Member Avatar for TnTinMN
0
580
Member Avatar for De.morgansPink
Member Avatar for Nebil

> when i try to delete a certain row it gives me the previous exception What previous exception? Is Bridge_Number a Text field? If not, get rid of the single qotes around it in the query. What column index does Bridge_Number represent in the listview? Your query indicates that it …

Member Avatar for Begginnerdev
0
356
Member Avatar for Gobble45

>My issue: I have a datagridview and a DB file with ~100 columns and ~200 rows of data. This data is imported to the DGV onLoad(). Does this mean that you first fill a datatable from the database and then set the dgv.DataSource equal to the datatable? If so, that …

Member Avatar for Gobble45
0
2K
Member Avatar for flywheeljack

I'm not sure if this is applicable to your situation, but take a look at : http://cgeers.com/2008/02/03/monitoring-a-smartcard-reader/

Member Avatar for tinstaafl
0
225
Member Avatar for zachattack05

Here are two options: This one whould update after you leave the first column. private void dgv1_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) return; if (sender is DataGridView && e.ColumnIndex == 0) { DataGridView dgv = (DataGridView)sender; if (dgv1.Equals(dgv)) { // set the value as needed dgv.Rows[e.RowIndex].Cells[2].Value = …

Member Avatar for zachattack05
0
6K
Member Avatar for pbedford83

I suggest that you take the time to go through this information: [Working with Datasets in Visual Studio](http://msdn.microsoft.com/en-us/library/8bw9ksd6%28v=vs.100%29.aspx) In particular, the walkthroughs at the bottom of the [Dataset Designe](http://msdn.microsoft.com/en-us/library/314t4see(v=vs.100).aspx)r topic.

Member Avatar for TnTinMN
0
250
Member Avatar for 7429EEFC

I like using datatables and a rowfilter for this type of stuff. Here is a simple example. I manually loaded the DataTables, but you would do this with your file contents. You could also do your text files as xml and load the table directly with the xml definition. Most …

Member Avatar for tinstaafl
0
531
Member Avatar for somjit{}

Personally I prefer VB.Net. If your goal is improve marketable skills in a few weeks and you already have a C background, it will be much easier for you to pick-up C#. Unfortonately, VB is viewed by many as an inferior language (even though it essentially equal to C#). MS …

Member Avatar for somjit{}
0
332
Member Avatar for pitic

Running a search on "HttpContext.Current null" I cam across this article that may explain what you are seeing. http://odetocode.com/Articles/112.aspx

Member Avatar for TnTinMN
0
269
Member Avatar for Djmann1013

On which button click did the error occur? Here are some recommended changes: Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) ' Dim strm As System.IO.Stream delete this and the next line ' strm = OpenFileDialog1.OpenFile() TextBox1.Text = OpenFileDialog1.FileName.ToString() If Not (strm Is Nothing) Then ' Display the image ' …

Member Avatar for Djmann1013
0
1K
Member Avatar for grgrl
Member Avatar for grgrl
0
2K
Member Avatar for jakewebb

That's a new error message to me :/ Usually it's along the lines of cannot delete file blah blah... Are you sure you do not have an instance of the program running? It may have crashed and did not fully unload from memory and release the file. Sometimes you will …

Member Avatar for tinstaafl
0
1K
Member Avatar for jayrbete

I am going to assume that you mean adding a video to the embedded resources. From the menu, goto Project->Properties. Then select the "Resources" tab. Next Select "Add Rersource"->"From Existing File". You can then select your video file. The file will be inserted with the File Name minus the extension …

Member Avatar for jakewebb
1
4K
Member Avatar for pearl.kumar1

Assuming that the field is stored as a DateTime type, If dr.IsDBNull(5) Then TxtAppointmentdate.Text = "" Else TxtAppointmentdate.Text = dr.GetDateTime(5).ToShortDateString() End If

Member Avatar for TnTinMN
0
119
Member Avatar for Tinnin

Tinnin, Why are you going through all this work just to read in values from an Excel file? What does converting it to a CSV format gain you? You could use the Excel interop to read the values directly. Alternatively, you could use ADO.Net to read the files without any …

Member Avatar for Tinnin
0
170
Member Avatar for jakewebb

Do you mean play an embedded file? If, so I believe you will first have to write the file out to the disk first and then point the media player to that file.

Member Avatar for jakewebb
0
363
Member Avatar for Taras20

Use one of these forms of parsing: ` i = Integer.Parse("1")` - will throw an exception if conversion is not possible ` Integer.TryParse("1", i)` - will not throw exception, leaves i unchanged

Member Avatar for TnTinMN
0
584
Member Avatar for Sammys.Man

I think the problem that you where having is the order that that you where adding the parameters. OleDB ignores the parameter names and substitutes them in sequential order. In the SQL CommandText, you could type pretty much any unquoted text where it expects a value and it will treat …

Member Avatar for Sammys.Man
0
257
Member Avatar for Pundia

I believe you are going to have to normalize and strip the diacritics from the string first. see: http://stackoverflow.com/questions/249087/how-do-i-remove-diacritics-accents-from-a-string-in-net You could add new column to your datatable with the processed string and then do the row filter against that processed string. Or you could use LINQ to create a list …

Member Avatar for TnTinMN
0
2K
Member Avatar for imBaCodes
Member Avatar for TnTinMN
2
89
Member Avatar for dinesh012
Member Avatar for renzlo

Sure it is doable! You just have to code it. :)) Here is a crude implementation of a custom textbox with this capability. You have to double click on a item to select it. You could change that to single click if you want. You may need to change the …

Member Avatar for renzlo
0
743
Member Avatar for UKnod

UKnod, That code is just plain nasty! :( It appears that you want to add a new record to the History table in the database. You have created a dataset (ds5) elsewhere in your code. Does your code need to access the dataset's History table elsewhere, or do you create …

Member Avatar for TnTinMN
0
240
Member Avatar for xXghostXx

>System.Data.OleDb.OleDbConnection' cannot be converted to 'System.Data.SqlClient.SqlConnection To be blunt about what BegginnerDev alluded to: >Which warrants the question, why are you cross calling the SQLClient and OLEDB libraries? change: `Dim constr as new OleDb.OleDbConnection` to: `Dim constr As New SqlConnection` Also, why are you creating and immediately disposing the adapter …

Member Avatar for TnTinMN
0
241
Member Avatar for NYCRAVEN

>I want to set the focus only the first time the form is loaded, from that point on I want the tab control to dictate the navigation. Then use either the Form.Shown event or Form.Load event.

Member Avatar for TnTinMN
0
176
Member Avatar for silvercats

Just posting this as a FYI as a potential source for low cost reference books, if you don't have a problem buying used books. For the one deceptikon referenced: http://www.biblio.com/search.php?author=cormen&title=Introduction+to+Algorithms&keyisbn=&format= p.s.: I should mention that they can be shipped from all over the world, so it may take a few …

Member Avatar for silvercats
0
265
Member Avatar for Rahul47

Is the dgv StudentList backed by a datatable? If so, add a boolean column (call it Selected)to the datatable then create two dataviews. Then create two dataviews filtered on the new column being either true (Selected) or false and use the dataviews as the datasource for the respective datagridviews. Then …

Member Avatar for TnTinMN
0
99
Member Avatar for Yorkiebar14

give this pattern a try Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted If WebBrowser1.Url = e.Url Then ' this is the one you want ' run your code against WebBrowser1.Document End If End Sub

Member Avatar for Yorkiebar14
0
1K
Member Avatar for Ashenvale

Are you using a relative or absolute path. If it is a relative path, it will be relative to the current working directory. Try adding this to your code to retrieve the PictureBox's error reason. Private Sub CompanyLogo_LoadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles CompanyLogo.LoadCompleted If e.Error IsNot …

Member Avatar for TnTinMN
0
119
Member Avatar for fx.eko

[HOW TO: Determine Printer Status and Print Job Status from Visual Basic](http://support.microsoft.com/kb/202480)

Member Avatar for TnTinMN
0
194
Member Avatar for major_lost

"Sender" typically is the control prompting the call to the event handler method. Cast it to the type of control you hope it is after a bit of chgecking first. Private Sub Label_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If sender IsNot Nothing AndAlso TypeOf sender Is Label Then …

Member Avatar for major_lost
0
358
Member Avatar for ImZick

> now the question is how can i get the that name to be used in my query? > using loop? > i will use it to be the name of my table i want to search. > >I hope you understand what i mean. Nope!, I do not understand. …

Member Avatar for ImZick
0
214
Member Avatar for Mireya B.

Since you state that you are using a VB Express Edition, this question should be moved to the VB.Net forum. Depending on the volume of data and security needs, you could use any of the options you listed, but I would stay away from using Excel files since that option …

Member Avatar for Reverend Jim
0
226
Member Avatar for coolnezz

You should calculate the monthly payment once based on the initial loan amount and not in your loop based on remaining balance. Are you using the Financial Class from the VisualBasic Namespace? If so, then your usage is incorrect and you should review the [documentation](http://msdn.microsoft.com/en-us/library/xxkhsh9h.aspx).

Member Avatar for coolnezz
0
414
Member Avatar for ImZick

>But when i run the setup to install it in another computer which is a 64bit. My project didnt connect to the database which is access. The most likely issue is that the target install can not find the DB provider. If you are using the Jet provider, your application …

Member Avatar for ImZick
0
217
Member Avatar for Djmann1013

Hi Dj, I know that this type of error can be frustrating, but it is happening for a logical reason. When you start application, an instance of Form1 is created. During it's creation the form level variables are created first. The problem is occuring with this statement: `Dim myUri As …

Member Avatar for TnTinMN
0
2K
Member Avatar for VIPER5646

>If StatusDate.Year <> "1900" Then Assuming "StatusDate" is a DataTime structure, then the "Year" method should be returning an integer value and not a string. Put `Option Strict On` at the top of your code and see how many other issues the IDE flags for you. I'm not saying this …

Member Avatar for VIPER5646
0
420
Member Avatar for ShamSundar

look at your code with a bit of formatting. Do Until rs.EOF If rs!RegNo = Text2.Text Then If IsNull(rs("Name")) Then answer = MsgBox("The Register Number You Entered Didnt Provide All The Inforamtion Do you still Want to Display the Details", vbYesNo + vbExclamation, "Alert") If answer = vbYes Then Text1.Text …

Member Avatar for Reverend Jim
0
325
Member Avatar for analys

> xlWorkBook = xlApp.Workbooks.Add > ' first worksheet > If xlApp.Application.Sheets.Count() < 1 Then > cmd.CommandText = "Select * From students" > cmd.Connection = connection > da.SelectCommand = cmd > da.Fill(dt) > dgrid.DataSource = dt > location = SaveFileDialog1.FileName > xlWorkSheet = CType(xlWorkBook.Worksheets.Add(), Excel.Worksheet) > xlWorkSheet = xlWorkBook.Sheets("Students") I believe …

Member Avatar for QVeen72
0
2K
Member Avatar for Papa_Don

Don, No offense intended, but you need to get more of the basics (no pun intended) under control first. Learn to use the debugger. It is there for reason it and is your best friend. [Debugging User Interface Reference](http://msdn.microsoft.com/en-us/library/vstudio/cwzf7x3e%28v=vs.100%29.aspx) Set a break-point in your code and inspect the variable's contents …

Member Avatar for Papa_Don
0
422
Member Avatar for ulasoc

You need to retrieve the command-line arguments, if any, and test the first argument. It should be the file that launched the application. Dim fi As IO.FileInfo ' used to test for file properties If My.Application.CommandLineArgs.Count > 0 Then fi = New IO.FileInfo(My.Application.CommandLineArgs(0)) If fi.Exists Then Select Case fi.Extension.ToLower Case …

Member Avatar for TnTinMN
0
207
Member Avatar for kingk110

Your main problem is that the checkbox is not very amenable to using an image to indicate the checked state. You are trying to paint over the box and that is always going to look strange. Here is a custom control that I hammered out quickly based on a Button. …

Member Avatar for kingk110
0
453
Member Avatar for sarman.boyslo

@Jim, right idea, but wrong laguage. This forum is for VB4 through VB6, not VB.Net. Dim Lines() As String Lines = Split(linereadfromcomm, vbNewLine) ' determine number of text items extracted from linereadfromcomm ' so that you do not try to reference an array element that does ' not exist when …

Member Avatar for tinstaafl
0
2K
Member Avatar for UKnod

Not sure of what use this would be, but for OLEDB connections you could do it like this: Private Sub Search() Dim conn As New OleDb.OleDbConnection("Your Connection String ") conn.Open() ' get all tables filtered to user tables Dim dbTables As DataTable = conn.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "Table"}) …

Member Avatar for TnTinMN
0
276
Member Avatar for disjes_1

Perhaps something like this will work for you. Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load With ListView1 .Alignment = ListViewAlignment.SnapToGrid .AllowDrop = True .AutoArrange = False .Scrollable = False .View = View.LargeIcon End With End Sub Private Sub ListView1_ItemDrag(ByVal sender As Object, …

Member Avatar for disjes_1
0
936
Member Avatar for KushMishra
Member Avatar for KushMishra
1
223
Member Avatar for mayuri.koul

> `PopulateGridView(.SelectedValue.ToString());` SelectedValue will be a DataRowView and not the Text displayed in the combobox. Use: `((DataRowView)comboBox1.SelectedValue).Row["TABLE_NAME"].ToString()` or I guess you could just use comboBox1.Text. Also, it would probably be a good idea to dispose of the datagridview data source before re-assigning it to a new DataTable. if (dataGridView1.DataSource != …

Member Avatar for TnTinMN
0
1K
Member Avatar for masterfact18

The End.