Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all 27201 articles
Browse latest View live

How to check is camera's capture button pressed?

$
0
0
Sounds rather simple but I can't find any information about that. I want to acquire images from external usb camera. Everything;s working fine from VB.net but I'd like to make things more simple using existing camera's capture button.

any idea?

Load project files to memory?

$
0
0
Hello

I have a project which uses .dll files, and also .exe files to function

but I need so when my project .EXE is ran from a removable device (USB/Ext HDD) then the program can still fully function

Is there any way in .NET I can preload these programs or compile them into my projects debug .exe?

Thanks - any help appreciated.

VS 2010 Importing a file with a list of URL's that are seperated by a line

$
0
0
So i need help with the following:
BtnImport - Click this button and it will show file explorer where you can only select a .txt file.
BtnGo - In the text file there are URL's each URL is on it's own line i want my program to be able to read the file with regex (already done this bit) but how do i add the selected file to this code here:
Code:

Dim the_request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("Selected file from BtnImport")
Thanks heaps for helping :)

VS 2015 Populate text fields on form load

$
0
0
Rookie question here but tired of trying/searching with no answer.

I have a simple form with 8 text boxes. On form load I read an XML file which will have up to 8 <description> elements. I am able to read the description(s) from the file but now need to assign each description to the text boxes on the form. Seemed quite simple until I started to write it out. Probably is simple for anyone but this rookie. My brain is mush now and figured I would raise the white flag before the migraine gets any worse :)

Here is what I have so far.

Dim xmlDoc As New XmlDocument()
xmlDoc.Load("C:\rssfeed\bcc.rss")
Dim nodes As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("/rss/channel/item")

For Each node As XmlNode In nodes
pDesc = node.SelectSingleNode("description").InnerText
MessageBox.Show(pDesc)

Next

I need to fill textbox1.text with the first "pDesc" and textbox2.text with the next "pDesc" and so on based on how many description elements there may be in the file.


If someone could please assist me (without laughing) I would be very greatful!!

Thanks so much

VS 2010 Having problem with ListBox as offline Chatbox

$
0
0
First of all, I'm very sorry to ask this (even more if this is a very stupid question), but I've spent 12 hours on Google and I didn't found any solution to this.

What I'm trying to achieve : I made a chatbox similar to like RPG-games chatbox, where a system notification and user chat will be displayed on the same box (I use ListBox for the box). The chat and notification system works properly as intended.

The problem is : If the text is too long, then the text would exceed the ListBox area, instead of making second line (breakline). Name:  Untitled.png
Views: 14
Size:  23.5 KB

As you can see in the above picture, the word "here" got cut off because it's exceeding the ListBox size, what I wanted to do is, (if the text is too long) the text supposed to break the line and continue at the second line instead.

Additional Information :

1. This is a game, but for now it's offline version(for me only).
2. This chatbox is offline, therefore it doesn't require internet or winsock yet.
3. The code.
Quote:

Public Sub BtnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEnter.Click
ListBox1.Items.Add(userName & ": " & BoxChat.Text)
BoxChat.Clear()
ListBox1.TopIndex = ListBox1.Items.Count - 1

End Sub
I'm not sure if this problem has a workaround or not, but if it's not possible to solve this without too much trouble, please show me the correct path to achieve this chatbox.
Attached Images
 

VS 2010 MDI Parent and MDI ChildForm

$
0
0
Hey,

i have already MDI Parent form and Form3 seperate.

But both are different. Form3 is not child form.
Now when i open MDIparent and try to open Form3 after which is not child form, it is going back to Parent form.

I want to open Form3 form as child, which is not actually child. Or it should locked, i should not able to use parent only when Form3 is not closed.

In VB.6 there is option to change Form3 as child form.... under prperties---MDIChild-True or False. How in VB 2010 .net?

I am bit confused.


Please help me.

Regards
ebin:confused:

VS 2015 Updating two DataGridViews

$
0
0
First I'm going to try to explain my problem.

I have two tables in a SQLEXPRESS database, a company table (opdg) and a contacts table (opdg_cp) which is holding the contacts for a company by company Id (opdg_Id). BTW Id in the company table is the primary key and is Identity, increment 1.

To keep it simple:

Company DataBase

Id Name

1 HillWood

2 Fergusson

3 van Dyke


Contacts Database

Id Lastname opdg_Id

1 Dewalt 1

2 Johnson 1

3 Henderson 3

4 Anderson 2

5 Eastwood 2

So 2 contacts belong to Fergusson, 2 to Hillwood and 1 to van Dyke

I created two datagridviews on one form. On holding the Companies and on holding the contacts. Both datagridviews are able to update, add, and insert records. What I'm trying to do is:

If I walk through the company database in the first datagridview, the second datagridview should show me the contacts for that company because of the opdg_Id cell in the contacts table. Well, I did that, it works well. I will include all code below.

But, I get a problem when I'm scrolling down in the company datagridview and I hit the CurrentRow.IsNewRow event to add a new record. Because at that point there is just at that particular moment no known value in the Id cell of the company table, it's still NULL. At that point I'm using the



datagridview_CurrentCellChanged event to search for matching contacts by C_Id, but the Id cell is NULL so I get an error.

Below the Code. BTW for opening, closing the database I use a separate Class, which I also include below.

This is the Class I'm using:

Imports System.Data.SqlClient

Public Class SQLControl
Dim HostIP = My.Settings.HostIP
Dim DataBase = My.Settings.Database
Dim User = My.Settings.User
Dim Password = My.Settings.Password

' CONNECTION
Public SQLCon As New SqlConnection With {.ConnectionString = "server=" & HostIP & ";User=" & User & ";Pwd=" & Password & ";Database=" & DataBase}
Public SQLCmd As New SqlCommand

Public Function HasConnection() As Boolean
Try
SQLCon.Open()

SQLCon.Close()
Return True
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try

End Function

' SQL DATA
Public SQLDA As SqlDataAdapter
Public SQLDS As DataSet

' QUERY PARAMETERS
Public Params As New List(Of SqlParameter)

' QUERY STATISTICS
Public RecordCount As Integer
Public Exception As String


Public Sub ExecQuery(Query As String)
Try
SQLCon.Open()

' CREATE SQL COMMAND
SQLCmd = New SqlCommand(Query, SQLCon)

' LOAD PARAMETERS INTO SQL COMMAND
Params.ForEach(Sub(x) SQLCmd.Parameters.Add(x))

' CLEAR PARAMETER LIST
Params.Clear()

' CREATE NEW DATASET AND DATAADAPTER
SQLDS = New DataSet
SQLDA = New SqlDataAdapter(SQLCmd)
RecordCount = SQLDA.Fill(SQLDS)

SQLCon.Close()

Catch ex As Exception
Exception = ex.Message
End Try

If SQLCon.State = ConnectionState.Open Then SQLCon.Close()
End Sub

End Class

Below the code for the Windows form, I deleted as much as code to keep it clear, and the BOLD part is my problem. BTW I'm from Holland, so I'm trying to explain my problem in English as good as I can.


Imports System.Data.Sql
Imports System.Data.SqlClient

Public Class Opdrachtgevers
' TWO NEW INSTANCES FROM SQLCONTROL CLASS
Private SQL As New SQLControl
Private SQL1 As New SQLControl
Public search As String
' WHEN FORM IS LOADED
Private Sub Opdrachtgevers_Load(sender As Object, e As EventArgs) Handles MyBase.Load

' EXECUTE QUERY AND POPULATE GRID, (FIRST DATAGRIDVIEW, COMPANY)
SQL.ExecQuery("select * from opdg")

' CALL LOADGRID_OPDG SUBROUTINE (First DataGridView, COMPANY)
LoadGrid_opdg()

' DISABLE SAVE BUTTON
btn_Opslaan_Opdg.Enabled = False

End Sub

' LOADGRID_OPDG SUBROUTINE
Private Sub LoadGrid_opdg()

' IF DATA IS RETURNED, POPULATE GRID & BUILD UPDATE COMMAND
If SQL.RecordCount > 0 Then
Opdg_Grid_View.DataSource = SQL.SQLDS.Tables(0)
Opdg_Grid_View.Rows(0).Selected = True
Opdg_Grid_View.Columns("id").Visible = False
SQL.SQLDA.UpdateCommand = New SqlCommandBuilder(SQL.SQLDA).GetUpdateCommand
End If
End Sub

Private Sub opdg_grid_view_CurrentCellChanged(sender As Object, e As EventArgs) Handles Opdg_Grid_View.CurrentCellChanged

If Opdg_Grid_View.CurrentCellAddress.X < 0 Or Opdg_Grid_View.CurrentCellAddress.Y < 0 Then Exit Sub
If Opdg_Grid_View.CurrentRow.IsNewRow Then

' THIS IS WHERE I HAVE A PROBLEM. IF A NEW ROW IS DETECTED AND THERE

' IS A NULL VALUE IN THE ID CELL, I CAN'T SEARCH THE CONTACTS TABLE,

' BECAUSE, THIS IS A NEW COMPANY RECORD, AND NOT SAVED

' BUT INSTEAD OF THAT, AFTER FILLING IN THE COMPANY'S RECORD,

' IT SHOULD BE POSSIBLE TO GO TO THE SECOND DATAGRIDVIEW TO FILL

' IN THE FIRST NEW CONTACT FOR THAT COMPANY.
Else
' GET THE COMPANY'S ID
search = Opdg_Grid_View.CurrentRow.Cells("id").Value

'SEARCH FOR THE COMPANY'S CONTACT
SQL1.ExecQuery("select * from opdg_cp where opdg_id =" & search)

' LOAD THE CONTACTS DATAGRIDVIEW
LoadGrid_opdg_cp()
End If
Exit Sub
End Sub
Private Sub LoadGrid_opdg_cp()


' IF DATA IS RETURNED, POPULATE GRID & BUILD UPDATE COMMAND
If SQL1.RecordCount > 0 Then

Opdg_Cp_Grid_View.DataSource = SQL1.SQLDS.Tables(0)
Opdg_Cp_Grid_View.Rows(0).Selected = True
Opdg_Cp_Grid_View.Columns("id").Visible = False
Opdg_Cp_Grid_View.Columns("opdg_id").Visible = False

SQL1.SQLDA.UpdateCommand = New SqlCommandBuilder(SQL1.SQLDA).GetUpdateCommand
Else
Call CType(Opdg_Cp_Grid_View.DataSource, DataTable).Rows.Clear()
End If
End Sub

Private Sub opdg_cp_grid_view_CurrentCellChanged(sender As Object, e As EventArgs) Handles Opdg_Cp_Grid_View.CurrentCellChanged

If Opdg_Cp_Grid_View.CurrentCellAddress.X < 0 Or Opdg_Grid_View.CurrentCellAddress.Y < 0 Then Exit Sub
If Opdg_Cp_Grid_View.CurrentRow.IsNewRow Then

Else
Dim search = Opdg_Cp_Grid_View.CurrentRow.Cells("id").Value
SQL1.ExecQuery("select * from opdg_cp where opdg_id =" & search)
LoadGrid_opdg_cp()
End If
Exit Sub
End Sub


Private Sub btn_Opslaan_Opdg_Click(sender As Object, e As EventArgs) Handles btn_Opslaan_Opdg.Click
' SAVE UPDATES TO THE DATABASE
SQL.SQLDA.Update(SQL.SQLDS) ' TO DO : ERROR CHECKING, DATA VALIDATION

' REFRESH GRID DATA
LoadGrid_opdg()

' DISABLE SAVE BUTTON
btn_Opslaan_Opdg.Enabled = False
MsgBox("Gegevens zijn opgeslagen")

End Sub

Private Sub Opdg_Grid_View1_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles Opdg_Grid_View.CellValueChanged
btn_Opslaan_Opdg.Enabled = True
End Sub

Private Sub Opdg_Grid_View1_RowsRemoved(sender As Object, e As DataGridViewRowsRemovedEventArgs) Handles Opdg_Grid_View.RowsRemoved
btn_Opslaan_Opdg.Enabled = True
End Sub

Private Sub Opdrachtgevers_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If Me.WindowState = FormWindowState.Normal Then
My.Settings.Opdg_Location = Me.Location
My.Settings.Opdg_Size = Me.Size
End If
My.Settings.Opdg_Ws = Me.WindowState
My.Settings.Save()
End Sub

Private Sub btn_Zoek_Opdg_Click(sender As Object, e As EventArgs) Handles btn_Zoek_Opdg.Click
SQL.ExecQuery("select * from opdg where Bedrijfsnaam like '" & txt_Zoek_Opdg.Text & "%'")

LoadGrid_opdg()

End Sub

Private Sub Btn_Opslaan_Opdg_Cp_Click(sender As Object, e As EventArgs) Handles Btn_Opslaan_Opdg_Cp.Click


Opdg_Cp_Grid_View.CurrentRow.Cells(0).Value = search


SQL1.SQLDA.Update(SQL1.SQLDS)
MsgBox("Gegevens zijn opgeslagen")
End Sub
End Class



So, this is it. In short:

If a new company is added, don't search for the contact, but it should be able to add that contact directly after the company's record is filled in in the first datagridview.

Many thanks for everybody who takes some time to look at this problem.

regards,

Mark Hofland

VS 2010 How Can Load .JPG İmage file from HDD to Picturebox ? But with File Name we choose.??

$
0
0
There is a Picturebox1 and Button1 and TextBox (Page name)

And there are picture files under C:\
picture names are Prv1, Prv2, Prv3..................Prv10, Prv11..........

I want to replace this picture with click button.

For Excample if Page.text is 5 then Code will load Prv5 file named picture
or if Page.text is 10 then Code will load Prv10 file named picture

under code I check Msgbox it show Prv1, Prv2.... but after not load Picture.

I awared this Prv (Name = "Prv" + Page.Text) is not the Dim Prv as String

Name = "Prv" + Page.Text

How can I solve it ?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Name As String
Dim Prv As String


Name = "Prv" + Page.Text
MsgBox(Name)
PictureBox1.Image = New System.Drawing.Bitmap("C:\Deneme\name.jpg")

End Sub


End Class

Report Viewer Help?

$
0
0
i don't have a report viewer im using visual studio 2015, then i download the reportviewer 2015, but it says not compatible for .net but the reportviewer shows on the toolbox then i try but i can't design a report window won't show meaning there is something happens can you help me sir?

What reportviewer should i use for my POS?

VS 2015, [ASK] how to update txt fies' selected line?

$
0
0
hello everybody here comes the newbie want to ask you again, so let's just go to the point

i'm trying to create a input data project , and i use textbox and txt files as the database

so i use the streamwriter to write all the text to the txt files line by line , my source code is kinda like this :

saving

Code:

Private Sub saving()
        Dim writer As New System.IO.StreamWriter(ofd.FileName + ".txt", True)
        Using writer
            writer.WriteLine("NO_SURAT = " + no_suratbox.Text)
            writer.WriteLine("DARI = " + daribox.Text)
            writer.WriteLine("KEPADA = " + kepadabox.Text)
            writer.WriteLine("TANGGAL = " + tanggal_surat.Text)
            writer.WriteLine("PERIHAL = " + perihalbox.Text)
        End Using

    End Sub

load
Code:

  Public Function ReadLine(linenumber As Integer, lines As List(Of String)) As String
        Return lines(linenumber - 1)
    End Function

Private Sub load()
        Dim reader As New System.IO.StreamReader(ofd.FileName + ".txt", True)
        Dim lines As List(Of String) = New List(Of String)
        Do While Not reader.EndOfStream
            lines.Add(reader.ReadLine())
        Loop
        reader.Close()
        no_suratbox.Text = ReadLine(1, lines)
        daribox.Text = ReadLine(2, lines)
        kepadabox.Text = ReadLine(3, lines)
        tanggal_surat.Text = ReadLine(4, lines)
        perihalbox.Text = ReadLine(5, lines)



    End Sub

but the one that i really curious is update :v is there any chance to update the text files by replacing the lines?
Code:

Private Sub update()
        `dunno what to type , help me`
    End Sub

thanks before :)

VS 2012 Query & Loop

$
0
0
I'm trying to take a text file. Have a program read it when I press a button and then output the number of times a specific name appears. I need to output it using a query and a loop so that it specifies:

"Query: ____ appears __ number of times"
"Loop: ____ appears__ number of times"

Please Help.

Database

$
0
0
Alright so I am finally going to start learning more about databases as I am beginning to understand them a little more.
So now I am confused, I am wanting to install the Microsoft Sql 2014, but there is too many options.
Do I want
LocalDB
Sql express
sql express with tools
sql management express studio
Sql management express with advanced tools

What is the best option? I think the local DB should work right? I am going to use it to store logins locally on user's machines.
Or
Should I ditch this and use a online one?

Button that copy's to clipboard the contents of a listbox

$
0
0
Anyone know of any examples Clipboard.SetText(Listbox1.SelectedItem.ToString) but how do you make the button perform this

I tried button = Clipboard.SetText(Listbox1.SelectedItem.ToString)

VS 2010 How Can I Load Pictures to Memory and Load Pictures From Memory To PictureBox ?

$
0
0
I read almost all Topics but I cant found exactly answer which I want. thats why want to ask again

I am Saving images of PrintDocument Pages. And Pages names like ; Prv1.jpg, Prv2.jpg, Prv3.jpg........ Prv10.jpg.... (to Wherever I want in the HDD)

But ; I want to load (take) this PrintDocument all Pages Images to Memory,
then After loaded to memory all this pages images, I want to load this any page calling with the record name Prv1.jpg, Prv2.jpg, Prv3.jpg........ Prv10.jpg....
into the PictureBox

I can load this pictures Prv1.jpg, Prv2.jpg, Prv3.jpg........ Prv10.jpg.... from file which are saved at HDD into the PictureBox

But how can I do it all this with using memory. Without Saving all images to HDD as Picture File.

After When I close window want to delete all this images from memory.



Summary;

I want to save PrintDocument Page Images to Memory (Many Page which the name as Prv1.jpg, Prv2.jpg, Prv3.jpg........ Prv10.jpg....

Then I want to Load any of this Image Pictures into the Picturebox

Thanks for advance.

images stored as byte array go missing when database is copied to new project

$
0
0
I'm saving image files as byte arrays in an Access database.

I have a compiled version of my application that contains the live access db with data and photos in it. Recently I copied that live database into my project so I had some live data to work with. When I run the application in release mode, all the data is there except for the image files.

I opened the database in access to have a look and there are no images in the table. What happens to the images when the database is copied like that?

To clarify, if I open the compiled application I can view the saved image files.

If I copy the db to my desktop and open the table containing the images stored as byte arrays, the fields are empty in the table.

If I copy the db to my project folder to use in the project, when I run it, the text data is all there but no images show.

VS 2010 Help with HTMLAgility Pack

$
0
0
Hey everyone.. I have a table similar to below

Code:

<table class="whois_result">
<tr class="whois_domain">
  <th>Domain name</th>
  <td colspan="2">
      test.xyz
  </td>
</tr>
<tr class="whois_status status_active">
  <th>Status</th>
  <td colspan="2">
      active
  </td>
</tr>
<tr class="whois_registrant">
  <th>Registrant</th>
  <td colspan="2">
      XXXXX-XXXXX<br>
      Bla Bla Bla<br>
      Meander 501, Test Test, Test   
      testestest<br>
      test@test.com<br>
  </td>
</tr>
</table>

I am trying to go through the entire page and pull details from specific TR classes. for example, I may want 'whois_result' and 'whois_registrant' from above, but not 'whois_status status_active'..All that I am looking to get is the values in between each (<td colspan="2">) areas, preferably without the <br>'s..

I'm trying to get these details using HTMLAgilityPack, but not having much luck. Below is the code I've been trying and messing with. Any help would be appriciated!

Code:

Dim whois_domain = document.DocumentNode.SelectSingleNode("//tr[@class='whois_domain']//td").Attributes("td").Value.ToString

Reuse the same web browser's window?

$
0
0
Is it possible to reuse the same web browser's window with process.start without opening a new tab or another Windows with vb.net?

Using if and else statement in mysql

$
0
0
I have my database column "type" from table name "loginfo". type column has 2 values. Administrator and Faculty. What im trying to do is when the user login into the system and the user is "administrator" then some buttons are enabled while if the user account type is "faculty" then some buttons are disabled. Thanks!

Problem with datagridview

$
0
0
I am getting the error "System.ArgumentException: DatagridviewComboBoxCell value is not valid". I happens when i scroll up or down and im not sure why. The values are fine and this wasnt happening before. Any idea why this is happening?

VS 2012 Aplication stops when doing a tableadapter insert

$
0
0
Hi guys, the problem is as follows. My application as to do a log, at all interaction of the user with software. When the aplication runs it should write a log, through a tableadapter insert. but when it reaches that particular line the program pauses and stops. No error, no warning, justs stops. Its possible to «preview data», using the tableadapter, no problem. i've already recreated the all lots (binding source, dataset and tableadapter), and everything is working in theory. the vs ide does warn about any errors or warning's. what is the problem i'm lost?. The database is sql server. and vs is with all updates applied.




Code:

'TODO: This line of code loads data into the 'UcctieDataSet3.Log' table. You can move, or remove it, as needed.
        Me.LogTableAdapter.Fill(Me.UcctieDataSet3.Log)
        'TODO: This line of code loads data into the 'UcctieDataSet3.Log' table. You can move, or remove it, as needed.
        Me.PedidosTableAdapter.Fill(Me.UcctieDataSet.Pedidos)
        'TODO: This line of code loads data into the 'UcctieDataSet.Destacamentos' table. You can move, or remove it, as needed.
        Me.DestacamentosTableAdapter.Fill(Me.UcctieDataSet.Destacamentos)
        'TODO: This line of code loads data into the 'UcctieDataSet.SUBDESTACAMENTOS' table. You can move, or remove it, as needed.
        Me.SUBDESTACAMENTOSTableAdapter.MudarSUBDestacamentos(Me.UcctieDataSet.SUBDESTACAMENTOS, 0)
        'LoginForm2.Show()
        Label11.Text = Me.UcctieDataSet.Pedidos.Count
        Me.PedidosTableAdapter.pendentes(Me.UcctieDataSet.Pedidos)
        Label5.Text = Me.UcctieDataSet.Pedidos.Rows(Me.UcctieDataSet.Pedidos.Count - 1).Item(0)
        Label7.Text = Me.UcctieDataSet.Pedidos.Rows(Me.UcctieDataSet.Pedidos.Count - 1).Item(1)
        Label9.Text = Me.UcctieDataSet.Pedidos.Rows(Me.UcctieDataSet.Pedidos.Count - 1).Item(2)
        Label3.Text = Me.UcctieDataSet.Pedidos.Count
        Me.PedidosTableAdapter.Fill(Me.UcctieDataSet.Pedidos)
        Button4.Enabled = False
        Dim pcad As Collection
        Dim tst As String
        Dim rc As Integer
        Dim filereader As String
        Try
            filereader = My.Computer.FileSystem.ReadAllText("C:\Users\g1960931\Documents\config.txt")
            TestDecoding(filereader)

        Catch ex As Exception
            MsgBox("Erro:- Ficheiro de Configuração corrupto ou inexistente", MsgBoxStyle.Critical)
        End Try
        Dim al As Integer
        al = 1
        pcad = ListAllADComputers()
        rc = pcad.Count

        Do While al <= rc
            tst = Microsoft.VisualBasic.Right(pcad.Item(al), 13)
            Me.DataGridView1.Rows.Add(tst)
            al = al + 1
        Loop
        DataGridView1.Sort(DataGridView1.Columns(0), System.ComponentModel.ListSortDirection.Ascending)
        DataGridView1.Update()
        lerconfig(dcrp)
        'Add a valid EWS service end point here or user Autodiscover
        service.Url = New Uri("https://rnsi.mai.gov.pt/ews/exchange.asm")
        'Add a valid user credentials
        service.Credentials = New WebCredentials(user, password, domain)
        service.UseDefaultCredentials = True
        service.AutodiscoverUrl("almeida.jlcr@gnr.pt")
        'to acess the proxy server
        WebRequest.DefaultWebProxy.Credentials = New NetworkCredential(user, password, domain)
        Label9.Text = My.User.Name

        ComboBox4.SelectedIndex = 0
        ComboBox6.SelectedIndex = 0
        ComboBox7.SelectedIndex = 0
        ComboBox8.SelectedIndex = 0
        ComboBox9.SelectedIndex = 0
        ComboBox10.SelectedIndex = 4
        ComboBox11.SelectedIndex = 4
        ComboBox12.SelectedIndex = 0
        ComboBox13.SelectedIndex = 3
        ComboBox14.SelectedIndex = 0
        ComboBox15.SelectedIndex = 0
        ComboBox17.SelectedIndex = 0
        ComboBox18.SelectedIndex = 0
        DETALHESMAQ = False

        Label75.Text = Date.Now.Year
        Dim usr, dt, mov, hr As String
        Dim cod As String
        cod = Me.UcctieDataSet3.Log.Rows.Count.ToString
        If cod = 0 Then
            cod = 1
        End If
        usr = My.User.Name
        dt = DateTime.Now.ToString("dd/MM/yyyy")
        hr = DateTime.Now.ToString("HH:mm:ss")
        mov = "Utilizador iniciou aplicação"
        Me.LogTableAdapter.Fill(UcctieDataSet3.Log)
        Me.LogTableAdapter.Insert(cod, usr, dt, mov, hr)    / this is the line where it all stops
        Me.LogTableAdapter.Update(UcctieDataSet3.Log)

Viewing all 27201 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>