winforms

Problem using BeginInvoke in Managed C++ WinForms

Hello, I am seeing something I do not understand while using Control.BeginInvoke to update a WinForms form in response to an event from a backgraound thread. The app is written in Managed C++. There are four classes involved: 1) a MyMonitor class that has a timer that goes off every second or so, and examines the state of a de...

Save a datatable to excel sheet in vb.net winform application

A year ago I saw a beautiful simple code that gets a data table and saves it in an excel file. The trick was to use the web library (something with http) and I'm almost sure it was a stream. I find a lot of code with response but I can't make it work in a win-form environment. There is also a cell by cell code - not interested -too sl...

Using a Windows Form as an abstract class - which pattern to use?

I'm struggling with a situation that I come up again time and time again but I am not sure whether the way that I am doing things is wrong or whether I could be doing things in a different way. An Example: I have a Windows Form that has a DataGridView with some private methods to perform validation of the datagrid and interpreting righ...

c# List<myObject> myList.copyTo() keeps a reference?

I've got a List and I used .copyTo() method. So it copies my List into one dimensional array. So I loop this array and add each myObject to another List, then I'm changing things in this new List. After this I'm showing the difference between the new values in my second List and the old values that are in my first List. But there is a...

What is &darr; and &uparr; equivalent in Winforms?

I'm working on a legacy vb.net winform app, and would like to have have up and down arrows within my button controls. I would think i need to invoke some sort of escape character sequence to have get the equivalent of and ? ...

Vertically centered text in a multiline TextBox, is it possible?

I'm looking for a WinForms .NET control that behaves exactly like the WinForms TextBox control in multi-line mode, but instead of the text being anchored to the top of the text box, I would like the text to be aligned in the middle - vertically. So, just like there is a TextBox.TextAlign property that takes Left|Right|Center, I'd want a...

Implementing Next/Previous with LINQ to SQL

I have the code below in an attempt to allow the user to "Step Through" the Case Notes in the DB by clicking Next or Previous on the WinForm. It will grab the First Case Note only. What am I doing wrong? There has been numerous edits to this post, I apologize, but in following Jon Skeet's advice I was able to "fix" what was originally ...

setting title of msgbox?

is it possible to change the title of the msgbox in vb.net? ...

Slow startup of Clickonce winforms application after update

We have a winforms application that is deployed to users through clickonce and uses the autoupdate functionality. What we have noticed is that for our users, it takes several minutes for the application to appear after a clickonce update occurs. The application executable is running during this time with fairly high cpu usage, but no w...

Windows Forms Application Exceptions Trapping

Is there an elegant way to trap all unhandled exceptions in a Windows Form application? I would like to handle them and write them to a log file. I know ASP.NET has one. I'm using C#. ...

Winforms application menu and application UI

Hey Everyone, I am working on a little WinForm app and have been trying to find the answers to a few questions i have without any luck. Im a ASP.NET developer so WinForms development is new to me. Here is my main question: How do I create a menu system that once selected the contents will render in the Main form of the selected item. ...

Winforms or Silverlight

Hey everyone, I have a small project that I will be working on shortly that collects employees time and what project the person was working on. Pretty straight forward. I was orginally going to work on it in WinForms but since im new to that I though maybe using Silverlight for the application since I will have a learning curve for each...

is it possible to center text in a msgbox?

is it possible to center text in a msgbox in vb.net? (similar to the < center> in html) this is not centering itself: MsgBox("Thank you for using Eyes At Ease" & Chr(153) & vbCrLf & _ "You can always access this screen by clicking on the icon in your taskbar" & vbCrLf & _ "To adjust the Hue and Saturation ...

Can we query on a data set like an sql query ?

I was wondering if we retrieve a dataset in C# from SQL database .then can we query on it ...

How do i get an Image for the various MessageBoxImage(s) or MessageBoxIcon(s)

How do i get an System.Drawing.Image for the various System.Windows.MessageBoxImage(s) and/or System.Windows.Forms.MessageBoxIcon(s) ...

How to create a thread in WinForms?

I need help in creating a thread, C# winforms private void button1_Click(object sender, EventArgs e) { Thread t=new Thread(new ThreadStart(Start)).Start(); } public void Start() { MessageBox.Show("Thread Running"); } I keep getting this message: Cannot implicitly convert type 'void' to 'System.Threading.Thread what to do...

How to design the UI for settings according to different options in C# WinForm?

This is a .NET winform application question. I come to this design from time to time. A simple form. On top of the form you have a list of options to select. According to different option chosen, the body of the form displays a unique panel of setting detail. How to design this UI in Visual Studio neatly? I have two ideas. First idea i...

.NET C# (WinForms) application not receiving event when clicked on taskbar

Hi, I have a .NET application (C#, WinForms) application running on Windows XP. If i minimize my application, and have several other windows minimized to the taskbar, and click on my application (in the taskbar) then often i see the taskbar "icon" blink but my application fails to "restore" its window. Any suggestions to what might caus...

C# thread functions

Can i make any function like public void myfunc() { //some processing } a thread function by Thread t = new Thread (new ThreadStart (myfunc)); then some where t.Start(); and can i pass any type of arguments to that? ...

Code Reuse , Threading Class

C# What type of winforms or controls implement "Invoke/BeginInvoke" functions ...