windows-applications

How to use SSL_CERT_FILE for OpenSSL Windows (OpenSSL 1.0.1c)

笑着哭i 提交于 2019-12-01 06:36:26
问题 How (if at all) can one define a single trusted certificate file for OpenSSL on Windows (Win-7, OpenSSL 1.0.1c) using the SSL_CERT_FILE environment variable? Various research led me to download the December '12 version of Mozilla's trusted certificates in PEM format, from here: http://curl.haxx.se/docs/caextract.html This contains all of the certs and assorted related info concatenated together into one file. I've found various references to the usage of the environment variables SSL_CERT_DIR

WMI The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

社会主义新天地 提交于 2019-11-30 15:17:50
My application requirement is like below. Application will run on domain admin system which will ping all machine under that domain, it will take disk drive, CPU and RAM details from all domain systems. Whenever I'm trying to ping machine I'm getting error that "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" Code I'm using to connect remote machine is ConnectionOptions options = new ConnectionOptions(); options.EnablePrivileges = true; options.Impersonation = ImpersonationLevel.Impersonate; options.Username = System.Configuration.ConfigurationSettings.AppSettings[

Convert Doc file to PDF in VB.Net

非 Y 不嫁゛ 提交于 2019-11-30 07:46:48
I have an situation where i need to convert Doc file into PDF file. I am devepoing windows application in vb.net. and also i don't want to user third party dll if possible. so can anyone give me some more idea ? You can use Office Interop for this. But it is better to use some managed library like Aspose using Microsoft.Office.Interop.Word; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; ... // Create a new Microsoft Word application object Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application(); //

How can I assign the 'Close on Escape-key press' behavior to all WPF windows within a project?

99封情书 提交于 2019-11-30 01:43:27
Is there any straightforward way of telling the whole WPF application to react to Escape key presses by attempting to close the currently focused widow? It is not a great bother to manually setup the command- and input bindings but I wonder if repeating this XAML in all windows is the most elegant approach? <Window.CommandBindings> <CommandBinding Command="Close" Executed="CommandBinding_Executed" /> </Window.CommandBindings> <Window.InputBindings> <KeyBinding Key="Escape" Command="Close" /> </Window.InputBindings> Any constructive suggestions welcome! All I can suggest to improve on that is

How to Avoid Multiple Instances of Different Users but Allow Multiple Instances on Single User Session

僤鯓⒐⒋嵵緔 提交于 2019-11-29 15:49:18
I have a windows application. I want to allow multiple instances for a single user session but I don't want multiple instances from different users. Put it simple, if A logs in to Windows, then he is able to run application as many instances as he likes but later, B logins as well, he should wait until all applications from A are closed. Is this possible? This requirement can be accomplished using a named Mutex Object in the global Kernel Object Namespace . A mutex object is created using the CreateMutex function . Here is a small program to illustrate its usage: int _tmain(int argc, _TCHAR*

Convert Doc file to PDF in VB.Net

…衆ロ難τιáo~ 提交于 2019-11-29 10:28:44
问题 I have an situation where i need to convert Doc file into PDF file. I am devepoing windows application in vb.net. and also i don't want to user third party dll if possible. so can anyone give me some more idea ? 回答1: You can use Office Interop for this. But it is better to use some managed library like Aspose using Microsoft.Office.Interop.Word; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; ... // Create a new Microsoft Word application

Share Config file for Web and Window App (Best Way)

↘锁芯ラ 提交于 2019-11-29 05:23:10
I have created a Class Library (Core Processing Component) using C# in Visual Studio 2008 and added the reference in Website. Website accessing the class library successfully. Web.config having some configuration values, which is used by the Class Library. Now, I want to access the same component and configuration in a Window Application (C# VS-2k8). I am able to access the same class library in window application. But, How do i Share the Web.config file of website with the Window Application? So that, i don't have to replicate the same configuration. Thanks. Update# 1 Further detail on

How can I assign the 'Close on Escape-key press' behavior to all WPF windows within a project?

巧了我就是萌 提交于 2019-11-28 22:33:06
问题 Is there any straightforward way of telling the whole WPF application to react to Escape key presses by attempting to close the currently focused widow? It is not a great bother to manually setup the command- and input bindings but I wonder if repeating this XAML in all windows is the most elegant approach? <Window.CommandBindings> <CommandBinding Command="Close" Executed="CommandBinding_Executed" /> </Window.CommandBindings> <Window.InputBindings> <KeyBinding Key="Escape" Command="Close" />

Define String ENUM in VB.Net

廉价感情. 提交于 2019-11-28 08:58:26
I am using Window Application for my project. There is situation where i need to define string enum and using it in my project. i.e. Dim PersonalInfo As String = "Personal Info" Dim Contanct As String = "Personal Contanct" Public Enum Test PersonalInfo Contanct End Enum Now i want value of that variable PersonalInfo and Contract as "Personal Info" and "Personal Contanct". How can i get this value using ENUM? or anyother way to do it. Thanks in advance... You could just create a new type ''' <completionlist cref="Test"/> Class Test Private Key As String Public Shared ReadOnly Contact As Test =

Open form with Form Name in winform appliaction

霸气de小男生 提交于 2019-11-28 05:13:11
问题 I want to ask what should i do to open form with the help or class name in winform c#? I have three different forms UserManagement GroupsManagement LocationManagement I get permission from database for these three forms in menu click i fill tag Property with the name of form like this tsmMain.Tag = item.PermissionName tsmMain.Click += new EventHandler(tsmMain_Click); what i want to do is to open form dynamically in button click and to remove these if condition? Can i do this with reflection