Could you give us an example of what your foldername looks because I think you got something wrong in the get...
Could you give us an example of what your foldername looks because I think you got something wrong in the get...
You really need to learn how to initialise your variables. You need an As and an intial value like:
dim num as integer= 0 or dim str as string= " "
If it is areference type you need to use the New keyword as in:
Dim bottomLabel As New System.Windows.Forms.Label
Here is a good reference to start you off:
https://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx
In your case I think it just means that you have to put the as clause at the enf of your function like:
Public Function getFolderNameGD(ByVal fullyQualifiedFolderName As String, ByVal searchPattern As String) As String
Assuming you got the image in a picture box you can simple do something like this:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.PictureBox1.Size = New System.Drawing.Size(140, 70)
End Sub
First put option strict on, this might throw more error msg.
I do think crop is not the way to do what you want. Look into split image.Maybe you just want to overlay lines?
Well the first line tells you:
System.NullReferenceException: Object reference not set to an instance of an object.
Which means you are referring to an object without having it declared.
HAve you got option strict on and infer off? This will mostlike flag the error, depending on the error meg settings for your project.
Maybe check this thread and post3 in it out:
http://www.vbforums.com/showthread.php?676983-RESOLVED-Unhandled-exception-on-form-closing
Your cmd is wrong. Check this example out:
http://stackoverflow.com/questions/11519195/how-to-delete-records-of-ms-access-database-using-vb-net-form-and-how-to-enter-a
This link might be helpful connecting with vb6 to db2:
http://docs.starquest.com/Supportdocs/techStarSQL/StarSQLODBC/Programming/SQ042_ADOParameterizedQuery.shtml
What have you tried sofar? You need to show us some code of things you have tried.
It is not very clear what you attempt to do. In your example you replace a single word, in your for each loop you replace all(?) text.
Also you should use something like:
For Each lbItem As string In ListBox1.Items
TextBox1.Text = Replace(TextBox1.Text, lbItem, "{HIDDED}")
Next
There is lot of work beeing done in this field of computing. Adding to what Schol-R-LEA has posted, do a google search on:computer voice commands and also look at this article:
http://www.pcworld.com/article/2055599/control-your-pc-with-these-5-speech-recognition-programs.html
Why don't you close all other open programs and than try? It might be the same problem as described in the thread.
O.K. than post your code from your trial as this might be shorter than your original code. <Before you do check also this thread on other open programs and the solution:
http://www.vbforums.com/showthread.php?669855-RESOLVED-PrintDocument-causes-form-to-minimize-or-lose-focus
If you can see the form in the taskbar it is not hidden but minimized. So check all of your code for the word minimized using quick find from your edit menu.
Maybe you close it in your printform or somewhere else. Definetly not in your button click.
You also need to add like this:
ListView1.Items.Add(Me.txtDescription.Text).SubItems.Add(Me.txtPrice.Text)
There are lots of examples on the net. Here is one for numbers only:
http://www.vbforums.com/showthread.php?350067-VB-Numeric-Textbox-input-only
I can't see where you open or close your database. So I suggest you check your select statement and check that your database is open etc. On second thoughts you might want to validate the string that comes from the textbox.
txtPrice.Text.StartWith should be: txtPrice.Text.StartsWith
Your lines 34 to 37 are fine. Which line throws the error?
Well he is writing it as a console program as he states in his first sentence. So, yes you can use vb.net to create a vb.net console project. In my previous post as just missed the (?) to complete my sentence.
He is using a script language
In vb6 you can't use declaration= dadada but you need to seperate these.
Private Sub cmdLogout_Click()
Dim reply As String
reply = MsgBox("Are you sure you want to Logout?", vbYesNo, "Confirmation")
If reply = vbYes Then
Unload Form1
frmAuthentication.Show
End Sub
This makes me always question is it vb6 or vb.net?
Do you have any code in the key events of the textbox? If yes, do show what you have done sofar.
Just search dani web with your query as there are lots of answers.
Here the frame is in action
It's hard to understand what exactly you want to do. However, to put a fframe around the chart you use:
Chart1.BorderSkin.SkinStyle = BorderSkinStyle.FrameThin1
and you can play around with different frames.
O.K. another way is to use the properties of the chart. Set BorderlineColor to black, BorderlineDashStyle to solid and than you can change the line thickness of the border
First of all get rid of the semicolon after 3
You need to use the textbox in vb6 and set the password character in the peoperties.
Where do you enter the string ? Textbox? Combobox?
Spaces in these names are problematic and there are different ways of dealing with it:
http://stackoverflow.com/questions/14190798/how-to-select-a-column-name-with-space-between-in-mysql-on-liunx-ubuntu
Yes you need to assign your value properly. Otherwise start your loop at the top and go down. That should work.
For i As Integer = dt.Rows.Count - 1 To 0 step -1
You can use somezhing like this (.NET Framework 4.5):
TextBox1.Location = New Point(15, 15)
or you can use the top and left properties:
TextBox1.Top = 100
TextBox1.Left = 30
It should be
welcom.show() without (;)
Why would you want to load form1 again? Anyway it works for me without an error.
Try:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim myform As New Form
myform.Show()
End Sub
Just type autocomplete into the search box in the top right corner and you will find plenty of references.
Set your form's KeyPreview property to True and test for the key combinations you want to prevent in its KeyDown event, then set e.SuppressKeyPress = True
You need two textboxes and a button. Add a module to your project and copy:
Option Explicit
Public Function HexIt(sText As String) As String
Dim A As Long
For A = 1 To Len(sText)
HexIt = HexIt & Hex$(Asc(Mid(sText, A, 1))) & Space$(1)
On Error Resume Next
DoEvents
Next A
HexIt = Mid$(HexIt, 1, Len(HexIt) - 1)
End Function
and in the command button on the form you need to put:
Private Sub Command1_Click()
Dim txtAscii As String
txtAscii = Text1
If Len(txtAscii) > 0 Then
txtHex = HexIt(txtAscii)
Text2 = txtHex
End If
End Sub
Please do check the answer for correctness
Well if you want the form to fit into A4 you need to find the size of the form on screen and print to preview. Trial and error. These are good starting values to put into the form load event:
Me.Width = CInt(595)
Me.Height = CInt(842)
Maybe also replace line 29: If Len(Trim(txt.Text)) Then with
If Len(Trim(txt.Text)) > 0 Then
One way of doing it is to capture your form into memory as a bitmap, resize the bitmap and than print it. That might make the font too small?
O.K so you want to print the whole form to A4 or part of it? So how big is the form -whole screen, part of the screen? How much space should it occupy on A4? The difficulty with using print form is that your screen resolution is different to the printer resolution. The easiest way is to change the size of the form to fit exactly what you want, but is maybe not possible. So without knowing exactly what you want it is hard to give any advice.
You are aware that you let the compiler do your conversions from text to decimal. Put option strict on and you will get some errors.Why? because you are multiplying text as in:
txtEur.Text = txtDollar.Text * 0.89
It is much better to declare variables correctly like:
Dim DecDollar as Decimal =0 etc.
Well Don, if you want the group to improve on your app you have to show us the code.
This link might help to solve the problem. And yes, there is a bit more involved printing selection in a form.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/adfda3b9-7dbb-430b-96ca-28dd7f543bea/how-to-print-a-group-box-content-only-in-vb?forum=vbgeneral
What have tried sofar? You got some code?
@ Jim
Sorry we just posted almost at the same moment.
Cheers
Put this on top of your class or form1:
Imports System.IO
Put this into your function instead of the msgbox:
Using writer As StreamWriter = New StreamWriter("C:\append.txt", True)
writer.WriteLine("First line appended; 1")
End Using
This creates a new file if the file doesn't exist