Hi iam trying to add objects into a combobox and use SelectedValue property to select and item in the combobox but it does not work, SelectedValue is still null after the assignment.
class ComboBoxItem
{
string name;
object value;
public string Name { get { return name; } }
...
How do I programmatically scroll to the first checked item in a CheckedListBox?
...
Hello All,
I have a question related with dataset. I wonder why am I reading wrong value from a dataset?
The field that I want to read has the value of: 2010-06-28 21:00:00
However, when I'm trying to read the first row using:
DateTime endShift = Convert.ToDateTime(ds.Tables[0].Rows[0]["rep_time_to"]);
I get: 04/07/2010 9:00:00 PM ...
Disclaimer:It's my first time developing an app that will be on a tablet style pc.
The app needs to allow a user to write notes with either a tablet pen or by touch. This must be a .net app and may be on either Windows XP and/or Windows 7. I am mainly tasked with capturing written notes from the user interface, but I am sure I will be ...
I am currently developing a Winforms Application that will run on a very specific tablet PC.
My development environment uses dual-17" monitors which are far bigger than the tablet screen size of 10.4" (1024x768).
Due to the purchasing department at my company the delivery of the tablet will not be until well into the design cycle.
...
Random r = new Random();
int sayi = r.Next(1, 49);
textBox1.Text = sayi.ToString();
This code shows the first random number in textbox1, but I also need to get the output for the other textboxes as well:
(first click)--->Textbox1: 3
(second click)--->textbox2: 24
(third click)---> textbox3: 32
...
I'm creating a HUD window for inspecting biz entities in my WinForms application.
I wanted to have a completely different style of window (minimize the content area and showing only the TitleBar, no system buttons, etc) so I created a WPF application for this.
The problem is that I want this Window to 'live' inside my WinForms applic...
I have a DataGridView databound to BindingSource which is in turn connected to a list of objects. After the data bindings are set up I'm populating the list from the background thread (using Form.Invoke of course). The problem is that the Grid is not updated. I can see in the debugger that the BindingSource contains items and DataGridVie...
Hi.
I have scenerio like this:
I have a BindingSource, typed DataSet and a ComboBox which property SelectedValue is bound to the BindingSource. On my form a have various controls but I guess the rule working for ComboBox will be applicable to the rest controls so I am describing a simplified scenerio.
To insert a new empty row I run t...
Is there any themes available for .net windows application like WPF?
how to use that.where to learn it?
...
Hi,
I want to use a tab control and have the tabs displayed on the left, as opposed to at the top. I have set the alignment to the left and the tabs are displayed there. However, how do I get the text to be displayed on the tab, vertically? I have looked at the msdn and it gives an example of a left aligned tab control but the tab la...
Hi,
In .NET Winforms, if I have some code which does something such as execute a stored proc against a SQL Server but I do not know how many parameters there are, can I add more controls to the form with the controls appearing straight away?
Thanks
...
Hey all,
I'm working with reflection and when I get the parameters' list of a method, I need to examine all of them, when I find any one which its type is an array I need to avoid it, I mean array of any kind, so I used the following which doesn't work:
(!(parameter.GetType().Equals(Array)))
The error was that I'm using a type as a v...
I am creating a windows application setup project using Visual studio 2008 setup project. This setup will have following steps:
Splash screen
Select Installation folder/directory
Database configuration
Select Components
I am having trouble finding a way to create such installation window in setup. could you please help me to find a s...
Hi all,
Say I have a global variable INT named X. Since X is global, we can assume that anything can modify its value so it is being changed everytime.
Say I have a Label control named "label". Here's what I want to accomplish:
I want to "bind" the value of label.Text to variable X. In such a way that when variable X is changed, it w...
Hi
This is a bit embarrasing but I'm not sure of the standard way to design a Windows Mobile Winforms application. Most of my experience is in Asp.NET. In particular what is the normal way to navigate between screens? I guess one way would be to have one "main" screen and open any other forms as modal dialogs. Another way would be to in...
In C#, WinForms, VS2008, .NET 3.5...
For this code:
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fal...
Hi,
I'm trying to validate a nullable datetime using the Enterprise Library Validation Block without success.
I've got a WinForm with a DateTimePicker with a visible checkbox. The DateTimePicker is bound to a nullable DateTime prooperty using a custom databinding where the parsing is done like this (if the DateTimePicker is not checked...
I have a graphical com-component from our vendor. I placed it in main form and want to draw above it. But MainForm_paint doesn't draw above that component. Is there any way to paint above that component ?
C#, WinForms, 2.0
code:
void MainForm_Paint(object sender, PaintEventArgs e)
{
using (SolidBrush b2 = new Solid...
Is there any property to set the language for datetimepicker?
When displaying the calendar, that is - if I want the week days to be displayed in Spanish, for example...
...