all groups > dotnet windows forms > april 2005 > threads for april 15 - 21, 2005
Filter by week: 1 2 3 4 5
Transparent UserControl
Posted by Josh at 4/21/2005 5:31:30 PM
I'm going Mad!
Has anyone been able to give a UserControl a transparent Background
I've tried...
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;
this.UpdateStyles();
.... but it does not work.
... more >>
major challenge : strange problem with drag&drop of Outlook2003 msg to vb.net form
Posted by info NO[at]SPAM webflowdesign.be at 4/21/2005 4:53:36 PM
Hi,
I'm desperatly trying to find how I can use drag and drop for an
Outlook 2003 msg towards a VB.Net Windows application. Normally you
should use
Dim theSteam As Stream = CType(e.Data.GetData("FileGroupDescriptor",
True), Stream)
to capture the filename (which works great) and use
Dim ms ... more >>
Several bugs and workarounds
Posted by Alex at 4/21/2005 2:19:50 PM
In the course of writing my application, I have come across several =
issues that seem to be Microsoft bugs.
Following is a summary and possible workarounds.
Jeffrey Tan, if you are reading this, please verify.
Also, I'd like to know how to request fixes for these issues.
1) Sometimes the... more >>
How to close a form in C#
Posted by thejamie at 4/21/2005 11:53:02 AM
I'm trying to close a form in C#. I have a vb background, so the question
may sound dumb. In vb it is just me.close(). I've tried a bunch of ways to
close the form but C# is acting pretty dumb also. I can't find a way to
close it. Here are some of the things I've tried:
private void... more >>
Creating a scrollable container control
Posted by Roger at 4/21/2005 10:03:34 AM
I would like to create a custom container control which can scroll its
child controls. I know that the AutoScroll property of
ScrollableControl can mimic this functionality, but AutoScroll causes
some behavior which is EXTREMELY obnoxious to my users, and I haven't
been able to find a workaroun... more >>
Windows Form in Shared Add-in not reading App.config settings
Posted by Erik at 4/21/2005 9:40:40 AM
Good Morning,
I am developing an Outlook Shared Add-in using VB.Net. A Windows form has
been added to the project, but is not reading the values in the app.config
file during testing. The code (Sub Main) is below and displays "Blank
connection string" is the label. It is called by an Outlo... more >>
InvalidCastException: (DataSet) DataGrid.DataSource
Posted by Nad at 4/21/2005 9:39:48 AM
I need some help please.
Say you have a DataGrid and a DataSet, and you create a dataview to handle
sorting and filtering and then you assign the dataview to
DataGrid.DataSource. Once you did that you will get InvalidCastException if
you do this:
DataSet dataSet = (DataSet) dataGrid.Data... more >>
DataGrid: Custom ComboBox column problem
Posted by TT (Tom Tempelaere) at 4/21/2005 6:33:02 AM
Hay there,
I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one
(I hope .NET 2.0 supplies one). I based it on this article:
http://msdn.microsoft.com/msdnmag/issues/03/08/DataGrids/default.aspx
I have a problem when there are two DataGrid's on one form, and when I
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
The object is currently in use elsewhere
Posted by Ian Rowland at 4/21/2005 4:09:03 AM
I have a splash screen that is displayed as the application starts. The
splash screen has text dynamically added to it to indicate the authorisation
mechanism and start-up progress. Due to the nature of the splash screen
graphic we have to draw the text onto the splash screen instead of assign... more >>
How to give initial focus?
Posted by Axel Dahmen at 4/21/2005 3:24:41 AM
Hi,
I've programmed a simple form having some panes and one button. There is a
basic thing I can't find a solution for:
1) I gave the button a TabIndex of 0.
The main pane has a TabIndex of 1.
Still the button doesn't get the focus when the form opens.
Why?
I tried to give f... more >>
Need good design for startup project
Posted by moondaddy at 4/21/2005 1:19:59 AM
I'm building a winforms app using vb.net 1.1 and have 3 basic tiers on the
client side. the UI, BLL and DAL. Currently everything is in one project
and at some point I'll parse it out to a separate project for each Tier.
Currently the startup object is Sub Main in the form called frmMain.
... more >>
Simple question: Updating a datasource
Posted by Peder Y at 4/21/2005 12:00:00 AM
This might be a simple question, but I havent found a solution anywhere:
I do some stuff, and fill a DataSet from a database.
After the tables have been processed (rows inserted/deleted/updated) I
want to write the DataSet back to the database.
My DataTable shall replace the table in the ... more >>
How to use c# creat dns server zone ?
Posted by huang hspeeder via DotNetMonster.com at 4/21/2005 12:00:00 AM
HI
I try it code only creat DNS ResourceRecord,How to creat dns zone?
thanks!
this code:
public void CreateRR(string zoneName, string rrTextRep)
{
if ( zoneName == null )
throw new ArgumentNullException("zoneName", "zoneName is null.");
if ( rrTextRep == null )
thro... more >>
Data Grid: Adding new Rows
Posted by Asela Gunawardena at 4/21/2005 12:00:00 AM
Hi
There is a databound grid that is being used in one of my Master - Detail
form there I need to keep two columns hidden and assign Autogenerated values
once a user adds a new record through the grid. can somebody please tell me
how to do this; as i couldn't find a single event that is fired on... more >>
NotifyIcon and Minimize
Posted by Albert Krüger at 4/21/2005 12:00:00 AM
Hello,
I have a form with a notifyicon. I have set ShowInTaskbar to false. When I
minimize the form, the form minimize, but there is a symbol on the windows
desktop for the minimized form. This symbol is the same as for child windows
which are minimized to its mdi-form. What I make wrong.
T... more >>
Could not deactivate CTRL+F4(close window)
Posted by RajBharati at 4/20/2005 11:01:03 PM
Despite setting controlbox property to false, CTRL+F4 shortcut is still
working.
Anyone can help me to disable CTRL+F4?
Raj kumar... more >>
About Trim
Posted by Kenny M. at 4/20/2005 5:08:03 PM
What is the best practice
Trim (myStringvar)
or
myStringvar.Trim
thks... more >>
Can't exit Windows after removing a control from a form
Posted by Greg Patrick at 4/20/2005 3:17:11 PM
This problem occurs on Windows 2000 but NOT on Windows XP:
If you programmatically remove a control from the Controls collection of a
panel on another form, then that form's default WndProc will return FALSE to
the WM_QUERYENDSESSION message!
Is there anything that can be done to fix this ot... more >>
Bulk Load text into dataset?
Posted by Marc Miller at 4/20/2005 3:14:42 PM
I have a non-delimited fixed-field text file with a record length of 5919
bytes long that I need
to load into an existing empty dataset with 159 columns.
Currently I am building a mapping like this:
Do While sr.Peek() >= 0
dr = dt.NewRow
dt.Rows.Add(dr)
Dim nLine As String... more >>
Reflection
Posted by Magesh at 4/20/2005 1:17:05 PM
Hi,
In order to display multiple lines in a column, i am creating creating a new
column style deriving from the DataGridTextBoxColumn. To get the height of
each row i am using the following code in one of the methods of this custom
columnstyle class.
MethodInfo mi = t.GetMethod("get_Dat... more >>
XmlElement.SelectNodes: Need help with accessing xml nodes
Posted by Nad at 4/20/2005 12:39:04 PM
Any help will be really appreciated.
When I use
XmlNodeList nodeList;
XmlElement root = doc.DocumentElement;
nodeList = root.SelectNodes("/bookstore/book");
to select nodes matching the XPath string, from XML file below, I get one
node which is OK.
BUT, if I remove the ":bk" f... more >>
Leave/Enter events
Posted by Egil Winther at 4/20/2005 11:26:52 AM
Hi All,
Is there a way to find out, on the leave-event, which control that is about
to receive focus?
Rgds
Egil Winther
ShipNet AS
... more >>
Moving a window
Posted by Cameron at 4/20/2005 9:11:10 AM
I stripped off the frame from a window but I still want the user to be
able to move it. If the user click on the background and moves the mouse
around I have some code that hooks into that and does the move but the
window keeps trying to redraw itself and it greats really crazy. Is
there an ... more >>
Windows application Icon
Posted by Siu at 4/20/2005 8:00:02 AM
Hi,
I've modified the Windows application icon (App.ico) and now I can't see it
when the application is in runtime and especially I cant't see it as icon of
the file myapplication.exe... What should I do to restore the situation?
I precise that in Visual Studio, when I open App.ico, I can se... more >>
C# Balloon Tooltip from Sys Tray Icon
Posted by steelwolverine at 4/20/2005 5:40:01 AM
How can I display a balloon tooltip from a system tray icon?? I can find
plenty of examples on how to do this from C++ or even Visual Basic by calling
the Shell_NotifyIcon function, but I can't find how to do this from inside C#.... more >>
Logged in user's first name using active directory
Posted by Mohamed Farouk at 4/20/2005 1:49:02 AM
i want to get the first name of the logged in user on the current machine,
windows application
i used the following code but i get System.NullReferenceException when it
reaches the Console.Writeline line
string myADSPath = "LDAP://myadelaide.com/CN=Users,DC=myadelaide,DC=com" ;
Directo... more >>
problems with restoring minimized MDI child form
Posted by Nadav Popplewell at 4/20/2005 1:11:06 AM
Hi Everybody,
I've got a strange problem:
While searching the newsgroups for something else,
I've come across a post that discusses a bug with restoring MDI child forms.
(for any body who is interested, the post is in
microsoft.public.dotnet.framework.windowsforms
by Scott Abel, the title... more >>
simplest way to use scrollbars without Autoscroll?
Posted by Kaimar_Seljamäe at 4/19/2005 11:54:45 PM
Hi,
I would like to use Form's AutoScroll property, but only partially.
Everything is ok except scrolling when ActiveControl changes (the first
part of "AutoScroll").
For example my code calls someControl.Focus() which results in scrolling
even if the someControl is partially visible. Tab ... more >>
Bound Control Problem
Posted by Peder Y at 4/19/2005 10:25:55 PM
I have a DataTable with "FirstName" and "LastName" columns.
How can I get my bound combo to show both these values as DisplayMember?
Thanks!
- Peder -... more >>
Binding on non-default property sets datarowstate modified
Posted by Johan Jooris at 4/19/2005 7:04:53 PM
Hi,
I've got the following problem with databinding:
If I bind a column of a dataset e.g. on the Text property of a Textbox,
everything acts as expected, i.e. if you don't make any changes to the text
in the textbox, the rowstate of the bound row stays unchanged.
On the contrary, when you... more >>
Datagrid combobox.. problem
Posted by Kina at 4/19/2005 5:01:01 PM
Hi,
I need to to have a combobox column on the grid.
The problem is when the user selects a value from the combo , when the user
clicks the combo in another row i need to remove the previously selected
value from the combo list. So the user has only the left available values to
be selecte... more >>
Changing Button shadow properties in C#
Posted by kingram at 4/19/2005 2:35:02 PM
I would to chand the default colors used to make a button look 3d. How do I
do that in c#.... more >>
Config file doesnt work when hosting control in IE as an ActiveX control from file system
Posted by ryanyoder NO[at]SPAM hotmail.com at 4/19/2005 2:23:49 PM
I want to install my user control in the GAC, regasm it and run it in a
browser without pulling the control from a web URL.
This is possible and explained in the MSDN KB article 305624
http://support.microsoft.com/d=ADefault.aspx?scid=3Dkb;en-us;Q305=AD624
I tried this and it works fine ex... more >>
icons on XP and W2k
Posted by + Kennedy Kok + at 4/19/2005 2:03:20 PM
I have a .NET application which is targeted at both W2k and XP. My form's
icons are XP style icons 32-bit. When it is running on W2k, the icons do not
look correct. I understand that W2k does not support 32-bit icons with 8-bit
alpha channels. My question is what can I do so that when my app i... more >>
Program won't work on one machine!!
Posted by Aaron at 4/19/2005 1:12:04 PM
Help!!! My program is working on other machines but no matter how much I try
it won't work on one of them. Here is the coredump, any help is
appreciated!!!
Microsoft (R) Common Language Runtime Test Debugger Shell Version
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All righ... more >>
firewalls & SQL Server connection
Posted by Stephen Russell at 4/19/2005 10:38:29 AM
I have a client that just bought new equipment. SP2 is installed as well as
Norton Firewall.
What are the steps I need to do to open up SQL server so they can access the
server now?
How do I find the port that SQL is running on is probably another Q.
TIA
__Stephen
... more >>
No sorting event available when sorting DataGrid columns!!!
Posted by Nad at 4/19/2005 9:49:03 AM
Hello,
I set my DataGrid.AllowSorting to true but there is no sort event to do some
processing! All I can think of is inside the click event which is not what I
really want because click event occurs before DataGrid is sorted.
Any comments?
... more >>
DataGrid: How to know which column header is clicked?
Posted by Nad at 4/19/2005 9:46:03 AM
Hello,
I have a DataGrid with one table in its TableStyle collection. The
TableStyle collection contains a ColumnStyle of some columns with headers
being visible.
Is there a way to find out which column header is clicked other than
calculating mouse cursor's position and checking it agai... more >>
mdi child of a child
Posted by oscar at 4/19/2005 7:58:02 AM
how do you make all child forms part of the container?
the container opens the form and it is a child (stays withing the container)
but when the child opens a form it is free floating. is there a way to make
the child's child stay within the container?... more >>
Invalidate() [No reply needed]
Posted by David Veeneman at 4/19/2005 7:47:13 AM
This post is for the Google crawler-- no reply is needed.
I had a problem getting the Windows Forms Invalidate() method to work on a
UserControl. Calling the method should force a repaint of the form, but the
repaint wasn't occuring. The solution is to add a call to the Update()
method imme... more >>
MaskedTextBox.InputText disappeared in 2.0 ?
Posted by VisualHint at 4/19/2005 5:12:57 AM
Hi,
My C# library is not compiling anymore with express C# beta 2 because I
was using MaskedTextBox.InputText.
The new msdn documentation still references this property from the
overview page of this control but does not contain the actual page for
the property anymore.
Is it a bug or has it... more >>
Correct Approach to Multi-Threading Issue
Posted by Colmeister at 4/19/2005 3:09:03 AM
I've done a lot of reading about multi-threading (I come from a VB6
background so these things are new to me) but I can't find an example of my
exact scenario.
It's very simple, I've got a worker thread which needs to read the Checked
property of a checkbox on a form. I gather that I can't... more >>
WM_MOUSEWHEEL
Posted by Smoothcoder at 4/19/2005 2:30:02 AM
Hi,
Could you, please, answer this: I have a panel control (with NO scroll
(AutoScroll = false)) on whose surface I draw a Gantt diagram; I want to
catch the WM_MOUSEWHEEL = 0X020A message but the panel refuses to catch that
message; I tried with WndProc, with override OnMouseWheel... every... more >>
Monospaced font size
Posted by Bjornkarl at 4/19/2005 2:08:01 AM
I am writing an application that draws text directly on the on the form
surface. The App must run on both .Net Compact Framework and the Normal .Net
Framework 1.1. I need to use Monospaced Font like Courier New (or
FontFamily.GenericMonospace). It is very important that each character takes... more >>
inherited form problem: designer won't paint controls
Posted by Brian G. DeKorte at 4/18/2005 4:17:14 PM
I have an inherited form.
The base class has some panels and a splitter for resizing them
In the inherited form, I've placed some child controls in the right-panel.
This all works fine, run the app everything looks great.
Go back to form in designer, and now it won't paint the new child contro... more >>
Edit a Menu in a component using Visual Studio
Posted by Jeronimo Bertran at 4/18/2005 3:08:44 PM
Hi,
If I add a menu (or context menu) to a component class by dragging it from
the toolbox, it is added correctly but I can't find a way to edit it. The
Edit Menu command appears in the context menu for the item but it doesn't
seem to do anything.
Thanks,
Jeronimo Bertran
... more >>
TabControl.SelectedIndexChanged event?
Posted by Nad at 4/18/2005 2:37:43 PM
Hello,
The SelectedIndexChanged event of TabControl object occurs when a tabpage is
selected.
I need to do some processing when user selects a new tabpage but before the
SelectedIndex has changed to the newly set tabpage index. I would call such
an event SelectedIndexChanging which would... more >>
Printing on a pre-printed form with VB.NET
Posted by Chris at 4/18/2005 2:07:10 PM
Hello Everyone,
I need to print on pre-printed form from my VB.NET app. The form I am
printing on has about 200 fields and each field needs to be justified
seperately. CR for .Net isn't giving me accurate output. The CR is close,
but a little off here and there and adjustments haven't w... more >>
Error When Adding an .ico file to the "Image" Property of a PictureBox Control
Posted by T-Man at 4/18/2005 12:44:31 PM
Hello All,
I am trying to load an icon file (.ico) into a PictureBox control using C#
..Net.
This type of file worked fine under VB6.
According to .Net documentation, it should work fine here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconDisp... more >>
OnLoad called multiple times
Posted by allancady NO[at]SPAM yahoo.com at 4/18/2005 11:54:20 AM
I'm getting started building a composite control, with my control being
derived from UserControl. For some reason, my override of
UserControl's OnLoad is being called four times for a single instance
of my control. I haven't been able to figure out why this is.
I had the same code implemente... more >>
NumericUpDown validate
Posted by Barguast at 4/18/2005 6:56:03 AM
Is there a way to check whether the current value in a NumericUpDown control
is valid? Whenever I check the 'Value' property, it always automatically
brings itself back within the limits specified by the Minimum / Maximum
properties which makes it impossible to check the compare the value manu... more >>
Forms in Tab control
Posted by RbanBph at 4/18/2005 2:37:05 AM
Hi,
I want to dispaly different forms in different tab pages of tab
control. How can I do this?
any help is appreciated.
Regards,
RbsnBph... more >>
Forcing a window into the foreground
Posted by dhbayne NO[at]SPAM ihug.co.nz at 4/18/2005 1:41:36 AM
Hi All,
I am trying to write an application (an OOS exercise tool) that will
periodically display a form in the foreground, and move back to the
foreground every time it loses focus, or once every 1/10th of a second
by a timer.
The problem is that myForm.BringToFront() isn't working; the
... more >>
c# - Detecting Properties button click on PrintDialog
Posted by dazzler at 4/18/2005 1:41:02 AM
I display the print dialog using the ShowDialog() function. On the print
dialog there is a properties button.
I need to detect when this properties button has been clicked as i want to
re-calculate the total pages possible to print as this value can change when
moving between portrait + la... more >>
Binding a TextBox to a DataGrid
Posted by Peder Y at 4/18/2005 12:00:00 AM
How do I bind a TextBox to a DataGrid? If I bind it to the DataGrid
DataTable, the TextBox doesn't get updated when I select another row. Do
I need to handle some DataGrid events?
- Peder -... more >>
Thread problems with own ApplicationContext,
Posted by eskeeske at 4/17/2005 10:42:07 AM
If i have a Sys Tray Application, with a ApplicationContext but with no
main form - How can i then call methods that e.g shows forms ???
The problem is that because there is no main form, there is no methods
like invoke ??
I found this q about it, but it does not solve my problem because in
... more >>
Adding blank row to Combo Box
Posted by Hemang Shah at 4/17/2005 12:00:00 AM
Hello
I'm sure others have asked this before, now its my turn!
Combo box with "DropDownStyle" is set as "DropDownList"
Once a user selects a value, how can they select null again ?
Or if there are 4 combo boxes on the form, once someone selects the first
time and saves the data, all th... more >>
Winforms and cookies
Posted by philbo NO[at]SPAM gmail.com at 4/16/2005 5:01:20 AM
Is there any way I can access a cookie stored by a browser from a winform?
Thanks,
Phil... more >>
Equivalent to OnUpdateCmdUI? (how to update menus/toolbars in .NET?)
Posted by Scott Smith at 4/15/2005 10:09:13 PM
I'm working on the first non-trivial application written in C#/.NET, and I'm
having to implement a lot of the framework that was provided in MFC.
In particular, menu items and toolbar buttons would
enable/disable/check/whatever automatically, as long as you handled the
OnUpdateCmdUI message... more >>
Selecting entire row in DataGrid
Posted by Bachus at 4/15/2005 7:22:05 PM
Hello,
Is there any way to disable highlight on selected cell in DataGrid ?
I want to select entire rows and only rows in my DataGrid.
DataGrid is readonly.
I put that into my code :
private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs
e)
{
dataGrid1.Select(dataGr... more >>
Transparent controls
Posted by Mikhail Fedosov at 4/15/2005 7:13:20 PM
Hello All!
Assume that we have a control which draws something on its background. I
need to place some labels and checkboxes on this control. And how can I make
the background of these controls to be transparent? I just want from label
and checkboxes to display only text, but not its back c... more >>
WinForm Timer question?
Posted by Kenny M. at 4/15/2005 1:58:02 PM
How much and dangerous is the WindForm Timer for my application?
Is it loding the memory while it is running?
thks
--
... more >>
Using .NET windows forms controls in an _embedded_ browser control
Posted by Manny Vellon at 4/15/2005 12:30:57 PM
I'm interested in using .net windows forms controls (datagrid, etc.) in my
app. My app, however, uses an embedded web browser control for its UI (for
easier content authoring). Pages are loaded locally (using file:// urls).
I've read examples of how to do this with IE and http protocol, but c... more >>
VB6 to VB.Net Conversion
Posted by Shariq at 4/15/2005 11:50:02 AM
Could someone please help me converting the following lines of vb6 code to
vb.net. The message box should display "1/3/2005" if it is executed today.
Private Sub Form_Load()
Dim nWeekNumber As Integer
Dim ThisYearStart As Date
ThisYearStart = YearStart(Today, 2)
msgbox ThisYea... more >>
How do you prevent tablestyles from serializing in a custom DataGrid?
Posted by Dave at 4/15/2005 10:58:58 AM
I have a custom DataGrid called BasicDataGrid : DataGrid and I have an
internal variable that keeps track of the table styles, but this
internal variable keeps serializing!
Is there a way to prevent this object from serializing?
Thanks,
Dave
... more >>
How to get control clipping region?
Posted by Julie at 4/15/2005 10:26:50 AM
How do you retrieve the visible clipping region for a control?
I have a control where I do some on-screen drawing (specifically
ControlPaint.DrawReversibleLine()), however I need to clip the line to the
visible bounds of my control.
Obviously, the client rect is simple enough to retrieve, ... more >>
form losing topmost state
Posted by Tony at 4/15/2005 7:50:05 AM
Is there something that can change the TopMost=true status of a form to
become false at a later time during running?
My code only has the statments
this.TopMost = true;
A search for TopMost only finds these statements within
#region Windows Form Designer generated code
I am testing wi... more >>
Main Form loses focus
Posted by TF at 4/15/2005 5:35:56 AM
hi,
I am developing a windows form application in VB.Net that has a splash
screen in the begining before the application loads the main form. To
display splash screen i am loading splash form in the "main" sub in a
seperate thread that periodically checks a static property
"IsFormLoaded" of the... more >>
Form Opacity - setting it back to 100%
Posted by Phil Jones at 4/15/2005 12:00:00 AM
I'm doing some stuff with the Form's Opacity property.
Basically I'm changing it's opacity to less than 100% when it's being moved,
and then resetting it to 100% upon completiong.
What I find is that after the Opacity property has been adjusted (to
anything), and then reset to 1, the form ... more >>
|