Quantcast
Channel: Visual Studio General Questions forum
Viewing all 21115 articles
Browse latest View live

VB 6.0 - office 2013 not working

$
0
0

Hi, there is application which is working perfectly with MS office 2010. The project has been built using VB6.0 and it process and open the word document. Application is working perfectly on all system where offices 2010 available but it doesn't work when office 2013 installed. The application is working perfectly for long 15 years. Can we do some settings in word 2013 to make it compatible to work in VB 6.0? 

Note- Below is line which has been used in Code-

Set GetWord=GetObject(Class:="Word.Application")


Unable to add a simple BMP to a dialog box

$
0
0

Hi.

I have a very simple task at hand: create an app (actually I need a DLL) that pops up a dialog with a "blinking led", which means I need a white circle and a red circle to interchange according to function calls.

I started by just creating a project, and dialog box, and then I tried to add a BMP to the dialog. There are many tutorials but VS 2019 (community) does not look like any of those. I am faced with problems no matter what i try:

1. Some tutorials say to use the "Picture Box" element from the toolbox and add it into the dialog. But I only have "Picture Control" and it works differently. There is no visible way to associate a picture, except manipulating the properties. Alas, in the properties I can't see BMPs i added as resources...

2. When adding a BMP (import) it is not assigned with an ID. I don't see how I can change that. That explains #1, maybe.

3. So instead of importing, I added a BMP internally in VS and painted it. These do get IDs, but when I add them to the dialog I get a black internal box with a fixed size. The BMP is not showed in it, nothing.

4. trying to somehow get to "Picture Box" I opened the toolbox configuration. An item named "Picture box" is ticked! And I can't see "Picture Control" there... In the toolbox itself, as mentioned, I have only "Picture Control"...

Would appreciate your help.

Thanks.


How to get current value of Custom Build Tool property page in VS Extension

$
0
0

Hello, I posted this question on stack overflow initially, but perhaps it would be better to ask it here.

I'm working on an extension for VS to help with interacting with items that are built with a custom build tool. However, I've been having great difficulty with grabbing information from property page from the project item.

You can imagine the scenario as follows:

  • I have a test.myfile in the solution
  • It is set to be built with a custom build tool with a commandline

On Stack overflow, I got an answer that tipped me off to the existence of VCCustomBuildTool but wasn't sure how to get the instance that relates to my project item. While I was debugging, I found that in a project's configuration, it has a list of tools and one had the type I was looking for. This led me to write the following.

var item = dte.SelectedItems.Cast<SelectedItem>().First();
VCProjectItem vcproj = (VCProjectItem)item.ProjectItem.Object;
IVCCollection configs = (IVCCollection)vcproj.project.Configurations;
VCConfiguration config = (VCConfiguration)configs.Item(item.ProjectItem.ConfigurationManager.ActiveConfiguration.ConfigurationName);
VCCustomBuildTool tool = null;
foreach (object o in config.Tools)
{
    if (o is VCCustomBuildTool)
    {
        tool = o as VCCustomBuildTool;
        break;
    }
}
// tool.CommandLine ends up being empty, it looks like the object is populated with default parameters

After getting the VCCustomBuildTool instance, it looks to be completely empty or filled with default parameters of the property page. This makes me believe I have found a template object, but not the instance of the page for the current project item. Where could I find this?

Visual Studio 2017: Display the title of a UWP application containing a NavigationView and an acrylic design extended to the title bar

$
0
0

Hello,

My UWP app has a NavigationView and uses Fluent Design with extended acrylic in the title bar.

So you have to draw the application title yourself, which normally appears automatically in the title bar, with a TextBlock control using CaptionTextBlockStyle. I tried to apply the example provided by Microsoft here.

But unfortunately this example does not take into account the extended acrylic in the title bar. Below the modified XAML code:

<Page
    x:Class="MesProjets.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MesProjets"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Microsoft.UI.Xaml.Controls"
    mc:Ignorable="d"><Page.Resources><ImageBrush x:Key="imagefond" 
                    ImageSource="/Assets/Images/Wallpaper.png"
                    Stretch="UniformToFill"/><Style TargetType="NavigationView"><Setter Property="Foreground" Value="White" /></Style></Page.Resources><Grid ><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="*"/></Grid.RowDefinitions><Grid.Resources><AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
                  BackgroundSource="HostBackdrop"
                  TintColor="DarkOliveGreen"
                  TintOpacity="0.6"
                  FallbackColor="DarkGray"/><AcrylicBrush x:Key="NavigationViewExpandedPaneBackground"
                  BackgroundSource="HostBackdrop"
                  TintColor="DarkOliveGreen"
                  TintOpacity="0.6"
                  FallbackColor="DarkGray"/><SolidColorBrush x:Key="NavigationViewItemForeground" Color="White"/><SolidColorBrush x:Key="NavigationViewItemForegroundPointerOver" Color="White"/><SolidColorBrush x:Key="NavigationViewItemForegroundSelected" Color="GreenYellow"/><SolidColorBrush x:Key="NavigationViewItemForegroundSelectedPointerOver" Color="White"/><SolidColorBrush x:Key="NavigationViewItemForegroundPressed" Color="GreenYellow"/></Grid.Resources><Grid x:Name="AppTitleBar" Background="Transparent"><!--Width of the padding columns is set in LayoutMetricsChanged handler. 
             Using padding columns instead of Margin ensures that the background
         paints the area under the caption control buttons (for transparent buttons).--> <Grid.ColumnDefinitions><ColumnDefinition x:Name="LeftPaddingColumn" Width="0"/><ColumnDefinition/></Grid.ColumnDefinitions><TextBlock Text="Mes Projets" 
               Grid.Column="1" 
               Style="{StaticResource CaptionTextBlockStyle}" 
               Margin="10,0,0,0"/></Grid><NavigationView x:Name="NavViewMain"
                        PaneTitle="  Mes Projets"
                        Margin="0,0,0,0" Grid.Row="1" 
                        Loaded="NavViewMain_Loaded"
                        SelectionChanged="NavViewMain_SelectionChanged"
                        ItemInvoked="NavViewMain_ItemInvoked"
                        CompactModeThresholdWidth="0"
                        ExpandedModeThresholdWidth="1000"
                        OpenPaneLength="250"
                        FontSize="24"
                        IsSettingsVisible="{Binding ElementName=settingsCheck,Path=IsChecked}" IsTabStop="False"
                        IsBackButtonVisible="Collapsed"><NavigationView.HeaderTemplate><DataTemplate><TextBlock  x:Name="appTitle" 
                                    Style="{StaticResource TitleTextBlockStyle}"
                                    Grid.Column="1"
                                    FontSize="28"
                                    VerticalAlignment="Top"
                                    x:Uid="MainPageTitre"/></DataTemplate></NavigationView.HeaderTemplate><NavigationView.MenuItems><NavigationViewItem Icon="Library" Tag="ListeProjets_Page" ><TextBlock Tag="Nav_ListeProjets" x:Uid="NVItem1" /></NavigationViewItem><NavigationViewItem Icon="Library" Tag="ProjetsPrevus_Page" ><TextBlock Tag="Nav_ProjetsPrevus" x:Uid="NVItem2" /></NavigationViewItem><NavigationViewItem Icon="Library" Tag="ProjetsEnCours_Page" ><TextBlock Tag="Nav_ProjetsEnCours" x:Uid="NVItem3" /></NavigationViewItem><NavigationViewItem Icon="Library" Tag="ProjetsRealises_Page" ><TextBlock Tag="Nav_ProjetsRealises" x:Uid="NVItem4" /></NavigationViewItem><NavigationViewItemSeparator/><NavigationViewItem Icon="XboxOneConsole" Tag="ListeMonnaies_Page" ><TextBlock Tag="Nav_ListeMonnaies" x:Uid="NVItem5" /></NavigationViewItem><NavigationViewItem Icon="Save" Tag="Backup_Page" ><TextBlock Tag="Nav_Backup" x:Uid="NVItem6" /></NavigationViewItem><NavigationViewItem Icon="Help" Tag="Aide_Page" ><TextBlock Tag="Nav_Aide" x:Uid="NVItem7" /></NavigationViewItem></NavigationView.MenuItems><Frame x:Name="contentFrame"></Frame></NavigationView></Grid></Page>

The result is that the title of the application appears in the upper left, but in a title bar that should not normally exist.

How do I get the same result we have with the Calendar app?

Thanks to whoever can help me.

VS is killing me

$
0
0
I've used Visual Studio for over ten years in its various iterations.  I installed VS 2019 to use for developing SSRS reports--nothing big or complicated here.  I was completely blindsided by VS 2019 destroying my home version of Windows 10.  This happened after update 16.4.  Before that, no problem and I should have ignored their obnoxious nag that tells me to update every time I open the IDE.  After the update and a reboot, Windows wouldn't come up and instead went into the infamous Windows 10 Automatic Repair loop.  After going through the various options to troubleshoot and repair, I ultimately got the dreaded damaged beyond repair message.  The laptop went to the shop since I didn't have a bootup disk I could use to reformat the hard drive and start over again.  Nice, huh?  Now, afraid to use VS 2019, I installed VS 2017 which I've used previously.  When I try to load an SSRS solution I just created, I get an "incompatible" message and another message that says the application is not installed.  I have done nothing between the last time I closed the solution and trying to open a couple of hours later.  With a fresh Windows 10 installation, there isn't a bunch of software that could corrupt an SSRS solution.  Basically, I am frustrated beyond words at what looks like really bad software since I can't think of any other company that puts out software that can easily corrupt an OS and continue to act like like it doesn't want to work.  

cannot install visual studio, not launch vs installer

$
0
0

vs 2019 community from `https://visualstudio.microsoft.com` but the Visual Studio Installer does not run.
The Windows Installer appears very briefly and then disappears. There is no reaction.

I tried after reset PC but it is the same.
What should I do?

%temp%

[12/13/2019, 15:58:9] === Logging started: 2019/12/13 15:58:09 ===
[12/13/2019, 15:58:9] [12/13/2019, 15:58:10] --- logging level: standard ---
[12/13/2019, 15:58:10] Directory 'C:\Users\7ADE~1\AppData\Local\Temp\fa172949c1a6214dfa5c85\' has been selected for file extraction
[12/13/2019, 15:58:10] Extracting files to: C:\Users\7ADE~1\AppData\Local\Temp\fa172949c1a6214dfa5c85\
[12/13/2019, 15:58:10] Error 0x8007002a: Failed to extract all files out of box container #0.
[12/13/2019, 15:58:10] Error 0x8007002a: Failed to extract
[12/13/2019, 15:58:10] Error 0x8007013d: Failed to get error string from error: 0x8007002a
[12/13/2019, 15:58:10] The entire Box execution exiting with result code: 0x8007002a
[12/13/2019, 15:58:10] Launched extracted application exiting with result code: 0x0
[12/13/2019, 15:58:10] === Logging stopped: 2019/12/13 15:58:10 ===

VS2019 16.4.1 - how to cease all the 'background tasks'?

$
0
0

My VS always run something as a background process. How can I stop these unsolicited 'tasks in queue'? They take too much of time and make my VS unresponsive.

Local C# Class Cannot be Added to Class Diagram

$
0
0

Hi,

I'm using Visual Studio 2015 for an Umbraco CMS website.

I have a very simple public ViewModel class. 

I have created a class diagram file in the same folder of the project, but when I drag my VM class on it, an error message box says "one or more of the selected items cannot be added to the class diagram".

It's really strange, it's a local file, in the same folder, it's public, etc.

Can anyone please tell me what am I doing wrong?

Thanks,

Sia


Looking for advice on how to make a Visual Basic Language Extension for Visual Studio Code

$
0
0

I know the documentation for making a language extension is here:

https://code.visualstudio.com/api/language-extensions/overview

What I don't understand is how to integrate VS Code and the Roslyn compiler, or if such a task is even possible. I could really use any and all help with this.

support multiple project types in a custom item template

$
0
0
I've created a custom item template. The ProjectType is CSharp and I can select it when I add a new item to a class library, but not ASP.NET Core projects.

All the documentation I found didn't cover if it's possible to support multiple project types.

MyTemplate.vstemplate:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">  <TemplateData>    <DefaultName>LC Class and Interface.cs</DefaultName>    <Name>LC Class and Interface</Name> <Description>Default Class that derives from Interface</Description>    <ProjectType>CSharp</ProjectType>    <SortOrder>10</SortOrder>    <Icon>__TemplateIcon.png</Icon>    <PreviewImage>__PreviewImage.jpg</PreviewImage>  </TemplateData>  <TemplateContent>    <References />    <ProjectItem SubType="CSharp" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Class.cs</ProjectItem>  </TemplateContent></VSTemplate>



Senior .NET Developer

Toolbox and Design tab don't work

$
0
0

I've opened a windows form project and I'm not able to use any of the toolbox options.

Also the design tab doesn't show up for me.

Arrays in Lists

$
0
0

How does one save new arrays in lists?  I have used List.Add but it only shows the old info in the arrays.  I tried to add new arrays but it doesnt seem to record new iformation.

watchOS project physical device shows under "Unsupported Devices"

$
0
0

I'm stuck and while I've found and tried solutions for other symptoms, I have not found any posts where the symptom is the phone being listed under "Unsupported Devices".  The phone and watch are both are on current OS versions so I would hope that is not the problem.  I've got a brand new empty Visual Studio 2019 16.4.2 WatchOS C# project with no companion app, and I have tried deleting and recreating multiple times so it isn't just one bad project creation.

  • Xcode can deploy to the physical device so it is connected
  • Visual Studio 2019 on Mac and on Windows can deploy an iOS project to the iPhone
  • Visual Studio 2019 on Mac and on Windows when in a watchOS project list the phone under "Unsupported Devices"
  • Watch Series 3 with 6.1.1, iPhone 6 Plus with 13.3
  • Info.plist on both projects have Deployment Target of 6.1, lowering to 1.0 did not help.
  • Bundle identifiers are the same except the last part and match the wildcard format in the provisioning profile.  The same provisioning profile is targeted for the Xcode and the Visual Studio projects, though I have tried different as well.

I would appreciate any suggestions on how to get a Visual Studio app to deploy to an Apple Watch.

(edit was just formatting to add the bullet points and this line)

I need help with this ... the vs interpreter is not that good.

$
0
0

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

public class xmlLinearLayout{
private static void Layout();
string  path = Assets.Resource.design.xml;
set.view(path);
onCreate();
set.ContentView(path);
}
}
}

ErrorCS1519Invalid token '(' in class, struct, or interface member declaration

ErrorCS8124Tuple must contain at least two elements.

ErrorCS1519Invalid token ';' in class, struct, or interface member declaration

ErrorCS1022 Type or namespace definition, or end-of-file expected




One instance of Visual Studio complains about licence

$
0
0

Greetings,

I have two instances of Visual Studio Community 2015 installed on two different PC, since a few years ago. Today, for the first time, one of the two installation says "Your trial has expired (I am signed in with my MS account). The other installation, on another PC, works fine. I'm puzzled, what's going on?

I cannot upgrade to a newer version because of other software I am using - otherwise I would need to buy upgrade that one as well, while the version I am using does the job I need.

Any hint about what's going wrong?

Thank you in advance.


Your automated publishing to Google Play will stop working on December 1.

$
0
0

I have the very very latest Visual Studio 16.3.10 installed.

When I Distribute my Xamarin app via the Visual Studio UI to google play, the google site says the following:

ACTION REQUIRED: Your automated publishing to Google Play will stop working on December 1, 2019
Your app is using an old version of the Google Play Developer API. From December 1 2019, versions 1 and 2 of this API will no longer be available, and any calls to these versions will fail. Update to version 3 before this date. Learn more

Some threads that do their own custom publishing say some endpoint v2 needs to be v3.

OK, great, but since I am using Visual Studio to do all of this, what needs to change in Visual Studio to stop getting this error ?

Best regards, Karhu.



Karhu Koti

Adding trial / paid checking to my Win32 desktop app for the Microsoft Store

$
0
0
I am using Visual Studio Community edition to prepare a .Net desktop app for sale in the Microsoft Store but I can't find any clear instructions on how to determine whether the user has bought my app so I can provide them with an unlocked version. Specifically, I need to know when a user has purchased my app so I can remove the trial functionality, effectively "un-locking" my app for full, unrestricted use. Any help on this would be greatly appreciated.

"The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)"

$
0
0

I'm using VS'15 

I worked on a project, C++ forms and went well. Now on reopening the project following error came up and i don't find a solution for relevant problem.

SeverityCodeDescriptionProjectFileLineSuppression State
MessageThe data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)0

Kindly help me asap 

Thanks 

Wajiha

 

Visual Studio Community and Pascal

$
0
0

Unsure where to post this question, but here goes.

I installed Visual Studio Community on desktop Windows 10 pro 64 bit.

If I create a project using (Python Windows Console)

Default title: Python Application

a Python interpreter is generated that seems to function properly.

If I create projects using (Python Windows Desktop)

Default titles: IronPython Application; IronPythonWindows Forms Application;

IronPython WPF Application

none of them run because of a message 'Failed to launch debugger IronPython|2.7-32'

Question: is the Visual Studio implementation of Python self-contained or do I have to look elsewhere to resolve this issue?

Thanks much for any direction...

John S.



jssd

I can't add a dll library to the visual studio community 2019 toolbox.

$
0
0

I can't add a dll library to the visual studio community 2019 toolbox.

When I make right click on the toolbox and select the "Choose item" option, the program starts loading the components, stops for a moment and then automatically closes visual studio, if I repeat the operation the same thing happens.

I already uninstalled visual studio and installed it again.

My operating system is Windows 10 Home


Viewing all 21115 articles
Browse latest View live


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