all groups > dotnet windows forms > february 2005 > threads for february 8 - 14, 2005
Filter by week: 1 2 3 4
Vertical scrolling for windowsforms in c#
Posted by christext NO[at]SPAM gmail.com at 2/14/2005 11:25:10 PM
hi all,
i need to create vertical scrollbar dynamically for the controls
that are created dynamically in the form. (i'm not adding any controls
to the panel). when the form exceeds(coz of dynamic controls creation)
the default system coordinates, vertical scroll bar should be
dynamic... more >>
How to create an click event in a form automatic(C#)
Posted by Baboon at 2/14/2005 10:53:09 PM
Hello
Now i have try create an click event in a form,so i doubleclick the form,but
the IDE create an form_load event automatic:
private void Form2_Load(object sender, System.EventArgs e)
{ }
but the code i need is:
private void Form2_Click(object sender, System.EventArgs e)
{ }... more >>
specified cast is not valid.
Posted by Ansari at 2/14/2005 11:12:43 AM
hi all,
I have a windows application which is developed in VB.NET.
I have used some bitmaps and set image property of button.
Some time I load form programmaticaly.. following error pops up
1) Specified Cast is not valid
it is on the following line of code.
Me.Button1.Image = CType(resourc... more >>
help:how to design panel in visual way without form
Posted by Yang_He at 2/14/2005 10:20:05 AM
I have to write some code to change the panel which contained in the forms,
but is there anyway just design the panel without putting it in the
form.Thanks forward!
... more >>
label.visible does not work
Posted by bugym at 2/14/2005 9:25:06 AM
I'm developing a quite comlex form containing a user control in C#
In the user control I'm trying to set a simple label to be visible:
labelState.Visible = true;
The debugger showns me, that the labelState.Visible is false
before entering this line of code.
But it is still false after thi... more >>
format grid cell
Posted by Mike at 2/14/2005 6:01:06 AM
On my grid i'm defining what data to show, colors, etc. Now, I have one
column were i need to show the time instead of seconds, I have the code to
convert time to seconds, but how can I get that into my grid?
i have
sub GridFormat()
... more >>
child mdi forms in different threads
Posted by yadavab at 2/14/2005 3:27:04 AM
Hi,
I want to open up a number of child forms in my main mdi container form, but
I want the processing that will happen in each child to happen in a different
thread. I tried something like this:
ChildForm childForm = new ChildForm();
shildForm.MdiParent = this;
Thread thread = new Threa... more >>
ColumnHeader. Is the (Name) a design time property? Or something e
Posted by ALWIZ New at 2/14/2005 1:27:01 AM
Hi,
Is it possible to retrieve the (Name) value from ColumnHeader property? I am
trying to get the value through PropertyDescriptor / PropertyInfo, override
it through new property but it does not seems to work or it is not available
to access. How can I actually do that programmatically i... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Secretion of documentation for Controls hosted in IE ?
Posted by B.J. at 2/14/2005 1:17:04 AM
Hi,
I develop .NET control which will host in IE (like applet). I want to set
value of <INPUT> from this control. Is it possible.
If no, is possible to change something in client-side from this control ?
P.S.: I browsed .microsoft.com and also I tried to find something in
google.com about... more >>
UseMnemonic
Posted by Siu at 2/14/2005 12:17:03 AM
Hi,
does a property UseMnemonic exist for a Button control?? I've created a
button with this property:
Button.Text = "&Add new record";
Button.Name = "btnMyButton";
The & should allow a easy access with the keyboards... but it doesn't work:
with Label is easy thanks to the UseMnemonic pr... more >>
WinForms Interaction
Posted by Ignacio Estrada via DotNetMonster.com at 2/13/2005 4:42:01 PM
Hi, I want to have interactions between two forms. A will sample with next
lines:
1. The program user has a main window with a Listview control on it
2. The user selects an item from the listview and selects some 'details'
option.
3. The program responds showing a child window with details fo... more >>
transfering info between forms in Visual Basic
Posted by iwdu15 at 2/13/2005 4:21:03 PM
How can i transfer information that user inputs from a textbox in one form to
a label in a second form?... more >>
Fixing form size in design mode from base form
Posted by SteveB at 2/13/2005 12:07:02 PM
Hi
Does anybody know of a way to fix the size of inheriting forms by setting a
size in a base form. I would like to remove the ability of developers to
change the size of a form (in design mode) if they inherit from a particular
base form. I know you can override the SelectionRules property ... more >>
ListBox resize problem
Posted by Marcin J. at 2/12/2005 5:07:24 PM
Hi,
Iam new to windows forms so maybe this problem was discussed already (tho I
could not find anything on google).
I have added and docked to the left a ListBox, now when I resize Form, list
box resizes correctly in Width, but in Height it does not change its
position smoothly. I mean t... more >>
Mouse capture for custom context or drop-down menus
Posted by Fardreamer at 2/12/2005 7:25:42 AM
Hello,
I'm implementing an undo/redo drop-down menu similar to the undo/redo
menus in VS.NET 2003. The idea is that when the drop-down arrow is
pressed, a floating ListBox control appears under the pressed button,
and disappears when the user chooses an action to undo or clicks
anywhere else ... more >>
Winforms Datagrid - detecting SORT
Posted by Lee Gillie at 2/11/2005 4:50:15 PM
I'm trying to find an event that will help me keep a status area updated
for the grid row under the cursor.
For the most part when a user clicks somewhere in the readonly grid I am
responding to the cell change event, and selecting the entire row. A
custom paint reverses colors. This works ... more >>
MessageBox bug?
Posted by Wayne at 2/11/2005 4:48:35 PM
I posted this in microsoft.public.dotnet.languages.csharp with name of "Bug
in Framework?"
Drop a timer on the form, set it's interval to 1000 and put this in for the
timer event:
timer1.Enabled = false;
MessageBox.Show("TEST");
Run the application and make sure to take focus away from t... more >>
Losing data
Posted by katie at 2/11/2005 4:05:31 PM
Not sure how to explain this problem so here it goes... I have two forms and
I want to copy data from one form to load into another. Now this seems to be
working but the problem is the various controls seem to be populated before
the bindingcontext is finished. Therefore erasing my preload dat... more >>
How to create a Transparent Window
Posted by Sebastien Girard at 2/11/2005 4:02:18 PM
Hello,
I am using the IE WebBrowser (shdocvw.dll) inside my form and use it to
display an HTML background in my form. I also want to capture mouse events
that occur on the browser (Mouse Down). To do so, my class implements
IMessageFilter to pre filter messages and do special stuff on Mou... more >>
Why does the user control's load event fire when components.Dispose() executes?
Posted by moondaddy at 2/11/2005 2:58:22 PM
I have a user control on a form and when I close the form.
This is the first event that fires:
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is No... more >>
User interface
Posted by ChrisB at 2/11/2005 1:45:46 PM
How would I code a program to take information entered in a text box on
a form and use it or a pointer to use the information in a different
part of the program?... more >>
Forms inheritance with UIP 2.0
Posted by gwenda at 2/11/2005 1:25:04 PM
Hi,
We are using UIP 2.0 and we encountered a problem when trying to inherit
from a form that inherits from UIProcess.WindowsFormView. Our base form have
an onLoad event handler that call its controller:
private MyController myController
{
get
{
return (MyController)this.Contr... more >>
Interface Design
Posted by hberenguel at 2/11/2005 7:31:03 AM
Hello there. I will start a new software development and I would like to put
in it
the same look and feel of Microsoft Money 2005 Edition. If you spend a few
moments using it, you will that it´s nice! really nice the way the software
handles the things with its interface. I will use C#, but ... more >>
How do I Bind to a DataView instead of a DataTable
Posted by Jay Pondy at 2/11/2005 6:01:04 AM
I have a strongly typed dataset that I have been able to bind to a DataGrid
and other associated controls such that selecting a name in the DataGrid
displays the record in the associated controls using DataBinding and the
CurrencyManager. Add, Update and Delete are all working great.
Abov... more >>
is this possible
Posted by Mike at 2/11/2005 5:23:05 AM
I have a winForm and i need to display my data in this format and this format
only. Is this format possible with any control supplied with .NET Windows
Application?
header data: BMW Porsche Lexus
left column
data:
1/5/05 2 car... more >>
Databinding Null (VB Nothing) values
Posted by David Jessee at 2/11/2005 1:55:03 AM
I have a listbox who's dataSource is an array of Classes of the type
Discount. and this listbox is bound to a Customer's Discount property.
Customer c = CustomerFactory.GetInstance(2342);
Dicsount[] d = DiscountFactory.GetAll();
ListBox1.DataSource=d;
ListBox1.DisplayMember="Description";
L... more >>
Free Mock test for MCP
Posted by Vijay at 2/10/2005 6:36:14 PM
Hi,
Do u have any site-links for the mock test of MCP exams(C#)?
Thanks and regards
... more >>
Visual Studio 2005 beta
Posted by Andy at 2/10/2005 5:15:32 PM
How to use oleDbConnection and oleDbDataAdapter to generate typed dataset?
oleDbConnection and oleDbDataAdapter are not on the toolbox. Datasource and
connection generated by Data Source Connection Wizard doesn't suit me.
TIA
... more >>
Strange exception behaviour
Posted by Jos Beelen at 2/10/2005 11:55:59 AM
Examine the following code fragment used from within the
main form of a windows forms application when clicking a
button:
private void button1_Click(object s, System.EventArgs e)
{
try
{
Form2 f2 = new Form2();
f2.ShowDialog();
}
catch (Exception ex)
{
MessageBox.Show (... more >>
MemoryStream??
Posted by Charles A. Lackman at 2/10/2005 11:52:57 AM
Hello,
I am working on an updater that Retrieves a file from a web page.
GetRequest.Method = "POST"
SW = New StreamWriter(TheRequest.GetRequestStream)
SW.WriteLine(TransferName)
SW.Close()
TheResponse = TheRequest.GetResponse()
ms = New MemoryStream()
CopyData(TheResponse.GetResponse... more >>
Thsi isnt working: If Me.DesignMode = True Then Return
Posted by moondaddy at 2/10/2005 10:31:52 AM
I have a user control (uc2)which lives on another user control (uc1) on a
form (a nested user control). When I open the form in design view the the
load even fires in uc2 so the first line of code in the in its load event
is:
If Me.DesignMode = True Then Return
However, it doesnt work a... more >>
Exception in ListView.OnHandleDestroyed
Posted by Christian Wilhelm at 2/10/2005 9:51:13 AM
Hi!
Sometimes (not reproduceable) I'm getting an NullRefException from
ListView.OnHandleDestroyed()-Method.
Can somebody tell me, why ListViewItemCollection.get_Item() is being
accessed, when the Handle of the ListView ist already destroyed?
....
3) System.NullReferenceException
2) ListVi... more >>
grid
Posted by Mike at 2/10/2005 6:03:05 AM
Is it possible to hide the "gray" column on the left side of the datagrid,
and is it possible to put data in there if i can't hide it?... more >>
TabControl wiht Alignment left and horizontal Text
Posted by Edi at 2/10/2005 1:11:03 AM
Hello
Is it possible to create a TabControl with Alignment Left and horizontal
Text for the TabPages?
Thanks Edi... more >>
Variable
Posted by mgalesic at 2/9/2005 9:37:11 PM
In VB.net
How could I access variable in Form2 declared in Form1.
Thanks!... more >>
Assign New CurrencyManager?
Posted by Hemang Shah at 2/9/2005 8:03:40 PM
I have the in famous multi combo on the form bound to the same DataSource
Issue.
I have a dvLookup which is used in multiple comboboxes to do the lookups.
How because they are all having the same DataSource: dvLookup, they have the
same currencymanager.
So selecting one option makes eve... more >>
Repost: UnsafeNativeMethods.CallWindowProc NullReferenceException
Posted by Matt Garven at 2/9/2005 6:31:02 PM
(apologies for the repost, I believe we've got our MSDN subscriber passport
correctly associated with our no-spam alias this time)
We are receiving error reports with NullReferenceExceptions from our users
with stacks like the following:
at System.Windows.Forms.UnsafeNativeMethods.CallWind... more >>
Need Graphical Tooltip
Posted by RichM at 2/9/2005 2:29:02 PM
I need to make a control that behaves like a tool tip, but I need to be able
to draw on it and I also need to show it on demand, not necessarily during a
mousehover event.
The problem with deriving from Control, is that you get the window frame
when you make the control a top level control.... more >>
app running slowly after used for a while/memory mgt
Posted by TS at 2/9/2005 1:48:30 PM
I have an application that is in production and every so often, i am told it
becomes slow and nearly unresponsive, so they have to reboot it, then it
works fine. I am wondering what the problem is. i imagine the code has a
memory leak somewhere. i can't confirm that a lot of memory is used up on
... more >>
Application.ThreadException Doesn't Work Right. Why?
Posted by James Hancock at 2/9/2005 1:46:34 PM
Here's the problem that I'm having.
Our application in debug mode doesn't link in Application.ThreadException,
it only functions when in debug mode. (did this with a compile directive) so
that we get errors on the right error line etc. Makes everything easier for
debugging in debug mode. Ho... more >>
EnableThemingInScope Error???
Posted by Ashton at 2/9/2005 1:37:09 PM
I am getting the following error when starting a winform app that causes the
app to simply hang and I have to end up killing it from taskmgr
Error loading main form : Object reference not set to an instance of an
object.
at System.Windows.Forms.EnableThemingInScope..ctor(Boolean enable)... more >>
How do I use Ctrl + Tab as one of the shortcuts in my menu item
Posted by dmsy NO[at]SPAM yahoo.com at 2/9/2005 12:41:00 PM
I tried using the Keys enumeration:
(Shortcut)(Keys.Control | Keys.Tab)
but it does not work.
... more >>
Disappearing text
Posted by josh NO[at]SPAM goldshlag.com at 2/9/2005 12:32:56 PM
I have a windows form application that works great on nearly all the
machine we have tested it on. We just got a new machine. When I run the
application on that machine, all the static test labels in my dialogs
are blank. I also have a message box that is showing up with no text in
it. It seems ... more >>
LinearGradients in DataGridColoredTextBoxColumn
Posted by Rob Oldfield at 2/9/2005 12:26:28 PM
I'm using the DataGridColoredTextBoxColumn class (the VB version) -
http://msdn.microsoft.com/smartclient/community/wffaq/ctrlsp.aspx#4umuvlol
to colour cells in a datagrid on a windows form (VS 2003) and, for the most
part, it's working fine. One slight issue though...
If I use
backBr... more >>
treeview,afteselect
Posted by Fred Herring at 2/9/2005 10:19:04 AM
How can select a node with a right mouse click?
Fred Herring... more >>
using user control in form & using design time question
Posted by TS at 2/9/2005 10:01:30 AM
Im used to using web forms and adding user control info at design time in
html. The example i have for a win form is that the user control must be
compiled then you add it to the toolbox then add it to the form to put it
on.
How do i add the control without having to compile it first and also ... more >>
Opacity and WM_NCCALCSIZE
Posted by Brian Westover at 2/9/2005 9:51:09 AM
I have a form which has a custom Non-client area. When the note is activated
the NC area is inflated, keeping the client area at the same location on the
screen. I manage the size of the NC area using the WM_NCCALCSIZE message and
paint it during the WM_NCPAINT. All works well as long as I d... more >>
openning a messagebox during form load
Posted by Nkem at 2/9/2005 9:45:02 AM
Any such thing as postopen event?
I have a form that loads data and after loading informs user of missing
information via a messagebox. My problem is that the messagebox appears
before the form opens. I would like the form to finish openning then have the
messagebox open on top of the form.... more >>
Status Bar Updating and SQL Connections
Posted by Max Turavani at 2/9/2005 6:51:01 AM
Hi,
I have a simple Windows Forms app that connects to a SQL server, extracts
about 50,000 records and saves them to a file. During the query, I have a
small bit of text on a status bar that increments a period (.) every second
to show the user that the app is still running and not hung. I ... more >>
PrintPage and table format
Posted by Siu at 2/9/2005 6:35:11 AM
Hi,
does anybody have an example of PrintPage event which builds a PrintDocument
as a table and handles also the size of columns contents like this:
Title1 |Title2 |Title3
================================
first cell has |second cell |also third
a t... more >>
Close form a from form b
Posted by Chris at 2/9/2005 5:13:02 AM
Hello,
How can I close one form (formA), from an event on another form (formB)?
TIA... more >>
Inner forms
Posted by Jan at 2/9/2005 4:05:02 AM
Hello,
I have main form like Windows Explorer. But in the right part I want to have
another form. How could I do it? How could I insert form into main form.
Jan... more >>
how to put LinkLabel in DataGrid's column
Posted by Maulin Vasavada at 2/8/2005 9:15:17 PM
Hi,
I am trying to develop Windows Forms application (not Web.UI stuff),
and
I wanted to put LinkLabel in the DataColumn of DataGrid but I am not
able to do so. I got this below link where the guy extended
DataGridColumnStyle to have combobox but I can't figure out how to put
LinkLabel inste... more >>
Assigning menu-shortcuts at runtime
Posted by Per Rollvang at 2/8/2005 5:34:57 PM
Hi All,
I got a recent-files-list on a WinForm, that gets added from a string-array
(string[]) at Form_Load, and I have difficulties assigning shortcuts to
them. I want the shortcuts to be Ctrl0,Ctrl1,...etc, based on how many items
I have in my list (max 10 items).
Is there any elegant ... more >>
Modal dialog after Application.Run returns
Posted by Harold Howe at 2/8/2005 4:02:31 PM
I would like to display a modal dialog after Application.Run returns. In
this particular case, it is a dialog to inform the user that some
cleanup code suffered catastrophic failure.
I have discovered that forms cannot be shown modally once Run returns.
Is there a way to alter this behavior... more >>
clone a control including it's events
Posted by Ren Reyes at 2/8/2005 1:39:08 PM
i have a textBox1 control and i'm handling it's double click event thru
textBox_DoubleClick(object sender, System.EventArgs e). now is there a way to
clone this control at runtime including it's event(s) so that when i
double-click the cloned control, textBox_DoubleClick() would get called?
... more >>
Why the order of tabPages was changed.
Posted by Andrew at 2/8/2005 1:05:03 PM
Hi, friends,
In my C#.net Windows MDI app, I have a Tab control. I added 12 tabPages in
the desired order to it.
However, when I run it, the order of tabPages was changed. I could not
figure out why. Any ideas? Thanks a lot.... more >>
Taskbar grouping
Posted by Sebastian Mark at 2/8/2005 11:55:41 AM
in winxp and up, where the task bar collects multiple windows of one
application under a common button, the common button for my program
written in .NET has a number, instead of a number and a name
Does anyone know what is going on?
Thanks
Sebastian... more >>
How do I Deserialize an Object from different assembly?
Posted by RapidFireBill at 2/8/2005 11:29:02 AM
I have a HashTable which has keys and values which are defined in a Class
CRoutePoint.
I have [Serializable] at the beginning of the CRoutePoint class.
CRoutePoint is in the NameSpace "MissionLibrarySuiteIII".
For example:
Hashtable m_hshPntsRoute = new Hashtable(NUM_NAV_POINTS);
... more >>
how to genrate a text string with bullet indentation
Posted by Linda Chen at 2/8/2005 11:08:04 AM
I need to genrate a text string from my application and
submit the string to my client throught a website. My
client ask us to generate the string with their "format".
That means in side my string I need to have white space
and indentation. For example, the string may look like:
"A. this ... more >>
WinXP and GroupBox painting problem
Posted by Tom at 2/8/2005 11:06:42 AM
I must be missing something or there is a bug in control... GroupBox text is
not painted correctly if located in another GroupBox when visual styles are
enabled (Application.EnableVisualStyles()). FlatStyle was set to System and
font size 8.25pt, however text is painted like font size was ~16p... more >>
Windows Forms Drawing Problem
Posted by Nathan Ernst at 2/8/2005 10:45:03 AM
The problem I am having is that under certain circumstances,
text fails to draw in some controls and dialogs. The problem
occurs primarily in the drawing of ListControls and any Dialogs
generated via MessageBox.Show. In the ComboBox, the items are
in the dropdown, and can be moused-over, h... more >>
Date and time picker
Posted by Sergio at 2/8/2005 8:59:09 AM
I need a date and time picker that allows me to choose a date from a calendar
and a time from some kind of clock. I need something that will allow the user
to choose a time and a date without having to type anything, and I need this
to be in a single control.
Does this thing exist or do I h... more >>
Double Buffering in PictureBox
Posted by TyBreaker at 2/8/2005 8:00:42 AM
Hi, I'm planning to do some GDI animation and came across some
references to using ControlStyles in Forms to do it automatically. The
ControlStyles though seems to set Double Buffering on the Form itself -
so does this then mean the PictureBox on the Form will also be Double
Buffered in ter... more >>
Brain fart
Posted by Mike & Dyan at 2/8/2005 12:21:03 AM
I am making a Mileage Calculator for work to keep track of mileage on my
car. I think I am missing something. In the answer box I only want 2
decimal places to right to show. For some reason I get it to work. Here is
my code.
Private Sub btnCalculate_Click(ByVal sender As System.Object,... more >>
|