419 Posted Topics

Member Avatar for weeraa
Member Avatar for yumyam09

At the top of your code type this: `Option Strict On` Better yet, on the menu got Tools->Options. Expand the "Projects and Solutions" node. Select "VB Defaults" and turn it on there. This will allow Visual Studio to point you to many mistakes in your code. Look at this line: …

Member Avatar for Reverend Jim
0
110
Member Avatar for fRodzet

Class MainWindow Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click Dim Other As New Window1(TextBox1) Other.Show() End Sub End Class Public Class Window1 Private DestTB As TextBox Public Sub New(ByVal DestTB As TextBox) InitializeComponent() Me.DestTB = sourceTB End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal …

Member Avatar for abelingaw
0
244
Member Avatar for ctrl-alt-del

Just food for thought, but why not impliment the API function CopyFileEx? http://msdn.microsoft.com/en-us/library/windows/desktop/aa363852%28v=vs.85%29.aspx PInvoke.Net has an example. http://www.pinvoke.net/default.aspx/kernel32/CopyFileEx.html This function gives you the relative safety of using a standard Windows library function along with the file progress reporting capability that you want.

Member Avatar for ctrl-alt-del
0
243
Member Avatar for MattBerry

> Now when I type something in textbox1 and lose focus, textbox2 is altered but when I click the button neither textbox is updated. > >Obviously if I uncomment the call to notifyPropertyChanged all works fine. This however brings up questions in my mind. > >1. If I change textfield1 …

Member Avatar for MattBerry
0
207
Member Avatar for bprosic

I recommend that you create a BindingNavigator to manage navigation. Your current implimentation has no error checking and the navigator will do all that for you. http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingnavigator(v=vs.90).aspx With a navigator you can define the buttons that handle navigation. The one draw back is that they need to be ToolStrip items. …

Member Avatar for bprosic
0
2K
Member Avatar for hadi.alshabany

How did you add the files? Are they in an external assembly? If you added them via Project-.Properties and the "Resources" tab and you know the name, there is no need to enumerate through the entries. You can just access using "My.Resources.NameYouWant".

Member Avatar for TnTinMN
0
46
Member Avatar for cloudynight

I am forced to conclude by the syntax "getcomments()" that getcomments is a function that returns an ArrayList. Howerver without seeing that function it is not possible offer any insite as to why this is happening.

Member Avatar for TnTinMN
0
364
Member Avatar for kjk86

> Here is what the source will look like: > text1 = text1 > text2 = text2 > text3 = text3 > text4 = text4 > text5 = abcdefg (Yes) > text6 = hijklmn (Yes) > text7 = 1234567 (No) > text8 = abcdefg (No) > >What I want to …

Member Avatar for TnTinMN
0
391
Member Avatar for testname123

You lost me on your sequence of events. However, the simplest way to store the textbox is to use "UserSettings". Go to Project->Properties and select the Settings tab. Create three setting like these: ![Usersetting](/attachments/fetch/L2ltYWdlcy9hdHRhY2htZW50cy8zL1VzZXJzZXR0aW5nLmpwZw%3D%3D/500 "Usersetting") Then in your notepad form do something like this: Private Sub btnSave_Click(ByVal sender As System.Object, …

Member Avatar for testname123
0
152
Member Avatar for brylle

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If Not Char.IsLetterOrDigit(e.KeyChar) Then e.Handled = True End If End Sub

Member Avatar for TnTinMN
0
103
Member Avatar for testname123

Add a constructor to the form (call it Form2) that needs to hide the button on the first form (call it Form1). Like this: Public Class Form2 Private ButtonToHide As Button Public Sub New(ByVal ButtonToHide As Button) Me.InitializeComponent() Me.ButtonToHide = ButtonToHide End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal …

Member Avatar for testname123
0
1K
Member Avatar for JohnKelly

Take a look at this [article](http://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C#). It's in C#, but you should be able to follow the methodology. If you have problems understanding it, feel free to ask questions here. I have implement his methods in a project of mine, so I have a basic understanding of what it is …

Member Avatar for JohnKelly
0
1K
Member Avatar for llandis3

Two things standout as big performance hits: 1) string concatenation: This is very slow and gets worse as the length of the string grows. Your "Display" variable gets longer as the loop progresses. 2) unnecessary assignment statements in the loop: The big one is assigning TextBox1.Text. Since you have not …

Member Avatar for llandis3
0
144
Member Avatar for xtianpark

There should not be a box behide the picture box. Are you sure that you do not have a image smaller than the size of the picturebox and that the PictureBox.SizeMode is not set to centerimage? Try setting the size mode to "Zoom" and see if the box goes away.

Member Avatar for TnTinMN
0
121
Member Avatar for ayat abukhadra

VB2005 has VB6 converter built-in. For simple projects it can be a time saver. As the others have stated, the converted source can be more work than starting from scratch. Here are download links for VB2005. Visual Basic 2005 Express Edition (445,282 KB) * IMG File: http://go.microsoft.com/fwlink/?linkid=54764 * ISO File: …

Member Avatar for TnTinMN
0
499
Member Avatar for Sevyt

The DLLImportAttribute is used to import a specific function from a native library. It does not import the entire library. You need the documentation for the function to define the signature properly. For imports from Microsoft Windows API's see [http://www.pinvoke.net/](http://www.pinvoke.net/). A quick websearch on beidlib.dll leads me to believe that …

Member Avatar for TnTinMN
0
140
Member Avatar for theonebit

> VB.net should be able to handle this although you may have to use parenthesis: If (0<= a <=100) then AND, ANDALSO, OR and ORELSE are used for testing two conditions but "0<=a<=100" is one logical condition This will compile and run if "Option Strict" is off (one of the …

Member Avatar for G_Waddell
0
4K
Member Avatar for dtrump23

You may want to take a look at this HTML Render. [http://www.codeproject.com/Articles/32376/A-Professional-HTML-Renderer-You-Will-Use](http://www.codeproject.com/Articles/32376/A-Professional-HTML-Renderer-You-Will-Use) You can use it to render HTML to an bitmap then save the bitmap.

Member Avatar for geniusvishal
0
129
Member Avatar for uroz

To be honest, I got a little confused by your logic. Therefore I thought I would post this example. It is similar to yours and maybe you can use it to find the problem in your code. string path = Application.StartupPath + "\\songs.txt"; System.IO.Stream strmSongs = System.IO.File.OpenRead(path); System.IO.StreamReader sr = …

Member Avatar for AnnieCalvert
0
121
Member Avatar for thewilf

Sometimes the designer gets messed up and exiting and restarting clears it up. Best to make sure the Form's Design view is closed before restarting. In the worst case you may have to edit the Form.designer.vb file and make sure that the controls are added to the proper tabpage. If …

Member Avatar for thewilf
0
109
Member Avatar for pop_cola

Unfortunately, Access does not support the DateName function. However, you can get the same functionality from the "FORMAT" function. Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & "D:\My Documents\temp\Play.mdb" & "'") Dim cmd As New OleDb.OleDbCommand() cmd.Connection = conn TextBox1.Text = "ma" cmd.CommandText = "SELECT *, FORMAT([DateEntered], 'MMMM') as [Month] FROM …

Member Avatar for G_Waddell
0
258
Member Avatar for mitch_oso

You have not assigned the connection to "OComn" (OleCoDbCommand). see: [http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection%28v=vs.90%29.aspx](http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection%28v=vs.90%29.aspx)

Member Avatar for thewilf
0
241
Member Avatar for BilalAKhan

> What I want to have is the inverted output e.g. binary output converted from 000010001000011 (abc) to 000110001000001 (cba). For i = 0 To stringlength - 1 If c = "0" Then convertdata = "00000" .... rest of your code Should be something like this: Dim stringlength as Int32 …

Member Avatar for TnTinMN
0
879
Member Avatar for cming21

try here: [http://raptorflowchart.freeforums.org/](http://raptorflowchart.freeforums.org/)

Member Avatar for TnTinMN
0
1K
Member Avatar for CloudZELL91

You did not mention what tutorial you are following. However, I have found this site to be very good, if at times dated, for learning the basics. [http://www.homeandlearn.co.uk/NET/vbNet.html](http://www.homeandlearn.co.uk/NET/vbNet.html) It would also be helpful if you posted a screen shot of your database definition. From the code you posted, you have …

Member Avatar for TnTinMN
0
101
Member Avatar for Start4me

Personally, I prefer to prevent the user from having such entry options. It makes the subsequent coding much easier. It is easy enough to write custom entry controls that inherit from those supplied in .Net. I have assumed that you want to be able to enter N=North, S=South, E=East, W=West …

Member Avatar for TnTinMN
0
300
Member Avatar for Merovingian

Take a look at [this article](http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=27346).

Member Avatar for TnTinMN
0
245
Member Avatar for k_nenad

A BindingSource also has a "Sort" property. I have not investigated the actual logic for this, but if the bindingsource.sort property is set to an empty string, the behaviour your are seeing will occur. If you set bindingsource.Sort to null before assigning the "DataSource", it will not clear the DefaultView.Sort …

Member Avatar for k_nenad
0
110
Member Avatar for track&price

Sandy, First off, change the password on that account immediately and cancel your credit card. I know very little about this topic, but: Dim em1 As HtmlElement = wb1.Document.All("emailAddress") 'returns ID: "login-Email_Address" Dim pw As HtmlElement = wb1.Document.All("password") 'returns ID: "login-password" These are not the ID's you wanted. This does …

Member Avatar for TnTinMN
0
298
Member Avatar for gujinni

I would suggest that you place your logic in the PlayStateChange event handler. Here is a snippet from a program of mine. Sub WMP1_PlayStateChange(ByVal sender As Object, _ ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) _ Handles wmp1.PlayStateChange Select Case e.newState Case WMPLib.WMPPlayState.wmppsUndefined currentStateLabel.Text = "Undefined" Case WMPLib.WMPPlayState.wmppsStopped currentStateLabel.Text = "Stopped" Case WMPLib.WMPPlayState.wmppsPaused …

Member Avatar for gujinni
0
2K
Member Avatar for themaj

The Form.Close method does exactly that; it tells the form to close. It does not stop the currently executing code block. The following code will demonstrate this behavior and show you an alternative to achieve your goal of stoping execution. Just step through the code in the debugger to observe …

Member Avatar for themaj
0
5K
Member Avatar for semicolon

I'm not sure that I understand what it is that you mean by "own session" If you mean that you want to merge the two datatables together so that they can be displayed in the same DataGridView control, then you would use the [DataTable.Merge](http://msdn.microsoft.com/en-us/library/system.data.datatable.merge.aspx) method. Perform the merge in your …

Member Avatar for TnTinMN
0
111
Member Avatar for PM312

You are not clearing MyDataTable before filling in CnScrip. Try adding MyDataTable.Clear before MyAdapter.Fill(MyDataTable).

Member Avatar for PM312
0
114
Member Avatar for behemothdave

Hi Dave, I suggest that you either type "Option Strict On" as the first line in your code or enable as the default state under "Options->Projects and Solutions->VB Defaults". This will force VS to flag improper type conversions. It may seem like a pain at first, but you will find …

Member Avatar for Albireo6972
0
335
Member Avatar for Nutster

Nutster, you may find this article helpful: [Click Here](http://www.codeproject.com/Articles/154121/Using-Try-Catch-Finally) The code placed under the "Finally" section can be viewed like an in-place method definition that will always be called before leaving the "Try-End Try" block. Let's say in your IOException example, that you can not recover from the file error …

Member Avatar for Reverend Jim
0
298
Member Avatar for JANINE

Usually, the best place to start is to get the [manual](http://download.gigabyte.us/FileList/Manual/motherboard_manual_8i945p(pro)(-g)_e.pdf). From the manual page 59. A. What is Dual BIOS Technology ? Dual BIOS means that there are two system BIOS (ROM) on the motherboard, one is the Main BIOS and the other is Backup BIOS. Under the normal …

Member Avatar for JANINE
0
372
Member Avatar for mzeewashooo

If you are not limiting the allowable characters in the textbox to exclude characters that the "LIKE" statement uses, you should preprocess the textbox's text to bracket those characters similar to like what I have shown in my example. I believe the SQL "LIKE" command treats these as special characters: …

Member Avatar for mzeewashooo
0
378
Member Avatar for M.Waqas Aslam

FoxPro uses a variant of the old dBase([Click Here](http://en.wikipedia.org/wiki/Dbase)) file format. There is a program (free trial) called DBF Manager that works well with these file types. You can find it here: [Click Here](http://www.astersoft.com/)

Member Avatar for TnTinMN
0
3K
Member Avatar for Minko

Hi Minko, You did not show how you defined your array so I had to guess. If you have a one dimensional array you can use the Array.Sort method. I defined a class to hold you data and made an array of those data items. Since the array holds a …

Member Avatar for Minko
0
6K
Member Avatar for romanzo

The problem is caused by: ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) When you remove the item, there is nothing selected and SelectedIndex = -1. That explains the error, but I have a feeling that your program logic may not be correct. Is the listbox used to select the meals or is it selected by the …

Member Avatar for romanzo
0
329
Member Avatar for ibpet11

Another option is to use the Linq extensions on the array class. For example: Dim A() As String = {"a", "b", "c", "d", "e"} Dim B() As String = {"a", "g", "c", "h", "k"} Dim InA_notIn_B() As String = A.Except(B).ToArray 'yields: b, d, e Dim InB_notIn_A() As String = B.Except(A).ToArray …

Member Avatar for Reverend Jim
0
3K
Member Avatar for tendaimare

Guys, this has nothing to do with nulls being returned from the database. It has to to do with the DataTable.Compute method returning a DBNull.Value when as the OP stated that the filter criteria does not match any records in the datatable. Replace the textbox.text assigment statement with: Dim o …

Member Avatar for Reverend Jim
0
587
Member Avatar for sean.downes.96

Sean, Before I even attempt to offer advice on this I want to make sure we have the goals well defined. So here is how I have distilled your description. Form1 contains: datagridview Form2 contains: multiple textboxes and a "Send Button" On clicking "Send", the contents of the textboxes are …

Member Avatar for sean.downes.96
0
283
Member Avatar for iFrolox

Most of your needs are pretty straight forward. The adding a button one is the stickler. I've hosted other apps in a winform before, so I thought why not follow the same method to host a winform button in another app? It sort of works ok. You need to control …

Member Avatar for iFrolox
0
3K
Member Avatar for belenos46

Isn't the correct syntax: System.IO.File.AppendAllText(filepath, strToAppend) not: System.IO.File.AppendAllText(strToAppend)?

Member Avatar for belenos46
0
774
Member Avatar for GregDen

> When the database doesn't have a password, it works perfectly. But when I give it a password ("OpenSesame") and change the Connect string to "Access;pwd=OpenSesame", I get this error: > "Couldn't find installable ISAM." I am probably wrong on this, but shouldn't the connection string be: "dns=Access;pwd=OpenSesame"?

Member Avatar for TnTinMN
0
328
Member Avatar for danielgr

> As a matter of interest, do you know if there is a way to do a similar query on a dataset using LINQ? You would have to run Linq against the DataTable.Rows collection. You could also use the DataTable.Compute method for a non-Linq solution. Dim dt As New DataTable …

Member Avatar for TnTinMN
0
172
Member Avatar for gefen2215

Assuming that the datagridview is bound to a datatable, then you can use the DataTable.Compute method. `Dim total As Decimal = CDec(dt.Compute("Sum([Payments])", "True"))` Where "dt" is the name of the datatable. I assumed that the column name in the datatable for "paymenents" is "Paymenents".

Member Avatar for TnTinMN
0
106
Member Avatar for iFrolox

Assuming this is the code that you are using to write the file (found in your other thread), Private Sub WriteAccounts(filename As String, Accounts As List(Of Account)) Dim lines As String = "" For Each acct As Account In Accounts lines &= acct.ToString() & vbCrLf Next System.IO.File.WriteAllText(filename, lines) End Sub …

Member Avatar for TnTinMN
0
141

The End.