winforms

can app containing WebBrowser control download files automatically by spoofing browser behavior?

suppose I want to automatically download a file from url that is located inside an authentication-required website into which I login using automated WebBrowser control based on Internet Explorer. But, once I am there and grab the link to the file, if I try to download it directly via IE6 by navigating to it, there will be the "do you wa...

Detect wifi connectivity in c#

I am working on an asp.net (or winforms) app that is supposed to detect wifi connectivity and strength. The intention is to provide the field agents with an indicator that they can connect to our main office What would I need to detect wifi connectivity? ...

WCF security between WinForms client and Shared Host webserver

Ok, I have developed this WinForms client, which interacts with a server (ASPX Application) by means of WCF calls. I would now like to deploy the server to my shared webhost, but I'm kinda new to WCF and especially the security possibilities behind it. The goal is to kind of secure the WCF service, so that not everybody that knows or f...

Work with textBox(s) and writing in to a File and read it back from File

Hi Can someone tell me how to; work with textBox(s) and writing the information in it to a file and read them back from the file(.txt file) Thanks. ps: I want to write some text in textbox (winforms) and when i click button save all the texts in all textboxs write to a file Daniel ...

Overriding DrawItem for ListBox - unselected items are not redrawn

This is a C# desktop application. The DrawStyle property of my ListBox is set to OwnerDrawFixed. The problem: I override DrawItem to draw text in different fonts, and it works. But when I start resizing the form at the runtime, the selected item is drawn correctly, but the rest of them are not redrawn, causing text looking corrupt for u...

Exception when using secondary UI message pump for a splash screen

I have encountered an odd issue with the way I am showing a splash form, that causes an InvalidAsynchronousStateException to be thrown. First of all, here is the code for Main{} where I start the splash form: [STAThread] static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDe...

Can I stop a .Net BindingSource automatically navigating to a new record?

Using a BindingSource attached to an ObservableCollection I have a combobox displaying the items in the collection. Visual Studio automatically includes a BindingNavigator so I've enabled some features on that as well. Using the Add button to add a new item; the combobox automatically selects the new item. I assume this is because the Bi...

Exporting to CSV using Winforms (built in)

Hi, Is there a way to implement csv exporting from a datagrid, using .NET 2.0 Winforms? Thanks ...

Mutex not releasing

My c# WinForm solution contains several projects including an Admin project containing frmAdmin and a User project containing frmUser. A third project contains frmTimer that has a timer that periodically launches frmUser. I want frmTimer to not launch frmUser when frmAdmin is open. I'm using a named mutex to tell frmTimer if frmAdmin ...

draw borders around richtextbox

Hi There, How to draw border around text inside richtextbox control? ...

occur node uncheck - treeview

Is there an event fires when the user unchecks a node in Treeview? ...

DataRepeater - Right Clicking and Current Item?

Using vb and winform, and powerpack's DataRepater. When I right click on a Repeater Item that alone does not seem to make the Item that I clicked on the Current Item. How can I make the Item that was Right Clicked to become the Current Item? thanks ...

what pattern should I use to couple .NET UI to a .NET library class that will provide callback updates

Hi, What's the best approach/pattern I should use for the following? Have a C# UI solution that will have (a) Winforms/WPF UI, and (b) class library. The UI will have to start a separate thread for the routine in the class library that will be polling The class library will then need to trigger a callback function in the UI to update ...

duplicity in combo-box when i fill

hi i have this code for fill combo-box SQL = "SELECT DISTINCT Name,Num FROM MyTbl order by Name"; adp = new OracleDataAdapter(SQL, Conn); adp.Fill(dsNa, "MyTbl"); adp.Dispose(); comFna.DataSource = dsNa.Tables[0]; comFna.DisplayMember = dsNa.Tables[0].Columns[0].ColumnName; ...

Multi lingual setup for windows application?

Hi Guys, We are developing a windows application in .NET(C#) IDE used is Visual Studio 2008. We are using localization to run the program multi lingually. What we would like to know is how to make the Setup of the windows Application multi-lingual. ie: When the end users runs the setup, it asks like please select your language. On ...

Calling a method on a child form from the parent form

hi, I have 2 forms ParentForm and a child form. In my parent form I have a thread listener which listens to a feed which updates an area of the ParentForm. Now, I have a ChildForm which also needs the data from the listener to be placed on an area of the ChildForm. the thread listener uses delegate to update my ParentForm when it gets...

How to put icon in a datagrid view in C# .net 4.0 windows forms application??

Hi I need to have icons in a column of a datagridview in C# .net 4.0 windows form application. ...

C# winform Menustrip merging problem

class MDIFormMenu: System.Windows.Forms.MenuStrip { } class ChildFormMenu: System.Windows.Forms.MenuStrip { } I used MDIFormMenu on MDIForm set MainMenuStrip property and ChildFormMenu added on ChildForm. It is failed to merge. If I used same class menu on both form it works. Please help me, what am I doing wrong? ...

how can i manage the Navbar(Devxpress control) to show the Diffrent forms of the application on single winform ?

Hi, i have NavBar(navigation) like we have in Outlook for the Mail,calander,Tasks etc., when we click each button we get different view (mail detail,calander detail,To do list etc), this kind of functionality i want to achieve in my Application by NavBar. which control is best for the showing the Content for the each navigation button ...

How to solve the "Cross-thread operation not valid" Problem ?

I have a windows forms dialog, where a longer operation is running (asynchron) within a backgroundworker job. During this operation I want to change some values on the form (labels,...). But when the backgroundworker tries to change something on the form, I get the error "Cross-thread operation not valid"! How can this problem be solved ...