[Solved] How can I print 5 to 2 decimal place implied?

If you want that with a standard format specifier you have to use a trick. Use the percent-format-specifier “P” after you removed the percent-symbol from the NumberFormatInfo: Dim percentWithoutSign = CType(NumberFormatInfo.CurrentInfo.Clone, Numberformatinfo) percentWithoutSign.PercentSymbol = “” Now you can use this Numberformatinfo wherever you want to display a value as percentage but without the percent-symbol (P0 … Read more

[Solved] How to create software .exe file attached it with database which can able to run on different machine?

Your question and your error arent related. For your client, you need to install Sql Express. LocalDB deployment on client PC For the flash error, you need to check where you are using flash and make sure is also installed. 2 solved How to create software .exe file attached it with database which can able … Read more

[Solved] Visual Basic – Ive written some code to loop a program 45 times and its not looping

You should google “vb.net for loop” and read about how loops work. Here is an msdn article on it: https://msdn.microsoft.com/en-us/library/5z06z1kb.aspx To apply the idea to your code – figure out which parts exactly should be repeating 45 times. Then wrap that in a for loop, something like the following: For i as integer = 0 … Read more

[Solved] vb.net reading text file ,split to random range

Here’s a simple example: Dim R As New Random Dim Count As Integer Dim RangeLength As Integer Dim DataFileName As String = System.IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.MyDocuments, “test.txt”) Dim Links As New List(Of List(Of String)) Using SR As New System.IO.StreamReader(DataFileName) While Not SR.EndOfStream Count = 0 RangeLength = R.Next(2, 6) Dim curLinkSet As New List(Of String) Links.Add(curLinkSet) While Not … Read more

[Solved] Syntax error in INSERT INTO statement (vb.net)

Use parametrized queries. For example the query would look like this: INSERT INTO anggota (no, nis, nama, kelas, jenis_kelamin, tempat_lahir, tanggal_lahir) VALUES (@no, @nis, @nama, @kelas, @jenis_kelamin, @tempat_lahir, @tanggal_lahir) Then adjust your code: cmd.Parameters.AddWithValue(“@No”, Tno.Text) cmd.Parameters.AddWithValue(“@nis”, Tnis.Text) cmd.Parameters.AddWithValue(“@Nama”, Tnama.Text) cmd.Parameters.AddWithValue(“@Kelas”, Tkelas.Text) cmd.Parameters.AddWithValue(“@Jenis_kelamin”, CBjk.Text) cmd.Parameters.AddWithValue(“@Tempat_lahir”, Tt4lahir.Text) cmd.Parameters.AddWithValue(“@Tanggal_lahir”, ttgllahir.Text) cmd = New OleDbCommand(sqltambah, conn) cmd.ExecuteNonQuery() 2 solved … Read more

[Solved] Failing Regex string thats correct

I don’t see the problem. The regex works in the Regex Hero online tester (including the capture group capturing “Beta”)… …and works in the following VB.NET snippet it generated (to which I added a Console.WriteLine call for clarity): Dim strRegex as String = “Version:</b>\s*<span>(.*)\<” Dim myRegex As New Regex(strRegex, RegexOptions.None) Dim strTargetString As String = … Read more

[Solved] Converting CURL command to .NET

Here is what I came up with based on the example posted by @M.Hassan Public Function UPLOAD_FILE(filepath As String) As String Dim request As WebRequest = WebRequest.Create(“http://localhost:8042/instances “) request.Method = “POST” Dim byteArray As Byte() = File.ReadAllBytes(filepath) request.ContentType = “application/x-www-form-urlencoded” request.ContentLength = byteArray.Length Dim dataStream As Stream = request.GetRequestStream() dataStream.Write(byteArray, 0, byteArray.Length) dataStream.Close() Dim response … Read more

[Solved] how to edit html using the webbrowser control? (turn on WYSIWYG features) [closed]

The WebBrowser control has a built-in WYSIWYG mini-HTML editor. You can use it. Here’s an example to how to turn that edit mode on: Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load ‘ I do this for this example, so that we have some elements loaded. ‘ For you, you will need to … Read more