hi I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same. to avoid creating size, columns, column names each time, i am trying to create class control for datagridview which will give me by default number of columns and size once i add the datagrid to form. i have tried this . **But it shows ten columns instead of five** . attached picture Public Class ClsDgvJournal Inherits DataGridView Public Sub New() Width = 500 Height = 200 Dim Col1 = New DataGridViewTextBoxColumn With {.HeaderText = "AAA", .Name = "A", …

Member Avatar
Member Avatar
+0 forum 10

Hi, I am trying to "Show" an error message for the user in two cases: 1. If he/she did not enter a correct value for a String. 2. If he/she did not enter a correct value for a Decimal. I know I have to use Try & Catch but each time I use them I get an error. [CODE] Private Sub ButtonAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAdd.Click Dim AClient As New BankAccountClass AClient.LastName = InputBox("Enter last name", "Enter") AClient.AccountNumber = InputBox("Depost Amount", "Enter") End Sub[/CODE] And this what I used for the Decimal [CODE]Try AClient.AccountNumber Catch …

Member Avatar
Member Avatar
+0 forum 5

This is my first time to do visual basic program Please help me about this problem... When I run the program with maximum attempt of 3 with correct username and password, Illegal user will pop up,,,i really dont know what to do..illegal user must be pop up when i already attempt " try again " then another "3attempt" then the username or password are wrong....pls help me [CODE] Imports System.Data.OleDb Public Class SignIn Dim ctr As Integer = 0 Dim crr As Integer = 0 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ctr += 1 …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am learning about the search capability in an array. I wrote a code that stores three names (first & last) and I want to: - Make the user select a number (from 1-3) by using a (combobox) - If the user select the proper number then a message will appear that the name is there. - If not then an error message will appear. I did all I could by creating this but my main problem is in the (ButtonFind). I went through lots of tutorials and this is what I came up with and I hope that …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am trying to write a program that - Generates 3 unique random numbers between 1 and a number entered by the users in an InputBox - Displays the 3 random number results in labels - Count the number of Loops So far I wrote this code but I don't know how to create the randoms to make it work. Your help is really appreciated. [CODE] Private Sub Button1Generate_Click(sender As System.Object, e As System.EventArgs) Handles Button1Generate.Click Dim userMsg As String userMsg = InputBox("Please Enter A Number?", "Integer", "Enter your integer here", 500, 700) Dim GenerateRandom As New Random(DateTime.Now.Millisecond) Try …

Member Avatar
Member Avatar
+0 forum 2

Hi, I am having a problem with the if statement that I created in my code. The condition should be: - Select Both Comboboxes (1&2) to print out a text in TextBox1 - If only One Combobox or No Combobox was selected, an error message appears and Nothing is printed in TextBox1. The code I wrote did not function as I wanted. It prints out a text after I select Combobox1 which isn't the way it should be. Please advise and thanks in advance. [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ComboBox1.SelectedIndex = …

Member Avatar
Member Avatar
+0 forum 3

Hi, My application is in VS2008 and coded in Vb.net. I have my database in Sql Server 2005.I have a Database table say Table1 in My Database named Test. Now i want to export the data in Table1 to a MS-Excel(.xls) file on the click of a button. An excel file should be generated after the user clicks on the button and the generated Excel file should have the data that is present in Table1. Can anyone provide me with a link or some helpful code to do this. [B]My code is in Vb.net[/B] Thanks.

Member Avatar
Member Avatar
+0 forum 9

Hello Friends, I've one problem with an Image which is to be placed in crystal report. I stored image in sql server 2000 database in varbinary datatype. Now i want to retrive that image and display in crystal report using vb.net 2005. Any one know how to do this?

Member Avatar
+0 forum 0

Hey. I am fairly new to VB.NET so I research alot when I run into bugs. Problem is I cannot find a solution to this, or anything remotely dealing with it. I am developing software to connect to a remote mysql server, run a query, and come back with a dataset. I have run this query against the server through a mysql prompt and have received a result successfully. But when i try to run this query from my app, I get an object reference error. Through debugging I have found that the @ character used for variables in sql …

Member Avatar
+0 forum 0

This is my vbscript to read the text file .. I want to know how to split some of the chinese characters. In my code it prompts the Text Line by Line with chinese characters my problem is how to split the chinese characters and the open and close pharenthesis thank you Example Original: 45029 * 小(xiao3) 姐(jie3) * 郑(zheng4) 45023 * 平(ping2) * 何(he2,he4) 45024 * 文(wen2) 鑫(xin1) * 阎(yan2) 45025 * 艳(yan4) * 崔(cui1) 45026 * 唐(tang2) * 建(jian4) 平(ping2) [B][COLOR="Red"]The output I need: 45029 * Xiao * Zheng 45023 * ping2 * he he[/COLOR][/B] ======================== Option Explicit …

Member Avatar
Member Avatar
+0 forum 1

help pls i need someone that can help me when i enter the date of birth using the [COLOR="Red"]datetimepicker[/COLOR] box it automatically compute the age and output in a textbox.text

Member Avatar
Member Avatar
+0 forum 8

help please..help me in my timer like the time they use in computer shop and when the player is already time out it will alert...[COLOR="red"]the idea like this if the player start 3:00:00 then it will appear in the textbox for the time - in and in the time - out textbox the time is decreasing until 0:05:00 and it will alert using message.box.Show("Computer 2 is 5 mins before time end") and also for the payment textbox in every 15 mins it will addition payment for example 10.00[/COLOR]....i need the source code or idea to create this..thank you...

Member Avatar
Member Avatar
+0 forum 7

Hi Everyone! I am here by to ask help on enhancing messageboxs. How is the way to Display a picture(like a JPG file) inside a messagebox along with text when a button is clicked? Any Suggestions would be appreciated. Thank You!

Member Avatar
Member Avatar
+0 forum 9

I am trying to populate a dataset with data from a dynamic SQL dataset created by a code generator (PDSA). If I want the first row of data, or I use a specific "Where" clause to retrieve 1 row, I have no problem. But, when I loop through the dataset that has four entries, instead of getting the four entries, I get the first row 4 times. Any idea why? Code Example: [CODE] Dim DS_C as New DS Dim dr_A As DS_C.Tbl_ARow Me.DS_C.Tbl_A.Clear() Dim bo As PDSA.DataLayer.tbl_BDC = New PDSA.BusinessLayer.tbl_B With bo .ConnectionString = AppConfig.SQLConnectString .SelectFilter = PDSA.DataLayer.tbl_BDC.SelectFilters.All .WhereFilter = …

Member Avatar
Member Avatar
+0 forum 1

This is an answer to a question in C++ area. [url]http://www.daniweb.com/software-development/cpp/threads/355232[/url] It should be ready to be modified to code in C++, C#, or Java, because VB.Net is fully OOP. Even though it can be used for vectors, you may still want to modify it to a Vector Class.

Member Avatar
Member Avatar
+0 forum 2

Dear, Currently I am working on VB.Net 3.5 Win Forms. I have few queries about datagridview, I believe your expertise will help me to overcome this. 1) I have DataGridViewComboBoxCell and DataGridViewTextBoxCellinserted into the the datagridview1, which in turn bounded with the datable, Here I want to update/edit the value of the datagridviewtextboxcell manually(by user). What I observe is, for each charecter insert/update, it calls the "DataGridView1_CurrentCellDirtyStateChanged" event, due to which I am facing few problems as below, - Unable to process the user enterred string/value - Each time(for each charecter enterred) I have rebind the gridview with datatable and …

Member Avatar
+0 forum 0

Looking on the web very few have got VB.net 2008/2010 using object arrays working. I felt it was time to give back what I have taken from the web for any other users. VB6 had a simple object array system which has been lost in VB.net As a C#/ C++ programer I like dot.net but think "Basic" should be Basic! I use VB.net for rapid Visual development and enjoy its ease in which you can come back to the code to re-read it. OK you need a Label as an Array with Option Strict On.......... This demo places 64 labels …

Member Avatar
Member Avatar
+1 forum 4

hello guys I need help Please.. What I want is that when i select the data from the listview1 it will also delete the corresponding data in the database im using mysql database...these is my code [CODE]Dim Button = MessageBox.Show _ ("Are you sure you want to delete this Data?", _ "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) If Button = Windows.Forms.DialogResult.Yes Then DataGridView1.Rows.Remove(DataGridView1.CurrentRow) da.Update(ds, "walkindata") If Not ListView1.SelectedItems.Count = 0 Then ListView1.Items.Remove(ListView1.SelectedItems.Item(0)) MsgBox("customer removed in the list.", MsgBoxStyle.Critical) Else MsgBox("No Customer Selected.", MsgBoxStyle.Critical) End If Else MsgBox("delete is cancel", MsgBoxStyle.Information) End If[/CODE] so far that is my code..it work but in order …

Member Avatar
Member Avatar
+0 forum 3

hello guys can u help me with code. Everytime i run the program and update the data in database. I got the error in this code [CODE]da.Update(ds, "reservationdata")[/CODE] [CODE] Dim dt As DataTable = ds.Tables("reservationdata") If resno.Text = "" Or custname.Text = "" Or custaddress.Text = "" Or TextBox1.Text = "" Or endTime.Text = "" Or amouttopaid.Text = "" Or InitialDeposite.Text = "" Or RemainingPayment.Text = "" Or DateTimePicker1.Text = "" Then MsgBox("Please fill the amount information for update", MsgBoxStyle.Exclamation, "UPDATE PAYMENT INFORMATION") Else Try With dt .Rows(0)("resno") = resno.Text .Rows(0)("custname") = custname.Text .Rows(0)("custaddress") = custaddress.Text .Rows(0)("facname") = facname.Text .Rows(0)("amenityname") …

Member Avatar
Member Avatar
+0 forum 6

hello guys i need help is it possible to check if the customer input his complete name is valid or not? if yes how?

Member Avatar
Member Avatar
+0 forum 1

hello guys i have a question because in my I.O.File i use this to save the data in the listview in a c:\test.txt but the problem is that it only save one data and every time i click the save the previous data that i save is deleted and it change the new one that i save...and also when i click the remove in the listview it will also delete the data that save in the c:\test.txt and the format should like this First name | lastname | address | rae alanah new york john smith los angeles here the …

Member Avatar
Member Avatar
+0 forum 5

hello guys can u help me with this my code [CODE] Dim myFile As String = "C:\report.html" Dim stream As New IO.FileStream(myFile, IO.FileMode.Create) Dim writer As New IO.StreamWriter(stream) writer.WriteLine() writer.WriteLine("" & TextBox8.Text) writer.WriteLine("" & DateTimePicker1.Text) writer.WriteLine() writer.WriteLine() writer.WriteLine("Customer Name | Cost | Number of hours | Time Start | Time Remaining | Facility Name | Amenity Name | Incharge Employee") writer.WriteLine() writer.WriteLine() writer.WriteLine() For Each item As ListViewItem In ListView1.Items writer.WriteLine(item.SubItems(0).Text & " | " & item.SubItems(1).Text & " | " & item.SubItems(2).Text & " | " & item.SubItems(3).Text & " | " & item.SubItems(4).Text & " | " & …

Member Avatar
Member Avatar
+0 forum 1

hello guys, I need help regarding with my listview how will you make in listview if the name is already exist in the listview it will no longer accept or there is a msgbox("name already in listview") and the name is in the first column of the listview. Or what i want is that if the name is in the listview is equal to the textbox.text which is where u input the name that shown in the listview there is a msgbox that will appear will not accept that coz the name is already in the listview....

Member Avatar
Member Avatar
+0 forum 8

hey guys can u help me with this the problem of this code should delete only the selected item from the listview in a report.txt but this code delete all the data in the txt file whether i selected only one data from the listview.... [CODE]Dim myFile As String = "C:\report.txt" Dim stream As New IO.FileStream(myFile, IO.FileMode.Create) Dim writer As New IO.StreamWriter(stream) For Each item As ListViewItem In ListView1.SelectedItems item.Remove() MsgBox("File Deleted Permanently.", MsgBoxStyle.Information) Next Next writer.Flush() writer.Close() stream.Close()[/CODE]

Member Avatar
Member Avatar
+0 forum 2

hello guys i need help how can u get the data in to two tables in one form. This code works but the problem is like in combobox2.text the data is display twice and also in inEmployee.text the data is display 4 time both are combobox so when u click the combobox u can see that the data is display twice or 4 times..... i need help please Dim sqlquery = "SELECT * FROM facilitydata, customerdata, employeedata" Dim myCommand As New MySqlCommand() myCommand.Connection = conn myCommand.CommandText = sqlquery 'start query myAdapter.SelectCommand = myCommand Dim myData As MySqlDataReader myData = myCommand.ExecuteReader() …

Member Avatar
Member Avatar
+0 forum 1

hello guys..i have a question..Is it possible to make the time running in datagirdview? and also if it is possible to make the update of two form combine in 1 form for example you have a customer form that you save, update in database and another like for employee that you can also save, update..is it possible to make that in one form?? that you have a two update in one form...

Member Avatar
Member Avatar
+0 forum 1

Hello Everyone I need to convert string to an image in vb.net. In my project, i need to capture the signature and show it as image. Capturing signature is done and it returns the data as string. I need to take this string and show it as image. I am doing in the following way [CODE]Dim Wfile As New StreamWriter("C:\Signature.tiff") WFile.WriteLine(ControlData) 'ControlData is the captured data in string format. WFile.Close()[/CODE] The tiff file is being created... but when i clicked on that to view the image.. it is showing nothing and it says preview not available. But the size of …

Member Avatar
Member Avatar
+0 forum 5

Hello Every one I have worked with VB.NET two years back. I have lost little touch with that and trying to get back. I have to use key down event on text box in VB form. The code for the event looks like this: [CODE]Private Sub TextBox1_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyDown If e.KeyCode = keys.Enter Then MessageBox.Show("Hello") End If End Sub[/CODE] I am using sharp development open source IDE. I am getting the following error while building [B]Handles clause requires a WithEvents variable defined in the containing type or one of its base types.[/B] when …

Member Avatar
Member Avatar
+0 forum 1

Ok, so I'm kinda new to programming, but I'm quick to grasp it. I like programming. Anyway, I'm trying to write a program that will do this. If a user types in a name in the first line of a textbox and clicks a button, the name will be wrapped in 2 bb-codes. If the user types in 2 names, 1 name on each line, both names are wrapped in the same bb-code...and so on...I'm using textboxes for ease of copying and pasting full lists of names and making each line in the textbox count. So far, I got this …

Member Avatar
Member Avatar
+0 forum 2

The End.