I am trying to fill in a combobox on my winform app from the database. I know there is info in the DB. I know the SP works. It returns the correct ColumnNames. But the DataSet itself is empty? Help!?!?
Call from my form-->
cboDiagnosisDescription.Properties.DataSource = myDiagnosis.RetrieveDiagnosisCodes();
The RetrieveDiagnosis...
I am using file.readalllines to read the file into a string, then using listbox.items.addrange and splitting by vbcrlf to insert the items. Is there a way to reduce the lag it causes for loading huge lists?
...
I am trying to figure out how to set the value of the text that is displayed for each item of a list control, such as a checkbox list, but really this applies to most list controls, not just the checklistbox control.
I have a checklistbox control:
Friend WithEvents clstTasks As System.Windows.Forms.CheckedListBox
...that I usual...
hello, ive created a user control keyboard.. when you click on abutton in the keyboard the button_click event is thrown and a string is get a parameter example when clickin on button C
CButton_Click
{
txt="C";
}
i need to catch that event outside the user control... so that when clickn on the button a textbox is filled with the string....
Do you know some higher level Framework Library which sits on top of Windows Forms?
Tasks:
Command Management
Master/Detail Form Management
Record Navigation
Input Validation
etc.
Of course, I could do this all by myself but I don't want to reinvent the wheel.
(sorry for my broken english!)
...
Hi
is there a way I can change the color of the form's controlbox in a .NET winform application i.e the box the has the close-minimize-maximize buttons? I need to change that blue color to match the colors of the different controls within that form.
Thanks in advance !
...
Hi, I am quite new to windows forms. I would like to know if it is possible to fire a method in form 1 on click of a button in form 2?
My form 1 has a combobox. My form 2 has a Save button. What I would like to achieve is:
When the user clicks on Save in form 2, I need to check if form 1 is open. If it is open, I want to get the instance...
Is there a .NET WinForms grid that supports multiple scrollbars, by dividing the grid up into N parts, horizontal-wise, and having a scrollbar for each part?
Example:
|---- Part 1 ---|---- Part 2 ---|---- Part 3 ---|
| Col 1 | Col 2 | Col 1 | Col 2 | Col 1 | Col 2 |
|<****=========>|<****=========>|<****=========>|
Each of those part...
These codes generates us this error:
Cross-thread operation not valid: Control 'progressBar2' accessed from a thread other than the thread it was created on.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.T...
I have a usercontrol that contains a FlowLayoutPanel (topdown flow) with a bunch of radiobuttons. The control exposes a CheckedChanged event that fires whenever one of the radiobuttons's check changed.
My form contains the usercontrol and a textbox. I subscribe the usercontrol's CheckedChanged event and depending on which radiobutton ...
I have been tasked to add an on-line help file to a windows application. So I have several questions in my mind:
How do you create help files and how
do you add them to a Windows Forms
project?
Is there a good way to handle them in
a VS solution?
Is there a tutorial on how to do
this?
...
I have a winform app that fills a lot of its dropdomn fields fram a maintenance table at runtime. Each Form has a Private void FillMaintFields()
I have run into a strange error where setting the column visibility on 1 form works but on another gives me an index out of range error!
Here is the abriged method on the offending form -->
...
For one reason or another, I have a need to detect when the user actually clicked on the X button. What I have so far is this:
protected override void WndProc(ref Message m)
{
if (m.Msg == (int)0xa1) //WM_NCLBUTTONDOWN
{
Point p = new Point((int)m.LParam);
p = this.PointToClient(p);
...
I have a Control that can overlay multiple C# user controls in my GUI. This control has a semi-transparent background in order to 'grey-out' portions of the GUI and the class looks somethink like this:
public greyOutControl: UserControl
{
// Usual stuff here
protected overide OnPaint()
{
paintBackround();
b...
I have created a custom control (the control is used for drag and drop) and I want to add focus and selected events to the control. Both need to be visually distinct. So I plan to implement a windows style for both of these events. For focus I have the control drawing a solid and a dotted line around the control using the following code ...
What is the difference between a Control and a UserControl in .NET WinForms? I want to create a custom control, but which one should I inherit from? I've always used Control in the past without any issues, but is the "recommended" way of creating a custom control?
...
Normally, when tabbing through controls on a form, when the focus is set to a CheckBox control, the text is outlined to show focus.
I am using a CheckBox without the text (so only the box is displayed). How can I force the focus outline to be drawn around the box instead of the text?
...
Hi,
I have a winforms form which is inherited from another form.
e.g.
class StartForm : aSyncDialog
aSyncDialog has an onload event
protected override void OnLoad(EventArgs e)
I have noticed that the load event in StartForm is not firing but the OnLoad one is.
private void StartForm_Load(object sender, EventArgs e)
Any idea wh...
I'm writing a desktop application in C# and .Net 2.0 that consumes webservices and i'm making provision for the case when the app is behind a proxy server, like with the example in this question.
It's a great idea and will set my app.config the same way, but right now I want to test the connection by providing the username and password....
I don't know why this is happening, but when I create a new form inside an EventHandler, it disappears as soon as the method is finished.
Here's my code. I've edited it for clarity, but logically, it is exactly the same.
static void Main()
{
myEventHandler = new EventHandler(launchForm);
// Code that creates a thread which cal...