winforms

Exception Handling in SCSF

I have a SCSF application i am trying to handle most of the exceptions using Application.ThreadException += new ThreadExceptionEventHandler(new ThreadExceptionHandler().ApplicationThreadException); The event handler :- public class ThreadExceptionHandler { public void ApplicationThreadException(object sender, ThreadExcept...

MultiThreaded WinForms in C#

Hello there, Can anybody reccomend books or other online resources for MultiThreaded Windows Forms in C# ? I am mostly interested to learn more about this topic especially in the context of a GUI application that sends messages and listens in the background for responses from the server. Many Thanks, MK ...

Cannot Connect to Sql Server Enterprise On Local Machine

Hi all, i've sql server 2008 enterprise edition, and a c# windows form code that should connect to server. it's a local server, on my computer, and when i try to log on i get this error cannot open database "Clients" requested by the login, the login failed. login faild for user crmsys. now, this user have the right permissions,...

Security in Winforms as it is webforms

Hi I am creating an application in c# in which I want to give certain rights to admin and some to users. Since admin is the main owner so he has rights to access any user profile and alter it according. I knew that both have different login but how can I restrict the access for the user without altering anything without rights? Any ref...

C# application closing problem.

I want my application such that, it will minimize to System Tray on clicking the close(X) button. And it will only be closed by clicking a different button/menu on the main application window or clicking a system tray context menuItem. I am able to make the window minimize to tray on close. But the problem I am facing is, I am now una...

C# Windows Forms Application update when minimized

Hi! I have a windows forms application where i add the mainloop in the constructor of the form like this: Application.Idle += new EventHandler(Update); that works fine - however, my update function is not called when I minimize the application window. What do I need to do in order to get my update function called also while the...

How to make usercontrol to behave as radiobutton

i am developing tab button as user control, how can i make it to behave as radiobutton. "When the user selects one option button (also known as a radio button) within a group, the others clear automatically". thank you. ...

Get list of reports from SSRS?

I've just started working with SSRS and so far I've been able to show reports in my Winforms app using the ReportViewer, by hard-coding the report path. I would like get a list of reports from SSRS so I can display them and let the user select which one they want to see. Is there a way to request the list of reports from SSRS? Thanks....

Populating a ListView with objects from a List<>

I am currently converting what was a Console Application into a Windows Form application. Fortunatly i initially designed the application to work with a GUI in the future so there was not much code to change. I have a UserCollection class which itself holds a List<> of type User/Member (Member is derives from User). What i would like t...

Not able to capture Enter key in WinForms text box

When the user is entering a number into a text box, I would like them to be able to press Enter and simulate pressing an Update button elsewhere on the form. I have looked this up several places online, and this seems to be the code I want, but it's not working. When data has been put in the text box and Enter is pressed, all I get is ...

Communicating with a Flash Lite app and a C# WinForms app?

I'm developing a Flash Lite app that can communicate to a C# app, via Bluetooth. I'm using 32feet.NET for the C# side and its working fine. It uses RFCOMM-SPP which is a sort of bluetooth serial port. Real simple to send data back and forth. You work with bytes. But I'm struggling with the Flash Lite side. I'm trying to use the free K...

in WinForms can control focus change "automatically"? if yes, can I somehow distinguish this from user triggered focus change?

I am not fully sure about this, but I seem to be observing cases where focus shifts automatically from one control to another, even after I explicitly programmatically set the focus to control that I want to have focused. Maybe it has to do with the control in question being a panel, and it seems that WinForms is happier to have a textbo...

How to enable sorting on a PagedList<T>

Hi there! Im hoping that someone has used the very excellent PagedList from Troy Goode? Im actually using it in a Winforms app, and while it does work, I have lost the ability to sort it. Returning a PagedList, controlling the Page and Size, and binding to a DataGridView is no issue, but my biggest concern is Sorting. Now I have also ...

Call a method on a class or pass as a parameter to another class? C#

Suppose I am logging some data with a 'Job' class. (A list of business objects, with various properties, for what it's worth.) I wish to be able to print this data, so I am wondering if there is a more preferred design for doing this. I have two ideas at the moment - calling a Print() method on the Job itself, or passing a Job instance ...

How-to integrate Paypal with WinForm Desktop Application

How-to integrate Paypal with WinForm Desktop Application Maybe Server-to-Server solution ? ...

How to set the ColumnIndex of a newly added DataGridViewButton column

Hi all, I have a really annoying issue with a button cell in a DataGridView control. I'm binding the grid to a dataset at runtime. Some of the rows in the grid will be linked to pdf documents. I create a button column and add it to the grid, then I loop through the rows and based on the value of a certain column I set the text of the cel...

How-To Secure Desktop Application To Web Service Calls

Hi, How can i secure Web Service calls from a desktop application (winform) ? I first think about pass login/password to each web services methods and then check from my database of user is authorized, but i'm looking for a better way to secure that. Thanks. ...

Getting information from button1_click() to button2_click()

I am fairly new to c#. I have one winform with 2 buttons on it. button1_click() generates some data say data1, data2, data3, data4. Now I want to use this data in button2_click(): private void button1_click(object sender, EventArgs e) { //generate data1, data2, data3, data4.. } private void button2_click(obje...

Fastest way to get focused control in WinForms c#?

I'm using ProcessCmdKey in my main form window for the application to test for certain keys and give Space, Right, Left, and a few others special processing. ProcessCmdKey in the main form is called even if the user is typing in a TextBox inside a nested set of user controls. I don't want to process the Space key when they are focused on...

Is there a way to silently or automatically install .NET?

I am selling desktop software written in C# to multiple clients, and having a huge problem: The .NET install. The users of this software are not computer-savvy and usually don't have any version of the .NET framework installed, and many times don't want it. Nearly every single one of my support requests is due to someone not installing...