all groups > dotnet windows forms > february 2005 > threads for february 22 - 28, 2005
Filter by week: 1 2 3 4
How do you read from Windows Event Log?
Posted by Charlie NO[at]SPAM CBFC at 2/28/2005 9:23:19 PM
Hi:
Are there any classes in .NET for reading Windows Event Logs? I would like
to build a WinForm to display entries in log.
Thanks,
Charlie
... more >>
ComboBox doesn't update from "ValueMember" when this property is changed on object
Posted by Teis Draiby at 2/28/2005 7:24:25 PM
In order to show the names of the objects added to the ComboBox I've set:
sausageChooserCombo.ValueMember = "Name";
- but when I change the "Name"-property on the objects, the ComboBox does
not update accordingly - it still shows the initial names... I've tried
this:
comboBox1.Refresh();
c... more >>
Could not Load Type mshtml.HTMLDocument - Error
Posted by Mani at 2/28/2005 2:23:02 PM
I have a Windows Forms application developed in .NET Framework 1.1 which has
a Microsoft Web browser embedded in a Form and is using mshtml to do some
changes on the loaded html file.
One of the user gets the following error while running that form.
"Could not load type mshtml.HTMLDocume... more >>
How Do I Create Docking Effects as in Visual Studio.NET 2003?
Posted by Craig Holdheide at 2/28/2005 2:13:04 PM
Hello VB Users,
I am about ready to start working on a small VB.NET 2003 project for my
company. I will be creating an MDI application that will using docking
extensivily. So far, I was able to create a MDI application and then able to
create a small form that would dock to the left si... more >>
Determining WHY the "Closing" event is happening
Posted by Alex Maghen at 2/28/2005 1:57:12 PM
Is there a way to determine if the closing event is happening because of a
user click on the window Close-Box as opposed to because of other reasons
like calls to the Form.Close() method?... more >>
Combobox Highlighting Issues
Posted by kcitrenbaum NO[at]SPAM gmail.com at 2/28/2005 1:03:39 PM
If I have a Windows.Forms.ComboBox on a form and set the Text property
to a value that's in the Items list, the ComboBox appears highlighted
until the combobox losses focus through User action. Setting focus to
the combobox and then to another control in code doesn't fix this
problem.
What's u... more >>
A generic error occurred in GDI+
Posted by TA at 2/28/2005 11:11:17 AM
Hi,
I'm testing an app in a virtual pc (Win 98 SE, framework 1.1 SP1), an i'm
getting "a generic error occurred in gdi+" in screens where there's a
groupbox or a datagrid. if i remove then, it works fine. The error messages
are bellow. Is this a "real" error or is happening just because it'... more >>
Invoke method appears to have an invalid cast causing an assertion
Posted by Kentonis at 2/28/2005 7:59:05 AM
I have the following invocation in my application:
private delegate void InitializeDataDelegate();
/// <summary>Loads information from the database.</summary>
public void InitializeData()
{
if(InvokeRequired)
{
Invoke(new InitializeData... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Best way to prevent selection of items in a ComboBox
Posted by Nick Zdunic at 2/28/2005 6:25:02 AM
I have several items displayed in a ComboBox.
Only a subset of these items should be selectable, the others are for
display purposes.
What is the best way to handle this. Via an event or create a subclass to
do it?... more >>
Binding textboxes (again)
Posted by VB Learner at 2/28/2005 5:17:35 AM
I have a simple experimental form with a few textboxes and a couple of
buttons which move the BindingContext(..).Position up and down, and
another button to Update the database.
I can click through the records fine using the up/down buttons, but
when I type a new value into one of the textboxe... more >>
How do I updating Save state
Posted by TEK at 2/28/2005 12:05:48 AM
Hello
I'm programming with forms against a domain model, mainly using databinding
to connect my business objects to my form controls.
The domain object know when stuff has changed, so whenever the user moves
out of a edited field, the model is marked as modified and I can use that to
for... more >>
using ToolboxBitmap from inherted control
Posted by jean-dot-paul-at-opelwilly-dot-com at 2/27/2005 7:56:20 PM
Hello,
Can I use the ToolboxBitmap from the inherted Control to show up in my
toolbox and if so how?
Greetings
Jean Paul
... more >>
Combobox looses Value when assigning to a typed dataset
Posted by Sergey Poberezovskiy at 2/27/2005 2:20:31 PM
Hi,
This one is rather strange:
I have a form that displays data in a number of controls.
On OK button click event I retrieve the corresponding
record from my typed DataSet:
MyTypedSet.FirstTableRow row = (MyTypedSet.FirstTableRow)
MyTypedSet.FirstTable.Select(filter)[0];
No problems h... more >>
Designer cannot open a derivation from an abstract class
Posted by Nigel B at 2/27/2005 1:47:05 PM
I am trying to build (in the .NET IDE and using VB) an app that uses forms I
am deriving from a base class which contains some functions declared as
'mustoverride' and the base class declared 'mustinherit'. The base class
inherits windows.forms. I get an error message telling me that the desig... more >>
Menu shortcuts
Posted by J L at 2/27/2005 12:15:34 PM
I create a MainMenu and set its text to &Admin. In VB6 this means
Alt-A would execute the menu. It does execute the menu but when the
form is first displayed, the "A" in Admin is not underlined. It does
show up underlined after I use Alt-A once.
Why is this? How do I get it to display with the... more >>
DirectoryInfo not working
Posted by G Dean Blake at 2/26/2005 5:28:40 PM
the following code has a valid string in Session("ScannedInvoicedDirectory")
which is \\Machine1\c\InvoiceScans. In fact I can put that string into file
explorer and it scans to the directory on the other machine sucessfully.
but rootdi.exists is false. This code used to work. What could be... more >>
Panel KeyUp event
Posted by Peder Y at 2/26/2005 1:44:57 PM
1) How can I make a Panel fire Key events?
Neither overriding the OnKeyUp event nor somePanel.KeyUp += new
KeyEventHandler(somePanel_KeyUp) seems to work.
2) What would be the procedure for doing this on a Control derived control?
Thanks!
- Peder -... more >>
Customising a windows close buttons and title bar
Posted by thechaosengine at 2/26/2005 12:09:34 PM
Hi all,
Some applications achieve a really nice look and feel in part because they
have changed the bar at the very top of the form window. There appears to
be a way to customise the whole bar and its buttons but I have no idea how
its done.
Can anyone point me in the right direction. Pe... more >>
how can modify the ftp page sourse code in VB.NET
Posted by Skumar at 2/26/2005 11:19:01 AM
hi
to all
i'm skumar
i'm woking in VB.NET frame work
i need to place a link to remote ftp page
we have the following info
URL:
FTPUserID
password:
by using the above info i can acees the ftp page's souce code,
but our need is to update the soucecode and upload it.
is t... more >>
Focus on form load
Posted by Etienne Boucher at 2/25/2005 9:38:13 PM
This is probably overly simple to fix, but I can't seem to find how. I have
a form with a TabControl, and when the form loads, it puts the focus on the
first tab by default. I want to put the focus on a text control ON the first
tab, but I can't find where to do that. If I give the focus to th... more >>
Forms - Can I automatically close the form after 5 minutes (but only if there is an exception.)
Posted by Joe Fallon at 2/25/2005 6:01:59 PM
I have a form that runs a batch task. (say every 15 minutes)
When it is kicked off it connects to the DB and then runs through all of the
things it is supposed to do.
The length of time to complete these tasks is unknown in advance.
If it finishes all of the tasks without error then the applic... more >>
Parameters for the Load Routine of a Form
Posted by Roger Stenson at 2/25/2005 3:30:13 PM
Hi all
I would be grateful if some one would tell me if there is a way to pass a
parameter to the Load routine of a form as with New in a Class
Roger Stenson
... more >>
datatable.clear
Posted by Greg at 2/25/2005 3:15:18 PM
Can someone explain to me why the following segment of code will not remove
all rows from the datatable?
My application is a Winforms front end connecting to an Access mdb back end.
Public Sub ClearTable(ByVal pstrTableName As String)
prpGetDataSet.Tables(pstrTableName).Clear()
... more >>
Missing texts from labels, buttons, etc.
Posted by Val Melamed at 2/25/2005 2:02:29 PM
Hi,
This is a strange and rare bug (feature?). This winforms application is
working fine on 99% of the machines but not on mine and also once in the
past a customer reported this strange behavior: when I start the application
all texts from labels, buttons, prepopulated lists, etc. are mis... more >>
master-detail relation with object binding
Posted by Patrice Ongla at 2/25/2005 1:43:30 PM
Hi all,
In Whibdey, I have a form bound to one of my business object. This object
has a collection of child object of another class.
Does anyone know how to create a master-detail relation between this form
and a grid in it which is bound to te dataconnector of the child class ?
Hope i'... more >>
WinForms connect to Hosted Database?
Posted by MisterKen at 2/25/2005 12:01:06 PM
Is it possible to using connect to a SQL Server database on a shared hosted
web account using sqlconnection objects?
What would the connection string look like?
Thanks.... more >>
Hide Column in Datagrid
Posted by Michael at 2/25/2005 11:13:35 AM
Hello,
After 2 years i come back to DOT NET development, so it is a little bit hard
in the beginning.
Here is my problem :
I have a table with a field whixh tells me if a person is a boy or a girl,
it is a boolean (0 or 1).
In my window application, i want to show a list of person, a... more >>
Outlook inbox component
Posted by WalterB at 2/25/2005 10:46:41 AM
A while back, I saw a Microsoft presentation where the developer
dropped a control onto a form and it displayed the contents of his
Outlook inbox. Does anyone know whether this is a standard control or
component, or whether it's available from a thrid party? Thanks.
... more >>
What's wrong in my code?
Posted by jean-dot-paul-at-opelwilly-dot-com at 2/25/2005 9:19:00 AM
Hello,
I want to swalow all mousclicks in a comboBox control.
I created wy own 'public class roComboBox : System.Windows.Forms.ComboBox '
Created a property ReadOnly and call only the base events if the ReadOnly is
false (see code beneath) but the mousclicks still pass.
Is there such thing ... more >>
ListBox, Double-Click and Closing Form
Posted by Bonnie Berent [C# MVP] at 2/25/2005 7:23:01 AM
OK, here's a mystery for you guys. It's a bug, I'm sure, but my question is:
is there a workaround?
Set up a Double-click event handler for a ListBox. In that event handler,
either close the form (this.Close()) or call another method that closes it,
doesn't matter.
You get an error:
... more >>
Minor bug in TabControl.TabPages.Remove().
Posted by Jeff at 2/25/2005 7:07:04 AM
I’ve just found a minor bug in how the TabControl selects the SelectedTab
after you remove a TabPage.
The code from TabControl.ControlCollection.Remove is shown below (thanks
Reflector!) notice that the SelectedIndex is always set even if a different
TabPage was selected previously. For ... more >>
Custom color dialog...
Posted by Peder Y at 2/25/2005 4:11:52 AM
I'm trying to make a custom color dialog. At this point I've designed it
as about 200 buttons on a form with different background colors. This
works, but is somewhat slow. Now, the effect I'm trying to produce is
the same as is used in most major text editing and drawing applications.
If the... more >>
GDI+ DrawImage stretches incorrectly
Posted by martin NO[at]SPAM tripper-bullet.com at 2/25/2005 1:30:11 AM
Dear group,
I posted this question before but still don't have a clue why
DrawImage _occasionally_ drops pixels. I don't want to be pushy but
am under increasing time pressure to find a solution. So I hope
you'll pardon me for trying again under a catchier subject line.
I need to stretch a... more >>
question on maximum width/heights
Posted by smith at 2/24/2005 10:39:08 PM
Googles shows that this question has been asked a couple of times but every
"answer" turns out to be a snappy "only an idiot would need that" rather
than a real answer. I'd kinda like a real answer if there is one.
question, in 3 parts:
1) Why is there a 32767 maximum width/height limit o... more >>
Any good info on how forms work internally
Posted by me at 2/24/2005 8:38:16 PM
What I am looking for is the details on how Forms work internally in terms
of threads that get created, message loops, etc.
Here are the type of question(s) I am looking answer so I need info that
would help:
- How many message loops / threads get created in an application that has
multi... more >>
Font.Size returns incorrect size?
Posted by Amit at 2/24/2005 8:25:44 PM
Hello,
I'm using the FontDialog to select a font and its size. When I return from
the dialog, the size returned by fontDialog.Font.Size is always a bit off
from the size I selected. For example when I select size 11, the size
returned by the dialog is 11.25, when I select size 10 the returned si... more >>
1
Posted by Adrian Lin at 2/24/2005 4:55:17 PM
How to force a form to stay maximized and immovable all the time
Posted by Gerhard Menzl at 2/24/2005 3:47:52 PM
I am developing a Windows Forms application that is supposed to stay
maximized and immovable all the time. Unfortunately, this approach:
WindowState = FormWindowState::Maximized;
MaximizeBox = false;
does not work. While the first statement does maximize the window, the
second one... more >>
Properties and enum C#
Posted by Tron at 2/24/2005 2:56:34 PM
I have a question and before everithing thanks for reading. I have a
custon control in windows forms and i want to expose a property with
enum values. i have three values and i want that property takes those
values from the list. Can anybody help me in this topic? I'm kind of
new in this topic o... more >>
Load Event Handler is swalling an exception
Posted by Greg Robinson at 2/24/2005 11:17:00 AM
We have a MdiParent that calls Show on a MdiChild.
Inside the MdiChild Load Event handler, we do a database trip. The db trip
causes a SqlClient.SqlException.
Back in the MdiParent, we catch and handle the exception.
This works when running in Debug mode from the IDE. The exception is c... more >>
Using The RichTextBox control
Posted by Marvin Scheinbart at 2/24/2005 10:45:45 AM
I'm using a richtextbox to display formatted text. The problem is not
the formatted text but getting the richtextbox to display the text
properly. My program prints out messages to the user. I maintain all
user messages in the richtextbox so the user can have a history of
messages. When the ... more >>
VB.Net Control Checkbox Association
Posted by Schlauberger at 2/24/2005 10:27:03 AM
I have a mnuNew_Click event that I am attempting to reset a forms textbox,
checkbox and picturebox's. The attached code is an attempt to loop through
the forms controls and reset them but I cannot find any option within the
controls class to set the properties for the checkbox and the picture... more >>
PostScript/Custom Font Bug?
Posted by Extreme Datasets at 2/24/2005 9:27:04 AM
I am trying to use a post script font on some lable controls and the font
does not show up in the font list. What is the problem?
It is an Adobe post script font (Rotis Semi Serif 55).
Thanks!!!... more >>
Application.Run, then Exit, then Run
Posted by foldface NO[at]SPAM yahoo.co.uk at 2/24/2005 7:12:45 AM
Hi
Is it possible to create a form, call
Application.Run()
to get the form working and processing messages, then
Application.Exit()
to stop it processing any messages and make it just hang around, then do
some stuff, then
Application.Run()
again and carry on where I started?
... more >>
Override NumericUpDown Class?
Posted by ReMEN at 2/24/2005 5:21:20 AM
---------
I posted this on another newsgroup on MS as well, maybe I
can get other opinions here as well
---------
Hi,
I posted on here before about using other characters than
integers in a
NumericUpDown control. The responses I got were pertaining
to unmanaged code.
My project is ... more >>
Showing a nonmodal form only once
Posted by Edgardo Rossetto at 2/24/2005 3:48:53 AM
Hi, I'm having this little issue which i dont know how to fix properly.
I have a button that instanciates a form, then it shows it normally (not
modal), this opened form is owned by the main form, the problem is that
I dont know how to check if it was previously openeded (the owned form).
... more >>
how to check if user is using a mouse ??
Posted by Piotrek at 2/23/2005 11:19:11 PM
hi,
I need to check if someone is really using workstation or not.
As using i mean moving mouse, or clicking keyboard. There
are a lot of "ergonomical helper" application (workrave for example)
that will stop users work after several minutes of real work, that
apps even know if you are realy ha... more >>
Firing events in vc#
Posted by george antony at 2/23/2005 10:58:59 PM
Can you suggest any most simplest way to fire events
in vC# from any events.
like:
public event loadrecord()
Private sub frmmaster_load(sender,e as eventargs)handles_
frmmaster.load
raiseevent loadrecord()
End Sub
... more >>
Cursor won't retain WaitCursor shape
Posted by scolemann at 2/23/2005 10:08:20 PM
Hi all,
I am making a call to a webservice asynchronously, but would still like
to keep a WaitCursor on the screen until the service returns.
Unfortunately, after the initial call made to BeginWebServiceMethod
returns the cursor changes back to the Default cursor. I have tried
setting both C... more >>
Newbie Question
Posted by KC Eric at 2/23/2005 8:23:49 PM
Hi all,
Suppose I have a form, and a button, the form has these functions:
private void button1_Click(object sender, System.EventArgs e)
{
Start();
}
public void Start()
{
Graphics g = this.CreateGraphics();
g.DrawString("start!", new Font("Arial", 12, FontStyle.Regul... more >>
Writing a file
Posted by Victor Rodriguez at 2/23/2005 5:38:17 PM
Is there a way to write a file from:
Dim datafile As System.IO.Stream =
Me.GetType().Assembly.GetManifestResourceStream("myassembly.filename.dbf")
To a physical file on the hard drive like "C:\filename.dbf"?
thanks in advance...
Victor
... more >>
property grid issues
Posted by Lance Johnson at 2/23/2005 5:05:27 PM
I have created a class B that contains 2 properties, which are both public.
I have a user control A that has 2 different instances of this class (C and
D). I've tagged it with the right attributes, but it's not showing the
subproperties of the item.
So in my property grid, I see C and D wi... more >>
knowing when (X) button is pushed
Posted by Xonica Developer at 2/23/2005 1:20:27 PM
i have this code:
Dim O As System.Diagnostics.StackTrace = New
System.Diagnostics.StackTrace(True)
Dim F As System.Diagnostics.StackFrame
F = O.GetFrame(7)
Select Case F.GetMethod.Name.ToString
Case "SendMessage", "RunDialog" 'close with me.close
... more >>
Flicker problem !!!
Posted by Stoyan at 2/23/2005 2:01:04 AM
Hi All:),
I have Form with BackgroundImage, in my form i have 20
controls(labels,buttons ...)
But controls refreshing too slow(like flicker).
thanks in advance
... more >>
How to do OWNERDATA in Listview with C#
Posted by Jeff Lindholm at 2/22/2005 7:53:47 PM
In the old MFC days you could create a ListView with the LVS_OWNERDATA style
and you would be asked to provide the item to be drawn as the list view
needed it. This way you could have lots if items in the listview but none of
them would exist as data in the list view.
Any way to do this in ... more >>
PrintDialog orientation bug ?
Posted by Emmanuel at 2/22/2005 12:52:12 PM
Hi,
the PrintDialog does not return the correct value for the Orientation of
the page if it is first initialized to false.
The following code demonstrates the problem:
PrintDialog pdlg = new PrintDialog();
pdlg.PrinterSettings = new System.Drawing.Printing.PrinterSettings();
//... more >>
Circular Progress Bar
Posted by Umut Tezduyar at 2/22/2005 11:37:16 AM
Do you get bored from linear progress bar. Here is my circular progress bar
named "ProgressCircle"
http://www.windowsforms.net/ControlGallery/ControlDetail.aspx?Control=624&tabindex=10
It is completely free and fully customizable. Please test and comment on it.
... more >>
get cell value
Posted by Mike at 2/22/2005 10:11:02 AM
How can i get the data within a cell on my datagrid when the user clicks on
that cell?
... more >>
Thread Abort
Posted by Ryu at 2/22/2005 9:37:01 AM
Hi, I tried to kill a thread by using the following:
Thread t = Thread.CurrentThread;
try
{
t.Abort();
t.Join()
}
catch(ThreadAbortException)
{
}
Everything when I execute from VS.NET 2003, the thread will be aborted
successfully. However when I tried to execute the program... more >>
bold the text within a specific cell of a datagrid?
Posted by Vinny Vinn at 2/22/2005 9:23:05 AM
Any ideas on how i can bold the text within a specific cell of a winforms
datagrid?i have used DataGridColumnStyle for an entire column,however
currently i need just the text of a specific cell to be bold?(The
datasource of the datagrid is a datatable).
Thanks
... more >>
Rasing events on File Change
Posted by altaf.sunesara NO[at]SPAM gmail.com at 2/22/2005 8:08:42 AM
Hello !
I would really appreciate some help
I have been developing an application where is need to raise certian
events on file change detected, I tried using the FileSystemWatcher
Class to do this but the problem i face is there are 2 events raised so
is there any other way out
where i can de... more >>
Is there a way to clone a panel
Posted by Davy C at 2/22/2005 7:25:13 AM
I have 2 forms. The 1st form dynamically creates controls into a panel, and
fills comboboxes from SQL statements. What I would like to do is copy that
panel to a second form? I could run the same function that I use to create
the panel on Form1, however I don't want to hit the database agai... more >>
|