winforms

C#, WinForms: Why isn't OnPaintBackground called when I call Refresh()?

I just found a form which overrides OnPaintBackground. The weird thing is that it is never called! Like, at all. Why is this? The form is refreshed, moved, resized, etc, etc, so it should have to do some repainting right? ...

How to insert and display a new row in the string array?

Hi Friends, i want to display a new row in my listbox on my winform. I have a code like this on my backhand class. string[] a = new string[att]; //String array contains the attributes. if (attCol != null) for (int i = 0; i < att; i++) //Loop through entire attributes { a[i] = " Attrib...

Which form controls to use for a chatbox (.net)

Hi, as I am doing a small chat application in vb.net (windows form), I'm having problem for the design of my chatbox. I would like text messages to be selectable so user can copy(ctrl+v) it but not usernames which displays who sent the message. What form controls should I use in order to accomplish this and what properties to change from...

How do I change the colours of a shape drawn by a VisualStyleRenderer?

I have an application that dynamically draws a chart onto a winform. Both the chart background and the individual chart bars are drawn using a VisualStyleRenderer object: For Each rect As Rectangle In barRectangles Dim renderer As New VisualStyleRenderer (VisualStyleElement.StartPanel.UserPane.Normal) renderer.DrawBackground(e....

How to move from WinForms to WPF

I used WPF very little before and some stuff seemed very different to achieve. Coming from a winforms background, what things will seem different and take you a while to figure out. Off top of my head, I remember not being able to specify which nodes are selected in a treeview control the way it's done in winforms, if I am not wrong. ...

Where is the System.Windows.Forms.Integration namespace?

I can't seem to find it, trying to keyboard input in a wpf form spawned from a winforms form. Found this: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/442782b1-00a1-4e2e-9cc6-ae99b6699126/ But when I try to use it, VS2008 complains about not being able to find the System.Windows.Forms.Integration namespace. I couldn't find ...

Best object structure for linq to object?

I have a program that stores data in objects in memory that you can think of as small db in memory. I would like to use LINQ to Objects to run some simple queries on the in memory objects. Is there a preferred structure that I should use for the in memory objects. Are there any good resources that I should read before I get to far into t...

How can I hide a panel that is on a SplitContainer?

I want to hide panel2 on a split container and have panel1 utilize the space. I was hoping setting Panel2Collapsed would do the trick, but no luck. Ideas? ...

Servlets and JSP video tutorials

Are there video tutorials for Servlets and JSPs with the same caliber as asp.net and windowsclient.net Learn section? ...

Form loads long time, how to hide the loading and display progress ?

I am using a very component heavy form that takes long time to set up. Part of the set up is behaviour of third party controls, that I cannot gather progress on. (DevExpress XtraScheduler). This freezes the app. What properties on the form do I need to set up so the forms loads in the background and what events should I contentrate on ...

Enterprise Java Beans video tutorials

Are there video tutorials for Enterprise Java Beans with the same caliber as asp.net and windowsclient.net Learn section? ...

.NET WinForm GC question

Is this code clean? private void button1_Click(object sender, EventArgs e) { frmCustomDialog f = new frmCustomDialog(); if(f.ShowDialog() == DialogResult.OK) TextBox1.Text = f.MyCustomProperty; } Do you need to close or dispose the form f or anything? Or is it automatically garbage-collected? Thank you. ...

Java Web Services video tutorials

Are there video tutorials for Java Web Services with the same caliber as asp.net and windowsclient.net Learn section? ...

I have to make a delegate such that when my statusbar gets updated then an event is triggered and the respective text gets displayed.

I have a project in which status bar gets updated many a times. Now i want to create a delegate such that whenever my status bar gets updated then an event is triggered inside the main form class and respective text gets displayed in the status bar, so that i dont have to create a different StatusLabel.Text for everytime my status bar ge...

Resources for WinForms/WPF dev trying to learn ASP.NET

What are your best resources for a WinForms/WPF developer to come up to speed on ASP.NET? Will it take a complete paradigm shift for me to learn how to use ASP.NET or will it be a slight adjustment? I will award the answer flag to the post with a resource that gets me up to speed in the shortest amount of time. Downloadable code and c...

Flex-style view states for .Net WinForms applications?

Is there anything like Flex View States for .Net desktop applications? i.e. the ability to edit the UI using a WYSIWYG IDE per view state and a means of switching between states during run time? If not as a built-in IDE feature, maybe as a 3rd party library? ...

.NET Equivalent for Hotkey Control

What is the .NET equivalent for the Hotkey Control? ...

Windows Forms: SelectionChanged event for TextBox class

How do I get notified of a selection change in a text box in .NET 2.0? I was unable to find a SelectionChanged event or an OnSelectionChanged method. What is the best workaround for this (without having to PInvoke, of course)? ...

How to block Winforms UI while background thread is running

I've inherited a Winforms application that does a lot of long running calls into the application server from the UI thread, so the UI stays unresponsive, unusable, unclosable for quite some time. (Which makes me really go AAAAAAAAARGH!) I plan to move the server calls to a background thread and have the UI disabled - but movable & closa...

Find Packet Loss and Trace Route in .NET

Hello All: I am trying to code to capture the packet loss on computers, but the only way I've been able to do so was to run the NetStat.exe and the TraceRt.exe processes and capture them to a listbox (using the code below): Private Sub myProcess() Dim p As System.Diagnostics.Process Dim theFile, sTemp, sLineOut, mySent, myRetr...