visual-studio-2010

Writing information from Combo-box to text file

前提是你 提交于 2020-01-05 09:04:40
问题 I am trying to right the information from a combobox into a text file so it can be saved. If the information in the combobox is John, Marry, Jack I would like it to appear in the text file like this: John Mary Jack The code I currently use give a result of JohnMaryJack in the text file For Each item As Object In cmbworld.Items Dim test As String test = item sb.AppendFormat("{0}", item) Dim FILE_NAME As String = "D:\Documents\test.txt" If System.IO.File.Exists(FILE_NAME) = True Then Dim

VB2010: Connect to SQL Server 2008

左心房为你撑大大i 提交于 2020-01-05 08:41:44
问题 I have a database on SQL Server 2008 and am trying to run code on Visual Basic 2010 to connect to it. I have the following code but am getting the error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) on

How do I get the signature image from a smartcard with C#?

牧云@^-^@ 提交于 2020-01-05 07:38:16
问题 I'm developing a C# application to certify pdf documents. I've got the certification process done but now I need to take the signature image stored in a smartcard and place it in the given PDF file. The code used to get the certificates is this: public static X509Certificate2 GetCertificate() { X509Store st = new X509Store(StoreName.My, StoreLocation.CurrentUser); st.Open(OpenFlags.ReadOnly); X509Certificate2Collection col = st.Certificates; X509Certificate2 card = null;

How do I get the signature image from a smartcard with C#?

亡梦爱人 提交于 2020-01-05 07:38:07
问题 I'm developing a C# application to certify pdf documents. I've got the certification process done but now I need to take the signature image stored in a smartcard and place it in the given PDF file. The code used to get the certificates is this: public static X509Certificate2 GetCertificate() { X509Store st = new X509Store(StoreName.My, StoreLocation.CurrentUser); st.Open(OpenFlags.ReadOnly); X509Certificate2Collection col = st.Certificates; X509Certificate2 card = null;

C++/CLI DLL project stops linking after conversion from VS2008 to VS2010

廉价感情. 提交于 2020-01-05 07:34:15
问题 I converted a perfectly working Managed C++ DLL project that uses Unmanaged C++ LIBs from VS2008 to VS2010. Beforehand I separately rebuilt the LIBs with VS2010 (they are part of another project that I have no authority over). However, after conversion my managed DLL project stopped linking giving me few dosen of LNK2001 error messages (see the sample below). All errors about "std" entities defined within "string" and "iosfwd" headers. Which compiler/linker settings am I missing? Thanks in

OOTB way to check for admin permissions before running VS2010 Installer MSI?

蹲街弑〆低调 提交于 2020-01-05 07:26:24
问题 I'm creating an installer for a 3rd Party ActiveX DLL running in IE7-9 on XP-Win7. The MSI should perform the following: Check for admin permissions. Notify the user and exit if insufficient permissions. Check for previous version. If it exists unregister or overwrite it. Install the DLL with vsdrfCOM so that it is recognized in the IE add-on menu. For (3), I set the vsdrfCOM but it didn't seem to work. I don't see an OOTB way to perform (1) or (2). Is that correct or is there an OOTB way?

How to add ZedGraph Control to Toolbox in wpf?

五迷三道 提交于 2020-01-05 07:25:10
问题 I added zedgraph.dll to my wpf application. There after i add that control to my toolbox. But it is not add to my toolbox in wpf application. But it add in WinForm Application. Anybody have solution for this problem? 回答1: xmlns:zed="clr-namespace:ZedGraph;assembly=ZedGraph" Add WindowsFormsIntegration to your references Add this for example..: <WindowsFormsHost Name="windowsFormsHost1" Margin="500,0,0,0"> <zed:ZedGraphControl x:Name="graph" Width="500" Height="320" /> </WindowsFormsHost> see

How to add ZedGraph Control to Toolbox in wpf?

▼魔方 西西 提交于 2020-01-05 07:25:09
问题 I added zedgraph.dll to my wpf application. There after i add that control to my toolbox. But it is not add to my toolbox in wpf application. But it add in WinForm Application. Anybody have solution for this problem? 回答1: xmlns:zed="clr-namespace:ZedGraph;assembly=ZedGraph" Add WindowsFormsIntegration to your references Add this for example..: <WindowsFormsHost Name="windowsFormsHost1" Margin="500,0,0,0"> <zed:ZedGraphControl x:Name="graph" Width="500" Height="320" /> </WindowsFormsHost> see

Project reference properties - Version number

ぐ巨炮叔叔 提交于 2020-01-05 05:54:27
问题 I have a Visual Studio project that references an assembly that I also created. Below is a screen shot of the properties of my assembly reference in the project. When I update my assembly version to 1.1.0.0 , my project fails, and I am thinking this property is the issue. Since the Version attribute says 1.0.0.0 , does this mean it will always look for my assembly that has a version of 1.0.0.0 ? And incrementing my version to 1.1.0.0 will cause my project to not see the assembly at all? 回答1:

Project reference properties - Version number

╄→尐↘猪︶ㄣ 提交于 2020-01-05 05:53:46
问题 I have a Visual Studio project that references an assembly that I also created. Below is a screen shot of the properties of my assembly reference in the project. When I update my assembly version to 1.1.0.0 , my project fails, and I am thinking this property is the issue. Since the Version attribute says 1.0.0.0 , does this mean it will always look for my assembly that has a version of 1.0.0.0 ? And incrementing my version to 1.1.0.0 will cause my project to not see the assembly at all? 回答1: