Microsoft Visual Studio

303

Solutions

377

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi all
how to center a datagrid in a screen independent the screen size

regards you experts
0
NFR key for Veeam Agent for Linux
LVL 1
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Hi,
I'm using Visual Studio Community 2017. In my case, I have text box named: txtSEARCH, Button named: cmdSEARCH and a Datagridview named: DataGridView1.

Datagridview populated from a text file named: "D:\esdcheck\.BAK.dll" and manualy put column in properties.
This is how I make columnsand this is my DataGridView (This is my form)
Sample For
What I want to do is to search User ID and display it in DataGridView

ex:
I type "1504579" in the text box (txtSEARCH) and when I click the button, datagridview will display all "1504579" in the list 'ONLY' from Rowel Virgo

I'm searching all day in the internet but no codes for like that, any help please and Thank you

This is How I populate my DatagridView:

Public Class Form1


    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Dim lines = (From line In IO.File.ReadAllLines("D:esdcheck\BAK.dll")
                     Select line.Split(CChar(","c))).ToArray
        For x As Integer = 0 To lines.GetUpperBound(0)
            DataGridView1.Rows.Add(lines(x))
        Next

    End Sub

End Class

Open in new window


this is my first post Listview and Datagridview  and thank you for the reply sir
Scott McDaniel (Microsoft Access MVP - EE MVE )
Account
Ryan Chong
Account
0
Hi all
can i

<asp:BoundField HeaderImageUrl="~/Images/<%=Session("uno")%>.png" 

Open in new window


need a session value inthere is that posible?
regards
0
I have a table with the following columns
Ticket Number
Assignee

There is a separate table listing all assignees - something like a list of all the staff.  Each ticket can have multiple assignees.  Assignees can work on multiple tickets.

When the user selects a ticket I want a list box to show total staff with the assignees on that ticket highlighted.  The user should be able to add and remove assignees from a given ticket.  The list of selected assignees need to be passed to an SQL stored procedure.
I'm using C# in Visual Studio 2010.
0
Oh Dear experts,
I need to atach a file that is in my hard drive in code behind
what is the propper sintax for

mm.Attachments.Add()

regards
0
Is there a way to force a file that is locked by another process to be moved/copied in C#?
0
I need to stop the user register if the username is contained in the password
this work for me

password.Contains(username)

Open in new window


But i need it to stop the registration if is

Ernesto or ernesto

at this moment just if is  ernesto or ernesto  quits

i mean, how to do it no mater the  CASE!

regards
0
Oh dear guys!
I Need to embed PDF in a modal window for terms aceptance of use of a portal.

please you experts!
0
Oh dear experts
how to achive this

 mm.Body = Session("uno") & uno & "-" & dos & Session("dos") "< br />" Session("tres") & tres & "-" & cuatro & Session("cuatro")

Open in new window


regards!
0
Hello,
Need to copy selected row to clipboard in vb.net 2015 desktop.

Public Sub CellMouseClick(sender As Object, e As Object) Handles DgClinic.CellMouseClick

 Try
            ' Add the selection to the clipboard.
            If e.columnindex = -1 Then
                Clipboard.SetDataObject(sender.Currentrow.ToString(), False) ---this does not work
            Else

                Clipboard.SetDataObject(sender.CurrentCell.Value.ToString(), False)
            End If

Open in new window

0
Get your Disaster Recovery as a Service basics
LVL 1
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Hello,
How can I select multiple rows in datagridview with mouse scroll or Shift+ left mouse click .
I am using vb.net 2015 desktop.

Regards
0
I currently have a visual studio C# solution that has two Projects.

The 1st Project is a .dll that will be used as a CAD application VBA reference file.  The .dll has a Windows form embedded. The purpose of this is to get and set file data from the SQL database and the CAD file currently being worked on. The CAD VBA does not have enough structure to accomplish what I need to happen so I 'm doing all the work in visual studio coding interface.

The second project is a console app that is required to make the form open from the .dll file.

This is the issue I have. The code works fine and pulls data from the data base and pushes it to the CAD file. But the form flashes open for a second then closes. I have never seen a form act like this. It looks as though it has mimicked the behavior of the console window. Below is the code I have so far. It's not a lot of code, but it does work, except for the form which I'm trying to keep open.

Project 1 dll Code:
using System.Runtime.InteropServices;

namespace ECOLib
{

    [ComVisible(true)]
    public interface TestI
    {
        void testIn();
    }

    [ClassInterface(ClassInterfaceType.None)]
    public class ECOLib : TestI
    {
        public void testIn()
        {
            ECOList f = new ECOList("X-2000-T"); //part number that is required for the SQL query
            f.Show();
        }
    }
}

Open in new window


Project1 Form Code:
using System;
using System.Data;
using System.Data.SqlClient;
using 

Open in new window

0
Hello,
I have word files named as 1.docx ,2.docx ; need to find the next number as a string or find max number filename .
I am using vb.net desktop.
Cheers
0
I have been using MS Access and a Pass Through Query for a long time to generate a distributable PDF every morning.  However, this methodology is not stable and this past weekend the server running the program crashed and I cannot get it to work.

I have been playing around with Visual Studio to create the PDF report from the SQL data set.  I have been able to create the Visual Studio report but not having access to a SQL Report directory I am at a loss on how to run my creation daily and save the output as a PDF to a shared folder that the application has privileges to.

I have been searching the internet for a solution but cannot find a straight forward answer.

Any help will be appreciated.

Thank you

Glen
0
Hello,
I have used the code you give in this  post :



It is the first code on the page .

I think i have partially understood it and it works fine for me (many thanks to you, really), but I need a more complicated code and I am unable to reply to this problem :

When I import the names of files of the folder in the table, it imports all the files names and add them as new records at the end of the records list in the table ; but i'd like it just adds the new files if there are new files in the folder, and\or removes the missing files if there are deleted files in the folder,  or do nothing if there is no changes in the folder . It's really too hard for me .
Thanks in advance .
0
Hi Friends,

according to my work,I have number of pdf files present in one folder .I need to merge all the files into a single pdf  file  based on last modified time stamp. Means first modified pdf file as first and then the rest.
I tried with the below code.

Sub Main() 
     
    Const DestFile As String = "MergedFile.pdf" ' <-- change to suit
     
    Dim MyPath As String, MyFiles As String 
    Dim a() As String, i As Long, f As String 
     
     ' Choose the folder or just replace that part by: MyPath = Range("E3")
    With Application.FileDialog(msoFileDialogFolderPicker) 
         '.InitialFileName = "C:\Temp\"
        .AllowMultiSelect = False 
        If .Show = False Then Exit Sub 
        MyPath = .SelectedItems(1) 
        DoEvents 
    End With 
     
     ' Populate the array a() by PDF file names
    If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\" 
    ReDim a(1 To 2 ^ 14) 
    f = Dir(MyPath & "*.pdf") 
    While Len(f) 
        If StrComp(f, DestFile, vbTextCompare) Then 
            i = i + 1 
            a(i) = f 
        End If 
        f = Dir() 
    Wend 
     
     ' Merge PDFs
    If i Then 
        ReDim Preserve a(1 To i) 
        MyFiles = Join(a, ",") 
        Application.StatusBar = "Merging, please wait ..." 
        Call MergePDFs(MyPath, MyFiles, DestFile) 
        Application.StatusBar = False 
    Else 
        MsgBox "No PDF files found in" & vbLf & MyPath, vbExclamation, "Canceled" 
    End If 
     
End Sub 
 
Sub 

Open in new window

0
I am using Windows 7 and VS 2017 Enterprise.
Trying to create a project from template "Blank App (Universal Windows)," But I get the message:
"You need to be running Windows 10 to open this project. Please update to Windows 10..."

So, is there no workaround to get this to work on Windows 7?
0
Hello,
I have a column 'Sel' in datagridview which has values like true/false.
Need to count how many are 'True' and display in a label.
I am using vb.net desktop.

Regards
0
Hello , i need help please
I am using visual studio 2017 , while debug I keep getting this error message :
the debugger cannot continue running the process. the operation could not be completed a retry should be performed
0
[eBook] Windows Nano Server
LVL 1
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

I have a Visual Studio Solution with two projects, a Core project containing the MainProgram (MainProgram.exe), and a MainProgramCore (MainProgramCore.dll) library.

It looks something like this:

Solution 'MyProgram'
> Core
      MainProgram     (depends on MainProgramCore)
      MainProgramCore
> Plugins
      MyPlugin        (depends on MainProgramCore)

Open in new window

And the created files:
Directory Structure:
Debug\
      MainProgram.exe
      MainProgramCore.dll
Debug\Plugins\
      MyPlugin.dll
      MainProgramCore.dll

Open in new window


As you can see my problem is I end up with two copies of MainProgramCore.dll, one in the \Debug directory, and one in the \Debug\Plugins directory.


Both MainProgram.exe and MyPlugin.dll depend on MainProgramCore.dll.

Building Core creates MainProgram.exe and MainProgramCore.dll in the \Debug directory.

Building MyPlugin creates MyPlugin.dll and MainProgramCore.dll in the \Debug\Plugins directory.


What do I need to do in Visual Studio so there's only one result copy MainProgramCore.dll instead of two?
0
I'm using C# in Visual Studio 2015.  Are there any libraries I can use to work out permuations and combinations.  If not, what about a simple factorial?
0
I am using Crystal report 2013,and visual studio 2017. but how to deploy on client machine.For Data Source in crystal report I using ODBC. i Already create proper ODBC ,and i download report distribution package from sap and install but still report not working.
and mypc project path shows as my attached image show. sir please help...... because your help save my reputation.thanks advance.
errr---Copy.png
0
Hi,

I have just started trying to learn Visual Basic 2015 and the book I am using has in the code instructed me to use the following code :

"Val" to convert a text string; and
"Me" to reference the current form

Neither of which are recognisied by Visual Basic 2015.

    private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Sum.Text = Val(Num1.Text) + (Val(Num2.Text));
        }
    }
}



  public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Me.Text = InputBox("Enter a Caption...")
        }

    }
}
0
today when i want to start to dubug ms asp.net website program the dianostic tools say it starting but does not do anythin. I triad anoter project and it still will not start. any ideas
0
Typically when I use any version of visual studio my source code is on the left part of my screen and takes up a majority of the screen. On the right side is my "Solution Explorer" tabbed window which I can conveniently click on a file and it will be displayed on the left of my screen.

Somehow something is screwed up because when I double click on a file in the Solution Explorer view, the file is opened, however it is not opened to the left of my screen as usual, but in a new tab that sits over solution explorer. So solution explorer is covered up? How can I reset Visual Studio editor so that when I click on a file in solution explorer it will open to the left of my screen?

I am using Visual Studio 2015
0

Microsoft Visual Studio

303

Solutions

377

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.