How can I add multiple titles on a gridview - vb.net

I'm working with a gridview on vb.net for webforms, I have to add titles to specific groups of columns in this table.. but I have not a clue of how to do it, heres an example of what i want:
"Student info", "Subject info" and "Partial Grades" ARE the titles I need to add.

Default Datagridview hasnt got an option as u wish.
You can try devexpress (It has got tones of properties in gridcontrol)
You can create your own control acting like your "TITLE LABELS"
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim DataGridView1 = New System.Windows.Forms.DataGridView()
Dim Column1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Dim Column2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Dim Column3 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Dim TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Dim Label1 = New System.Windows.Forms.Label()
Dim Label2 = New System.Windows.Forms.Label()
'DataGridView1
DataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None
DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Column1, Column2, Column3})
DataGridView1.Location = New System.Drawing.Point(13, 78)
DataGridView1.Name = "DataGridView1"
DataGridView1.RowHeadersVisible = False
DataGridView1.Size = New System.Drawing.Size(397, 228)
DataGridView1.TabIndex = 0
DataGridView1.Name = "dgv"
AddHandler DataGridView1.ColumnWidthChanged, AddressOf DataGridView1_ColumnWidthChanged
'
'Column1
'
Column1.HeaderText = "Column1"
Column1.Name = "Column1"
'
'Column2
'
Column2.HeaderText = "Column2"
Column2.Name = "Column2"
'
'Column3
'
Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill
Column3.HeaderText = "Column3"
Column3.Name = "Column3"
'
'TableLayoutPanel1
'
TableLayoutPanel1.ColumnCount = 2
TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 53.98936!))
TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 195.0!))
TableLayoutPanel1.Controls.Add(Label2, 1, 0)
TableLayoutPanel1.Controls.Add(Label1, 0, 0)
TableLayoutPanel1.Location = New System.Drawing.Point(12, 51)
TableLayoutPanel1.Name = "TableLayoutPanel1"
TableLayoutPanel1.RowCount = 1
TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
TableLayoutPanel1.Size = New System.Drawing.Size(398, 29)
TableLayoutPanel1.TabIndex = 1
TableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.[Single]
TableLayoutPanel1.Name = "title"
'
'Label1
'
Label1.Anchor = System.Windows.Forms.AnchorStyles.None
Label1.AutoSize = True
Label1.Location = New System.Drawing.Point(82, 8)
Label1.Name = "Label1"
Label1.Size = New System.Drawing.Size(39, 13)
Label1.TabIndex = 0
Label1.Text = "Label1"
'
'Label2
'
Label2.Anchor = System.Windows.Forms.AnchorStyles.None
Label2.AutoSize = True
Label2.Location = New System.Drawing.Point(281, 8)
Label2.Name = "Label2"
Label2.Size = New System.Drawing.Size(39, 13)
Label2.TabIndex = 1
Label2.Text = "Label2"
'
'Form1
'
Me.Controls.Add(TableLayoutPanel1)
Me.Controls.Add(DataGridView1)
End Sub
Private Sub DataGridView1_ColumnWidthChanged(sender As Object, e As DataGridViewColumnEventArgs)
Dim title As TableLayoutPanel = CType(Me.Controls("title"), TableLayoutPanel)
Dim dgv As DataGridView = CType(Me.Controls("dgv"), DataGridView)
title.ColumnStyles(0).Width = dgv.Columns(0).Width + dgv.Columns(1).Width
title.ColumnStyles(1).Width = dgv.Columns(2).Width
End Sub
End Class

Related

Swap positions between three Panels

I have three panel type objects (A, B, and C), which have been dynamically generated within another panel type control.
My question is, how can I exchange panel B to the position of panel A and panel A to the position of panel B? This will be triggered by a click on a ToolStripMenuItem.
What I had thought, was to go through the arrangement of panels to know who exists and from there to work them, is that correct?
For Each obj As Control In Panel1.Controls
MsgBox(obj.Name)
Next
This is the code that I use to move to right:
Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click
Dim clickedPanel = DirectCast(DirectCast(DirectCast(sender, ToolStripMenuItem).Owner, ContextMenuStrip).SourceControl, Panel)
clickedPanel.Location = New Point((clickedPanel.Location.X + 120), clickedPanel.Location.Y)
End Sub
This is the code I use to generate objects dynamically:
Private Sub TileNavItem5_ElementClick(sender As Object, e As NavElementEventArgs) Handles TileNavItem5.ElementClick
Dim pos As Int32 = cInt(TextBox38.Text)
Dim poslabel As Int16 = cInt(TextBox42.Text)
Dim posY As Int16 = 330
Dim posX As Int16 = 3
Panel1.AutoScrollPosition = New Point(0, 0)
Dim pb As New Panel With
{
.Width = 120,
.Height = 460,
.Top = 10,
.Left = 10,
.BorderStyle = BorderStyle.FixedSingle,
.BackgroundImage = Image.FromFile("C:\example.bmp"),
.BackgroundImageLayout = ImageLayout.Stretch,
.ContextMenuStrip = CntxtMnuStrpSection,
.Name = "Panel" & Val(TextBox37.Text)
}
AddHandler pb.Click, AddressOf myClickHandler_b
Dim labela As New Label With {
.AutoSize = True,
.Location = New Point((poslabel), 12),
.Text = "Section " & CInt(TextBox37.Text),
.ForeColor = Color.White,
.BackColor = Color.Transparent,
.Font = New Font(Me.Font, FontStyle.Bold),
.Name = "Label" & CInt(TextBox37.Text)
}
pb.Location = New Point(0, 0)
pb.Location = New Point(pos, 20)
Panel1.Controls.Add(pb)
pb.Controls.Add(labela)
For j = 1 To 4
Dim pbdoors As New Panel With
{
.Width = 114,
.Height = 98,
.Top = 10,
.Left = 10,
.BorderStyle = BorderStyle.FixedSingle,
.BackgroundImageLayout = ImageLayout.Stretch,
.ContextMenuStrip = CntxtMnuStrpUnit,
.Name = "Unit" & Val(TextBox37.Text) & j
}
AddHandler pbdoors.Click, AddressOf myClickHandler_doors
pbdoors.Location = New Point(posX, posY)
pb.Controls.Add(pbdoors)
posY = (posY - 100)
Next
Panel1.AutoScrollPosition = New Point(Panel1.HorizontalScroll.Maximum, Panel1.VerticalScroll.Maximum)
TextBox37.Text = CInt(TextBox37.Text) + 1
TextBox38.Text = Val(TextBox38.Text) + 120
End Sub
You just need to find the controls. Swapping is the easy part.
Finding controls is also easy if you use Control.Controls.Find(String, Boolean). But you must at least know the control's name.
The difficulty comes in here
' TextBox37.Text = CInt(TextBox37.Text) + 1 ' implicit conversion from int to string
TextBox37.Text = (CInt(TextBox37.Text) + 1).ToString()
where you must find the control by name and you have built some integer into the name. Can you keep track of how many times 1 is added to TextBox37.Text?
If you can, you can pass it into this function, and the swapping will be performed
Private Sub swap(index1 As Integer, index2 As Integer)
' build the panel names
Dim p1Name = $"Panel{index1}"
Dim p2Name = $"Panel{index2}"
' find the panels
Dim p1 = DirectCast(Panel1.Controls.Find(p1Name, True).FirstOrDefault(), Panel)
If p1 Is Nothing Then Throw New ArgumentException("index1")
Dim p2 = DirectCast(Panel1.Controls.Find(p2Name, True).FirstOrDefault(), Panel)
If p2 Is Nothing Then Throw New ArgumentException("index2")
' swap the panels
Dim temp = p2.Location
p2.Location = p1.Location
p1.Location = temp
End Sub
swap(1, 2) will swap panel 1 with 2. swap(4, 6) will swap the panel 4 with 6. This logic is not included in your question (i.e. how many times is TileNavItem5_ElementClick called?), so you know better how to incorporate it. I hope it works for you.

Vb.net export data to excel

I have a problem with the following code to export the data to excel with following button click Event:
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
ExportToExcel()
End Sub
here is the code
Private Sub ExportToExcel()
Dim ExcelApp As Object, ExcelBook As Object
Dim ExcelSheet As Object
Dim i As Integer
Dim j As Integer
Try
Me.DgView.DefaultCellStyle.ForeColor = Color.Navy
Me.DgView.RowsDefaultCellStyle.BackColor = Color.AliceBlue
Me.DgView.GridColor = Color.Blue
Me.DgView.BorderStyle = BorderStyle.Fixed3D
Me.DgView.RowHeadersBorderStyle = BorderStyle.Fixed3D
DgView.AutoGenerateColumns = False
Dim ReferColumn As New DataGridViewTextBoxColumn()
ReferColumn.DataPropertyName = "Refer_no"
ReferColumn.HeaderText = "ካሴት መ/ቁ"
ReferColumn.Width = 80
Dim TitleColumn As New DataGridViewTextBoxColumn()
TitleColumn.DataPropertyName = "Title"
TitleColumn.HeaderText = "ካሴት ርእስ"
TitleColumn.Width = 150
Dim GnrNmColumn As New DataGridViewTextBoxColumn()
GnrNmColumn.DataPropertyName = "Genre_Name"
GnrNmColumn.HeaderText = "የካሴት ዓይነት"
GnrNmColumn.Width = 100
Dim GrpNmColumn As New DataGridViewTextBoxColumn()
GrpNmColumn.DataPropertyName = "Group_Name"
GrpNmColumn.HeaderText = "የምድብ ስም"
GrpNmColumn.Width = 100
Dim ActColumn As New DataGridViewTextBoxColumn()
ActColumn.DataPropertyName = "Actors"
ActColumn.HeaderText = "ሪፖርተር"
ActColumn.Width = 150
Dim DirecColumn As New DataGridViewTextBoxColumn()
DirecColumn.DataPropertyName = "Director"
DirecColumn.HeaderText = "ኃላፊ"
DirecColumn.Width = 150
Dim LangColumn As New DataGridViewTextBoxColumn()
LangColumn.DataPropertyName = "Language"
LangColumn.HeaderText = "ቋንቋ"
LangColumn.Width = 150
Dim releasedateColumn As New DataGridViewTextBoxColumn()
LangColumn.DataPropertyName = "release_date"
LangColumn.HeaderText = "የተቀረፀበተት ቀነን"
LangColumn.Width = 150
Dim StatusColumn As New DataGridViewTextBoxColumn()
StatusColumn.DataPropertyName = "status"
StatusColumn.HeaderText = "ሁኔታ"
StatusColumn.Width = 80
Dim synopsisColumn As New DataGridViewTextBoxColumn()
synopsisColumn.DataPropertyName = "synopsis"
synopsisColumn.HeaderText = "የተቀረፀበተት ጉዳይ"
synopsisColumn.Width = 180
DgView.Columns.Add(ReferColumn)
DgView.Columns.Add(TitleColumn)
DgView.Columns.Add(GnrNmColumn)
DgView.Columns.Add(GrpNmColumn)
DgView.Columns.Add(ActColumn)
DgView.Columns.Add(DirecColumn)
DgView.Columns.Add(LangColumn)
DgView.Columns.Add(releasedateColumn)
DgView.Columns.Add(StatusColumn)
DgView.Columns.Add(synopsisColumn)
Dim columns As String() = {"Refer_No", "Title", "genre_name", "group_name", "Actors", "Director", "Language", "release_date", "Status", "synopsis"}
DVDModule.FillListWithoutParam(DVDList, columns, "usp_SelectDVDList", _
GetType(Entity.DVD))
FormatGridWithBothTableAndColumnStyles()
DgView.DataSource = DVDList
'create object of excel
ExcelApp = CreateObject("Excel.Application")
ExcelBook = ExcelApp.WorkBooks.Add
ExcelSheet = ExcelBook.WorkSheets(1)
With ExcelSheet
For Each column As DataGridViewColumn In DgView.Columns
.cells(1, column.Index + 1) = column.HeaderText
Next
For i = 1 To Me.DgView.RowCount
.cells(i + 1, 1) = Me.DgView.Rows(i - 1).Cells("Refer_no").Value
For j = 1 To DgView.Columns.Count - 1
.cells(i + 1, j + 1) = DgView.Rows(i - 1).Cells(j).Value
Next
Next
End With
ExcelApp.Visible = True
'
ExcelSheet = Nothing
ExcelBook = Nothing
ExcelApp = Nothing
I admit I didn't read all of your code. It's a mess and there's too much code for your question. It gives you some kind of error or what?
Anyway, if you just want to export a table showing some data, I suggest you to create a .csv file instead of using MS Excel. It's much more easier to code, faster during execution, and the output file is portable

Runtime datagridview

I want to design datagridview at run time I want it to fill with data and appear on the form according to comboboxtext and if combobox is empty it disappear and when I click on datagridview I want the cell to be selectedvalue in the combobox and datagriddisapear
And here the code that I tried
Private Sub ComDr_KeyPress(sender As Object, e As KeyPressEventArgs) Handles ComDr.KeyPress
Dim d As New DataGridView
Dim dt As DataTable = New DAL().selectdatatable(String.Format("select Dr_Name,Dr_No from DR where Dr_Name like '%{0}%'", ComDr.Text))
If dt.Rows.Count > 0 Then
' Try
Controls.Add(d)
d.DataSource = dt
d.BringToFront()
With d
.Name = "Dr_Name"
.Width = ComDr.Width
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
.ColumnHeadersHeight = 30
.Height = 10 * 35
.ForeColor = Color.Blue
.BackgroundColor = Color.Beige
.RowHeadersVisible = False
.BackgroundColor = Color.BurlyWood
'.DefaultCellStyle.SelectionForeColor = Color.Yellow
' .DefaultCellStyle.SelectionForeColor = Color.Black
' .DefaultCellStyle.Font = New Font("tahoma", 13)
.Location = New System.Drawing.Point(680, ComDr.Location.Y + 30)
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
End With
For i As Integer = 0 To d.Rows.Count - 1
Dim row As DataGridViewRow = d.Rows(i)
row.Height = 35
d.Rows(i).DefaultCellStyle.BackColor = If(i Mod 2 = 0, Color.Wheat, Color.BurlyWood)
Next
AddHandler d.CellClick, AddressOf d_cellclick
'ComDr.DisplayMember = d(0, d.SelectedRows(0).Index).Value.ToString
'ComDr.ValueMember = d(1, d.SelectedRows(0).Index).Value.ToString
'ComDr.Text = String.Empty
'Controls.Remove(d)
' ComDr.SelectedValue = d(0, d.SelectedRows(0).Index).Value.ToString
'Catch ex As Exception
'MsgBox(ex.Message)
'End Try
' Controls.Remove(d)
End If
End Sub

Why do I need a function for this Visual Basic code?

I am trying to figure out the functions for an application that you order donuts and coffee through. There is no box to input quantities. The type of doughnuts are selected using radio buttons grouped in combo boxes as is the type of coffee. The user ordering does not input any information. That application calculates according to the selected radio buttons. There is also a 3% sales tax.
The donuts are as follows:
Glazed are $0.65, Sugar $0.65, Chocolate are $0.85, and Filled are $1.00.
The coffee costs:
Regular is $1.00 and cappuccino is $2.50.
How do I write a function for each one? I would think I would just write one function that calculates the donut, coffee and sales tax. I am not sure what I am supposed to include if there is only one possible choice for each case. I thought that I could just write a bunch of constants since nothing changed and do an If statement but the assignment is asking for functions.
This is what I have so far for the doughnuts.
Private Function GetDonutPrice(ByVal strDonut As String) As Double
Dim dblDonutPrice As Double
'Calculates and returns the price of donuts
If strDonut = "G" Or strDonut = "S" Then
dblDonutPrice = 0.65
ElseIf strDonut = "C" Then
dblDonutPrice = 0.85
Else
strDonut = "F"
dblDonutPrice = 1.0
End If
Return dblDonutPrice
End Function
And then for the btnCalc_Click I coded this:
Private Sub btnCalc_Click(sender As Object, e As EventArgs)
'Displays donut and cappucino subtotal, taxes and price
Dim strDonutPrice As String
Dim dblDonutPrice As Double
If radGlazed.Checked Then
strDonutPrice = "G"
ElseIf radSugar.Checked Then
strDonutPrice = "S"
ElseIf radChoc.Checked Then
strDonutPrice = "C"
ElseIf radFilled.Checked strDonutPrice = "F"
End If
' get the donut price '
dblDonutPrice = GetDonutPrice(strDonutPrice)
End Sub
And I get an error in dblDonutPrice = GetDonutPrice(strDonutPrice)
It sounds like you need a function that receives the type and quantity of doughnuts and does the math and returns the cost. And the same for the coffee. So you will have three functions total. The coffee, the doughnuts, and the main one that take the input of what is order and how many, calls the other functions, adds it up, and then does the sales tax
Something like this maybe.
Private Sub cmdAddItUp_Click(sender As System.Object, e As System.EventArgs) Handles cmdAddItUp.Click
Dim iQuantity1 as integer
Dim dDoughnutCost as double
'Get the data to send to doughnuts
iQuantity1 = val(TextBox1.Text)
iQuantity2 = val(TextBox2.Text)
etc.
'Get the doughnuts cost
dDoughnutCost = Doughtnuts(iQuantity1, iQuantity2, iQuantity3)
'Do the same for the coffee
dCoffeeCost = Coffees(iQuantity1, iQuantity2, iQuantity3)
'Add it up
dSubTotal = dDoughnutCost + dCoffeeCost
'Calculate tax
dTotal = Tax(dSubTotal)
'Now you have the total, do something with it. Display it maybe!
End Sub
Private Function Doughtnuts(iQuantity1 As Integer, iQuantity2 As Integer, iQuantity3 As Integer) As Double
'Do the math
End Function
Private Function Coffees(iQuantity1 As Integer, iQuantity2 As Integer, iQuantity3 As Integer) As Double
'Do the math
End Function
Private Function Tax(dSubtotal As Double) As Double
'Calculate tax
End Function
Hope that helps get you started. Good luck with your schooling.
I made some assumptions on your UI. Rather than placing the items as radio buttons in a ComboBox, I placed all of the doughnuts and coffees into a respective GroupBox. The concepts of this answer will still apply, however you'll just have to be mindful that this is not directly drop-in and go.
Here's the way I laid out the UI:
I have placed the RadioButtons for the items inside a FlowLayoutPanel inside of a GroupBox. I also placed labels into a TableLayoutPanel to provide the total amounts.
The most important part is how I named the RadioButton controls for the items being listed. In the code behind file I used the names of the RadioButton controls to check which Item was being modified. I could have populated the RadioButton controls at run time to ensure that everything lined up, but that was more work and it's not difficult to do if you use GetType(MyEnum).GetNames() in the Me.Load event of the form to create new RadioButtons with the correct name, text, and adding the proper event handlers to the radio buttons.
If you'd like to see how this works, add a new form to your Project and call it DoughnutsAndCoffee. Here is the designer file and the Code behind:
Code Behind:
Public Class DoughnutsAndCoffee
Private SelectedItems As New List(Of Items)
Public Event ItemsChanged()
Public Sub UpdateTotal() Handles Me.ItemsChanged
Dim subTotal As Decimal = 0D
For Each item As Items In SelectedItems
subTotal += Prices.GetPrice(item)
Next
Dim TaxTotal As Decimal = subTotal * Prices.Tax_Rate
Dim total As Decimal = subTotal + TaxTotal
Me.SubTotal_Label.Invoke(Sub() Me.SubTotal_Label.Text = subTotal.ToString("C2"))
Me.Tax_Label.Invoke(Sub() Me.Tax_Label.Text = TaxTotal.ToString("C2"))
Me.Total_Label.Invoke(Sub() Me.Total_Label.Text = total.ToString("C2"))
End Sub
Private Sub RadioButton_CheckedChanged(sender As Object, e As EventArgs) Handles Cappuccino_RadioButton.CheckedChanged, Chocolate_RadioButton.CheckedChanged, Filled_RadioButton.CheckedChanged, Glazed_RadioButton.CheckedChanged, Regular_RadioButton.CheckedChanged, Sugar_RadioButton.CheckedChanged
Dim senderRB As RadioButton = DirectCast(sender, RadioButton)
Dim selectedItem As String = (From item As String In GetType(Items).GetEnumNames Where senderRB.Name.Contains(item) Select item).FirstOrDefault
If selectedItem <> String.Empty Then
Dim Item As Items = DirectCast([Enum].Parse(GetType(Items), selectedItem), Items)
If senderRB.Checked Then
Me.SelectedItems.Add(Item)
RaiseEvent ItemsChanged()
Else
If Me.SelectedItems.Contains(Item) Then
Me.SelectedItems.Remove(Item)
RaiseEvent ItemsChanged()
End If
End If
End If
End Sub
Private Sub DoughnutsAndCoffee_Shown(sender As Object, e As EventArgs) Handles Me.Shown
RaiseEvent ItemsChanged()
End Sub
End Class
Public Structure Prices
Public Const Tax_Rate As Decimal = 0.03D
Public Const Glazed As Decimal = 0.65D
Public Const Sugar As Decimal = 0.65D
Public Const Chocolate As Decimal = 0.85D
Public Const Filled As Decimal = 1D
Public Const Regular As Decimal = 1D
Public Const Cappuccino As Decimal = 2.5D
Public Shared Function GetPrice(item As Items) As Decimal
Dim itemStr As String = [Enum].GetName(GetType(Items), item)
Return GetType(Prices).GetField(itemStr).GetValue(Nothing)
End Function
End Structure
Public Enum Items
Glazed
Sugar
Chocolate
Filled
Regular
Cappuccino
End Enum
Designer File:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class DoughnutsAndCoffee
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Glazed_RadioButton = New System.Windows.Forms.RadioButton()
Me.Sugar_RadioButton = New System.Windows.Forms.RadioButton()
Me.Chocolate_RadioButton = New System.Windows.Forms.RadioButton()
Me.Filled_RadioButton = New System.Windows.Forms.RadioButton()
Me.Regular_RadioButton = New System.Windows.Forms.RadioButton()
Me.Cappuccino_RadioButton = New System.Windows.Forms.RadioButton()
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.Total_Label = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Tax_Label = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.SubTotal_Label = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.FlowLayoutPanel2 = New System.Windows.Forms.FlowLayoutPanel()
Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel()
Me.Coffee_GroupBox = New System.Windows.Forms.GroupBox()
Me.Doughnuts_GroupBox = New System.Windows.Forms.GroupBox()
Me.TableLayoutPanel1.SuspendLayout()
Me.FlowLayoutPanel2.SuspendLayout()
Me.FlowLayoutPanel1.SuspendLayout()
Me.Coffee_GroupBox.SuspendLayout()
Me.Doughnuts_GroupBox.SuspendLayout()
Me.SuspendLayout()
'
'Glazed_RadioButton
'
Me.Glazed_RadioButton.AutoSize = True
Me.Glazed_RadioButton.Location = New System.Drawing.Point(3, 3)
Me.Glazed_RadioButton.Name = "Glazed_RadioButton"
Me.Glazed_RadioButton.Size = New System.Drawing.Size(58, 17)
Me.Glazed_RadioButton.TabIndex = 9
Me.Glazed_RadioButton.Text = "Glazed"
Me.Glazed_RadioButton.UseVisualStyleBackColor = True
'
'Sugar_RadioButton
'
Me.Sugar_RadioButton.AutoSize = True
Me.Sugar_RadioButton.Location = New System.Drawing.Point(3, 26)
Me.Sugar_RadioButton.Name = "Sugar_RadioButton"
Me.Sugar_RadioButton.Size = New System.Drawing.Size(53, 17)
Me.Sugar_RadioButton.TabIndex = 10
Me.Sugar_RadioButton.Text = "Sugar"
Me.Sugar_RadioButton.UseVisualStyleBackColor = True
'
'Chocolate_RadioButton
'
Me.Chocolate_RadioButton.AutoSize = True
Me.Chocolate_RadioButton.Location = New System.Drawing.Point(3, 49)
Me.Chocolate_RadioButton.Name = "Chocolate_RadioButton"
Me.Chocolate_RadioButton.Size = New System.Drawing.Size(73, 17)
Me.Chocolate_RadioButton.TabIndex = 11
Me.Chocolate_RadioButton.Text = "Chocolate"
Me.Chocolate_RadioButton.UseVisualStyleBackColor = True
'
'Filled_RadioButton
'
Me.Filled_RadioButton.AutoSize = True
Me.Filled_RadioButton.Location = New System.Drawing.Point(3, 72)
Me.Filled_RadioButton.Name = "Filled_RadioButton"
Me.Filled_RadioButton.Size = New System.Drawing.Size(49, 17)
Me.Filled_RadioButton.TabIndex = 12
Me.Filled_RadioButton.Text = "Filled"
Me.Filled_RadioButton.UseVisualStyleBackColor = True
'
'Regular_RadioButton
'
Me.Regular_RadioButton.AutoSize = True
Me.Regular_RadioButton.Location = New System.Drawing.Point(3, 3)
Me.Regular_RadioButton.Name = "Regular_RadioButton"
Me.Regular_RadioButton.Size = New System.Drawing.Size(62, 17)
Me.Regular_RadioButton.TabIndex = 13
Me.Regular_RadioButton.Text = "Regular"
Me.Regular_RadioButton.UseVisualStyleBackColor = True
'
'Cappuccino_RadioButton
'
Me.Cappuccino_RadioButton.AutoSize = True
Me.Cappuccino_RadioButton.Location = New System.Drawing.Point(3, 26)
Me.Cappuccino_RadioButton.Name = "Cappuccino_RadioButton"
Me.Cappuccino_RadioButton.Size = New System.Drawing.Size(82, 17)
Me.Cappuccino_RadioButton.TabIndex = 14
Me.Cappuccino_RadioButton.Text = "Cappuccino"
Me.Cappuccino_RadioButton.UseVisualStyleBackColor = True
'
'TableLayoutPanel1
'
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TableLayoutPanel1.AutoSize = True
Me.TableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.TableLayoutPanel1.ColumnCount = 2
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
Me.TableLayoutPanel1.Controls.Add(Me.Total_Label, 1, 2)
Me.TableLayoutPanel1.Controls.Add(Me.Label5, 0, 2)
Me.TableLayoutPanel1.Controls.Add(Me.Tax_Label, 1, 1)
Me.TableLayoutPanel1.Controls.Add(Me.Label3, 0, 1)
Me.TableLayoutPanel1.Controls.Add(Me.SubTotal_Label, 1, 0)
Me.TableLayoutPanel1.Controls.Add(Me.Label1, 0, 0)
Me.TableLayoutPanel1.Location = New System.Drawing.Point(67, 133)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
Me.TableLayoutPanel1.RowCount = 3
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333!))
Me.TableLayoutPanel1.Size = New System.Drawing.Size(140, 57)
Me.TableLayoutPanel1.TabIndex = 9
'
'Total_Label
'
Me.Total_Label.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.Total_Label.AutoSize = True
Me.Total_Label.Location = New System.Drawing.Point(80, 41)
Me.Total_Label.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.Total_Label.Name = "Total_Label"
Me.Total_Label.Size = New System.Drawing.Size(39, 13)
Me.Total_Label.TabIndex = 5
Me.Total_Label.Text = "Label6"
'
'Label5
'
Me.Label5.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(10, 41)
Me.Label5.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(31, 13)
Me.Label5.TabIndex = 4
Me.Label5.Text = "Total"
'
'Tax_Label
'
Me.Tax_Label.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.Tax_Label.AutoSize = True
Me.Tax_Label.Location = New System.Drawing.Point(80, 22)
Me.Tax_Label.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.Tax_Label.Name = "Tax_Label"
Me.Tax_Label.Size = New System.Drawing.Size(39, 13)
Me.Tax_Label.TabIndex = 3
Me.Tax_Label.Text = "Label4"
'
'Label3
'
Me.Label3.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(10, 22)
Me.Label3.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(25, 13)
Me.Label3.TabIndex = 2
Me.Label3.Text = "Tax"
'
'SubTotal_Label
'
Me.SubTotal_Label.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.SubTotal_Label.AutoSize = True
Me.SubTotal_Label.Location = New System.Drawing.Point(80, 3)
Me.SubTotal_Label.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.SubTotal_Label.Name = "SubTotal_Label"
Me.SubTotal_Label.Size = New System.Drawing.Size(39, 13)
Me.SubTotal_Label.TabIndex = 1
Me.SubTotal_Label.Text = "Label2"
'
'Label1
'
Me.Label1.Anchor = System.Windows.Forms.AnchorStyles.Left
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(10, 3)
Me.Label1.Margin = New System.Windows.Forms.Padding(10, 3, 10, 3)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(50, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "SubTotal"%0

Ambiguous in the namespace

I've updated a project from VB6 to VB.NET. Everything seemed to work fine, but now I'm facing errors related to the namespace when trying to build. Besides, I'm getting them on Form's designers, which have been automatically generated by Visual Studio. More specifically, the errors I'm facing involve the System.Drawing namespace and its internal structures (Point, Size, SizeF, etc).
I've checked it and I haven't found any other class that could be causing the conflict. I've also tried to delete the reference to the library and add it again, and to Clean the project, but the error is still there.
It's seems a problem similar to the one asked in this question, but I've tried the solutions answered there and haven't worked either. Any ideas of what could I do? This is driving me crazy and my whole project is stopped until I can fix that.
Thank you very, very much in advance.
EDIT: Added screenshots of the error and the code that's throwing it
Complete message of one of the errors: Error 18 'Point' is ambiguous in the namespace 'System.Drawing'. C:\Users\practiquesINF\Desktop\Projecte01_VBNET_V2\Upgraded\Frm_Files.Designer.vb 152 39 P_IF01
Complete code of one of the files that throws the error (as I've said, it's the designer of one of the forms and it has been generated automatically):
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Frm_Files
#Region "Upgrade Support "
Private Shared m_vb6FormDefInstance As Frm_Files
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As Frm_Files
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = CreateInstance()
m_InitializingDefInstance = False
End If
Return m_vb6FormDefInstance
End Get
Set(ByVal Value As Frm_Files)
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
#Region "Windows Form Designer generated code "
Public Shared Function CreateInstance() As Frm_Files
Dim theInstance As Frm_Files = New Frm_Files()
theInstance.Form_Load()
Return theInstance
End Function
Private visualControls() As String = New String() {"components", "ToolTipMain", "_Text1_4", "DataCombo1", "_Text1_3", "_Text1_2", "_Command1_2", "_Command1_1", "_Text1_1", "_Text1_0", "_Command1_0", "CommonDialog1Open", "_Label1_6", "_Label1_5", "_Label1_4", "_Label1_3", "_Label1_2", "_Label1_1", "_Label1_0", "Command1", "Label1", "Text1"}
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
Public ToolTipMain As System.Windows.Forms.ToolTip
Private WithEvents _Text1_4 As System.Windows.Forms.TextBox
Public WithEvents DataCombo1 As AxMSDataListLib.AxDataCombo
Private WithEvents _Text1_3 As System.Windows.Forms.TextBox
Private WithEvents _Text1_2 As System.Windows.Forms.TextBox
Private WithEvents _Command1_2 As System.Windows.Forms.Button
Private WithEvents _Command1_1 As System.Windows.Forms.Button
Private WithEvents _Text1_1 As System.Windows.Forms.TextBox
Private WithEvents _Text1_0 As System.Windows.Forms.TextBox
Private WithEvents _Command1_0 As System.Windows.Forms.Button
Public WithEvents CommonDialog1Open As System.Windows.Forms.OpenFileDialog
Private WithEvents _Label1_6 As System.Windows.Forms.Label
Private WithEvents _Label1_5 As System.Windows.Forms.Label
Private WithEvents _Label1_4 As System.Windows.Forms.Label
Private WithEvents _Label1_3 As System.Windows.Forms.Label
Private WithEvents _Label1_2 As System.Windows.Forms.Label
Private WithEvents _Label1_1 As System.Windows.Forms.Label
Private WithEvents _Label1_0 As System.Windows.Forms.Label
Public Command1(2) As System.Windows.Forms.Button
Public Label1(6) As System.Windows.Forms.Label
Public Text1(4) As System.Windows.Forms.TextBox
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Frm_Files))
Me.ToolTipMain = New System.Windows.Forms.ToolTip(Me.components)
Me._Text1_4 = New System.Windows.Forms.TextBox()
Me.DataCombo1 = New AxMSDataListLib.AxDataCombo()
Me._Text1_3 = New System.Windows.Forms.TextBox()
Me._Text1_2 = New System.Windows.Forms.TextBox()
Me._Command1_2 = New System.Windows.Forms.Button()
Me._Command1_1 = New System.Windows.Forms.Button()
Me._Text1_1 = New System.Windows.Forms.TextBox()
Me._Text1_0 = New System.Windows.Forms.TextBox()
Me._Command1_0 = New System.Windows.Forms.Button()
Me.CommonDialog1Open = New System.Windows.Forms.OpenFileDialog()
Me._Label1_6 = New System.Windows.Forms.Label()
Me._Label1_5 = New System.Windows.Forms.Label()
Me._Label1_4 = New System.Windows.Forms.Label()
Me._Label1_3 = New System.Windows.Forms.Label()
Me._Label1_2 = New System.Windows.Forms.Label()
Me._Label1_1 = New System.Windows.Forms.Label()
Me._Label1_0 = New System.Windows.Forms.Label()
CType(Me.DataCombo1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'_Text1_4
'
Me._Text1_4.AcceptsReturn = True
Me._Text1_4.BackColor = System.Drawing.SystemColors.Window
Me._Text1_4.Cursor = System.Windows.Forms.Cursors.IBeam
Me._Text1_4.ForeColor = System.Drawing.SystemColors.WindowText
Me._Text1_4.Location = New System.Drawing.Point(160, 200)
Me._Text1_4.MaxLength = 1
Me._Text1_4.Name = "_Text1_4"
Me._Text1_4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Text1_4.Size = System.Drawing.Size(19, 20)
Me._Text1_4.TabIndex = 14
Me._Text1_4.Text = "S"
Me._Text1_4.Visible = False
'
'DataCombo1
'
Me.DataCombo1.Location = New System.Drawing.Point(112, 240)
Me.DataCombo1.Name = "DataCombo1"
Me.DataCombo1.OcxState = CType(resources.GetObject("DataCombo1.OcxState"), System.Windows.Forms.AxHost.State)
' Me.DataCombo1.RowSource = Nothing HI HA QUE AFEGIR UN DATA SOURCE O SINO EL PROBLEMA NO GENERA EL FORMULARI
Me.DataCombo1.Size = New System.Drawing.Size(233, 21)
Me.DataCombo1.TabIndex = 13
'
'_Text1_3
'
Me._Text1_3.AcceptsReturn = True
Me._Text1_3.BackColor = System.Drawing.SystemColors.Window
Me._Text1_3.Cursor = System.Windows.Forms.Cursors.IBeam
Me._Text1_3.ForeColor = System.Drawing.SystemColors.WindowText
Me._Text1_3.Location = New System.Drawing.Point(270, 112)
Me._Text1_3.MaxLength = 0
Me._Text1_3.Name = "_Text1_3"
Me._Text1_3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Text1_3.Size = New System.Drawing.Size(67, 20)
Me._Text1_3.TabIndex = 10
Me._Text1_3.Text = "19"
Me._Text1_3.Visible = False
'
'_Text1_2
'
Me._Text1_2.AcceptsReturn = True
Me._Text1_2.BackColor = System.Drawing.SystemColors.Window
Me._Text1_2.Cursor = System.Windows.Forms.Cursors.IBeam
Me._Text1_2.ForeColor = System.Drawing.SystemColors.WindowText
Me._Text1_2.Location = New System.Drawing.Point(113, 111)
Me._Text1_2.MaxLength = 0
Me._Text1_2.Name = "_Text1_2"
Me._Text1_2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Text1_2.Size = New System.Drawing.Size(43, 20)
Me._Text1_2.TabIndex = 8
Me._Text1_2.Text = "32"
Me._Text1_2.Visible = False
'
'_Command1_2
'
Me._Command1_2.BackColor = System.Drawing.SystemColors.Control
Me._Command1_2.Cursor = System.Windows.Forms.Cursors.Default
Me._Command1_2.ForeColor = System.Drawing.SystemColors.ControlText
Me._Command1_2.Location = New System.Drawing.Point(155, 272)
Me._Command1_2.Name = "_Command1_2"
Me._Command1_2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Command1_2.Size = New System.Drawing.Size(78, 33)
Me._Command1_2.TabIndex = 6
Me._Command1_2.Text = "Cancel"
Me._Command1_2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
Me._Command1_2.UseVisualStyleBackColor = False
'
'_Command1_1
'
Me._Command1_1.BackColor = System.Drawing.SystemColors.Control
Me._Command1_1.Cursor = System.Windows.Forms.Cursors.Default
Me._Command1_1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me._Command1_1.ForeColor = System.Drawing.SystemColors.ControlText
Me._Command1_1.Location = New System.Drawing.Point(245, 266)
Me._Command1_1.Name = "_Command1_1"
Me._Command1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Command1_1.Size = New System.Drawing.Size(97, 40)
Me._Command1_1.TabIndex = 5
Me._Command1_1.Text = "OK"
Me._Command1_1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
Me._Command1_1.UseVisualStyleBackColor = False
'
'_Text1_1
'
Me._Text1_1.AcceptsReturn = True
Me._Text1_1.BackColor = System.Drawing.SystemColors.Window
Me._Text1_1.Cursor = System.Windows.Forms.Cursors.IBeam
Me._Text1_1.ForeColor = System.Drawing.SystemColors.WindowText
Me._Text1_1.Location = New System.Drawing.Point(114, 82)
Me._Text1_1.MaxLength = 0
Me._Text1_1.Name = "_Text1_1"
Me._Text1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Text1_1.Size = New System.Drawing.Size(225, 20)
Me._Text1_1.TabIndex = 2
Me._Text1_1.Text = "c:\cgc\RUSTICA.TXT"
'
'_Text1_0
'
Me._Text1_0.AcceptsReturn = True
Me._Text1_0.BackColor = System.Drawing.SystemColors.Window
Me._Text1_0.Cursor = System.Windows.Forms.Cursors.IBeam
Me._Text1_0.ForeColor = System.Drawing.SystemColors.WindowText
Me._Text1_0.Location = New System.Drawing.Point(113, 53)
Me._Text1_0.MaxLength = 0
Me._Text1_0.Name = "_Text1_0"
Me._Text1_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Text1_0.Size = New System.Drawing.Size(225, 20)
Me._Text1_0.TabIndex = 1
Me._Text1_0.Text = "c:\cgc\240padrus.cnt"
'
'_Command1_0
'
Me._Command1_0.BackColor = System.Drawing.SystemColors.Control
Me._Command1_0.Cursor = System.Windows.Forms.Cursors.Default
Me._Command1_0.ForeColor = System.Drawing.SystemColors.ControlText
Me._Command1_0.Location = New System.Drawing.Point(248, 7)
Me._Command1_0.Name = "_Command1_0"
Me._Command1_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Command1_0.Size = New System.Drawing.Size(91, 38)
Me._Command1_0.TabIndex = 0
Me._Command1_0.Text = "Buscar Fitxer"
Me._Command1_0.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
Me._Command1_0.UseVisualStyleBackColor = False
'
'CommonDialog1Open
'
'
'_Label1_6
'
Me._Label1_6.BackColor = System.Drawing.SystemColors.Control
Me._Label1_6.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_6.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_6.Location = New System.Drawing.Point(8, 205)
Me._Label1_6.Name = "_Label1_6"
Me._Label1_6.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_6.Size = New System.Drawing.Size(137, 23)
Me._Label1_6.TabIndex = 15
Me._Label1_6.Text = "Firma Secretari (S/N):"
Me._Label1_6.Visible = False
'
'_Label1_5
'
Me._Label1_5.BackColor = System.Drawing.SystemColors.Control
Me._Label1_5.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_5.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_5.Location = New System.Drawing.Point(8, 248)
Me._Label1_5.Name = "_Label1_5"
Me._Label1_5.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_5.Size = New System.Drawing.Size(97, 23)
Me._Label1_5.TabIndex = 12
Me._Label1_5.Text = "Remesa:"
Me._Label1_5.Visible = False
'
'_Label1_4
'
Me._Label1_4.BackColor = System.Drawing.SystemColors.Control
Me._Label1_4.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_4.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_4.Location = New System.Drawing.Point(8, 24)
Me._Label1_4.Name = "_Label1_4"
Me._Label1_4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_4.Size = New System.Drawing.Size(91, 19)
Me._Label1_4.TabIndex = 11
Me._Label1_4.Text = "Banc"
Me._Label1_4.Visible = False
'
'_Label1_3
'
Me._Label1_3.BackColor = System.Drawing.SystemColors.Control
Me._Label1_3.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_3.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_3.Location = New System.Drawing.Point(171, 112)
Me._Label1_3.Name = "_Label1_3"
Me._Label1_3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_3.Size = New System.Drawing.Size(99, 19)
Me._Label1_3.TabIndex = 9
Me._Label1_3.Text = "Pes de les Cartes:"
Me._Label1_3.Visible = False
'
'_Label1_2
'
Me._Label1_2.BackColor = System.Drawing.SystemColors.Control
Me._Label1_2.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_2.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_2.Location = New System.Drawing.Point(8, 116)
Me._Label1_2.Name = "_Label1_2"
Me._Label1_2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_2.Size = New System.Drawing.Size(97, 23)
Me._Label1_2.TabIndex = 7
Me._Label1_2.Text = "Remesa:"
Me._Label1_2.Visible = False
'
'_Label1_1
'
Me._Label1_1.BackColor = System.Drawing.SystemColors.Control
Me._Label1_1.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_1.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_1.Location = New System.Drawing.Point(8, 85)
Me._Label1_1.Name = "_Label1_1"
Me._Label1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_1.Size = New Drawing.Size(97, 23)
Me._Label1_1.TabIndex = 4
Me._Label1_1.Text = "Fitxer d'Eixida:"
'
'_Label1_0
'
Me._Label1_0.BackColor = System.Drawing.SystemColors.Control
Me._Label1_0.Cursor = System.Windows.Forms.Cursors.Default
Me._Label1_0.ForeColor = System.Drawing.SystemColors.ControlText
Me._Label1_0.Location = New System.Drawing.Point(8, 55)
Me._Label1_0.Name = "_Label1_0"
Me._Label1_0.RightToLeft = System.Windows.Forms.RightToLeft.No
Me._Label1_0.Size = New System.Drawing.Size(97, 22)
Me._Label1_0.TabIndex = 3
Me._Label1_0.Text = "Fitxer d'Entrada:"
'
'Frm_Files
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(364, 324)
Me.Controls.Add(Me._Text1_4)
Me.Controls.Add(Me.DataCombo1)
Me.Controls.Add(Me._Text1_3)
Me.Controls.Add(Me._Text1_2)
Me.Controls.Add(Me._Command1_2)
Me.Controls.Add(Me._Command1_1)
Me.Controls.Add(Me._Text1_1)
Me.Controls.Add(Me._Text1_0)
Me.Controls.Add(Me._Command1_0)
Me.Controls.Add(Me._Label1_6)
Me.Controls.Add(Me._Label1_5)
Me.Controls.Add(Me._Label1_4)
Me.Controls.Add(Me._Label1_3)
Me.Controls.Add(Me._Label1_2)
Me.Controls.Add(Me._Label1_1)
Me.Controls.Add(Me._Label1_0)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.Location = New System.Drawing.Point(3, 18)
Me.Name = "Frm_Files"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Text = "Fitxers d'entrada i Eixida"
CType(Me.DataCombo1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Sub ReLoadForm(ByVal addEvents As Boolean)
InitializeText1()
InitializeLabel1()
InitializeCommand1()
Form_Load()
If addEvents Then
AddHandler MyBase.Closed, AddressOf Me.Frm_Files_Closed
End If
End Sub
Sub InitializeText1()
ReDim Text1(4)
Me.Text1(4) = _Text1_4
Me.Text1(3) = _Text1_3
Me.Text1(2) = _Text1_2
Me.Text1(1) = _Text1_1
Me.Text1(0) = _Text1_0
End Sub
Sub InitializeLabel1()
ReDim Label1(6)
Me.Label1(6) = _Label1_6
Me.Label1(5) = _Label1_5
Me.Label1(4) = _Label1_4
Me.Label1(3) = _Label1_3
Me.Label1(2) = _Label1_2
Me.Label1(1) = _Label1_1
Me.Label1(0) = _Label1_0
End Sub
Sub InitializeCommand1()
ReDim Command1(2)
Me.Command1(2) = _Command1_2
Me.Command1(1) = _Command1_1
Me.Command1(0) = _Command1_0
End Sub
#End Region
End Class
In case this is relevant for the question, the form was upgraded from VB6 to VB.NET using an automatic tool. Specifically, the VBUC by Mobilize.net (I do not intend to do this as spam, but to give as much information as I can. If I shouldn't have done this, I'll edit the post and delete the reference)
Finally, I've managed to solve it! It seems that one of the external libraries I was using was creating a conflict. As Visual Studio didn't tell my which one it was, I simply unreferenced them all and then referenced again only the ones that I needed at that exact moment.
The conflict seemed to be caused by one of the libraries of the GrapeCity's ActiveReport tool. As I had to upgrade the tool and it wasn't code that I had written (and it was quite poorly commented), I didn't know which ones were or will be needed, so I referenced more than necessary. And it seems that precisely one of the extra libraries (I'm not sure at all, but I think that it was one of the Chart ones) was the one causing the conflict.
Thank you all for your help! And sorry for not answering before, but I had to switch to another urgent project and I couldn't try the solutions until today.