I am creating an winform application that will run on a tablet PC. One form for this app will have a listview control.
I would like to allow the user to change the font size based on preference (ie did they remember their glasses today). A few ways that I can think of would be a numeric-up-down or +/- button controls. Both of these...
How to use a WPF user control in a windows forms application?
...
I have a parent class that holds all of the fields that are common between all device types. From that, I have a few derived classes that each hold their unique fields. Say I have device type "Switch" and "Transformer". Both derived classes only have 2-3 of their own unique fields. When doing the UI design (windows forms) in this case.
...
I'm using .NET 2.0 with standard controls. I want to display a simple list with the following formatting:
Column1 contains a 32x32px icon
The second column contains 2 text lines:
1 Bold formatted text line
1 Non bold line
Rows are separated by a dotted line (3px space, 1px dot, 1px height)
What's the best way to do this ?
.... e...
I have Dual Monitors and want displaying a windows form in the center of the screen. (I have a variable MonitorId=0 or 1).
I have:
System.Windows.Forms.Screen[] allScreens=System.Windows.Forms.Screen.AllScreens;
System.Windows.Forms.Screen myScreen = allScreens[0];
int screenId = RegistryManager.ScreenId;
// DualScreen management
if ...
What is the difference between options 1 and 2 in the following?
private void BGW_DoWork(object sender, DoWorkEventArgs e)
{
for (int i=1; i<=100; i++)
{
string txt = i.ToString();
if (Test_Check.Checked)
//OPTION 1
Test_BackgroundWorker.ReportProgress(i, tx...
In my C# app I get an xml from a server that contains some replies like in a forum thread (with elements like author, time, body, title, whatever).
When I get this xml, I create a new form in which i want to display these replies, and a little text box with an "add reply" button. I'd also like some edit buttons on perhaps my own replies...
Is there any way to capture the time interval between mouse wheel scroll start and stop? Actually I want to capture the interval between the scrolling start and stop when I very quickly scroll the mouse wheel.
I have already looked at MouseWheel event but it don't fulfill my requirement. In senes that it always gives a value of Delta 1...
Using C# Winforms (3.5).
Is it possible to set the row colors to automatically alternate in a listview?
Or do I need to manually set the row color each time a new row is added to the listview?
Based on a MSDN article the manual method would look like this:
//alternate row color
if (i % 2 == 0)
{
lvi.BackColor = Color.LightBlue;
}...
I would like to add Copy-Paste Link functionality to an application. The application replaces a complex Excel workbook. I would like to be able to copy tables, text, and charts from the application and use Paste Link in MS Word.
For the uninitiated:
With Excel, when you use Paste Link for the tables, text, charts, etc. the items updat...
I have a .NET C# winforms application which works great on my machine, but if I try to run it on another machine, it doesn't start up. No error message, no crash message, no window - nothing.
I've found that this always happens when a referenced assembly is missing. I guess this is .NET's general behavior and not specific to my app, is ...
I'm struggling getting a certain column within my DataGridView to display things right. It had been working and I must have broken something subtly, now all I get is an empty string. Does anyone know why this might be?
// this inherits from DataGridView
this.Rows.Add(new object[]
{
"test",
new CustomType("A", "1")
});
CustomTy...
I have a text box that when it is disabled the text in it is gray and kind of dithered. (This is the standard functionality.)
Is there a way to make this easier to see?
I have tried this:
txtBoxNumber.Enabled = false;
txtBoxNumber.ForeColor = Color.Black;
and that has no effect.
NOTE: This is a .net Compact Framework app, but I...
I've got several nested classes, with the following structure:
BackupLocation contains list of BackupClients
BackupClients contains a list of BackupVersions
BackupVersions contains a list of BackupFiles
In my UI - Im populating a combo box with BackupLocations - and have several listboxes for the clients, versions, and files.
When ...
VB.NET 2008 - WinForms
Hi Everyone!
I've been looking for an answer to my problem but I only find more questions related to my problem...
The thing is that I'm using a AxWebBrowser control in VB.NET 2008 to open a excel file in a WindowsForm, it opens succesfully and everything... but the problem is this:
If I had a Excel File Open b...
For a .NET (Winforms) application are there any flip clock controls?
Ideally it would look something like the one found on the BlackBerry Bold:
UPDATE 1:
Following this SO link I have added an element host to my project to host the WPF retroclock that @Shane mentioned.
UPDATE 2:
A few steps that I followed:
Compile RetroClock
Ad...
Working in .NET Compact Framework, C#, .Net 3.5, Visual Studio 2008. Targeting Windows Mobile and CE devices from the same project (it's a CE app, runs on both types of devices).
I have a form that must be displayed using ShowDialog. the form itself is just a blank screen with a "loading..." message on it. AFTER the form displays on the...
How can I write a C# winforms code like this?
CheckedListBox items don't have 'Tag' and 'ValueMember' properties.
I know there are many alternatives to this. But I need to work it this way.
private void LoadPermissionsToCheckedListBox()
{
Role selectedRole = (Role)comboBox1.SelectedItem;
int i = 0;
foreach (Permission p i...
This is modified code I found on this site.
When appending text to a TextBox and InvoveRequired is false the text will display in the box but the next time the function is called and InvokeRequired is true the text string placed by the first call is lost (""). Multiple calls when InvokeRequired is true work as expected.
comBox is a typ...
I have single-thread windows form application written with VB.NET and targeting Framework 1.1. The software communicates with external boards through a serial interface, and it mainly consist of a state machine that run some tests, driven in a loop done with a Timer and an Interval of 50ms.
The feedback on the user interface is done thr...