windows-applications

WCF Named Pipes timeout in a WinApp, but not in a ConsoleApp?

瘦欲@ 提交于 2020-01-17 08:35:13
问题 In relation to Async two-way communication with Windows Named Pipes (.Net) which seems dead (the thread that is) :/ I'm wondering why the following code works perfectly in a ConsoleApplications, but when I do exactly the same thing with WindowsApplications I get an timeout on the client when calling "Console.WriteLine(proxy.ProcessData());". The strange thing is that the server method "ProcessData" is called without any exceptions, but still I get a timeout after the default 1 min?! How can I

WCF Named Pipes timeout in a WinApp, but not in a ConsoleApp?

情到浓时终转凉″ 提交于 2020-01-17 08:33:29
问题 In relation to Async two-way communication with Windows Named Pipes (.Net) which seems dead (the thread that is) :/ I'm wondering why the following code works perfectly in a ConsoleApplications, but when I do exactly the same thing with WindowsApplications I get an timeout on the client when calling "Console.WriteLine(proxy.ProcessData());". The strange thing is that the server method "ProcessData" is called without any exceptions, but still I get a timeout after the default 1 min?! How can I

C# SQLDataAdapter - Issues with INSERT

耗尽温柔 提交于 2020-01-16 05:05:08
问题 Please refer to the question that started it all for me: C# SQLDataAdapter - Not inserting data into DB I'm developing an archival system, well building on to it I should say. But my latest issue looks like this once I hit var rowsAffected = sqlAdapter.InsertCommand.ExecuteNonQuery(); : Additional information: The parameterized query '(@TableID int,@RowID int,@RowState tinyint,@UserID int,@XMLHisto' expects the parameter '@TableID', which was not supplied. Now here's where it potentially gets

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

夙愿已清 提交于 2020-01-10 05:25:45
问题 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? 回答1: This requirement can be accomplished using a named Mutex Object in the global Kernel Object Namespace. A mutex object is created using

cannot open window service on computer '.' in window application

三世轮回 提交于 2020-01-10 01:04:48
问题 I develop one window application and I also create one service. I start the service using coding in window application, but I am getting an error like cannot open window service on computer '.' I have used below code. ServiceController controller = new ServiceController("SeoMozScheduleService"); if (controller.Status == ServiceControllerStatus.Stopped) { controller.Start(); } If i right click on Application and click on Run as Administrator than it works fine for me... 回答1: To make this

How to build my own DataGrid for Win8 App Store?

白昼怎懂夜的黑 提交于 2020-01-06 08:46:06
问题 I have a list of items that I want to display in a table-like control, for my Win8 app store. Lets say that the object Item contains a Barcode, price and amount (all are double types). I want to present a table with different columns for each prop of this object. I would also like to present this table in a LayoutAwarePage. Any Ideas? 回答1: You can start from here : How to get a data grid like UI for a collection of Items? MyToolkit - DataGrid Usage of MyToolkit DataGrid <controls:DataGrid x

link from webbrowser to ScintillaNET editor in a same c# form?

霸气de小男生 提交于 2020-01-05 03:18:10
问题 I am new to ScintillaNET. I am using webbrowser and scintillaNET editor component in the same form. My task is when i click a link in webbrowser it should link to a text which is in editor. Any help and suggestion will be appreciated. Thanks in advance. 来源: https://stackoverflow.com/questions/27498332/link-from-webbrowser-to-scintillanet-editor-in-a-same-c-sharp-form

How to make my app singleton application? [duplicate]

拟墨画扇 提交于 2020-01-04 08:23:12
问题 This question already has answers here : What is the correct way to create a single-instance WPF application? (36 answers) Closed 3 years ago . I have a application but currently it is not a singleton application. I like to make it singleton application so that its another instance does not exit at the run time . If this can be done please reply with some sample codes . 回答1: Here are some good sample applications. Below is one possible way. public static Process RunningInstance() { Process

How to zoom picturebox along with graphics

安稳与你 提交于 2020-01-03 06:37:18
问题 I want to zoom picture box along with graphics. this will Zoom the only image part not the graphics part. public Image PictureBoxZoom(Image imgP, Size size) { Bitmap bm = new Bitmap(imgP, Convert.ToInt32(imgP.Width * size.Width), Convert.ToInt32(imgP.Height * size.Height)); Graphics grap = Graphics.FromImage(bm); grap.InterpolationMode = InterpolationMode.HighQualityBicubic; return bm; } private void zoomSlider_Scroll(object sender, EventArgs e) { if (zoomSlider.Value > 0 && img != null) {

How to set FIFO and palindrome compare?

泪湿孤枕 提交于 2019-12-25 19:42:11
问题 I have this windows application 1.- So, first when I Add a number it added to listbox1 but not to list 2. I need to be add ed to listo 2 to 2.- I need the numbers be added separately... For example if I add number 202, it split on 2 after 0 after 2 3.- I need add button for FIFO, but I don't know how can I program it. 4.-Finally compare one by one it with listbox1 with listbox2 with polindrome method, and if its palindrome show message box, say "they are polindrome", if not, say "number it's