all groups > dotnet windows forms > april 2005 > threads for april 8 - 14, 2005
Filter by week: 1 2 3 4 5
Slow ListView Performance due to painting
Posted by Danny T at 4/14/2005 10:50:51 PM
In .net 2.0 (beta 1), I've got a ListView that contains 1000 items. I've
set it so when I click the heading of a column, it groups by that column.
All works fine, but because the listview is redrawing after every
change, it's quite slow. If I uncomment the .Visible lines, it's *very*
fast, ... more >>
Checking for logout when closing a form?
Posted by Andy Pickering at 4/14/2005 6:01:27 PM
I've written an app that minimises to the system tray when the 'close'
button is clicked (I'm setting the Cancel flag in my formname_Closing event
handler). This works fine until you try to logout of Windows - the logout
is unable to stop my app! Is there any way to check whether the user is
l... more >>
Multithreaded form problem
Posted by Jeronimo Bertran at 4/14/2005 5:27:01 PM
Hi,
I have a form with a pictureBox that should change from visible to not
visible depending on a status. The form receives events from a
communication thread in an object called commDriver.
In my form I register the event
commDriver.OnStatusReceived +=new StatusReceivedDelegate
(co... more >>
"<default>" selection in ComboBox DataSource
Posted by kaborka at 4/14/2005 1:55:09 PM
I have a combobox whose datasource is a lookup table populated from the
database. However, the record whose field is bound to the SelectedValue of
the combo uses DBNull to indicate no selection, in which case the combobox
should display "<default>". I convert the DBNull to zero in the source... more >>
How do form paint itself ?
Posted by Jazz at 4/14/2005 1:55:02 PM
I wrote a very simple windows form application. In my form I put a button.
Then I wire a function to the Paint event of the form. In that function, I do
nothing. I start the application from VS.Net and set a breakpoint in the
function. Everytime I hide the form and then unhide the form, the br... more >>
Allow Combobox dropdown but NOT select an item
Posted by Scott Wylie at 4/14/2005 1:23:34 PM
I want the user to be able to drop down the list in a combobox and the user
to scroll the list up and down but they can't pick an item in the list.
I have started looking at overriding the DefWndProc but not sure what
messages to capture.
Any help would be appreciated??
--
Scott Wylie... more >>
Singleton Form in Whidbbey
Posted by farmboy at 4/14/2005 11:54:14 AM
Can someone give me an example of the PROPER way to create a singleton
form in Whidbey? I've done it in the current .NET, but I've been
reading that we can't mess with the constructor in the designer.vb
code.
I've been searching for info, but haven't found much in regards to
doing this in Wh... more >>
Stopping an application from closing
Posted by Joe_Black at 4/14/2005 9:40:52 AM
Hi All,
I want to stop my app from closing, unless the user specifically wants
it to, I use this code:
private void MainForm_Closing(object sender,
system.ComponentModel.CancelEventArgs e)
{
if(MessageBox.Show("Are you sure you wish to close Millenium?",
"Question", Messag... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
sender in MouseEvents
Posted by simonrigby_uk NO[at]SPAM hotmail.com at 4/14/2005 9:18:56 AM
Hi folks,
Small issue with sender argument in mouse events.
I have a container control that users can add instances to of a another
control at runtime. In response to the user adding a new control (Task)
to the container (Pad), I create a new instance of Task, add two
handlers, one for Mous... more >>
Struggling to add a new Row to DataView
Posted by Rod at 4/14/2005 9:05:48 AM
I can't believe I am struggling with this, but I am.
I have a form with the controls bound to a DataView.
The form has an "add" button which is meant to add a new row.
I do this with the code below
_______________________
Dim newDataRowView As DataRowView = MembersDataView.AddNew
newData... more >>
How the property grid displays an array of values
Posted by Dan at 4/14/2005 7:36:19 AM
Hi,
I want the property grid to display a list of values, say
MyParameters
{
private ArrayList Surveys;
....
}
Survey1
Name: New York
Operator: Siemans
Price: 1000
Survey2
Name: Washington DC
Operator: Lucent
Price: 999
I program in C#.
Thanks.
Da... more >>
Is there a way to get the listview header background color?
Posted by jrhoads23 NO[at]SPAM hotmail.com at 4/14/2005 6:58:17 AM
I am looking for a way to get the background color of a listview header
(when in Details view)
I have found a couple various threads on how to change the background
color, but I have yet to find out how to GET the background color. 99%
of the time it is Control, but I want to be able to get it.
... more >>
Asynchronous Web Service Progress
Posted by Lucas Tam at 4/14/2005 12:15:13 AM
Hi all,
Is there anyway to track the progress of a Async Web Service Call (BeginXXX
/EndXXX type)?
In my long running web service, I want to flag certain stages of
completion, is there a way to relay this data back to the calling function?
Thanks.
--
Lucas Tam (REMOVEnntp@rogers.co... more >>
databound problems with c# datagrid .NET framework v. 1.1
Posted by Omatase NO[at]SPAM gmail.com at 4/13/2005 8:21:51 PM
I have spent hours on the following two problems:
1 - Resizing a column to a new width
2 - disabling the addnew feature of the datagrid, without making cells
uneditable (i.e. by locking the control)
Here is the data I have on my progress so far:
I think the problems both stem from t... more >>
Open Form
Posted by Melike Muftuoglu at 4/13/2005 5:12:57 PM
Is it possible to show a form by using its name property in VB.NET. I am
thinking about getting the name of the windows form from database and then
show the form. just like DoCmd.OpenForm "nameof form" in MSaccess..
Thanks in advance
chaplin
... more >>
Form databinding using list obj instead of biz obj
Posted by moondaddy at 4/13/2005 3:03:55 PM
I have a form where I was using databinding to bind all of it's fields to a
business class. Now I'm converting it over to binding to a list object
which is a list of the same business objects.
Note: me.Me.CustName is a textbox in this form, "Me.CustName" is a property
in the business objec... more >>
Databinding "synchronization"
Posted by Jeppe Dige Jespersen at 4/13/2005 2:19:02 PM
I have a simple winform. On the form, I have a DataGrid and a Textbox, along
with a typed (and filled) dataset.
First, I add a databinding to the textbox, binding it to a field in say...
Northwind's Customers table. Then I databind the datagrid by setting the
Datasource property to "dsNorthwin... more >>
When will Microsoft fix the tab-page reordering bug???
Posted by Alex at 4/13/2005 12:00:00 AM
The designer keeps spuriously rearranging the tabs in the TabControls.
This is highly annoying!
I checked Google and it seems that there are reports since VS 2002.
Isn't it time to provide a fix???
--=20
Address email to user "response" at domain "alexoren" with suffix "com"... more >>
.Net and Win32 API Calls
Posted by TC at 4/12/2005 7:21:51 PM
Hello,
I am in the process of migrating a VB6 component over to C#. This component
uses Win32 API calls such as FindWindow, SetForegroundWindow, SetWindowLong
and EnableWindow.
Should I be using these APIs to achieve the same results in C# or should I
be using something unbeknownst to m... more >>
Deploying a .NET Application with No-Touch deployment
Posted by recoil NO[at]SPAM community.nospam at 4/12/2005 11:22:31 AM
I am wondering if there is a way, such that when you deploy a .NET
Application via the web with no-touch deployment, there is a way to
allow the user to relaunch the application without being connected to
the net, as long as the application has been visited before. I
understand that there is a l... more >>
Activated Event Vs. other Events
Posted by Christian Correa at 4/12/2005 10:29:21 AM
Hi all,
If you've used the ODBC DSN wizard, you've seen that there is a button which
lets you test a data connection. I want to create a dialog with the same
funcionality; to know if a connection to a database was made succesfully.
The form has to render itself completely first, then attemp... more >>
Anyone create a message in Lotus Notes?
Posted by Stephen Russell at 4/12/2005 9:33:32 AM
At the end of a process I have been asked to message different people
depending on the outcome.
Any ideas on working with Lotus Notes instead of CDOM ??
TIA
__Stephen
... more >>
How to change ListView row height
Posted by Andrew at 4/12/2005 9:12:01 AM
It's a simple question: How can I specify the ListView row height. Where do I
define it, in the ListViewItem or ListView itself?
Thanks.
lz... more >>
Create a Bitmap (snapshot) of a webpage programmatically...how?
Posted by Joseph Black at 4/12/2005 9:00:03 AM
Hi everyone,
I have a pesky little problem that is driving me nuts.
I'm trying to capture an image of a web page programmatically in a
background thread or process.
What I'd like to do is create a Bitmap object of a webpage from, say, the
new WebBrowser control of .net 2.0 or even the old Act... more >>
grab a file from a FTP server problem.
Posted by Stephen Russell at 4/12/2005 8:57:33 AM
I am getting an error that a file doesn't exist. When it errors on the box,
I go into the Explorer and I see the file????
Here is my existing code:
// Get file for new dump file
//string path = @"c:\temp\chelsea_update_full.txt"; Former file &
Path from Dev Box
string path = @\... more >>
Showing a Form using a timer
Posted by Chris Q. at 4/12/2005 6:59:02 AM
I am creating an application that will create a notify window similar to
outlook 2003 notify popup. I am making an asyncronous remoting call using
system.thread that raises an event to show the form. However, the form shows
up as a black box and then immediately disappears when the event is ca... more >>
Clicking disabled button still raises event
Posted by bjorn at 4/12/2005 5:04:02 AM
Hi,
I have a button, which I disable after it has been clicked. it gets enabled
when all processing (code that gets executed when the button is clicked) is
done.
Looks like this:
Private Sub btnLabel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLabel.Cli... more >>
ComboBox unique ValueMember and non-unique DisplayMember
Posted by cryolitte at 4/12/2005 12:00:00 AM
I have a ComboBox bound to a DataTable. For example:
ID Name
1 John
2 John
3 Bob
I then set ValueMember = "ID" and DisplayMember = "Name". All the data in
the ValueMember's column is unique, but the DisplayMember's column may not
be unique.
The problem:
U... more >>
Calculating Rows in a Datagrid to a textbox
Posted by Jamie Sutherland at 4/12/2005 12:00:00 AM
Hi,
In my datagrid i have a column that contains totals which I wish to to keep
a running total of in a text box elsewhere on my windows form. So if a row
is removed from the datagrid then the running total is reduced and if added
then it is added.
Also is it possible to take the data which ... more >>
Drag&Drop file to another application
Posted by SMA at 4/12/2005 12:00:00 AM
Hello,
I want to provide a file copy operation with dragging an icon (or something
else) from my application to Windows Explorer or another application which
supports file drop, I can easily get files which dropped to my application
but do not how to perform the first one. Most of the tutor... more >>
Windows Service AutoStart Problem (C#)
Posted by VinSand at 4/11/2005 11:58:01 PM
Hi,
I have a problem on some machines to AutoStart a very simple windows service.
It just logs a line in the event log when the OnStart and OnStop occurs.
The service is setup as "Automatic" / Localsystem Accoutn.
The machines where the service does not autmatic start are member of a
domain ... more >>
Problem opening up MS Access app from .net 1.1 winforms app.
Posted by moondaddy at 4/11/2005 10:53:44 PM
I have a vb.net 1.1 winforms app that performs a login, checks for updates,
downloads updates to the client, then starts the client app. The client app
is a MS Access 2003 application. I created a setup file using the latest
version of InstallShield and have installed this app on about 10 ... more >>
Multiple dynamic MenuItems with a single Clic Event Handler
Posted by Jeronimo Bertran at 4/11/2005 7:45:39 PM
Hello,
I need to create a menu dynamically where the number of items is variable
but I don't know how to add a single click event handler with a way to
distinguish which item caused the click event:
foreach (MyType obj in ObjectTypes)
{
MenuItem item = new MenuItem(obj.title);
/... more >>
MVC in windows forms (c#)
Posted by Paul at 4/11/2005 6:14:39 PM
I'm new to .net windows forms but know vc++ mfc and MVC
(model-view-controller) very well.
Just getting started I find it surprising I can't generate custom event
handlers via a wizard in the class view in the vs.net ide. You have to
code your own events and delegates stubs by hand. And the... more >>
How to get equal sizing panes in a form?
Posted by Axel Dahmen at 4/11/2005 3:45:35 PM
Hi,
I want to create a simple form containing, lets say, two TextBoxes within a
Panel. Both TextBoxes should resize equally when the user resizes the
window.
Can the Forms layout manager handle this? And how do I have to set the
properties to get the desired effect?
Your help is quite ap... more >>
looking for an unhandled exception reporting component/service
Posted by Scott W at 4/11/2005 3:35:18 PM
I'm looking for a component/service that will log unhandled exceptions to a
Web service. While there are numerous frameworks and examples that can log
exceptions to a log file, the event log, or send an e-mail, these approaches
don't work for my application which is intended to be a retail de... more >>
Active Window
Posted by Josh at 4/11/2005 2:50:49 PM
Hi,
Anyone know how to read the text from the title bar of currently active
window in Windows. I want to record what application I used at what time.
I hope there is a quick c# answer.
Thanks in advance
... more >>
Advanceing the cursor to another control
Posted by premium001 at 4/11/2005 1:55:03 PM
I have 3 textboxes on a form and I want to advance to the next textbox after
entering some info and pressing enter. My cursor doesn't move when I press
enter. How do I make it advance? I am using and learning vb.net 2003.
--
Thank you for your help...premium001... more >>
Creating my own intellisense, code completion functionality
Posted by Jeremy Chapman at 4/11/2005 1:25:28 PM
Our company as written an application where users can write c# 'scripts' for
some very specific scripting needs. It is our intent to distribute this to
analysts so they can write scripts. The application works very well, but we
want to employ some sort of intellisense or code completion much li... more >>
Form Navigation
Posted by TOM at 4/11/2005 1:03:27 PM
New to programming in VB.NET, is there a way to navigate
to different forms. I can open a new form but I am having
trouble closing the old one.
Tom... more >>
Logic Question about Public Method I created.
Posted by SouthSpawn at 4/11/2005 12:22:59 PM
I have the following situation.
I am creating my own user control.
This asp.net user control will have a method called "Read". When this
method is being called from the page. It will read line by line threw a
list dictionary. While reading line by line
it will be setting public properties tha... more >>
Application Icon
Posted by Arne at 4/11/2005 8:18:02 AM
What format should an application icon have?
A 16x16 bit seem to work as an icon for a shortcut only.
What format should an icon have that is displayed when the program is running?
How do I specify which icon to use when running?
Do I need multiple icon files?
... more >>
DisplayMember of ComboBox
Posted by Rod at 4/11/2005 12:00:00 AM
If I set up a combo box at design time it works just fine.
Now if I place the following 3 lines in the form load procedure (I know they
are correct because they were copied from InitializeComponent)
The first line is obeyed, but the second line is ignored. I know this
because if I look at "Dis... more >>
NotifyIcon: How to hide associated form?
Posted by Axel Dahmen at 4/11/2005 12:00:00 AM
Hi,
I want to write a small tool having only the NotifyIcon as its visible GUI.
I don't need the form associated with the NotifyIcon. How can I set the
form's visible status to false? If I write "this.Visible=false;" after the
call to InitializeComponent() nothing changes; the form's still vis... more >>
Datagrid Help
Posted by Jamie Sutherland at 4/11/2005 12:00:00 AM
Hi,
I have a windows form using vb.net that has 5 text boxes, 1 button and a
datagrid.
txtProdID
txtDesc
txtQty
txtUnit
txtTotal
dgProducts
btnAddtoDataGrid
When the user has entered the info into the textboxes and then click
btnAddtoDataGrid then I want the data added to the datagrid... more >>
How to set a timer in an application so that a function will be called every 5 or 10 min?
Posted by ywchan at 4/11/2005 12:00:00 AM
I am writing an application which automatically perform some function for
every 5 or 10 min....I would like to ask how to automate it? Thanks!
... more >>
Incorrect location of forms in MDI application
Posted by sirish csv via .NET 247 at 4/10/2005 10:10:28 PM
Hi,
I have an MDI application=2E Initially I open say 5 forms, they=
position themselves in a cascaded manner=2E When I close all of=
them and open another form it positions itself in the location=
which would have come after the 5th form=2E It is as if the MDI=
parent is remembering the lo... more >>
Size of executable
Posted by Hemang Shah at 4/10/2005 9:09:47 PM
Hello
I just realized my c# application which has only about 3 forms, is almost
50MB in size.
Is that normal ?
How can I make it more managable and practicle?
Thanks
... more >>
Architetural Decisions
Posted by Bruno Rodrigues at 4/10/2005 5:55:04 PM
Hi,
I'm on my way to my first OOP-for-real project in C#, and having some big
trouble with code architeture.
I have four namespaces:
- Layout
- Info - Where I hold empty structs with business objects
- DB - Where I fill my Info objects
- Classes - Where I do all the business ... more >>
ArgumentException @ Image.FromStream(stream)
Posted by halise irak via .NET 247 at 4/10/2005 1:02:26 PM
I get an "ArgumentException: Invalid parameter used at
System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)"
exception. it is too ridicilious to get such an exception, can anyone see what
might cause that exception?
(By the way, i am trying to throw the he... more >>
Object passed to TimerHandler immutable?
Posted by Bill at 4/9/2005 7:47:22 PM
This one has me stumped. I'm using sample code in the C# Programmer's
Cookbook as a guide. Specifially, Recipe 4.3, Execute a Method Using a
Timer.
I created a form with a ProgressBar on it (Min=0, Max=100). When I
created my Timer object I passed the ProgressBar as the second
parameter, t... more >>
Drag drop between objects of same type?
Posted by Simon Rigby via .NET 247 at 4/8/2005 8:03:34 PM
Hi ppl,
I have a situation where a user can add a user control to another=
control (like a scratchpad) at runtime=2E I've done this by way of=
a context menu=2E The user selects to add a new item from the=
context menu and then clicks on the scratchpad where they want=
to create the new c... more >>
Making a smart client work like a browser?
Posted by ipeighty at 4/8/2005 6:11:03 PM
This may seem like an odd question and I'm not talking about using a browser
in my smart client. Rather the following:
I find it easy to create a nice UI when building a web application but since
the project I am about to embark on is local to the machine, making a smart
client makes more ... more >>
Need Toggle button like in MS Access
Posted by moondaddy at 4/8/2005 5:35:58 PM
I'm writing an app in vb.net 1.1 and would like to use a toggle button
similar to the one found in MS Access. does anyone know of such a control
or how to make one?
Thanks.
--
moondaddy@nospam.nospam
... more >>
Monitor application switch. launch, and exit events
Posted by g62msdn at 4/8/2005 2:11:04 PM
I want to monitor "applications" much
like the Windows Task Manger does. All I want to know is what applications
are running, and which application is on top. However, I don't want to
"poll" the task manager for that info periodically. Instead, I need to know
whenever
there is a change in t... more >>
GDI+ Paint over children controls such as button as well as non-client scrollbar
Posted by Chris Pursley via .NET 247 at 4/8/2005 1:22:13 PM
I am trying to paint in a custom control "OnPaint" but can not paint over the child controls such as a button or listview. I also want to be able to paint in the "Bounds" region of the control over the scrollbars in a ScollableControl. Any ideas?
--------------------------------
From: Chris Pursle... more >>
Opening and Closing a form error : Cannot access a disposed object named "frmImage".
Posted by D Witherspoon at 4/8/2005 10:26:27 AM
I use the following code to open up a form.
-------------------------------------------------------
If fImage Is Nothing Then
fImage =3D New frmImage
End If
fImage.Show()
-------------------------------------------------------
It works the first time, but when the form i... more >>
Handling dialog results in deeply nested call stacks
Posted by SSI Developer at 4/8/2005 9:13:04 AM
If a form returns a dialog result and it can be handled immediately, then you
can just check for the result and proceed accordingly.
However, if the result of a dialog has to be returned from a deeply nested
method in the call stack to the original caller in the call stack, what is
the best... more >>
"to determine which modifier key was pressed" question
Posted by SolarCoder at 4/8/2005 8:27:06 AM
In the .NET 2003 docs, it says to use the following code for an event handler
to determine which modifier key was pressed when an event is fired:
Private Sub Button1_KeyPress(ByVal sender As Object, ByVal e As _
System.Windows.Forms.KeyPressEventArgs) Handles Button1.KeyPress
If (Control.M... more >>
Bind Nested Table from DataSet
Posted by porko at 4/8/2005 6:59:03 AM
We're trying to bind a nested table from a DataSet that is loaded form XML
that looks like this:
<RootNode>
<RootRecords>
<ChildsNode>
<ChildRecords>
The table we're trying to display is the 'ChildsNode'. We seem to be able
to bind successfully, but the DataGrid displays... more >>
Component icons!
Posted by Atmapuri Makovsek via .NET 247 at 4/8/2005 3:24:43 AM
Hi!
How can I define the icon for my custom component
in VS2003? (to appear on the toolbar)
Thanks!
--------------------------------
From: Atmapuri
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>gQvgEg9shEWPrTHbTy8B1g==</Id>... more >>
Transparent Control is opaque
Posted by ralphsieminsky NO[at]SPAM hotmail.com at 4/8/2005 1:50:59 AM
A form has a background image. On that
form there is a button. Partially overlapping
that button is a class derived from Control,
with only one customization: it makes its background
transparent in the constructor, using this technique:
http://msdn2.microsoft.com/library/wk5b13s4.aspx
Bring... more >>
Rounded Rectangle Region
Posted by Sanjay at 4/8/2005 12:00:00 AM
hi,
I want to create RoundRectRegion in .net.
We used to have createRoundRectRegion API in vb6.
Does .net frameWork has anything to achieve the same.I also don't find any
method to
create Rounded Rectangle.
plz suggest me how to go about it.
sanjay singh
... more >>
Component with threads
Posted by Steve Whine at 4/8/2005 12:00:00 AM
Hello,
I am writing a Component whose work needs to be done on a separate
thread (or ThreadPool), and when this work is done a Component event
needs to be fired in the main GUI thread. What is the best way to send a
mesasge to this Component?
As far as I can see, here are my options, in ... more >>
Datagrid new row
Posted by Gav at 4/8/2005 12:00:00 AM
Hi All,
I have a datagrid that is populated by a strongly typed dataset where ID
must be supplied... when I'm adding a new row in code this isn't a problem
because I can set the ID to whatever I like. However I do not show the ID in
the datagrid so if I type something in the new row of the ... more >>
Slider in Toolbar
Posted by Achim Domma (Procoders) at 4/8/2005 12:00:00 AM
Hi,
I'm developing some kind video player application. I want to control the
current position in the video using a slider. Could somebody give me a
starting point on how I create a slider in a toolbar?
regards,
Achim... more >>
|