hello guys,
i'm trying to publish an application so i can use it in an other computer and i'm following the steps in this link:
https://docs.microsoft.com/en-us/dot...ots=dotnet-5-0
The problem is that the version that i get when i debug from the application visual studio and the one that it's published doesn't work exactly the same way even thought i save the changes that i make before publishing.
the difference is that when i debug the app from visual studio i get the msgbox to save the changes in the files with no probleme and the app works just fine but the version published i get the msgbox to save changes behind all the apps like in the picture (it shows behind the application) .
the problem is that my application actually shows a datagrid and because the msgbox shows behind the app i can't do anything with the datagrid because it's suppose to show in front the datagrid like this :
does anybody knows how to solve this problem and thank you sooooo much
my code is so long so i'm gonna show the most important parts :
Code:Imports Microsoft.Office.Interop.Excel Imports Microsoft.Office.Interop Imports System.Windows.Forms.OpenFileDialog Imports System.Windows Imports System.IO Imports System.Text Imports System.Windows.Forms.DataGridView Imports System.Drawing Imports System.Drawing.Color Public Class Form1 Dim xlworkbook As Excel.Workbook Dim ws1 As Excel.Worksheet 'Dim workbook As Excel.Workbook Dim xlWorkSheet As Microsoft.Office.Interop.Excel.Worksheet Dim xlApp As Microsoft.Office.Interop.Excel.Application Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click xlApp = New Microsoft.Office.Interop.Excel.Application OpenFileDialog1.ShowDialog() TextBox1.Text = OpenFileDialog1.FileName xlworkbook = xlApp.Workbooks.Open(TextBox1.Text) For Each xlWorkSheet In xlApp.Sheets ComboBox1.Items.Add(xlWorkSheet.Name) Next End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Dim ws1 As Excel.Worksheet work1 = xlApp.Workbooks.Open(TextBox1.Text) ws1 = work1.Worksheets(ComboBox1.SelectedItem) ' here i change the color of some cells and add them to a data grid in Form2 and i show the form 2 when the value in the cells that i changed the color for Form2.Show() work1.Close() xlApp.Quit() System.Runtime.InteropServices.Marshal.ReleaseComObject(xlApp) : xlApp = New Microsoft.Office.Interop.Excel.Application System.Runtime.InteropServices.Marshal.ReleaseComObject(work1) : work1 = Nothing System.Runtime.InteropServices.Marshal.ReleaseComObject(ws1) : ws1 = Nothing end sub end sub




Reply With Quote
