how to get the list of all printers in computer - C# Winform
hi i need to get the list of all printers that connect to computer how i can do it in C# - Winform thank's in advance ...
hi i need to get the list of all printers that connect to computer how i can do it in C# - Winform thank's in advance ...
Normally i was creating each thread per action i wanted to do multithreaded. I was doing it like that: private Thread threadForWycena; private void someMethod() { threadForWycena = new Thread(globalnaWycena); threadForWycena.Start(); } Then when user wanted to close one of the gui's i was checking for this thread and if...
I need to be able to set an icon on a ToolStripStatusLabel item in a C# Windows Forms application. The item will being displaying an image and text. I assumed that I could use an Icon with such an item but I am mistaken. What is the best way of creating an Image object from an existing Icon object? the intended code will look something ...
This might sound like a silly question, but when I search for webservices, I get no information about how to create them in a windows forms application. The only result is how to create and expose them by creating an .aspx page. So my questions is: Can you create and expose webservices within a windows forms application or are they som...
I've "inherited" a fairly substantial Winforms project using the Infragistics NetAdvantage 2007 Vol. 2 set of components. I'm not awfully familiar with those, and how I'm facing a problem - someone who knows them probably will have a solution in no time - so here's my question: I'm tasked with creating a "Release Notes" screen, which s...
Hi Here is my problem: I have DataGridView. It's source is set to the BindingList of my business objects. Business object implement INotifyPropertyChanged interface. Each time the business object changes DataGridView fires several SelectionChanged events. When I add/remove objects to the DataSource SelectionChanged events are fired too...
I use data binding to control the datagrid, which connect to database table directly, what I want to do now is to implement the pager function on the datagrid, which I can only load 20 records from Database into memory, and display them. What do I know now is the the data binding will load all the records into database and then do some f...
There are pros and cons for both approaches. But from a managers perspective what is the best approach? ...
hi all How can I show a child form within a mdi container form which its windowstate= maximized ? when I put these below lines of code when my child form is loading (by clicking on a menu Item of my Main form), the child form loses its parent position and does not show within its parent form. private void mnuUnit_Click(object sender, ...
I've got a Form which is a mdiContainer. When the Form hasn't got a child, I want to capture the doubleClick event when a user doubleClicks the clientArea (same behavior as Photoshop). But when I set the doubleClick event, nothing happens. How can I achieve this? ...
I'm using an MVC pattern in winforms application. I need to call remote service asynchronously. So On some event in View I invoke corresponding Presenter method. In Presenter I call BeginInvoke method of service. But to View must be updated only in Main Thread. I could actualy point CallBack to some function in View, and update it`s cont...
I could use a library that implements the Finite Element Method in my winforms application. Is there available any such library for the .NET platform? ...
hi everyone, I have a serious problem with nested user controls (UCs) in WinForms while trying to implement the mvp pattern (passive view). The project consists of one model (designed as a singleton) and a set of different presenters with corresponding view interfaces. To avoid one huge view interface and therefore an overloaded main UI,...
I've got some timers that measure the time to execute code. DateTime startTimeFunctionTotal = DateTime.Now; for (int i = 0; i < array.Count; i++) { DateTime startTimeFunction = DateTime.Now; //some code here DateTime stopTimeFunction = DateTime.Now; TimeSpan durationTimeFunction = stopTimeFu...
Hello, I have a listview in which a user can browse for assemblies, the problem is that the user can add the same entry from the dialogbox. This is useless and does not account for anything, so how can i get rid of this? My question is, how does one compare with the item in the listview so that it does rule this out. Yes! There has a...
I'd like to move my project's ActiveX controls to (preferably) WPF or WinForms. My customers aren't expert .NET programmers, but they're able to use WinForms to do basic drag-drop to use my controls. I've experimented with the VS 2010 WPF designer, and it seems like the drag-drop experience is much less intuitive than WinForms. Is i...
I've one MainForm window and from that user can press 3 buttons. Each of the button starts new Form in which user can do anything he likes (like time consuming database calls etc). So i decided to put each of the forms in it's own threads: private Thread subThreadForRaportyKlienta; private Thread subThreadForGeneratorPrzelewow; ...
Hi, I'm using C#, how do I check if a checkbox is checked on a form from a class file? It's a winform app. Thanks Lee ...
For some reason, this code does not actually draw my bitmap file... or show the form. namespace GraphicsEngine { public partial class Form1 : Form { Bitmap[] dude = new Bitmap[3]; Bitmap dude0 = new Bitmap(@"C:\Directory.bmp"); Point renderpoint = new Point(1, 1); public Form1() { dude[0] = new Bitmap(@"C:...
I am constantly drawing frames, and I need the form to not flicker. How do I accomplish this? namespace GraphicsEngine { public partial class Form1 : Form { Image[] dude = new Image[3]; static int renderpoint = 0; int lastimage = 0; public Form1() { dude[1] = new Bitmap(@"C:\Documents and Settings\Boys\...