winforms

C# VScrollBar & HScrollBar

Hi all. In my form i have a RichTextBox. I also have a VScrollBar and HScrollBar. I set the RichTextBox property ScrollBars to None so i can use the new scroll bars for it. Thats where i hit a problem, how do i do it? I searched online and found nothing for "c# richtextbox vscrollbar" Please help. Id prefere articles instead of code so ...

Winform - which is a usercontrol last event to fire

Which is a usercontrol last event to fire when the application/control is loaded? The load event? ...

Is there a way to use .aspx pages as templates for emails being sent from a winform application?

ASP.NET is great for creating html. We send out a lot of html email messages. In the past we've been loading .html templates with key strings that are replaced to make the email more custom (ie. [[FirstName]] would be replaced with "John Doe"). However as we are adding more and more email campaigns the logic to customize the email is...

Aggregate Function not available as Article in Merge Rep Publication

I have Merge Replication set up and I just noticed that a Aggregate Function is not available on my Subscriber. After further investigation I discovered that is is not even available in the Publication as an option. There are other Functions listed there but not that one. Ideas? Is there something written that doesn't allow Aggregate...

WinForm User Controls - Drag Drop

Is it just me... but I thought you could drag/drop User Controls onto WinForms? Can't drag them to the toolbar either. Maybe I'm having a VB6 flashback. It must be missing something simple I'm doing wrong. ...

Ultragrid/Winforms Grid Hierarchy problem

I need to create a winforms grid with 3 levels, using infragistics ultragrid. Level 1 has 2 columns (Fixed) ---> Level 2 has 3 columns (Fixed) --------> Level 3 has Infinite no of columns (Dynamic based on type of level 2 item) example Level 1 Item 1 --> 3 Columns (Fixed) Level 1 Item 1 --> Level 2 item 1 --> 3 Columns (Fixed) Lev...

Populating Treeview using Linq

I'm playing with Linq-SQL and would like to display my data in a TreeView on a form. I'm also using .net 3.5, if that matters. Now, my question - is there a better way to populate this treeview? The way I'm doing it now is like this (psuedo): for each order { OrderNode = new TreeViewNode for each product in order { Produ...

Image animation stops on minimizing and restoring

I have a .NET WinForms application with an animated GIF in a PictureBox. It's a loading animation, shown while a BackgroundWorker does some processing in another thread. I load the image by setting the Image property and it animates on its own. All is fine until I minimize and restore the application. At which point, the image stops ani...

how to get usercontrol to update

This is in MSVC# 2008. I wrote a simple usercontrol that has 2 labels, 2 textboxes and 1 button. I also created a few properties for the user to set the labels' and the button's text. I added this usercontrol to a form, compiled and ran it and it worked fine. Then today I went back and added another similar property. Now suddenly...

How to set Progress bar on Message Box

I want to set progress bar on my message box how to set ...progress bar property style have Marquee property..... Message box code is bellow....... MessageBox.Show("Data process please wait .", "Data progress ", MessageBoxIcon.Information); ...

How do I override a method?

Hello, I created an OnPaint event of my button,which I lately tried to override,but I failed My code: protected override void button1_Paint(PaintEventArgs e) { } I get this error: "no suitable method found to override". What should I do to make the error dissapear,but keep the method as override? ...

Does the user control test container in Visual Studio work on 64-bit OS?

I recently moved to a machine with 64-bit Windows. When I try to debug a winforms user control with the test container that's included in Visual Studio Team System 2008, I just get an empty test container and the user control does not load. Nothing even shows up in the list of controls that can be loaded. I hope that there is something o...

Making Infragistics Winforms UltraMaskedEditor Behavior Less Weird

I decided to replace my UltraTextEditors with UltraMaskedEditors to make things a little nicer for my users. (In a WinForms App) But the (default) behavior of the UltraMaskedEditor is quite different from what I've come to expect as standard textbox behavior. 1) The first field on the form (the one that gets focus on load) now shows u...

C# Change Control.Top From 16bit to 32bit Int (WinForms)

Im working on a program which moves a panel within a form. I use a scrollbar to change the panels .Top property. However, this property will only reach -32768. In this case, i need it to go much higher (or lower o0). Is there anyway i can change it to a 32bit int so it can go upto −2147483648? edit, maybe if i clarify what i am trying...

From C# to Java. A Noob question.

I wanted to learn to program and looked at both Java and C#. I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it. With just one download, C# Express got me going. From what I saw with Java that couldn’t be done. At least not with out downloading and configuring other software. All...

how to debug Random crashes

we have a dotnet 2.0 desktop winforms app and it seems to randomly crash. no stack trace, vent log, or anything. it just dissapears. There are a few theories: machine simply runs out of resources. some people have said you will always get a window handle exception or a gdi exception but others say it might simply cause crashes. we...

LinkLabel needing more space than TextRenderer.MeasureText says

If I give TextRenderer.MeasureText some text to measure and width to use it will return the height needed to display that text. private static int CalculateHeight(string text, Font font, int width) { Size size = TextRenderer.MeasureText(text, font, new Size(width, Int32.MaxValue), TextFormatFlags.NoClipping | TextFormatFlags.WordBre...

How do I call paint event?

Hello, My program draws text on its panel,but if I'd like to remove the text I have to repaint. How do I call(raise) the paint event by hand? ...

Configuring the Package.xml for SQL Express ClickOnce Pre-Requisite install ?

I have a winform app being installed by ClickOnce and I need to be able to enable Remote Connections in sqlexpress by default. Also, I need to make sure the local user has access to the SQL instance. How do I edit the manifest file? My app is a part of a Merge Replication topology. I inherited the DAL and until I change it I cannot ...

Forbidding access to Inherited winform controls

Hi! I am writing a BaseForm to be inherited. The BaseForm has some basic standard controls of my application. The problem is: I want allow inherited forms to use and change this controls, but not remove they from the form. The biggest problem is a TabControl which Tabs must be added by users Inherited Forms. If I set "Modifiers" prope...