I am building a named pipe service using wcf using the example given in http://www.omegacoder.com/?p=101 but I am unable in Visual Studio 2008 to be able separately execute the windows form and then the console application.
Can someone explain to me how it is possible to start separately a number of projects in a solution in Visual Studio 2008? I have tried multi starts in Visual Studio, but this does not work.
I have both projects in the same project solution, and I have tried option two in your suggestion, but when I do so, Visual Studio hides solution explorer stopping me from starting the console project. How do you get round this?
When you run your instance of your first application, press Ctrl + Alt + L this shortcut display Solution Explorer, now you able to see your other projects even first project, do the same as you do for first project.
I have the weirdest problem.
I have a method in C# that call a function from a dll in MFC which preforms LoadLibrary() to another MFC dll.
When I'm calling this C# method from the main thread, everything is works great.
However, when I'm creating a thread (in c#) and calling the same function, the LoadLibrary in the second dll gets stuck, i.e. not returns.
And i tried also AfxLoadLibrary(), gets the same problem.
I have a problem regarding multiple log files. In my project i have a GeneralLog (singleton instance) that is configured from the app.config of the application.
<!-- The DebugFileAppender writes all messages to a log file-->
<appender name="GeneralAppender" type="log4net.Appender.FileAppender">
<!-->the file where to write the events<-->
<file value="GeneralLog.dat" />
<!-->the lowest level a message must reach in order to get written in the log file<-->
<threshold value="WARN" />
<!-->a value indicating that every message is appended to the log file<-->
<appendToFile value="true" />
<!-->the message layout<-->
<param name="ConversionPattern"value="[%d] - %m%n" />
<!-- add other appenders here and the log messages will be sent to every listed appender -->
<appender-ref ref="GeneralAppender" />
This works. During the execution I create alot more (dynamically) log files from appenders defined like this:
FileAppender generalLogAppender = new FileAppender();
//Initialize the properties of the appender
generalLogAppender.Name = generalLogFileName;
generalLogAppender.File = "Log+"+ fileName + ".dat";
generalLogAppender.AppendToFile = true;
generalLogAppender.Threshold = Level.Warn;
PatternLayout layout2 = new PatternLayout();
layout2.ConversionPattern = "[%d] - %m%n";
The files are created, but nothing is written in them, only in the GeneralLog. I am really confused by this. I checked the net and of course CodeProject and found only static examples of logs, never a mixed case.
I am fighting against the Universe...
there are two ways out:
1. Modify the connection string to pass username/password credentials, instead of using a trusted connection.
2. Grant access to ‘NT AUTHORITY\NETWORK SERVICE’ to your database.
I have Adobe Reader Control in my Win Form. I am loading pdf files from Remote Server into this control.
Well, among Thousand of Files there are about 10 Files which can not be opened by Adobe Reader Control.
I am using Adobe Reader 8.0
For Test only, I copied those files from remote server to Drive C of my computer.
Then I made an application to show these PDF files.
Every thing worked correctly from my drive C.
let me mentioned that among thousands of files in remote server i can not only show these 10 files in adobe control other files are shown accurately.
Even I Tested WebBrowser Control to show these files from remote server but failure.
Let me make sure that file exists in remote sever. I am asking why these 10 files can not be shown from remote server? while i can browse these files using Adobe Reader 8.0 and the same i can browse them when i copy them to my c drive.
for sample code
i have a TreeView called "tvwProject" which in the frmLoad function i have the following code:
//tvwProject.SelectedNode = tvwProject.TopNode;
meaning that i don't want any node to be selected in the loading of the frm.
the event's flow continues to the Enter function & automatically to AfterSelect
in the Enter event -> tvwProject.SelectedNode == null
BUT in AfterSelect event -> tvwProject.SelectedNode = first node in treeView
how can i control the selected node ??
how can i see the event flow in my program ??
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison. Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
But when I installed this application on 64-bit Vista Business machine it creates problem.
Vista created Wow6432Node for registry entries of 32-bit application. It is a transparent process.
For, Step 1 it has created MyKey under HKLM\SOFTWARE\Wow6432Node\Microsoft.
For, Step 2 it has fetched value of MyKey from HKLM\SOFTWARE\Wow6432Node\Microsoft.
For, Step 3 it does not find the registry entry and return null.
Code for opening sub key in Step 2 and 3 is same..
looks like the installer works on 32-bit environment (Wow6432Node, this is absolutly transparent for the installer). The application works on 64-bit and looks up the key like on a 32-bit mashine without Wow6432Node.
is there a way to compile a installer for 64-bit sys? I'm not adept in installers.
I have retrieved data in Grid View from wizard.. I have modified 2 fields in Grid View
I need to update the same using update command using table-adapter.
Can anyone help me how to use update command...
How can i let the user insert a new values into a combobox inside of datagridview?
I have datagrigview with columns.
One of them contain 5 values that are common and there is a lot of values that the user can insert them by him self.
The problem is that if choose Combobox in the datagrid then the user can only choose the values that been insert to item list of the combobox and if i choose textbox then the user can't pick default values by click, just by writing the full name.
What can i do if i want the user to possibility to choose or to write new values?
I wrote a Web application by ASP.NET and C#. I need to change date of my server behind about 1 year ago and after that changing date came back. For example, time is 30/09/2009 and when the program runs, time should be 30/09/2008 and after 3sec time comes back 30/09/2009.
I wrote this rule by ASP.NET and C# and that web application work correctly, but for 5 days, that code can't change date of server, although web application worked correctly and could change date by below codes.
Also these codes work and can change date of server when those are written as WIN application and don't return any error, and those are written as WEB application and run in Visual Studio 2008 don't return any error and works correctly, but when those codes are written as WEB application and run in ISS can't change date of server and return "error: 1314", so I be confused!!!
I will be very glad if somebody helps me.
Thank you very much.
<pre> [DllImport("kernel32.dll", SetLastError = true)]
public static extern int SetLocalTime(ref SystemTime lpSystemTime);
public struct SystemTime
public short wYear;
public short wMonth;
public short wDayOfWeek;
public short wDay;
public short wHour;
public short wMinute;
public short wSecond;
public short wMilliseconds;