Posts
 
Reputation
Joined
Last Seen
Ranked #571
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
96% Quality Score
Upvotes Received
25
Posts with Upvotes
24
Upvoting Members
18
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
7 Commented Posts
3 Endorsements
Ranked #486
Ranked #490
~49.9K People Reached
About Me

Final Year Bachelors Student of NEDUET Karachi, Pakistan. Microsoft Certified Professional for .Net framework 2.0. Mostly self taught programmer who just love to code.I can be contacted by:eng.shahan@hotmail.com but I won't solve any question "personally".

Interests
Favorite Games: Basket Ball, Cricket, Football. Favorite Foods: Nuts, Chocolate Chip, Chocolate and…
PC Specs
As a contributor in these forums: DaniWeb Contributor Experts-Exchange Contributor MSDN Contributor…
Favorite Forums
Favorite Tags
Member Avatar for jazzyb

Your form2 code should be like this: [CODE]Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.userTableAdapter.Fill(Me.myDataSet.user) Me.DataGridView1.DataSource = Me.myDataSet.user ' Bind grid with table Me.DataGridView1.Refresh() End Sub[/CODE]

Member Avatar for spandan_1
0
3K
Member Avatar for paulablanca

Hi! Check this: [CODE] Private Sub DataGridView1_CellEndEdit(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit If (e.ColumnIndex = 0) Then ' Checking numeric value for Column1 only Dim value As String = DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString() For Each c As Char In value If Not Char.IsDigit(c) Then MessageBox.Show("Please enter numeric value.") DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value …

Member Avatar for valeriduss
0
6K
Member Avatar for Ghost

@inderneel Lets say you have two forms: Form1 and Form2. You called Form2 from Form1 like this: Form2 frm=new Form2(); frm.ShowDialog(); My question is are you willing to exit the Application from Form2 ??? Try: [B]Environment.Exit(0); [/B] The exit method terminates the PROCESS and your form(s) lies under the same …

Member Avatar for vasanthmc2
1
10K
Member Avatar for mrinsult2000

Hi! Please check this: [CODE] List<string> Col1 = new List<string>(); List<string> Col2 = new List<string>(); DataGridView1.AllowUserToAddRows = false; //removes last(Extra) row foreach (DataGridViewRow row in DataGridView1.Rows) { Col1.Add(row.Cells(0).Value.ToString); Col2.Add(row.Cells(1).Value.ToString); } DataGridView1.AllowUserToAddRows = true; //add row again If addition of rows allowed. [/CODE]

Member Avatar for Richardlee32
0
5K
Member Avatar for sushilsth

Try using the below sample code: ' iterate on all pages of tab control For Each page As TabPage In TabControl1.TabPages ' picked GroupBox controls only in a separate variable ' to aviod evaluation each time during loop Dim grpBoxes() As GroupBox = page.Controls.OfType(Of GroupBox)() For Each grpBox As GroupBox …

Member Avatar for ShahanDev
0
139
Member Avatar for ammukarthi

I would recommend you store the country code in your table as well in front of country name(or in a separate table and link them). Your life will be easier. Just fetch the country code from the table corresponding to the country name.

Member Avatar for ShahanDev
0
218
Member Avatar for hueikar

You need to check two things here: 1. This path **should exist**. 2. You have **permission** to access the location. Since it seems to a location of a server/Domain directory.

Member Avatar for ShahanDev
0
106
Member Avatar for oluseye.ademola

From your question my understanding is that you have saved your data in database through form 1 and you want to see the updates on form2. In form2, you need to use SqlCommand, SqlConnection and SqlDataApadter classes and an instance of DataTable. See the example below: (untested, but give you …

Member Avatar for ShahanDev
0
214
Member Avatar for DryGoldFish

AFAIK, you are using TYPED dataset. What you need to do is, in the table inside you dataset, you need to perform a check with the username you take as an input from user and if it exists display an error message. On the other hand insert an entry in …

Member Avatar for ShahanDev
0
149
Member Avatar for joel.blundell.5

Can you post the error message you received ? It will help us to figure out the problem.

Member Avatar for ShahanDev
0
194
Member Avatar for tin.marcelino

Hi! The error you are receiving, appears when for example we do not initialize an object and try to access one of its property so in this case the the object does not exists so we can not access its property. I have a couple of questions and few guidelines …

Member Avatar for ShahanDev
0
195
Member Avatar for saleem.mukhtiar

This can be the [startup](http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.customformat.aspx): While [this](http://www.vbdotnetheaven.com/uploadfile/mahesh/vb-net-datetimepicker/) one also seems useful.

Member Avatar for ShahanDev
0
116
Member Avatar for vijaycare

You can setup your query to pick 15 challans and fill a datatable. Pass this datatable to crystal report's datasource. Thats it...!

Member Avatar for ShahanDev
0
150
Member Avatar for cheiL

Hi! Could you please provide more detail ? As you said: [QUOTE]Instead of deleteing I want my code to be ammended to set curprice = curPrice(intCurrentData)[/QUOTE] You want to update 'CurPrice' but in your DELETE query it is doing a different thing, no sigh of 'curprice' manipulation etc... Can please …

Member Avatar for cheiL
0
135
Member Avatar for BleepyE

This could be a direct hit: [URL="http://www.vbdotnetheaven.com/UploadFile/mahesh/AccessMySqlDatabase04252005015856AM/AccessMySqlDatabase.aspx"]http://www.vbdotnetheaven.com/UploadFile/mahesh/AccessMySqlDatabase04252005015856AM/AccessMySqlDatabase.aspx[/URL] For an alternative: [URL="http://dev.mysql.com/tech-resources/articles/ebonat-load-and-search-mysql-data-using-vbnet-2005.html"]http://dev.mysql.com/tech-resources/articles/ebonat-load-and-search-mysql-data-using-vbnet-2005.html[/URL] Check this if gone through the above two: [URL="http://www.codeproject.com/KB/vb/VBnet_to_mySQL_Server.aspx"]http://www.codeproject.com/KB/vb/VBnet_to_mySQL_Server.aspx[/URL]

Member Avatar for farooqpathan
0
210
Member Avatar for vn412

This will generate a checkbox column in your datagridview: [CODE] Dim chkBoxCol As New DataGridViewCheckBoxColumn DataGridView1.Columns.Add(chkBoxCol) [/CODE] Is this what was required ?? then by looping through all the checkboxes you can set value(s) accordingly.

Member Avatar for Patel Pritesh
0
295
Member Avatar for Cally_Law

When you execute your "command" use ExecuteScalar() method to accomplish the task. You should do like this: [CODE] 'Define your OleConnection, connectionstring etc.. Dim cmd as OleDBCommand(........) 'pass connectionstring,connection object etc Dim AffectedRecords as Integer = cmd.ExecuteScalar() If(AffectedRecords>0)then ' if condition match there is some record added. ' Display your …

Member Avatar for ShahanDev
0
231
Member Avatar for djjavo

Hi! You can append "NewLine" character at the end of each line as demonstrated in the sample, and use it with Write() and TrimEnd() method, Run this code in a separate project you will see a file at location "C:\abc.txt" [CODE] Sub Main() Dim user() As String = {"item1", "item2", …

Member Avatar for djjavo
0
166
Member Avatar for 0096

Hi! One way as I see: Use this funtion: [CODE] Public Function LoadNewQuestion(ByVal QuestionNumber As Integer) As DataRow Dim row As DataRow = VBtestasDataSet.Questions.Rows(QuestionNumber) 'You will find Rows() method under "Table" of "DataSet" Return row End Function[/CODE] and on every "Next" button click call: LoadNewQuestion(0) LoadNewQuestion(1) LoadNewQuestion(2) . . . …

Member Avatar for 0096
0
253
Member Avatar for kylelendo

Hi! Here is the vb.net code: [CODE] Dim text As String = IO.File.ReadAllText("YouPathOfFile") Dim bytearray() As Byte = Encoding.ASCII.GetBytes(text.ToCharArray()) Dim Hex As String = String.Empty For Each b As Byte In bytearray Hex &= Convert.ToString(b, 16) Next System.Diagnostics.Debug.Print(Hex) 'see result in "Output window"[/CODE] and here is the link for verification …

Member Avatar for ShahanDev
0
219
Member Avatar for StevenSchaffner

Hi! You should go through this link: [URL="http://www.codeproject.com/KB/webforms/Editable_GridView.aspx"]http://www.codeproject.com/KB/webforms/Editable_GridView.aspx[/URL] In the link you should consider these parts: [CODE]<asp:GridView ID="grdContact" runat="server" AutoGenerateColumns="False" DataKeyNames="Id, Type" OnRowCancelingEdit="grdContact_RowCancelingEdit" OnRowDataBound="grdContact_RowDataBound" [B] OnRowEditing="grdContact_RowEditing" [/B] OnRowUpdating="grdContact_RowUpdating" ShowFooter="True" OnRowCommand="grdContact_RowCommand" OnRowDeleting="grdContact_RowDeleting">[/CODE] and this one also: [code]<asp:TemplateField HeaderText="Name" HeaderStyle-HorizontalAlign="Left"> <EditItemTemplate> <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox> </EditItemTemplate> <FooterTemplate> <asp:TextBox ID="txtNewName" runat="server" …

Member Avatar for ShahanDev
0
494
Member Avatar for Derren

Hi! Change line 34 like this: [CODE] RichTextBox1.Text = myStreamReader.ReadToEnd()[/CODE] You need to use "Text" property instead of "Rtf".

Member Avatar for codeorder
0
257
Member Avatar for ryan311

Hi! Have a look at this code: [CODE] Dim dt As DateTime = DateTimePicker1.Value.AddDays(-1)[/CODE]

Member Avatar for ryan311
0
113
Member Avatar for RenanLazarotto

Hi! Have a look at this code a well: [CODE] Dim d As Decimal = 52496874654 d = CDbl(d.ToString().Substring(0, 3))[/CODE]

Member Avatar for RenanLazarotto
0
149
Member Avatar for VIPER5646

Hi! GeekByChoiCe's approach is correct. But I want you to don't only use the suggestion, you should go first to this link, where some other related information is also covered for your better understanding: [URL="http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx"]http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx[/URL]

Member Avatar for VIPER5646
0
165
Member Avatar for bklynman01

Hi! There are couples of scenarios discussed in this link, I would recommend you to go through this as well: [URL="http://msdn.microsoft.com/en-us/library/cd8yh918.aspx"]http://msdn.microsoft.com/en-us/library/cd8yh918.aspx[/URL]

Member Avatar for ShahanDev
0
139
Member Avatar for kylelendo

Hi! As you have been asked for: [QUOTE]how can i learn it ???What book should i refer??any tutorials????[/QUOTE] I would recommend you to go through [URL="http://msdn.microsoft.com"]msdn.microsoft.com[/URL] and search about that topic. For example: I want to know the methods and properties supported by ArrayList so have a look at this: …

Member Avatar for Hani1991
0
186
Member Avatar for maknae10

Hi! At line 41 of your code, you have: [CODE] With Me[/CODE] it should be: [CODE] With lstview[/CODE]

Member Avatar for ShahanDev
0
194
Member Avatar for shers

Hi! to writing faster in an excel sheet you need A Fast bulk copy Method: See this heading in the link "A "Fast Bulk-Copy" Method" : [URL="http://www.codeproject.com/KB/office/FastExcelExporting.aspx"]http://www.codeproject.com/KB/office/FastExcelExporting.aspx[/URL]

Member Avatar for ShahanDev
0
144
Member Avatar for ninjatalon

Hi! Your this line: [CODE]frmEstimateMenu.Show(intX)[/CODE] should be: [CODE]frmEstimate.Show(intX)[/CODE] I believe there is a typing mistake... Also, This should be amend as well: [CODE]Public Overloads Sub Show(ByRef x As integer) y=x MyBase.Show() '' To leave the Show() feature of the form intact. end sub[/CODE]

Member Avatar for codeorder
0
89