all groups > dotnet windows forms > january 2005 > threads for january 15 - 21, 2005
Filter by week: 1 2 3 4 5
problem with Timer (WinForm)
Posted by Kenny M. at 1/21/2005 7:49:03 PM
I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use Timer.Stop.
It seems that the stop instruction is not stoping the timer asso... more >>
setting the parent property from MDI child form in c#
Posted by Melisa at 1/21/2005 7:09:02 PM
How can I enable/disable Main Menu Item on MDI Parent Form
when a Child form is loaded?
Is it possible?
In one child form i the code below on the button click event.
The first line of code has error. I also dunno why may be it is not possible
to instantiate the parent form while it is ... more >>
ColumnHeadersVisible property failing
Posted by Rob Oldfield at 1/21/2005 4:26:12 PM
I''ve got a datagrid on a windows form that I'm formatting using a custom
table style. Within the code that sets the style up I have
tsName.ColumnHeadersVisible=false.. but they are still displaying. Any
ideas why that might be?
Thanks
... more >>
Scrolling Problems in a Form
Posted by Robert Gross at 1/21/2005 10:42:39 AM
Hi everybody,
I have a little problem, no two. First my english is not quiet good so
please try to understand what I want and help me, please ;) And second:
I habe a Form. In this form is a ScrollableControl (modified, so it could
raise scroll events), containing another Control painting a... more >>
Set 'RunAs' property programmatically for WinForms VB.Net applicat
Posted by Henry at 1/21/2005 9:49:07 AM
Hi,
in a .Net 1.1 WinForms application I have a dialog that lets the user set
new network credentials.
Question: How can I assign the new credentials - say nc, defined by
Dim nc = New System.Net.NetworkCredential(M_User, M_Password, M_Domain)
- to the running (VB.Net -) application, s... more >>
Datagrid with colored columns pausing during setup
Posted by Rob Oldfield at 1/21/2005 9:17:45 AM
I have a windows form that contains a datagrid with columns given coloured
backgrounds via the DataGridColoredTextBoxColumn class. Data is loaded, and
the table style set up, during the load event of the form. At present, the
form half displays, then pauses, then completes. Is there any way of... more >>
FileSystemWatcher fails
Posted by Rob Oldfield at 1/20/2005 11:25:51 PM
I have an app (that should really be a service, but I haven't got round to
it yet) that just monitors a network folder via a filesystemwatcher for new
files and then does its thing. Generally, it works fine, but it fails about
once a month - which is about one every 2-3 hundred files. No error ... more >>
Colour schemes
Posted by Rob Oldfield at 1/20/2005 11:19:53 PM
Has anyone done any research (or even just any ideas) on the best colour
scheme to use for forms? I don't like the default grey background.... but
is it the best?
Thoughts?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
2 Simple Questions
Posted by Matthew MacDonald at 1/20/2005 9:37:06 PM
Hi everyone,
I have what I think are 2 pretty simple questions. I know I have done it
before, but can't remember how I did it.
#1: I have a windows form with a textbox. The textbox is getting filled
from within a function. I need to have the scroll buttons on the text box
accessable at ... more >>
ListBox: How to only fire SelectedIndexChanged if the an item is directly selected.
Posted by felix at 1/20/2005 5:02:09 PM
I would like to only fire SelectedIndexChanged if the an item is
directly selected.
example:
I have a listbox with a few items in it. These items only half fill the
listbox. If I click in the listbox, but not directly on an item (that
is in the bottom half of the listbox), the bottom item is... more >>
Creating a Form From A Non-UI Thread
Posted by dotNetDave at 1/20/2005 3:51:02 PM
I have a non-UI assembly that contains a Form similar to the MSN Messenger
pop-up that appears when a user comes online. I have a Timer in this assembly
that on regular intervals goes and looks for new information and if it finds
any, displays the Form to the user right above the System Tray.
... more >>
Pre Load a form
Posted by news.microsoft.com at 1/20/2005 2:09:17 PM
Is there any way to preload a form in VB.NET of how can I avoid seeing when
a form is loading, how it is painting all the controls it contains?
I think in VB6 I could use Load(frmTest) and after it is loaded, show it.
Thanks
... more >>
How to attend click button even on to in order to don't close form called by ShowDialog?
Posted by £ukasz Margielewski at 1/20/2005 2:07:37 PM
I have my own windows form with some contrlos to set a few parameters.
I show this form by frm.ShowDialog(). How I have to proram the button which
sometimes should close form but in another time, the buuton should give a
messagebox (with warning message: "Some parameters are incorect") and not ... more >>
HowTo:Change disabled control font color?
Posted by strout at 1/20/2005 2:05:11 PM
When a textbox/text area/dropdownlist is disabled, the font is grayed out.
Can I change the default color of disabled control to black?
I tried to override Disable/Enable property of textbox and set 'ReadyOnly'
instead of diabling the control. It works for textbox only because dropdown
lis... more >>
Problem with a timer
Posted by Kenny M. at 1/20/2005 1:27:03 PM
I have a Winform running and a timer (winform) firing each 3 min to make a
transmition of data..I'm ok about the UI stoping for a while, the problems is
that the timer fires two times in every interval, even if I use time.Stop.
It seems that the stop instruction is not stoping the timer assoc... more >>
TopMost problem
Posted by Hovhannes Asatryan at 1/20/2005 12:57:06 PM
Hi guys.
I am writing an aplication with C#.Net in VS.Net2003
I have a Mdi form wich has 2 child forms.
How can I set one of the child forms as a topmost ?.
When I set TopMost property to true it does not work.
I tried every thing but nothing helps.
Can anyone send me an example of code.
... more >>
Can't override ShowDialog
Posted by Martin Hart - Memory Soft, S.L. at 1/20/2005 9:51:12 AM
Hi:
I have a set of derived forms that I wish to implement an 'Execute' method
to launch these forms, but I also wish to hide the 2 inbuilt ShowDialog
methods so these can't be called unwittingly.
I have tried:
private new DialogResult ShowDialog() { }
private new DialogResult ShowDial... more >>
DateTimePicker default value
Posted by Q. John Chen at 1/20/2005 9:31:08 AM
I am working on an application created by another person. And I am
confused with the default value of the dateTimePicker.
One dateTimePicker always set the value to the current date/time in
property window. (actually no value is set by look at the generated
code)
But another one had the val... more >>
Calling winForms in Installer project
Posted by weichung at 1/20/2005 9:18:07 AM
I had build an installer project for my ASP.NET project. And found that
several fields need to be configured, like the web.config files and etc,
which requires user input. Also I need to attach my database using the
installer project, anybody could suggest how I could perform similar action?
... more >>
How to get the Windows user and group names.
Posted by Mauricio Pires at 1/20/2005 8:43:05 AM
Does Anyone know how to get the Windows user and group names?
Thanks.
... more >>
Dynamically Added Textbox (no KeyDown, KeyUp, KeyPress events fire)
Posted by Doug Perkes at 1/20/2005 8:14:37 AM
I am having a strange problem with a textbox that I am dynamically
adding to a form.
What I am currently doing
-------------------------
I have a set of questions defined in a database. Each question can have
a variable number of possible responses and can be laid out
differently.
I have ... more >>
Deploy Crystal Report without modify HKEY_LOCAL_MACHINE
Posted by Patrick at 1/20/2005 7:43:03 AM
Hello!
We developped a .NET Application, which includes some Reports. We created a
Setup Projects, including the CR merge modules, specifing there our CR
licence key.
Now we have the problem that we need to deploy this application on computers
where the users do not have the right to modif... more >>
DataGrid Control Selected Index
Posted by Chris at 1/20/2005 6:43:02 AM
Hello,
I am using a DataGrid control to populate an all customers list. I would
like the users to be able to scroll up or down the list press Enter and the
customer record populate on another form. I am able to accomplish this only
with the Click Event, and it only works if you Click the... more >>
DATA GRID and CTRL C
Posted by Harshawardhan at 1/20/2005 6:35:02 AM
C# - Windows application.
Datagrid class... Data grid is populated with records. (see the code below)
Select one of the entire row from the grid (selected gfrom outside left
boundary).
The row gets highlighted...
Press CTRL C to mimic copy functionality.
boom!!! unhandled exception... more >>
Custom Control Property HelpText Property
Posted by GreyAlien007 at 1/19/2005 6:37:02 PM
Yeah, reading the subject, it makes no sense...but here goes..
I made a textbox control w/ some added features...the problem is, whenever I
go to use it, I forget what my custom properties do. Is there a way to put
helptext into the custom properties so it appears in the bottom of the
prop... more >>
Reuse DataGridTableStyle
Posted by Rob Oldfield at 1/19/2005 4:59:31 PM
Hi,
I have two datagrids (on the same Windows form) that are basically two
different filters of the same datatable. I've set up a table style for the
first one and I'm then trying to reuse that same style for the second
datagrid. That's giving the error "Cannot add a DataGridTableStyle alrea... more >>
deployment
Posted by Ganesan at 1/19/2005 4:27:50 PM
hi
Can window controls be loaded from a html page which could be hosted on a
linux machine?
the client m/c will be running windows
pls provide me links if any
thanks in advance
--
Ganesan.B
... more >>
Smooth scrolling
Posted by Ozone at 1/19/2005 4:09:55 PM
I am developing a windows application for scrolling through multi page tif
documents (similar to ms word style). I am having difficulties achieving a
highly smooth scrolling affect. I load the entire tif into a memory stream
and access it from there. I am using a picturebox like control to vie... more >>
How to open cash drawer through receipt printer in c#?
Posted by c#newbie at 1/19/2005 11:31:05 AM
How to open cash drawer through receipt printer in c#?... more >>
Keyboard Selection of DataGrid Rows then Delete
Posted by WineNCheese at 1/19/2005 10:37:13 AM
Hi all.
I'm having problems preventing the delete of datagrid rows when they are
selected via keyboard selection. I have implemented the common solution of
overriding of PreProcessMessage() to prevent delete when the user selects
the entire row by selecting the row header. This works fine... more >>
Running a .Net WinForms app from network drive etc...
Posted by James at 1/19/2005 9:35:05 AM
Not sure if this is the proper group for this but...
First, I am trying to figure out exactly what steps I must take on each
client machine to be able to Run a .Net WinForms ap from a local Intranet
mapped drive. Currently my app will only run if it is installed to a local
hard drive. Not... more >>
Tab page order with forms inheritance issue...
Posted by Tyler at 1/19/2005 8:48:29 AM
I have a BaseForm with a tab control that has two tab pages on it.
When I create a DerivedForm based on the BaseForm I am able to add
pages to the form in the DerivedForm. I am also able to reorder all of
the pages on the tab control in design mode, however, as soon as I
compile to run, the reo... more >>
Logging/error handling
Posted by Jeffrey at 1/19/2005 8:33:49 AM
There is a small group of doing .net development in c#/VB.net. I noticed
each of us is logging/ catching errors differently in our programs. In
short, does anybody know of a class or object out that that will allow us to
add to each project to have common logging/error handling to access through
... more >>
Dynamic Binding to Winform Interface
Posted by ADLearner at 1/19/2005 8:29:04 AM
I am trying to load an assembly dynamically in a windows form application and
bind to one of the interfaces contained in it.
I can successfully load the assembly into memory and create the object which
is a Form. But how do I bind to an interface the Form has implemented with
out making a pr... more >>
restoring window minimzed to the system tray?
Posted by Mark Smith at 1/19/2005 1:18:41 AM
I have an app that minimizes itself to the system tray. It's also
single instance; when a second instance is started, it just activates
the first one and quits.
When the first instance isn't in the system tray, I can use
ShowWindowAsync() via interop to bring it to the front. When it's
mini... more >>
DefaultAttribute not working in PropertyGrid on runtime generated
Posted by Robert Magnusson at 1/18/2005 3:43:01 PM
Hi All,
I am testing some stuff out at the moment with the runtime generation of
classes relating to schema-validated XML elements. I was hoping to get to the
point that I could include the use of the DefaultValueAttribute on any
property that requires it. The PropertyGrid was then to be u... more >>
Strip bytes off the end of a byte array
Posted by Fred Herring at 1/18/2005 3:05:08 PM
I am attempting encryption. I start with a byte array of some dimension and
end with a padded byte array with junk on the end. Is there a clever way to
remove padding from the end of a byte array?
Thanks,
Fred Herring... more >>
Bitmap region is already locked
Posted by Rick at 1/18/2005 12:35:08 PM
I have an application that is capturing grayscale images from a frame grabber
(about 10 frames per second). The 1024 X 768 pixels are then copied to the
bitmapData section of a bitmap ( a background processing thread) and then
displayed by the UI thread.
The basic structure of the code is t... more >>
Determine Selected Rows in DataGrid C#
Posted by Clive Godden at 1/18/2005 11:50:38 AM
Does anyone have any C# code snippet for iterating thro a datagrids rows and
getting the values of the rows that have been selected
... more >>
DateTimePicker events
Posted by Rob Oldfield at 1/18/2005 11:45:08 AM
Hi,
I'm looking for which event to use with regard to a DateTimePicker control.
I want my event to fire when the actual contents of the control is
changed... but I'm finding that all events are firing when I, for example,
scroll from month to month. Presumably I'm missing something very
stra... more >>
How to determine if a KeyEventArgs contains a "text" character?
Posted by Daniel Chait at 1/18/2005 11:09:03 AM
I am writing a control which extends System.Windows.Forms.TextBox and adds in
the concept of EditMode vs. ReadyMode (similar to an Excel cell).
So normally when focus arrives on the control, I hide the blinking cursor
and change the mouse pointer from an I-beam to an arrow. When the user hit... more >>
Datagrid tablestyle,column style not working
Posted by Nitin at 1/18/2005 9:28:28 AM
I have adatagrid and a dataset, when i bind dataset to grid, it works fine,
however when i use formatting(Tablestyle, Columnstyles), then the formatting
doesnt work. The data is still binded without showing the formatting. What
canI do to resolve this problem?
... more >>
datagrid navigation
Posted by oscar at 1/18/2005 7:09:04 AM
i currently have a dataview bound to my datagrid and would like to add some
navigation. i already have a mouseup event that highlights a row when the
user clicks a cell. i am looking for a way to highlight the previous or next
row depending on if the user hits the up or down arrow keys. i'v... more >>
Changing Treeview's selectedNode in Afterselect event.
Posted by Debi at 1/18/2005 1:07:03 AM
Hi,
I've a problem with setting the selectednode in a treeview. When a user
clicks a node on the tree, I save the data for the previous node, and store
the newnode in a variable in the Mouse up event. Then I reuild the tree, and
set the SelectedNode to the newnode. I can see that the sele... more >>
Determine wether context menu is shown
Posted by Teis Draiby at 1/17/2005 10:10:19 PM
I am using context menus as pull-down menus, activated by buttons. If a
context menu is already open I want the corresponding button to close the
menu instead.
Is there an easy way to determine wether a context menu is 'open'?
regards, Teis
... more >>
No touch deployment - IEEXEC won't fire up
Posted by Jag at 1/17/2005 8:59:07 PM
We are experiencing a problem when trying to run an application using no
touch deployment.
All works fine on our W2K workstations but failes to run when browsing from
IE on a Win2K server with framework 1.1, IE 6.0.28.
On the server running the application like this works:
"C:\WINNT\Micros... more >>
Check-boxes on TreeNodes
Posted by javatopia at 1/17/2005 8:15:01 PM
Hello,
I have a tree view that shows check boxes on its nodes. Is there a way to
turn off the check boxes for some of the nodes, and not all of the nodes? I
see there is a check-box property for the TreeNode object in the Win32 API,
but it's not exposed in the .NET API.
Thanks
-- Ja... more >>
No popup event when using shortcuts in context menu
Posted by Claes Bergefall at 1/17/2005 7:30:40 PM
Appearantly a ContextMenu doesn't fire its Popup event
when invoking a menu item with a shortcut.
This kind of makes the Popup event useless for enabling
or disabling menu items (if you're using shortcuts)!?
Example:
Suppose you have two menu items in a context menu
and that they have th... more >>
How can one select from overlapped panels in the form design View?
Posted by Jim Brandley at 1/17/2005 6:44:22 PM
I am building a Windows Form App that has a splitter in the client area,
treeview on the left, and panels on the right. Different classes of tree
nodes need different views. How can I cause the one I want to work on (say
add or remove a control) to pop to the top of the z order in the design
vie... more >>
the order control of child forms of mdi
Posted by zbcong at 1/17/2005 5:56:04 PM
hello
if there are several child forms are opened in their mdi parent.how can i
move the one of the child forms to the front end to show in the CODE??
thank you!!!
... more >>
Error lost in databinding
Posted by Igor Anic at 1/17/2005 4:33:12 PM
I have a business object which has a property bound to textbox:
txt.DataBindings.Add(new Binding("Text", obj, "MyProp"));
Object property set method for MyProp is something like:
set
{
if (...)
throw(new ApplicationException("error message"));
else
_myProp = value;
}
The pr... more >>
Repost for MS: UnsafeNativeMethods.CallWindowProc NullReferenceExceptions
Posted by Niall at 1/17/2005 11:14:32 AM
A colleague of mine previously made the following post in this newsgroup,
but it hasn't received any MS attention. We were reminded that we should
register our nospam alias with the .Net Passport that is linked to our MSDN
licenses, and it was reposted with that nospam alias, but it still hasn... more >>
SteadySelection Class
Posted by carlmanaster at 1/17/2005 10:52:37 AM
Hi,
I needed this for my current project and thought it might be useful to
someone else. It's a simple Disposable class that preserves a
RichTextBox's selection, used like this:
// using (new SteadySelection(rtb))
// {
// rtb.SelectAll();
// rtb.SelectionColor = Color.Red;
// }
B... more >>
How to add tabpage to tabcontrol at 1st tab?
Posted by Tee at 1/17/2005 10:05:42 AM
Hi,
I have a tabcontrol that has a tabpage, I want to add another tabpage on
runtime, but I want the tabpage to be added to the 1st tab, anyone know how
to do it?
Thanks,
Tee
... more >>
PictureBox that Receives and Shows Input Focus
Posted by Bruce at 1/17/2005 9:06:56 AM
I am trying to create a control which is basically a PictureBox than
can receive and show focus. I have created a UserControl descendant
that simply contains a PictureBox control. The PictureBox control
automatically sizes to whatever size is selected for the control. To
show focus, I am overrid... more >>
Icons / Button graphics
Posted by Paul Aspinall at 1/17/2005 8:37:01 AM
Hi
Can anyone point me to a resource for common used (or not so common) icons /
button graphics??
Thanks
... more >>
extra header in datagrid
Posted by saleek at 1/17/2005 3:17:01 AM
I was wondering if there is a way I can add an extra header to a datagrid?
I found this solution on the internet - but it seems quite old and didn't
work for me.
http://www.dotnet247.com/247reference/msgs/13/69744.aspx
It recommends the following:
Private Sub DataGrid1_PreRender(ByVal ... more >>
Is there a way to set the category order in the PropertyGrid
Posted by Robert Matheson at 1/17/2005 3:05:01 AM
I have an application which uses the PropertyGrid to display
highly-customised dynamic data using ICustomTypeDescriptor. I need to be able
to display the properties within categories with the order of both the
categories and properties being programmable.
I can control the order of properti... more >>
Splash screen
Posted by Juan Ignacio Gelos at 1/16/2005 9:14:58 PM
Hi,
I'm trying to 'hide' the main form of an application until all the
layout work is done and all the controls have their final sizes and
locations (once the form is displayed you can see the several toolbars,
panels and docking sections being resized, drawn for the first time, etc,
and ... more >>
Prompt SQL action via mail
Posted by Rob Oldfield at 1/16/2005 3:36:33 PM
Hi,
I'm working on a VB app that links in to our personnel db to control holiday
requests. The idea is that a user can go into the app, enter some dates
that they want holiday for, with that then passed to their manager for
approval. My original thinking was that the request would generate a... more >>
Enter key not being captured - not firing KeyDown
Posted by STom at 1/16/2005 2:39:49 PM
I monitor the KeyDown event for an edit field on my Winform. I am capturing
the Enter key (in case someone presses it it needs to act like a tab).
This works most of the time, but there is some sequence happening within my
code in other places that makes it so that the 'Enter' key is not capt... more >>
dataset merge (Is there a better way?)
Posted by WhiskyRomeo at 1/16/2005 1:05:03 PM
If you pull changes from a dataset and send the changes to update method of a
data adapter, when you merge the changes back to the original dataset you may
end up adding duplicate rows. This happens when the PK is updated either
because a row is being added and the PK is an Identity column or... more >>
Toggle between iexplore windows
Posted by larsi at 1/16/2005 12:29:01 PM
Hi!
I need to bring focus to ... more >>
replacement for doevents
Posted by z f at 1/15/2005 8:12:54 PM
Hi,
i have vb.net windows forms applciation.
i make a loop in order to do some work that consumes time, and i want the
user to be able to press the stop button in the middle, problem is that no
events are received while in the loop.
in VB6 we had the DoEvents command that did the job.
what i... more >>
Label font color change doesn't take effect
Posted by STom at 1/15/2005 7:26:10 PM
I pass my label control by reference into a function in order to change =
the font color. If the value in the label is a negative number, I will =
change the color to red like this;
lbl.Font =3D New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
lbl.Font =3D New System.Drawing.Font(lbl.Fon... more >>
|