Click here to Skip to main content
       

Visual Studio

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
Questionvs2010 referencesmemberMember 78886599hrs 2mins ago 
Hello all,
 
I'm having some headache with my project references.
 
First off all, I have a common library which uses 3rd party .NET librarys. Now, the problem is that all these 3rd party dll's come from one program that needs to be installed on the system for my application to work. But still, vs2010 copys the dll's into it's output directory and uses those copys instead of the dll's located in the program folder of the 3rd party program. (Are you with me, I know my english isn't top of the notch) How can I prevent this, so that vs2010 doesn't copys those dll's again, and that my app will use the original dll's?
 
Is it possible?
 
The next problem I have, is that in my application, I use a usercontrol from my library that uses a 3rd party dll. And for some reason I really need to add that 3rd party dll to my application references allthough my library already references that 3rd party dll. Can I change this behaviour? So that referenced dll's from my library don't need to be referenced in my application itself?
 
I hope that my questions are clear,
Thanks in advance!
AnswerRe: vs2010 referencesprofessionalSimon_Whale8hrs 12mins ago 
have a read of this Take advantage of Reference Paths in Visual Studio and debug locally referenced libraries[^]
Every day, thousands of innocent plants are killed by vegetarians.
 
Help end the violence EAT BACON

QuestionSecurity featuresmemberJames R Opdycke II15 May '13 - 16:33 
I was tasked in my schooling with adding security features to a calculator code we wrote for a previous project. I have never used security features before and have not the first idea how to incorporate them in my project. We apparently have to add them to our functions (plus, minus, multiply, divide). I'm not asking for anyone to do the work for me but I could use help with what exactly needs to be done.
 
The following is an example of the code for the button that divides:
 
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles divNum.Click
        ansBox.Text = (Integer.Parse(numBox1.Text) / Integer.Parse(numBox2.Text)).ToString()
    End Sub
 
If more of the program is needed or anything just let me know. Any help would be amazing!
QuestionRe: Security featuresprofessionalRichard Deeming16 May '13 - 1:27 
What do you mean by "security features"?



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: Security featuresmemberJames R Opdycke II16 May '13 - 11:35 
Here is my teachers exact wording of the assignment.
 
The GUI interface for your calculator now needs additional functions. To add security functions address the following in your Visual Studio file:
Program at least one of the functions (add, subtract, multiple or divide) in your calculator program to include a security feature.
An example of a security feature is to declare a variable as "private" as opposed to "public" (conduct some independent research if necessary to refresh on these topics).
GeneralRe: Security featuresprofessionalMatt T Heffron16 May '13 - 12:53 
Other than being in VB instead of c# I don't see anything to change in the code you've shown. Wink | ;)
 
Seriously:
From the wording, it looks like the issue is the accessibility of the various variables and methods in the implementation of your program. Make sure everything has the most restrictive accessibility (public/internal/protected/private) that still allows it to function correctly. Then look at things that aren't private and think about how you could redesign your code to reduce their "exposure".
 
I'd suggest you avoid modifying the accessibility of any code generated by the designer, lest you confuse the designer.
GeneralRe: Security featuresmvpRichard MacCutchan16 May '13 - 21:19 
As Matt says, this has nothing to do with security; it's a pity your teacher does not understand that.
Use the best guess

GeneralRe: Security featuresmemberJames R Opdycke II17 May '13 - 7:10 
He left this piece of python code as an example for the assignment but idk where in the code it has the security feature. From everything I have found all of my code says private on it so if that's what he wants it should have been already done lol
 
#!/usr/bin/python
 

#
from Tkinter import * # Download this from http://www.manning.com/grayson/
from tkMessageBox import * # Download this from http://www.manning.com/grayson/
 
# Calculator is a class derived from Frame. Frames, being someone generic,
# make a nice base class for whatever you what to create.
class Calculator(Frame):
 
# Create and return a packed frame.
def frame(this, side):
w = Frame(this)
w.pack(side=side, expand=YES, fill=BOTH)
return w
 
# Create and return a button.
def button(this, root, side, text, command=None):
w = Button(root, text=text, command=command)
w.pack(side=side, expand=YES, fill=BOTH)
return w
 
# Enter a digit.
need_clr = False
def digit(self, digit):
if self.need_clr:
self.display.set('')
self.need_clr = False
self.display.set(self.display.get() + digit)
 
# Change sign.
def sign(self):
need_clr = False
cont = self.display.get()
if len(cont) > 0 and cont[0] == '-':
self.display.set(cont[1:])
else:
self.display.set('-' + cont)
 
# Decimal
def decimal(self):
self.need_clr = False
cont = self.display.get()
lastsp = cont.rfind(' ')
if lastsp == -1:
lastsp = 0
if cont.find('.',lastsp) == -1:
self.display.set(cont + '.')
 
# Push a function button.
def oper(self, op):
self.display.set(self.display.get() + ' ' + op + ' ')
self.need_clr = False
 
# Calculate the expressoin and set the result.
def calc(self):
try:
self.display.set(`eval(self.display.get())`)
self.need_clr = True
except:
showerror('Operation Error', 'Illegal Operation')
self.display.set('')
self.need_clr = False
 
def __init__(self):
Frame.__init__(self)
self.option_add('*Font', 'Verdana 12 bold')
self.pack(expand=YES, fill=BOTH)
self.master.title('Simple Calculator')
 
# The StringVar() object holds the value of the Entry.
self.display = StringVar()
e = Entry(self, relief=SUNKEN, textvariable=self.display)
e.pack(side=TOP, expand=YES, fill=BOTH)
 
# Loop to produce the number buttons.
# is an anonymous function.
for key in ("123", "456", "789"):
keyF = self.frame(TOP)
for char in key:
self.button(keyF, LEFT, char,
lambda c=char: self.digit(c))
 
keyF = self.frame(TOP)
self.button(keyF, LEFT, '-', self.sign)
self.button(keyF, LEFT, '0', lambda ch='0': self.digit(ch))
self.button(keyF, LEFT, '.', self.decimal)
 
# The frame is used to hold the operator buttons.
opsF = self.frame(TOP)
for char in "+-*/=":
if char == '=':
btn = self.button(opsF, LEFT, char, self.calc)
else:
btn = self.button(opsF, LEFT, char,
lambda w=self, s=char: w.oper(s))
 
# Clear button.
clearF = self.frame(BOTTOM)
self.button(clearF, LEFT, 'Clr', lambda w=self.display: w.set(''))
 
# Make a new function for the - sign. Maybe for . Add event
# bindings for digits to call the button functions.
 
# This allows the file to be used either as a module or an independent
# program.
if __name__ == '__main__':
Calculator().mainloop()
GeneralRe: Security featuresmvpRichard MacCutchan17 May '13 - 7:28 
Well I know nothing about python; and you posted this question in the Visual Studio forum. However, and more relevant, there is nothing you can do to a calculator to make it secure, even if we really understood what that is supposed to mean. Go back and talk to your teacher and get a better explanation of what problem you are supposed to be addressing.
Use the best guess

GeneralRe: Security featuresmemberJames R Opdycke II17 May '13 - 7:30 
I will. Thanks anyway!
GeneralRe: Security featuresmemberJames R Opdycke II17 May '13 - 7:11 
This is a visual basic calculator code he also gave as an example:
 
Public Class Form1

Private Sub calculateBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculateBtn.Click
Dim number1 As Double
Dim number2 As Double
Dim answer As Double

If input1TextBox.Text = "" OrElse input2TextBox.Text = "" Then
MessageBox.Show("Please Enter a Number")
ElseIf additionRb.Checked = False And subtractRb.Checked = False And multiplyRb.Checked = False And divideRb.Checked = False Then
MessageBox.Show("Please Choose an Operation")
Else
number1 = Double.Parse(input1TextBox.Text)
number2 = Double.Parse(input2TextBox.Text)

If additionRb.Checked = True Then
answer = number1 + number2
answerLbl.Text = answer.ToString()
ElseIf subtractRb.Checked = True Then
answer = number1 - number2
answerLbl.Text = answer.ToString()
ElseIf multiplyRb.Checked = True Then
If number1 = 0 OrElse number2 = 0 Then
answerLbl.Text = "0"
Else
answer = number1 * number2
answerLbl.Text = answer.ToString()
End If
ElseIf divideRb.Checked = True Then
If number1 = 0 Then
answerLbl.Text = "0"
ElseIf number2 = 0 Then
answerLbl.Text = "Cannot Divide by Zero"
Else
answer = number1 / number2
answerLbl.Text = answer.ToString()
End If
End If
End If

End Sub

End Class
AnswerRe: Security featuresmemberJames R Opdycke II16 May '13 - 11:36 
I guess it's anything I can add to my code to make it more secure
QuestionVisual Studio 2012memberJames R Opdycke II7 May '13 - 17:29 
I am just learning how to use the program. When I saved my project and closed out it left me three files.
 
Calculator.Designer.vb
Calculator (resx)
calculator.vb
 
No matter which of these files I open I have no way of opening the project and trying to compile them so I can see if my program works.
 
I would also like to know if there is anyway to turn the GUI interface back on when i reopen a project.
 
Thank you for any help you can give!
AnswerRe: Visual Studio 2012mvpRichard MacCutchan7 May '13 - 21:22 
Start Visual Studio and load the solution or project, not individual files. And press F5 to run the program. See also the Visual Studio help or get a copy of a book on VB.NET which will explain all the different options.
Use the best guess

GeneralRe: Visual Studio 2012memberJames R Opdycke II8 May '13 - 20:55 
It never saved as a project for some reason. I created a new one of the same project and got it to actually work. Thank you!
QuestionView the changes in the database by DATA-SETmemberVb Rnd4 May '13 - 7:07 
HAI

DATABASE : SQLSERVER 2005
VB : 2008
TYPE PROJECT : NETWORK

Use a separate DATASET in the draft and when I update the data or start I update the data also DATASET so you do not need to reopen Aldtasi of the new data because the size of a very large and cause slow in the project How can I find records that have been updated or deleted, or added?
Because the project network
SuggestionRe: View the changes in the database by DATA-SETmvpRichard MacCutchan4 May '13 - 7:37 
Please do not post the same question in multiple forums.
Use the best guess

QuestionCustom Templates [modified]memberJohn Simmons / outlaw programmer25 Apr '13 - 11:52 
I'm trying to create a custom temple, and I have some files in the solution that need to have the project name as their name. I have the following:
 
<ProjectItem ... TargetFileName="$safeprojectname$.dll.config">test.dll.config</ProjectItem>
<ProjectItem ... TargetFileName="$safeprojectname$.xml">test.xml</ProjectItem>
 
But when I create a new project with the template, I get a Visual Studio error saying it can't copy the file because it can't find it.
 
Anybody got any clues for me?
 
EDIT ========================
 
BTW, I also tried using $projectname$ instead of $safeprojectname$, and it doesn't matter where I put either one - I still get the error.
 
Lastly, I tried using "xyz" instead of $projectname$, and that gave me the same error.
 
This is STUPID.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997


modified 26 Apr '13 - 11:12.

AnswerRe: Custom TemplatesmvpRichard MacCutchan25 Apr '13 - 22:42 
I'm not sure what language template or what file the above belongs in, but should you not be using $safeprojectname$ rather than test in the text portions of the above statements?
Use the best guess

GeneralRe: Custom TemplatesmemberJohn Simmons / outlaw programmer25 Apr '13 - 23:25 
I tried that too, but according tot he MSDN site, I'm supposed to use the TargetFileName attribute.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

GeneralRe: Custom TemplatesmvpRichard MacCutchan25 Apr '13 - 23:30 
Sorry, I'm stumped then, I've not use this type of template.
Use the best guess

AnswerRe: Custom TemplatesmemberJeremy Rice26 Apr '13 - 5:03 
Maybe it's choking on the fact that they're named "test". Is it finding all of the other files ok?
GeneralRe: Custom TemplatesmemberJohn Simmons / outlaw programmer26 Apr '13 - 5:08 
That was a simple replacement because I was too damn lazy to type the actual entire file name.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

AnswerRe: Custom TemplatesprotectorAspDotNetDev26 Apr '13 - 6:54 
Based on this (probably what you are looking at), you also have to set ReplaceParameters to true:
<ProjectItem ... ReplaceParameters="true" TargetFileName="$safeprojectname$.xml">test.xml</ProjectItem>

GeneralRe: Custom TemplatesprotectorAspDotNetDev26 Apr '13 - 7:24 
Well, nevermind I guess. I just tried this and I get the same error:
Microsoft Visual Studio:
Unable to copy the file 'Go.cs' from the project template to the project.
Cannot find file "C:\Users\AspDotNetDev\Local\Temp\jsdgjlkgjlk.ljksd\Temp\Go.cs".

According to this, it may be a Visual Studio bug. However, if it is, it exists in both 2010 and 2012 (I tried both).

AnswerRe: Custom TemplatesmemberAlan N26 Apr '13 - 7:42 
When I try this the error message is saying it can't find the original file, e.g. test.cs, in the temporary directory used for template expansion.
 
After monitoring the temp folder with a filesystem watcher I can see the correctly renamed file, not the original file. So far so good as the file was supposed to be renamed. The issue is why after having renamed the file, does VS then stupidly look for the original filename.
 
VS appears to be using the project file to decide which files it needs to copy from the temp directory to the final location. The fix is to use replaceable parameters in the project file for any renamed files.
e.g. change
<Compile Include="test.cs" />
to
<Compile Include="$safeprojectname$.cs" />
 
I use the word fix rather than solution as now the modified project file is only good after the parameters have been replaced by template expansion. If you try and open it directly, VS will look for a file named $safeprojectname$.cs.
 
Damn tricky things, these templates!
Alan.
AnswerRe: Custom TemplatesprotectorAspDotNetDev26 Apr '13 - 7:43 
I got it working! The important missing step was to modify the .csproj file itself to account for the new dynamic filename. In my test, this was the only thing I really needed to change:
<Compile Include="$safeprojectname$.cs" />
Just so I have a full example posted here, the contents of my ZIP file are:
Properties
  AssemblyInfo.cs
Go.cs
Testify.csproj
Testify.vstemplate
The contents of AssemblyInfo.cs (GUID changed for security considerations):
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
 
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Testify")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Testify")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
 
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
 
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa")]
 
// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
The contents of Go.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Testify
{
    class Go
    {
    }
}
The contents of Testify.csproj:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Testify</RootNamespace>
    <AssemblyName>Testify</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="$safeprojectname$.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
The contents of Testify.vstemplate:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
  <TemplateData>
    <Name>Testify</Name>
    <Description>Basic C# App</Description>
    <ProjectType>CSharp</ProjectType>
    <ProjectSubType>
    </ProjectSubType>
    <SortOrder>1000</SortOrder>
    <CreateNewFolder>true</CreateNewFolder>
    <DefaultName>Testification</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
    <LocationField>Enabled</LocationField>
    <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
    <Icon>__TemplateIcon.ico</Icon>
  </TemplateData>
  <TemplateContent>
    <Project TargetFileName="Testify.csproj" File="Testify.csproj" ReplaceParameters="true">
      <ProjectItem ReplaceParameters="true" TargetFileName="$safeprojectname$.cs">Go.cs</ProjectItem>
      <Folder Name="Properties" TargetFolderName="Properties">
        <ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
      </Folder>
    </Project>
  </TemplateContent>
</VSTemplate>
I put that ZIP file in my "Visual Studio 2012\Templates\ProjectTemplates\Visual C#" folder and was able to successfully create a project from it.

GeneralRe: Custom TemplatesmemberJohn Simmons / outlaw programmer29 Apr '13 - 4:22 
That IS the answer. I tried it this morning, and it worked like a charm. Smile | :)
 
Many thanks, oh great and powerful Oz!
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

QuestionHow to get the cell that contains a certain text?memberAlek García18 Apr '13 - 16:52 
Hi, I 'm developing (trying actually) a desktop application that works well only if the word "PERIOD" is located in the cell A14(inside an excel file). But instead of that, I'd like to make it work if the word "PERIOD" is found no matter what cell it is in, provided it is inside the column 'A'.
 
That's the problem, I don't know how to search a certain word inside a column and get its cell(the 'row part' actually).
In other words I'm looking for this code: "If a cell inside column A contains "PERIOD", get the number of row".
 
Any ideas?
Thanks in advance.
AnswerRe: How to get the cell that contains a certain text?mvpRichard MacCutchan18 Apr '13 - 23:12 
This has nothing to do with Visual Studio, and since you have not mentioned what programming language you are using, or how you are accessing the Excel file, it is difficult to make a useful suggestion.
Use the best guess

QuestionVisual C++ project physical directory [solved] [modified]memberecony16 Apr '13 - 10:29 
I want to make a directory structure for my project, like:
project1\header
\source
\Lib
\resource
etc..
On my disk, I created the folders. but I don't know how to import the structure to my visual studio virtual groups.
I mean, when I moved .h files to \header folder, visual studio could not found .h files then.
 
Is there a method to let visual studio work with physical directory structures?

modified 19 Apr '13 - 11:48.

AnswerRe: Visual C++ project physical directorymvpRichard MacCutchan16 Apr '13 - 21:24 
Yes it is possible but once you have the files in place you then need to add them to the project in Solution Explorer, from their source locations.
Use the best guess

GeneralRe: Visual C++ project physical directorymemberecony17 Apr '13 - 1:58 
I tried, but the .cpp files can't find .h files.
#include "stdafx.h" for example, even I changed it to:
#include "Header/stdafx.h"
 
IDE gives:
unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
GeneralRe: Visual C++ project physical directorymvpRichard MacCutchan17 Apr '13 - 2:34 
  1. Do a Clean of your project and delete all the Debug and Release folders.
  2. Make sure that you have added all the files into the project correctly.
  3. Check that all #include statements have the correct path prefix where necessary.
  4. Rebuild the project and correct any errors.
  5. Repeat as necessary.
Use the best guess

GeneralRe: Visual C++ project physical directorymemberecony18 Apr '13 - 10:26 
I changed the project directory structure like the following:
 
project1\Header\StdAfx.h
project1\Source\StdAfx.cpp
project1\project1.vcproj; project1.sln
 
Now I got error message:
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
 
In StdAfx.cpp, only one statement:
#include "..\Header\stdafx.h"
 
Could you give me some tip?
GeneralRe: Visual C++ project physical directorymvpDave Kreskowiak18 Apr '13 - 10:51 
Hre's a tip. Try pasting that error message into Google.
 
It's very easy to fix.

GeneralRe: Visual C++ project physical directorymemberecony18 Apr '13 - 15:14 
Tried,Can't find solution
GeneralRe: Visual C++ project physical directorymvpDave Kreskowiak18 Apr '13 - 15:37 
bullsh*t. You're going to do some work for this one. Do what I told you and the very first link will solve it.

GeneralRe: Visual C++ project physical directorymvpRichard MacCutchan18 Apr '13 - 22:45 
I already told you what to do in my previous response. However, given the fact that you do not really seem to understand how this works, I would suggest you forget this idea and stick with the standard project structure as created by Visual Studio.
Use the best guess

GeneralRe: Visual C++ project physical directorymemberecony19 Apr '13 - 4:37 
I understand your previous post. and I created a test project, sure, it works.
But, the project I am working with, it seems remove old, add new location, clean, IDE still give error messages.
This is a WinCE template project, supplied by one company, will ask them how to solve it.
 
Thank you for your help
GeneralRe: Visual C++ project physical directorymvpRichard MacCutchan19 Apr '13 - 5:37 
The error message indicates that the project has not been cleaned properly, as Visual Studio thinks that there should be a precompiled header somewhere. Clean and rebuild should fix this. Since this project is not your own it would make more sense to leave it as is.
Use the best guess

Questionwhy cannot find code map in vistual studio2012 update2?memberhack00414 Apr '13 - 21:30 
i was update up update2,but right click still no see code map,,why??thanks for reply
AnswerRe: why cannot find code map in vistual studio2012 update2?professionalRichard Deeming15 Apr '13 - 1:49 
Which edition of Visual Studio? You'll need Ultimate to create code maps. Either Premium or Professional will let you open existing maps, make limited edits, and navigate code.
http://msdn.microsoft.com/en-gb/library/vstudio/jj739835.aspx[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: why cannot find code map in vistual studio2012 update2?memberhack00415 Apr '13 - 2:45 
yes,that's Ultimate version,but i not see mapcode?why?need setup it?
GeneralRe: why cannot find code map in vistual studio2012 update2?mvpDave Kreskowiak15 Apr '13 - 3:56 
If you have Ultimate, you can right-click a solution, project, or code file in the Solution Explorer and pick "Show on Code Map".
 
If you don't see this option, you don't have Ultimate.

GeneralRe: why cannot find code map in vistual studio2012 update2?memberhack00415 Apr '13 - 4:12 
now it's working,but why right click in code editor no show?,,however thank you!
GeneralRe: why cannot find code map in vistual studio2012 update2?mvpDave Kreskowiak15 Apr '13 - 6:21 
It depends on exactly what you right-click on what's going to show up in the menu and how it's worded.

Question[VC++ & XAML] keydown event bug on the touch keyboard for metrop app programmingprofessionalMember 997974310 Apr '13 - 20:58 
Hi,
I am a beginner for Metro app development and trying to use the keydown event but not the keyup event with a text box element on the XAML. I have created two key event functions (up and down) from the text box, which are the below. The problem is the keydown function works only when the key is up but not down. If I hold the key press down, the event does not come out until the key up, which is the same as the keyup function.
 
I am working to get keyboard input from the touch softkeyboard. For example, after invoking the touch keyboard with the text box element, I like to play a unique sound only when a key (e.g., 'Q' or 'K') is pressed.
 
Anyone knows how to fix this problem? I also appreciate that you can help me know the alternative way with an example source code. Thank you a lot in advance.
 

MainPage::OnKeyUp(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
{
if((int)e->Key == 112) // F1 key
{
errorText->Text = "F1 Key up";
}
 
}
 
MainPage::OnKeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
{
if((int)e->Key == 112) // F1 key
{
errorText->Text = "F1 Key down";
}
}

I just found that only space key, backspace and enter key are working for keydown but all other keys are sending the key down event when the key is released on the touch keyboard. So my question must be rephrased to how to make all other keys send the keydown event on the Keydown api? or the other apis?

Thank you.
SuggestionRe: [VC++ & XAML] keydown event bug on the touch keyboard for metrop app programmingmvpRichard MacCutchan10 Apr '13 - 21:56 
Please do not post the same question in multiple forums. This is also not a Visual Studio issue.
Use the best guess

QuestionVB - Adding to List(of String) from datagridview column/cell value [modified]memberPrissySC6 Apr '13 - 12:20 
(SOLVED) I have played with this, but I am missing the obvious. Can I borrow your brains again? (I dislike working alone.)
 
I make a selection in the datagridview. This selection is now processed in the make list handle. I bold the first column's text for identity on the datagridview. I want to keep the value from the cell in a list. I get out of range and null exceptions.
 
At this point, I do not have the cleanest code as I am working on operational aspects of the grid. So, below the instruction to bold the selected, I am counting the bolded (which works fine) for a count value on the form to be displayed, but I cannot add the "job number" to my list. And before you ask, yes the job number is a string. I checked that first!
 
Original declaration is ...
 
dim selectedJobNo as list(of string)
 
 Private Sub MakeListToolStrip_Click_1(sender As Object, e As EventArgs) Handles MakeListToolStrip.Click
 
        Dim f As Font = New Font(JobsDataGridView.Font, FontStyle.Bold)
 
        For selectrow = 0 To JobsDataGridView.SelectedRows.Count - 1
            JobsDataGridView.SelectedRows(selectrow).Cells(0).Style.Font = f
 
        Next
 
        Dim i As Integer = 0
        Dim count As Integer = 0
        selectedJobNo = New List(Of String)
 
        For i = 0 To JobsDataGridView.Rows.Count - 1
 
            If JobsDataGridView.Rows(i).Cells(0).InheritedStyle.Font.Bold Then
                count = count + 1
                selectedJobNo.Add(JobsDataGridView.SelectedRows(i).Cells(0).Value.ToString)
                MsgBox(selectedJobNo.Count)
            End If
 
        Next
        JobSelectedToolStrip.Text = count
 
        'remove highlight selection and deselect any row highlight
        Me.JobsDataGridView.SelectionMode = DataGridViewSelectionMode.CellSelect
    End Sub
 
Solution:
 

I am leaving this post in case someone tries a similar method. However, I switched to a collection! I don't know why I didn't think of this. I am so very accustomed to just using a list.
 
Here is what I did ...
1. When item selected in the DGV. I bolded the index/reference cell only. I add to the collection.
2. When removing an item from the custom selected list, I un-bold the index/reference cell. I remove from the collection.
3. When they switch between sorts, I run through the collection to bold the index/reference cells (because the DGV gets a new datasource selected based on the predefined sorts open/closed/all).
4. On request to print, I run through and add to an unbound datasource which I assign as the base for the dataset that prints the report and exports to excel.
 
Don't forget to check if the index/reference in the collection exists.
 
You might wonder why I just don't track the DGVrows? Well, the way that it works, user can select and deselect as many times on as many different sorts as the user would want (which is quite often). I did not want to keep moving these rows in and out and sacrifice any "time". I kept it simple and did not record any selections until the time at which the user decides that they actually want the selection.
 
Hope that made sense, LOL.

modified 7 Apr '13 - 17:02.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid