Databound ListBox Won't Update on Clear?
I have a ListBox control bound to an ArrayList:
m_expressionFilters = New ArrayList
m_expressionBindingManager = BindingContext(m_expressionFilters)
lstboxFilters.DataSource = m_expressionFilters
When I add an Item to the ArrayList, that change is immediately reflected in
the ListBox:
m_expressionBindingManager.SuspendBinding()
m_expressionFilters.Add(CurrentFilter)
m_expressionBindingManager.ResumeBinding()
However, when I call the Clear method of the ArrayList, the changes are not
reflected in the ListBox:
m_expressionBindingManager.SuspendBinding()
m_expressionFilters.Clear()
m_expressionBindingManager.ResumeBinding()
At this point, the m_expressionFilters ArrayList has a Count of zero, but
the Items formerly held in the ArrayList are still listed on the form in the
ListBox. I have tried calling the Refresh and Update methods on the
ListBox, but that produced no visible changes at all.
Any help or advice would be greatly appreciated.
Carl Tag: Take over screen. Tag: 95151
crystal integration
Using v1.1 of the .Net Framework, I added a Crystal Report item to my
solution as an embedded resource. My problem is that when I drop a
ReportDocument component onto my form, the window that prompts me to select
a typed reportDocument does not include in its drop-down the embedded report
that I added, and so I can't integrate the report into the form thru the
crystalReportViewer. Any idea why I wouldn't see the report show up in the
drop-down?
Thanks! Tag: Take over screen. Tag: 95147
Handling System Shutdown in a WindowsForms App
Hi. I have an application that runs as a Tray Icon app with no visible window
(most of the time) and right now, the system will not shut down while that
app is running. I think I need to handle "SystemEvents.SessionEnded" or
something to properly deal with that but I don't understand how, inside the
code for my Main Form for the application, I set up a handler for the event
and then what I actually DO with the event once it comes (though I assume I
just do whatever I would normally do to exit my application grcefully).
Can someone help me with a sample?
Alex Tag: Take over screen. Tag: 95141
Detect any kind of activity in a window.
I need to write a function so if the user doesn't do anything in 15 minutes,
it will log them out. I've got the timer set up fine I'm just looking for an
easy way to detect people doing anything. What's the easiest way to do it?
It looks like it may be mousemove on the windows. Is this reasonable?
TIA - Jeff. Tag: Take over screen. Tag: 95140
ListView.tag lost object
Hi,
I have a Form with two ListViews; The ListViews are diplayed on the
Design surface, but I progmatically adding the items to each ListView.
When adding the items to the list view I am iterating through and
setting the following:
...
With myListViewItem
.Text = drArticles("Title").ToString
.ToolTipText = drArticles("Summary").tostring
.Tag = CType(drArticles("ID"),Guid)
End With
myListView.Items.Add
...
This works fine and the items are displayed.
The problem arises when I respond to a SelectedIndexChanged event I can
retrieve the .ToolTipText and .Text values from then
SelectedListViewItemCollection but the .tag property is always empty (it
knows the object type is GUID but does not have the value. I know the
value is being set as I can set the ToolTipText to same ID as the TAG
and it is stored correctly.
Any ideas?
Many thanks in advance Tag: Take over screen. Tag: 95138
ListView.tag loast object
Hi,
I have a Form with two ListViews; The ListViews are diplayed on the
Design surface, but I progmatically adding the items to each ListView.
When adding the items to the list view I am iterating through and
setting the following:
...
With myListViewItem
.Text = drArticles("Title").ToString
.ToolTipText = drArticles("Summary").tostring
.Tag = CType(drArticles("ID"),Guid)
End With
myListView.Items.Add
...
This works fine and the items are displayed.
The problem arises when I respond to a SelectedIndexChanged event I can
retrieve the .ToolTipText and .Text values from then
SelectedListViewItemCollection but the .tag property is always empty (it
knows the object type is GUID but does not have the value. I know the
value is being set as I can set the ToolTipText to same ID as the TAG
and it is stored correctly.
Any ideas?
Many thanks in advance Tag: Take over screen. Tag: 95137
Close all windows in a VB.Net program
I've got a VB.Net program where under a condition I want to close all of my
windows (logging out the user due to inactivity). Is there a way to close
all of the currently open windows without going through each one to check if
it exists?
TIA - Jeff. Tag: Take over screen. Tag: 95136
General Windows Forms and Memory Question
I am seeing an interesting memory issue with a winform in my application.
I've noticed everytime I show a form in my application, the memory usage
increases. When I close the form, the memory isn't released. The only time
the memory is released is when I "minimize" the application. Eventually,
overtime, my application consumes a good amount of memory.
Has anyone experienced this?
Thanks,
Yosh Tag: Take over screen. Tag: 95135
ClickOnce returns XML instead of starting application
Hi
I just deployed a ClickOnce Application to a Windows 2000 Server, which only
has .NET 1.1 installed.
When I launch the application via the auto generated html page I get the
.Application XML back. I was expecting the application to launch.
If I deploy the same SmartClient to my local XP machine with .NET 2.0, the
applications installs and starts just fine.
Am I missing something? Do I need to install .NET 2.0 on the Windows 2000
server, or do I need to register some MIME types on the server? If so, could
you please provide a link (I can't find anything in the documentation... but
I found place that said that I should be able to deploy to any HTTP 1.1
compliant web server).
Please help.
Thomas Tag: Take over screen. Tag: 95132
.NET 2.0: ToolStripTextBox with Caption?
In a Winforms 2.0 application, I have a StatusStrip which hosts a
ToolStripDownDown item to display a small menu. The menu consists of
two checkable menu items and one ToolStripTextBox . Now I want to
display a simple caption on the left of the textbox. I cannot seem to
find an easy possiblity to do this, altough this seems a very common
scenario to me. After all, which programmer wants to just display a
textbox without any caption? Can somebody help me? Do I really have to
bake my own control inherited from ToolStripControlHost just for this?
Thanks for any help
Urs Eichmann Tag: Take over screen. Tag: 95129
propertygrid hosting in IE
I am not able to get properties in propertygrid with custom TypeConverter
working properly when hosted in Internet Explorer. Please help Tag: Take over screen. Tag: 95128
TabControl.OnDrawItem
Hello ppl!
I am manually drawing tab items in a TabControl by using a handler attached
to the DrawItem event on such control. I am using rectangles inside the
Item's region
for the background and drawing strings for text using the graphics object
provided in the DrawItemEventArgs. I al also painting the aread just to the
right of the last tab with another rectangle in the same DrawItem event.
The form runs just fine and I can see the tabs asd intended on the initial
load. However, as I move the form to either the left or right just beyond
the screen, my painted rectangle simply dissapears or gets smeared. If the
form is moved beyog the screen's upper or lower boundaries the rectangle gets
painted again. This also happens if another window is on top of the
tabcontrol. I tried timers for refreshing the control and the form. Tried
also a refresh on the form on a Move event and managed to eliminate the
problem is the form moves beyond the right screen boundary but still the
same problem on the left boundary. Anyway I can work around this?
Thanks in advance
sampe code of the event handler:
private void tabControl1_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)
{
Graphics g = e.Graphics;
int lastTabIndex = this.tabControl1.TabPages.Count-1;
System.Drawing.StringFormat textFormat = new StringFormat();
textFormat.Alignment = StringAlignment.Center;
textFormat.LineAlignment = StringAlignment.Center;
textFormat.Trimming = StringTrimming.None;
textFormat.FormatFlags = StringFormatFlags.NoWrap;
Rectangle tabRect = this.tabControl1.GetTabRect(e.Index);
Rectangle lastTabRect = this.tabControl1.GetTabRect(lastTabIndex);
//filler rectangle beyond last tab
g.FillRectangle(new SolidBrush(Color.Blue), lastTabRect.Right,
lastTabRect.Top, this.tabControl1.DisplayRectangle.Width,
lastTabRect.Height);
//tab Item background
g.FillRectangle(new SolidBrush(Color.Red), tabRect);
//Item text
g.DrawString(this.tabControl1.TabPages[e.Index].Text,
e.Font,
new SolidBrush(Color.White),
tabRect,
textFormat);
} Tag: Take over screen. Tag: 95127
Splashscreen disappears
I added a Splashscreen to my Windows Forms project.
I specified it in Project - Application Tab - Splash screen.
When I launch the project the splash screen turns up, which is fine.
BUT then a NullReferenceException is thrown!
I turned on "Break when an Exception is thrown" but it will not stop on a
code line that is visible to me.
My application uses a frmMain as start form.
The frmMain code is enclosed by a Namespace.
When I enclosed the SplashScreen code in the same Namespace and modified
Project - Application Tab - Splash screen to point out the new full name,
then the problem disappears, but so does the SplashScreen .......!
As far as I can see there are no more settings I should have set to get it
working. Tag: Take over screen. Tag: 95126
Control to graphically connect listviews (or treeviews)
Hello.
I'm lookin for a way to have two listboxes whose some elements can be
connected graphically by an arrow. The arrows should 'move' as the listboxes
scroll, 'following' the elements they are attached to.
It should be similar to the relations fields in graphic
representation of SQL queries (as in Visual Studio's Query Designer)
I'd like to have a similar effect with two treeviews (whose element can
connected by arrows, as in Biztalk Mapper)
Does anyone know if there is a third party control that allow this?
Thank you. Tag: Take over screen. Tag: 95125
Smart Client Offline Application Block in .NET 2.0?
Hi,
Couple of questions:
1. Does anyone know whether Microsoft have plans to redevelop the SCOAB for
.NET 2.0?
2. Has anyone had experience using the existing release of SCOAB with .NET
2.0?
We have recompiled the block in 2.0, and there are lots of warnings and a
couple of compile errors (to do with Win32 calls using unsafe code within
the caching component) in the release build.
Thanks,
Chris Tag: Take over screen. Tag: 95124
Run Time Controls
hi,
I'm adding 5 Text box controls during runtime in my windows application. I'm
adding those in a for loop.
But i got only one text box as result in my form.
Why like this? And what i have to do for displaying all 5 text boxes?
Regards,
Gomathi Tag: Take over screen. Tag: 95117
guide to design a custom/ flashy windows application
I did developed a windows application which mainly does the function of
displaying data and updating the data changed by the user using visual
studio.net 2003
Now I want to improve the look and feel of the user interface of the
application. I tried embedding some pictures onto the forms and then
making the labels to have transperent color. But this change throwed an
'Invalid Value' error.
Any suggestions for my issue resolving or regarding the development of
user interface is greatly appreciated.
Thanks in advance
arun Tag: Take over screen. Tag: 95108
Serializing/Deserializing from a Modal UI Editor
I created a control that I derived from Windows Forms Control. I added one
string property, which is the name of a file. This property is a Modal UI
Editor property for which I provided a form named ShapeEditor. When the user
presses the ellipsis in the Properties window of the control in the IDE,
ShapeEditor is displayed and enables the user to draw shapes. The shape
objects are collected in an ArrayList and then serialized to a file using a
BinaryFormatter as follows.
FileStream sw = new FileStream(ShapesFileName, FileMode.Create);
ArrayList Shapes = new ArrayList();
// Create shapes and populate Shapes.
....
Shapes.Add(ShapeObject);
.....
// Then serialize
bf.Serialize(sw, Shapes);
// Deserialization is the reverse:
Shapes = new ArrayList();
sr = new FileStream(ShapesFileName, FileMode.Open);
BinaryFormatter bf = new BinaryFormatter();
Shapes = (ArrayList)bf.Deserialize(sr);
// Use objects
foreach (ShapeObject s in Shapes)
Here is the problem.
When I invoke ShapeEditor from the properties window
foreach (ShapeObject s in Shapes)
fails with an invalid cast exception even though Shapes[0].GetType() returns
a ShapeObject.
However, if I invoke ShapeEditor from a running program, everything works
fine(the same code is executed). It is as if the IDE is somehow interferring
with the deserialization.
Any help greatly appreciated. Tag: Take over screen. Tag: 95107
Custom Control ClipRegion Question
In a few of my custom controls, I need to ensure that when the control goes
from a partially obscured state to a fully exposed state, that the entire
ClientRectangle control is re-rendered, rather than just the portion that
was exposed. This seems like a simple thing, yet my simple mind hasn't come
up with a solution that works in all cases...
I've tried Graphics.SetClip, btw, and it didn't do anything. Perhaps I
haven't interpreted the black box correctly...
Any ideas appreciated... Tag: Take over screen. Tag: 95106
BindingSource vs. old binding
I'm getting myself confused about the new BindingSource. In the old days I'd
bind a combobox like this to show the "productName" field:
DataSet ds = getDS();
cboX.DataSource = ds.Tables["Products"];
cboX.ValueMember = "productID";
cboX.DisplayMember = "productName";
Now I guess I can do this:
BindingSource bs = new BindingSource(getDS(), "Products");
which sets the bs.DataSource and the bs.DataMember (ie the table within the
dataset).
But, how do I tell it what field to display when the table has multiple
fields? There is no longer any DisplayMember or ValueMember property. Tag: Take over screen. Tag: 95105
Problem changing the size property in the Resize event
I am trying to preserve the aspect ratio of a form when it is resized. To
simplify the problem, I'm starting with a square form, and trying to keep it
square when either the width or height is changed. My code is based on the
example found in MSDN, July 2005, for the Control.Resize Event.
Here is the relevant code:
public class Form1 : System.Windows.Forms.Form
{
private Size _previousSize;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
_previousSize = this.Size;
}
private void Form1_Resize(object sender, System.EventArgs e)
{
Control control = (Control) sender;
System.Console.WriteLine(
"Height={0}\tWidth={1}",
control.Size.Height, control.Size.Width);
Size newSize;
// Ensure the Form remains square (Height = Width).
if (control.Size.Height != _previousSize.Height)
{
System.Console.WriteLine(
"Height changed: oldSize={0}", _previousSize.ToString());
newSize = new Size(control.Size.Height, control.Size.Height);
System.Console.WriteLine("newSize={0}\n", newSize.ToString());
_previousSize = newSize; // save new value for previous size
control.Size = newSize;
}
else if (control.Size.Width != _previousSize.Width)
{
System.Console.WriteLine(
"Width changed: oldSize={0}", _previousSize.ToString());
newSize = new Size(control.Size.Width, control.Size.Width);
System.Console.WriteLine("newSize={0}\n", newSize.ToString());
_previousSize = newSize; // save new value for previous size
control.Size = newSize;
}
}
}
My code writes some debugging data to the console.
Here is the debugging data that is produced when I execute the Size command
from the control menu of my form, and press the right arrow key three times.
Height=300 Width=311
Width changed: oldSize={Width=300, Height=300}
newSize={Width=311, Height=311}
Height=311 Width=311
Height=300 Width=322
Height changed: oldSize={Width=311, Height=311}
newSize={Width=300, Height=300}
Height=300 Width=300
The first press of the right arrow key just starts the resize operation. On
the second press of the key, the code changes the Height from 300 to 311.
But on the third press of the key, the Height has changed back to 300 on
entry to the Resize event. That is the problem.
On the screen, the form alternates between increased sizes and its original
size.
Does anyone know what's causing this problem? Tag: Take over screen. Tag: 95104
Problems with Fonts in Visual Studio .NET
I am trying to build a Windows applications with some special fonts (DIN).
However, after installing the fonts, the fonts appear in almost all editors
except Visual Studio .NET. Infact, the font even appears in the dropdown
list box to select a font in the Tools | Options | Environment | Fonts and
Colors dialog box... but for some reason, I cant use it in building
applications... I dont see the the font listed in the drop down for Labels,
Button Names, Form Names and such.
Any help would be greatly appreciated.
Thanks. Tag: Take over screen. Tag: 95100
Custom message window
Hello,
I want to make a custom message window on my app, I want to fit my window
size to the number of lines on my string message. How can I do that? some
place with FAQs about. Tag: Take over screen. Tag: 95095
Create an object surface using GDI+
Hi,
I'm trying to create an object surface (much like PowerPoint's, but for
easier things) using GDI+. I mantain a record of the objects, and their
properties, so as of now I'm able to paint the items in the Graphics object.
However, I also need to make some work with this objects. The first one
is to know, when the user clicks somewhere, in which of the items he or
she has clicked. As first, I was trying to use Rectangle methods, but my
items can be rotated, so it doesn't work very well.
Second, I need to move the items, so I don't know how to do it well. For
example, an user clicks on an item, a popup menu shows, and selects
rotate. The actual results must be shown on the screen until the user
accepts the changes.
Is there any tutorial / information / help available for waht I'm
looking for?
Thanks in advance Tag: Take over screen. Tag: 95089
Treeview Question
I realize now that I most likely should have programmatically created my
(many nodes) treeview instead of using the designer to add nodes.
It was more convenient, but since each double-click of an item outputs
different information, I really need to go back and forth between the name
of each node and the output sub's Select Case statement - -
That being said, - now I'm at a crossing point - -
So - now I need to change over so that the entire tree is built
programmatically in the form's load event.
Is there any way to export all the nodes created in the Designer, so that
they can be easily converted to a programmatic building of the treeview? Tag: Take over screen. Tag: 95085
multiselect print documents word VBA6
I have populated a list box which has been activated for multiselect. The
list box has approx 15 names within it that corrospond with documents. I wish
the user to be able to make mutiple selections and the corrosponding
documents to be printed. However failing dismally at getting the right code.
Could anyone possibly help please Tag: Take over screen. Tag: 95083
CheckedListBox displaying duplicated items(V2.0)
I have a CheckedListBox, I add an item with .Items.Add() and get two entries
displayed. If I try to select the second one I get a null reference error.
(It's sorted, but unsorted has the same problem.)
Am I doing something wrong?
.net 2.0, WinXP Pro Tag: Take over screen. Tag: 95080
can messagebox be used in object not derived from winforms
Can I actually use a messagebox within my own class which is not derived from
Forms?
Thanks,
--
---He who will not economize will have to agonize. ----- Tag: Take over screen. Tag: 95079
DatagridView, Data Binding, New Row
Hi!
I have this scenario: I have a windows form. I have a DataGridView Control
which is bound to a DataSource. Under the DataGridView I have texboxes which
represent each one of the columns in the Datasource (also shown in the
datagridview)
As I move from row to row, the values of the textboxes (which are also bound
to the datasource) change according to the value of each column of such row.
That is perfectly normal.
I have set the DataGridview not to allow user to add edit or delete rows so
they must press a button to "Add New Row".
How do I move (Or select) the row pointer to the New row (last row) such
that the bound Textboxes point to the new row (showing empty values of
course). In this way the user can type any value into the texboxes and
therefore update the new row.
Thanks!
--
I love .NET! Tag: Take over screen. Tag: 95078
How to bring a foreign window to top?
Hi,
from a dotnet winform application I start a process which is a Windows
application. I want the window to stay visible even if the user clicks on the
winform window.
I tried to call BringWindowToTop:
[DllImport("user32.dll")]
public static extern Boolean BringWindowToTop(IntPtr hWnd);
IntPtr hWnd=process.MainWindowHandle;
bool bResult=de.itools.util.Win32.ApiCalls.BringWindowToTop(hWnd);
where process is the System.Diagnostics.Process which was startet before. I
get true as result, but the window does not come to foreground.
As this doesn't work I tried with other window handles:
IntPtr hWnd=process.Handle;
or
IntPtr hWnd=de.itools.util.Win32.ApiCalls.GetTopWindow(
process.MainWindowHandle);
or
IntPtr hWnd=de.itools.util.Win32.ApiCalls.GetTopWindow(
process.Handle);
but with no success. It seems all these calls dont affect the window at all.
TIA
Frank Tag: Take over screen. Tag: 95077
overflowbutton@toolstrip
Dear all,
I have in C# 2.0-Application of me insert a toolstrip-Menu, something comes
to a overflow, and a overflow-button is displayed. Because I have custimize
the toolstrip-menu, I will custimize the overflow-button too.
I custimize the overflow-button with the command
this.toolStrip1.OverflowButton.ShowDropDownArrow = true;
this.toolStrip1.OverflowButton.Text = "More >>";
this.toolStrip1.OverflowButton.ToolTipText = "MORE >>";
this.toolStrip1.OverflowButton.DisplayStyle =
ToolStripItemDisplayStyle.ImageAndText;
this.toolStrip1.OverflowButton.Font = new System.Drawing.Font("Arial",
11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
((byte)(0)));
this.toolStrip1.OverflowButton.Enabled = true;
this.toolStrip1.OverflowButton.Visible = true;
this.toolStrip1.OverflowButton.BackColor =
System.Drawing.Color.CornflowerBlue;
....
And when I run the Application, the will displayed in the "normally" Style.
Why? Can you help me?
Another global settings:
OS: Win XP
Windows Style: Classic and the XP-Style
Tool-Strip-Render Mode: System
Best regards
stift Tag: Take over screen. Tag: 95074
howt use global variable like functionality in vb.net?
hi ..
im kind'f new to vb.net ..
how do i make use of a global variable like functionality into my vb.net
application
for the purpose of user management ?
i just found this document
http://dotnet.mvps.org/dotnet/faqs/?id=accessmainform&lang=en ... using
which i can read the main forms content but what if i want to set\change
certain values of the main form?
--
Renjith Chembakarayil Tag: Take over screen. Tag: 95073
Using listbox multiselect option
Please Help, Im using word VBA 6 I belive. I have populated a list box with
approx 15 document names. I wish the user to be able to multiselect the
documents, then press a command button to print out the various selected
documents. However having real problems getting even close to the right code.
Can anyone help Tag: Take over screen. Tag: 95072
Multiselect list box to print out mutiple documents
I have a populated list box (20 items) all documents names. I wish the user
to be able to multiselect the documents, press a command button and have all
the selected documents print. However Im having real problems with how to
write the code for this, can anyone help please Tag: Take over screen. Tag: 95070
How to Cancel all Databindings
I have databound an object to some controls in a edit-form. I would like to
allow the user to cancel all the changes made by pressing "Cancel" button or
confirming the changes by pressing "OK". I rather don't want to manually
transfer the properties from a cloned object ... is there a way of doing
this nice and tidy the .net way?
/Andreas Zita Tag: Take over screen. Tag: 95068
datagrid Vs gridcontrol
Normally, I use datagrid in my applications. Since, I have Xceed controls,
I've replaced the datagrid with gridcontrol (from Xceed components).
But at the run time, the previous datagrid is visible, instead of replaced
gridcontrol....can 'YOU' help me?
Thanks in advance....
davidsnoah@yahoo.com Tag: Take over screen. Tag: 95064
Firing an event whenever a control is added
Is there an event which fires whenever a control is added to a
ControlCollection? There doesn't seem to be, but I'm wondering if
there's a kludge anyone's come up with to spot whenever a control is
added?
Cheers,
Andy D Tag: Take over screen. Tag: 95063
Greyed options in ListBox .NET 2.0
Hi folks,
I have a situation where I might like to grey out certain options in a
ListBox and hence make them unselectable. Does anyone know if this is
possible?
Comments are welcome, but I'm fully aware that I could just remove the
options that I don't want selected, and in fact I may well just do that
but it would make more sense for my application if I could leave them
there but greyed out.
Cheers
Simon Tag: Take over screen. Tag: 95061
Date Format Changes from Regional Settings
HI All,
I have a problem can anyone help?
We are using DateTimePicker control for date editing on many forms.
Now we have a special requirement that if a user will change the datetime
format from the regional settings then the new datetime format must not
update in the DateTimePicker control (which actually updates those changes
on runtime) untrill user will restart the application.
I tried to find any solution but failed. Can anyone help?
Thanks
Naeem Tag: Take over screen. Tag: 95060
Using RichTextBox when having AcceptButton
Hi,
If I use a RichTextBox in a form with no buttons, the user can use <enter>
for new line with no problem. If I have an AcceptButton in the form, the
<enter> button will press the key instead of inserting a new line.
Does anyone know how to solve this?
Thanks!
/Mats-Lennart Tag: Take over screen. Tag: 95059
Colour coding a cell in the windows datagrid
The grid's last cell in the 2nd row should be coloured red at all
times.I have subclassed the DataGridColumnStyle's that represent a
column, overriden the Paint method and set the background brush to
red.But my grid does not seem to use the overriden paint method in
subclass.Can anyone please help me out and tell me what may be the
problem?????..
*** Sent via Developersdex http://www.developersdex.com *** Tag: Take over screen. Tag: 95057
KeyPreview property for mu custom Container Control?
Hello,
I've created a custom container control and I want to have the same effect
where "KeyPreview" has for a form. In short, I want to catch all the key
events occured within the control (Also in inner controls).
Is there any easy way for this or should I trap the "KeyDown", etc. events
of all the controls inside my control?
Regards,
Özden Tag: Take over screen. Tag: 95053
C# VS 2005 Class Library / Windows Form Frustration (BUG?)
Greetings,
I may have encountered a bug, but a very frustrating one. Took me hours to
figure out what the problem is and how to reproduce it. The best way to
explain how to reproduce it is to explain my need, I want to create a
library called "CompanyName.Console" and have a class called Console. But,
I don't want the fully qualified namespace and object to be
CompanyName.Console.Console (because it is redundant). so do these steps:
1. Create Class Library called "Test.Console"
2. Rename Class1 to Console and the constructure
3. Build it
4. Change the namespace to read CompanyName (instead of CompanyName.Console)
5. Add a new Windows Form. You'll get a Designer exception.
If you omit step 4, it works just fine.
Is this a bug or design by behavior?
Thanks,
Shawn Tag: Take over screen. Tag: 95049
Datagrid: How to allow user edit and program update?
Hi,
I am trying to program in VB around the datagrid control.
I have a dataset representing my application domain.
My dataset is linked to my datagrid, so that anytime I change the value
of a column in my dataset, the datagrid gets updated. Internal updates
are triggered by internal events (timer, remote calls...).
But if the user is editing the same row that my program updates, then
the current cell edition will be canceled, and the user looses what he
is typing.
How can I avoid this?
How can I have the datagrid reflect dataset row updates and let the
user edit the same row (different column)?
Thanks for your hints!
Thomas Tag: Take over screen. Tag: 95048
data bings for tree view
What is possible?
I tried array list with tree view and got empty view - no nodes.
Which objects can TreeView be bound to? Any samples?
Thanks Tag: Take over screen. Tag: 95046
TopItem in ListView with Groups isnt working?
I can't get the ListView property TopItem to work properly when also using
Groups. It only scrolls to the correct position when ShowGroups is false.
Any solution for this problem?
What I really want is to scroll to a certain Group Header. Is this possible
somehow?
/Andreas Zita Tag: Take over screen. Tag: 95041
Setting a minimum width in a form with a sizable handle
I have a WindowsForm that has a handle that allows resizing. However, I don't
want the size less than a particular value. If I check for the width in the
Resize event and make changes if the value is too small, I don't like the
visual effect of the redrawing. If I use the ResizeEnd event, the visual
effect is better because there is only one redraw after the logic is executed.
Is there a way to place a minimum width of a resizable window without having
to force a redraw based on the logic I described?
--
Michael Hockstein Tag: Take over screen. Tag: 95039
Reminder utility in a Windows based application
Hello,
I have been primarily working on ASP.NET applications but I am relatively
novice to Windows applications. I am trying to build a reminder utility for
a Windows Form based application. Sort of like the Outlook reminder for
Appointments and Meetings. Essentially something that will popup and give
you an option to re-schedule it. If you select a to be remided after 2
hours, it should pop up again after 2 hours with the same form.
I would imagine that I would have to write some sort of Windows service to
keep the application 'alive' and keep track of time. However, I would
appreciate if you could let me know some better (more standard) ways of
implementing such a functionality.
Thanks. Tag: Take over screen. Tag: 95034
Best Way to Check for Dataset Changes
vb.net 2.0
VS 2005
What is the best way to check to see if a table in the dataset or the whole
dataset has changes?
If I use
myCurrencyManager = CType(Me.BindingContext(Me.DsMain.tblClient),
CurrencyManager)
myCurrencyManager.EndCurrentEdit()
if dsMain.HasChanges then msgbox("Is Dirty")
On my form, I have several controls loaded from the same dataset but
different tables using the data wizards. When I put my cursor in a textbox
bound to dsMain.tblClient and then put the cursor in a textbox bound to
dsMain.tblNotes, the dataset shows it has changes. This is with no data
changes and no position changes.
What is the best way to check for changes?
Regards,
Brian Tag: Take over screen. Tag: 95033
I need to write an app where I use the entire screen. This includes getting
rid of the task bar. How do I do that?