Microsoft Visual Studio

266

Solutions

341

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

I am trying to automate printing in foxpro.My requirement is When I clicked on print button It should start printing without asking for the destination folder dialogue box. printing is working fine..But it always asks for destination folder dialogue box

i tried with set printer to funtion..But it is for pointing the .exe file of the default printer

set printer on

odoc.printout()

Is there any option in foxpro to set destination folder programatically?

 in my system I have adobe pdf and pdf995.

Thanks in Advance
0
Percona Live Europe 2017 | Sep 25 - 27, 2017
LVL 2
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

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
We will install a visual studio version, probably 2015 or 2017 so that we can be ready for the present someday in the future. But for now we have to deliver our source code to the customer who only knows about Iso c++03.

This means that if a developer inserts some newer c++11/14 constructs into our code base, then I want the computer to issue fatal errors forcing the developer to have to conform to c++03.

I found this link that does not appear to go back far enough in time.
https://msdn.microsoft.com/en-us/library/mt490614.aspx

If you have an answer, please provide a relevant link that supports your response so that I can show my manager. Thanks.

Using Windows 10.
0
I would like to create an application using VB.NET Visual Studio 2017 using the VideoLan VLC ActiveX plugin but need to specify the audio output device like I can in the actual VLC application. Can I do this using the ActiveX?

This is because I will have 3 TVs connected to 3 different HDMI ports on the same computer and need different sound and images on each of them. Putting different screen image on each monitor is done, but not the sound.

Or, if I have 3 different graphics cards and use the HDMI ports on each individual card would I be able to output sound to the individual TV's?
0
If user selects 5 on ddl and only 4 event participants are displayed, there will be a label asking user to select qty that is lower!! Now, when I click the button nothing changes and there is also a line underlining eventParticipants.
- The end of the cookies line are red too, and I think there is a problem with the image.url part?
code behind for the button
  protected void btnAdd_Click(object sender, EventArgs e)
    {
        var id = Convert.ToInt32(lblItemNr.Text);
        SqlConnection con = new SqlConnection(_connStr);
        if (con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        SqlCommand cmd1 = con.CreateCommand();
        cmd1.CommandType = CommandType.Text;
        cmd1.CommandText = "update EventDetail set eventParticipants=eventParticipants-" + ddlAmount.Text + " where EventDetail_ID=" + id;
        cmd1.ExecuteNonQuery();
        Response.Redirect("Detail.aspx?id=" + id.ToString());
        //below are the codes with problems (eventParticipants)...
        if(Convert.ToInt32(ddlAmount.Text) > Convert.ToInt32(eventParticipants))
        {
            l1.Text = "please enter lower quantity";
        }
        else
        {
            l1.Text = "";

            if (Request.Cookies["aa"] == null)
            {
                Response.Cookies["aa"].Value = lblTitle.Text.ToString() + "," + lblPrice.Text.ToString() + "," + lblDate.Text.ToString() + "," + lblLocation.Text.ToString() + "," + 

Open in new window

0
Hi there,

thank you for reading this ,  i have a light SSIS package . It runs without any errors in the visual studio 2012 in  dev environment.  but once it gets deployed to test environment   using proxy account with full permission access ran the package in SSMS 2012 . it shows error below .  Does anyone have any ideas ?  Thank you .

DataFlowTaskError: there were errors during  validations
DataFlowTaskError: Failed validation and return status "VS_ISBROKEN"
DataFlowTaskError:  one or more component failed validation
DataFlowTaskError: Microsoft SQL server Client 11.0  hresult:0x80004005
Description :Syntax error, permission violation , or other non specific error
0
1. When I click edit, I have to click it twice in order for the edit to work
2. Then shows the update, but all the items are not shown and when I click update -> it says 'result = det.EventDetailUpdate(int.Parse(id), int.Parse(tid), tname, tdate, decimal.Parse(tprice), tdesc, tlocation, tstart, tend, timage, int.Parse(tparticipants)); 'input string is not in correct format
what I did to update!!
   protected void abind()
    {
        List<EventDetail> detList = new List<EventDetail>();
        detList = aDet.getAllEventDetail();
        gvDetail.DataSource = detList;
        gvDetail.DataBind();
        //   ViewState["grdDetailsDataSource"] = (List<EventDetail>)gvDetail.DataSource;
    }  protected void gvDetail_RowEditing(object sender, GridViewEditEventArgs e)
    {
        gvDetail.EditIndex = e.NewEditIndex;
     //   abind();
    }
    protected void gvDetail_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        gvDetail.EditIndex = -1;
      //  abind();
    }
    protected void gvDetail_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int result = 0;
        EventDetail det = new EventDetail();
        GridViewRow row = (GridViewRow)gvDetail.Rows[e.RowIndex];
        string id = gvDetail.DataKeys[e.RowIndex].Value.ToString();
        string tid = ((TextBox)row.Cells[2].Controls[0]).Text;
        string tname = ((TextBox)row.Cells[3].Controls[0]).Text;
        string tdate = ((TextBox)row.Cells[4].Controls[0]).Text;
 

Open in new window

0
I would like in my Visual Studio vb.net or c# project a way to link to code methods that it impacts. Is this possible in Sandcastle?
0
eg. I have 20 participants. When I select 2qty and click the button, it is supposed to have 18 participants!! However now when I click the button, the qy changes to 0 , and all the other participants no. for other events will change too..
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        var id = Convert.ToInt32(lblItemNr.Text);
    SqlConnection con = new SqlConnection(_connStr);
        if (con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        SqlCommand cmd1 = con.CreateCommand();
        cmd1.CommandType = CommandType.Text;
        cmd1.CommandText = "update EventDetail set eventParticipants=eventParticipants-" + lblParticipants.Text;
        cmd1.ExecuteNonQuery();
        Response.Redirect("Detail.aspx?id=" + id.ToString());   
    }

Open in new window

0
howshow.png
How to show columns?
0
Use Case: Protecting a Hybrid Cloud Infrastructure
LVL 4
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

I got this dumped in my lamp. They need a timer for their Excel vba application. I create a COM class in Visual studio, register for COM Interop, serialization is on AUTO, and XML documentation is checked. Builds fine. I build and import into Excel fine. But when it encounters the new variable it says it can't create the ActiveX component. What they want is the timer to run until it reaches a certain count and then notifys the vba code it is done and displays that value in the spreadsheet - without locking out any other activity going on. Below is the code for the dll in vb.net. I don't get beyond the import reference in Excel and instantiating the object before the ActiveX error. Going nuts here any help appreciated.

 ' A creatable COM class must have a Public Sub New() 
    ' with no parameters, otherwise, the class will not be 
    ' registered in the COM registry and cannot be created 
    ' via CreateObject.
    Public tmrUpdate As New System.Timers.Timer
    Private TimeLeft As String
    Public timeUpDate As Integer

    Public Sub New()
        MyBase.New()
        AddHandler tmrUpdate.Elapsed, AddressOf Tick
        DoStuff()
    End Sub
    '<DllExport("add")>
    'Public Function TestExport(left As Int32, right As Int32) As Int32
    '    Return left + right
    'End Function
    '<DllExport("TimeLeft")>
    Private Async Sub DoStuff()

        'Doing stuff

        timeUpDate = 599
        tmrUpdate.Start()
        'Application.DoEvents()
        Await 

Open in new window

0
I'm trying to filter a gridview from a gridview with checkboxes!! I have this error at
' if (chk.Checked)'
Below is part of the code!!

  private void BindGrid()
    {
        string constr = ConfigurationManager.ConnectionStrings["EventContext"].ConnectionString;
        string query = "SELECT EventDetail_ID, EventType_ID, EventDetailName, eventDate, eventPrice, eventDesc, eventLocation, startTime, endTime, eventImage, eventParticipants FROM EventDetail";

        string condition = string.Empty;

        foreach (GridViewRow row in grdDetails.Rows)
        {
            CheckBox chk = (CheckBox)row.FindControl("chkSelect");
            if (chk.Checked)
            {
                string eventtypeid = row.Cells[0].Text;   
                // i am trying to get the bounded field value of eventtype ID field here
                condition += string.Format("'{0}',", eventtypeid);
            }
        }
        if (!string.IsNullOrEmpty(condition))
        {
            condition = string.Format(" WHERE EventType_ID IN ({0})", condition.Substring(0, condition.Length - 1));
        }
        using (SqlConnection con = new SqlConnection(constr))
        {
            using (SqlCommand cmd = new SqlCommand(query + condition))
            {
                using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
                {
                    cmd.Connection = con;
                    using (DataTable dt = new DataTable())
                    {
                        

Open in new window

0
Below is my code behind. When I click the add to cart button, the qty(eventParticipants) should decrease but it doesn't. Also, it says the name id does not exist in the current context for the id in the btnAdd_Click part below~~

 string _connStr = ConfigurationManager.ConnectionStrings["EventContext"].ConnectionString;

    protected void Page_Load(object sender, EventArgs e)
    {
        FillPage();
    }
    private void FillPage()
    { 
        if(Request.QueryString["id"] == null)
        {
            Response.Redirect("Events.aspx");
        }
        else
        {
            //get selected event's data
            if (!String.IsNullOrWhiteSpace(Request.QueryString["id"]))
            {
                int id = Convert.ToInt32(Request.QueryString["id"]);

                EventDetail Detail = new EventDetail();
                EventDetail detail = Detail.getEventDetail(id);
                if (detail == null)
                {
                    Response.Write("<script>alert('No event found');</script>");
                    return;
                }
                //fill pg w data
                lblDate.Text = detail.eventDate;
                lblLocation.Text = detail.eventLocation;
                lblStartTime.Text = detail.startTime;
                lblEndTime.Text = detail.endTime;
                lblParticipants.Text = detail.eventParticipants.ToString();
                lblPrice.Text = "$" + detail.eventPrice;
                lblTitle.Text = 

Open in new window

0
I Need some help with Visual Studio, I have a project file that was made in VS2008 and I need it to work in a newer version (2012)
0
I Need some help with Visual Studio, I have a project file that was made in VS2008 and I need it to work in a newer version (2012
0
Im trying to get checkboxes in one gridview to filter to another gridview. I think I got this error because of ' (ListItem item in chkSelect.Items)' when I didn't use checkboxlist. What do I change in the codes??


 <asp:GridView ID="grdEventType" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" DataKeyNames="EventType_ID" datasourceid="sdsEventType" ForeColor="Black" GridLines="Vertical" Width="50%" OnSelectedIndexChanged="grdEventType_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="#CCCCCC" />
            <Columns>                                    
                <asp:TemplateField HeaderText="Select">
        <HeaderTemplate>
            <asp:CheckBox ID="chkAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
    </HeaderTemplate>
    <ItemTemplate>
       <asp:CheckBox ID="chkSelect" runat="server"AutoPostBack="true" OnSelectedIndexChanged="Type_Selected" />
    </ItemTemplate>
   </asp:TemplateField>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True"/>
                <asp:BoundField DataField="EventType_ID" HeaderText="EventType_ID" ReadOnly="True" SortExpression="EventType_ID" />
                <asp:BoundField DataField="EventTypeName" HeaderText="EventTypeName" SortExpression="EventTypeName" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" />

Open in new window

0
Dear sir,
i have published windows forms application using visual studio 2013 and for reporting used SAP product cristal report 2013 for visual studio  when i run on client machine it installed perfect  but when i click on report form it shows an error:
ERROR: ''crystaldecisions.shared.sharedutils;threw an exception''
cr.png
0
language : c++
(tools : visual studio , acrobat reader)
thanks a lot
0
I'm new to, and using Git. I have my remotes/origin branch of "master" that contains all production-ready code.

From "master", I create a new local branch called "Bug Fixes".

When I try to push code changes in Bug Fixes back to "master", I get this error every time:

Error encountered while pushing to the remote repository: Not a valid reference 'origin/master'

Maybe I'm not using this correctly? Can someone please advise?
0
Problems using Powershell and Active Directory?
LVL 6
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

I'm getting the following error when I'm working in Visual Studio Professional 2017 Version 15.2

System.InvalidOperationException: 'The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.'

How do I fix this?
Which Access Database Engine Redistributable must I download to fix this?

I'm running Microsoft Office 365
0
I am considering building a new application using C# 7.  I was researching building a licensing component.  I would envision licensing my software for a year at a time.  

I have found numerous articles on free solutions that I can implement, however many of them are 10+ years old!  I wanted to see if anyone had suggestions on how I could go about this.

As a reference, I did find this article which looks good.  However, it is from 2005, therefore I wanted to check the community to see if there was a “newer and better” way to accomplish this.

https://www.codeproject.com/Articles/11012/License-Key-Generation
0
Hello Experts.

I've been wanting to a add a really nice looking pop-up that shows temporarily for a set number of seconds then doesn't show again while the program is running. I'm only able to get it to partially show on the screen. The fantasy was to have something that floats up then goes away, but that's more of a WPF thing and I am only working with a basic Windows Form. I'm thinking perhaps the System.Threading.Thread.Sleep function is causing the problem, but I'm not sure how else to do this.

To help with understanding my issue, I have created a quick Demo solution that should suffice for its purpose. Please note that I still don't have WinZip, so the attached file is actually a .RAR file renamed to have a .ZIP extension so the EE uploader would take it.

BTW, I found a pretty decent solution that also uses System.Threading.Thread.Sleep but it uses the MsgBox function, and not a custom form which is what I want to do. Nevertheless, it does work. This is the code for that solution. If we can just swap out the standard dialogue with mine, that would be great!

Module FormUtils
    Private sAutoClosed As Boolean
    Private Sub CloseMsgBoxDelay(ByVal data As Object)
        System.Threading.Thread.Sleep(CInt(data))
        SendKeys.SendWait("~")
        sAutoClosed = True
    End Sub
    Public Function MsgBoxDelayClose(prompt As Object, ByVal delay As Integer, Optional buttons As MsgBoxStyle = MsgBoxStyle.ApplicationModal, Optional title As 

Open in new window

0
I'm currently using Visual Studio Code. How can I use Visual Studio Code along-side my web browser to code in real-time and see the changes in real-time? Brackets have "Live in Preview", not seeing this in Visual Studio Code.
0
No checkbox is being shown for the Select/Unselect ALL checkbox at the header template. Also when I run, all the checkbox is already supposed to be checked !

Here is the aspx codes
 
<asp:GridView ID="grdEventType" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" DataKeyNames="EventType_ID" datasourceid="sdsEventType" ForeColor="Black" GridLines="Vertical" Width="50%" OnSelectedIndexChanged="grdEventType_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="#CCCCCC" />
            <Columns>
                                       
                <asp:TemplateField HeaderText="Select">
        <HeaderTemplate>
        <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);"
            runat="server" type="checkbox" />
    </HeaderTemplate>
    <ItemTemplate>
       <asp:CheckBox ID="chkSelect" runat="server" />
    </ItemTemplate>
    <HeaderTemplate>
    </HeaderTemplate>
   </asp:TemplateField>

                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True"/>
                <asp:BoundField DataField="EventType_ID" HeaderText="EventType_ID" ReadOnly="True" SortExpression="EventType_ID" />
                <asp:BoundField DataField="EventTypeName" HeaderText="EventTypeName" SortExpression="EventTypeName" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" />
            

Open in new window

0
The word Review order is in blue. It is supposed to be white!! And the border surrounding all of this should be grey but it is blue too
Aspx code
<div class="panel panel-info">
                        <div class="panel-heading">
                            Review Order <div class="pull-right"><small><a class="afix-1" href="#">Edit Cart</a></small></div>
                        </div>
                        <div class="panel-body">
                             <div class="col-md-12">
                                    <strong>Subtotal (# item)</strong>
                                    <div class="pull-right"><span>$</span><span>Wait 4 Cart</span></div>
                                </div>
                                <div class="col-md-12">
                                    <small>Tax</small>
                                    <div class="pull-right"><span>-</span></div>
                                </div>
                                <div class="col-md-12">
                                    <small>Shipping</small>
                                    <div class="pull-right"><span>-</span></div>
                                    <hr/>
                                </div>
                                <div class="col-md-12">
                                    <strong>Order Total</strong>
                                    <div class="pull-right"><span>$</span><span>Cart</span></div>
                                    <hr/>
           

Open in new window

0

Microsoft Visual Studio

266

Solutions

341

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.