ShowDialog, SEHException and Timer control
I know the SEHException when calling ShowDialog is quite a common problem,
generally associated with EnableVisualStyles, but I've just been having a
problem with it, and I'd already added the DoEvents call before
Application.Run, so it wasn't that.
I'm working on an application which uses a timer to poll a database at
regular intervals. There is also an override button to force an immediate
check. When a dialog box was shown from the Timer control's Tick event, I
got the SEHException, but when it was shown from the manual override, I
didn't. Strange, thought I.
As an experiment, I replaced the System.Windows.Forms.Timer control with a
System.Timers.Timer object, and the problem went away.
I post this in the hope that it might help others in the future.
Cheers,
Mark Tag: detect row selected in datagrid Tag: 89137
VB.NET problems displaying custom dialog box
I added a form to my project to use as a dialog box. The form is simple, 2
text boxes, 1 checkbox, 3 labels and 2 buttons. It will eventually allow a
user to reset a password, but I haven't added the functionality yet. I have
the dialog created when the user selects Tools - Reset Password from my main
menu control. When Reset Password is clicked I execute:
Dim frmResetPassword As New ResetPassword
frmResetPassword.ShowDialog()
Where ResetPassword is the name of the new form. When launched it's
generating an error:
Object reference not set to an instance of an object.
The error is generated from an unknown module. Now here is where it gets
weird. If I add a button to the form and run it again I don't get an error.
I don't put code behind the button or change anything else (I still execute
from the menu item), I just add it to the form.
I have no idea what is going on and would be most appreciative to anyone who
can point me to a solution.
Thanks. Tag: detect row selected in datagrid Tag: 89119
How to get rid of scrollbars in datagrid?
I have windows form with datagrid control.
I don't want the datagrid control to display vertical and horizontal
scrollbars.
I wonder whether there is a way to get rid of scrollbars without
deriving my own class from System::Windows::Forms::DataGrid?
The problem is that unless I derive my own class from DataGrid
I don't have access to scroll bar objects. The HorizScrollBar and
VertScrollBar
properties of VertScrollBar are protected!
Can anyone recommend alternative way to get rid of scrollbars?
Thanks Tag: detect row selected in datagrid Tag: 89118
PropertyChangedEvent
I read this article called "Windows Forms Data Binding and Objects" by
Rockford Lhotka wich in an MSDN article. It makes a custom class that can be
bound to. If a value in the class changes from code or an other control it
needs to be updated in all bound controls. That´s where the PropertyChanged
event comes in. The article says that de bindingmanager listens for those
events.
Now, the sample code (I didn´t run it) is in VB.Net. I would like to do the
same thing in C#. And guess what, it doesn´t work. I don´t know what i am
doing wrong and can´t find any samples.
Anyone there that can give me a hint?
Much appreciated, thanks. Tag: detect row selected in datagrid Tag: 89112
Null reference exception on main form. Help please...
.I created a VB.net Windows application using Form1.vb as my one and only
Windows form. When I go to run the application I receive the following
exception: "An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object."
When I opened up the Windows Form Designer generated code region I have a
constructor function that looks like this:
"Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub"
Any ideas on how to remedy this? Tag: detect row selected in datagrid Tag: 89109
ListBox component and underlying Items objects
Hello,
I've run into a brick wall in working with a standard ListBox. I'm loading
lightweight objects into a ListBox component - call them Elements. The
Element class has an ElementName property and an overridden ToString() method
that displays the ElementName. When I load Elements into my list box Items
collection, the ElementName displays and all is well. My problem occurs
when I change an ElementName property programatically. The underlying
Element does indeed change, but I can't get the text displayed the list box
to reflect it! I can delete and re-add the Element and the change will show
up, but neither ListBox.Update() nor ListBox.Refresh() change it.
I've considered a custom draw method (which I may have to implement anyway).
But is there another way of changing the text I'm overlooking? I'm not
using data binding - can a ListBox programatically bind to its own Items
collection?
Any help appreciated.
Thanks much
Jim Stanley
Media Services, Inc. Tag: detect row selected in datagrid Tag: 89108
Is "colspan" in ListView possible?
I am working with MS Visual studio C#.net, .net framework 1.1.
Do you have an idea, how can I use the ListView (details display mode),
that it does similarly as an html table do?
Or there is a better container which would fit my needs?
What I need in the ListView is:
1. Above some subitems, a common header should appear
(above the actual column headers).
2. In some rows I don't have all details (texts for all subitems),
but instead I have a commentary, common for some subitems.
So, I would need a kind of "colspan" in a table.
I would be grateful for any help/
Jola
----------------------------------------------------
I want to obtain that (example):
<html>
<table border=1>
<tr>
<th colspan='2'>
</th>
<th colspan='3'>
Block 1
</th>
<th>
</th>
<th colspan='3'>
Block 2
</th>
</tr>
<tr>
<th>
Main item
</th>
<th>
</th>
<th>
Subitem 1
</th>
<th>
Subitem 2
</th>
<th>
Subitem 3
</th>
<th>
</th>
<th>
Subitem 11
</th>
<th>
Subitem 22
</th>
<th>
Subitem 33
</th>
</tr>
<tr>
<td>
First entry
</td>
<td>
</td>
<td>
1284
</td>
<td>
4352
</td>
<td>
3214
</td>
<td>
</td>
<td>
3421
</td>
<td>
2412
</td>
<td>
3421
</td>
</tr>
<tr>
<td>
Second entry
</td>
<td>
</td>
<td colspan='3'>
here comes the commentary
</td>
<td>
</td>
<td>
4536
</td>
<td>
9867
</td>
<td>
3910
</td>
</tr>
<tr>
<td>
Third entry
</td>
<td>
</td>
<td>
3424
</td>
<td>
3334
</td>
<td>
3214
</td>
<td>
</td>
<td colspan='3'>
here comes the commentary
</td>
</tr>
</table>
</html> Tag: detect row selected in datagrid Tag: 89104
RichTextBox with OLE functionality
How do I implement the kind of OLE functionality found in MFC (CRichEditCtrl,
CRichEditView and CRichEditDoc) in a RichTextBox?
Are there any samples available (e.g. Wordpad for C#)?
--
Arild Tag: detect row selected in datagrid Tag: 89103
different levels of opacity in a Form
I'm trying to create a form with different levels of opacity. Is this
possible? Tag: detect row selected in datagrid Tag: 89100
Text formatting in Menu
Hi,
I m using Menu in my vb.net application. I want to increase the text
size, and font,change text color, increase the gap between two consecutive
menu items.
Is it all possible with the menu provided in vb.net? If no then how can I
do this?
Thanks in advance,
RbanBph Tag: detect row selected in datagrid Tag: 89098
Unable to set the ValueMember of a ComboBox to a non Browsable property
Setting the ValueMember property of a ComboBox to a name of a property
that is not browsable throws the following exception.
System.ArgumentException: Could not bind to the new display member.
Parameter name: newDisplayMember
It works fine if I set Browsable to true.
Has anyone encountered this before? Seems like a bug to me.
This is how I set up the DataSource:
ArrayList list = new ArrayList();
list.Add(new Person("John Doe"));
this.comboBox.DataSource = list;
this.comboBox.DisplayMember = "Name";
this.comboBox.ValueMember = "Name";
This is my Person class:
public class Person
{
string _name;
public Person(string name)
{
this._name = name;
}
[Browsable(false)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
}
Here is the complete code listing:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace BrowsableAttributeTest
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ComboBox comboBox;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
ArrayList list = new ArrayList();
list.Add(new Person("John Doe"));
this.comboBox.DataSource = list;
this.comboBox.DisplayMember = "Name";
try
{
this.comboBox.ValueMember = "Name";
}
catch(Exception e)
{
MessageBox.Show(e.ToString(), e.GetType().ToString());
}
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.comboBox = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// comboBox
//
this.comboBox.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox.Location = new System.Drawing.Point(24, 32);
this.comboBox.Name = "comboBox";
this.comboBox.Size = new System.Drawing.Size(184, 21);
this.comboBox.TabIndex = 0;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.comboBox);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
public class Person
{
string _name;
public Person(string name)
{
this._name = name;
}
[Browsable(false)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
}
} Tag: detect row selected in datagrid Tag: 89097
How? Using a custom TypeConverter in custom grid column style.
I have bound a grid column to an enumeration data type.
I derive from DataGridTextBoxColumn and override GetColumnValueAtRow and
call a function I wrote to convert the enumeration value to a
descriptive text for display in the grid cell. This works well.
Even though the grid is not editable, and the column is readonly, when
one clicks on the cell I get a type conversion exception. Looking at the
stack I see Edit calls GetText which uses an "EnumConverter" to convert
the descriptive text to an int32, which ultimately tries to parse the
descriptive as an int32, and of course fails.
I see that DataGridTextBoxColumn has a PRIVATE type converter member.
I am seeking any pointers to examples, or samples, or explanations of
how to intercede the conversion of the descriptive back to an enumerated
value for my custom column type. I think I need to implement a type
converter, but I don't see how to tie it in. Or even just to know "it
can't be done" would be helpful. Tag: detect row selected in datagrid Tag: 89091
check box in data grid
How do you get a check boxs to appear as one of the columns in a datagrid?
many thanks in advance
Rod Tag: detect row selected in datagrid Tag: 89090
No Touch Deployment and web server authentication
Our app is No Touched Deployed from a web server.
We leave the default Anonymous Access set on the web site.
So far, 4+ client installs, no problems.
I did an install on a client's web server last week, leaving Anonymous
Access checked. I did some tests, all worked fine.
Today, the app is crashing. I asked the client what's different on the web
server. Per the client they can't leave anonymous access enabled so they
unchecked it.
So, now I am seeing 401 Returns Codes in the IIS log file for our files.
How do folks work around this? It's a 2000 server box so this client cannot
create another web site. I have no idea how to how to 'log in' to the web
site when the client is making a request for a file. Tag: detect row selected in datagrid Tag: 89089
How to Assign Connection Param for CrystalReportViewer??
Hello!
I designed a crystel Report and run normally in my Computer. But when I
bring it to the user computer (The SqlServer name is diffirent). So My
Report is not working. I want to know how to do to assign the Connection
param to CrystalReportViewer dynamically in order to run the report in anny
Computer???
Thanks! Tag: detect row selected in datagrid Tag: 89088
WebBrowser.CheckIfCreatedInIE()
Hi Group.
I'm developing a UserControl which is hosted inside Internet Explorer as
an ActiveX control. Inside this control I need HTML rendering
funtionality, which the new 2.0 WebBrowser control provides. The problem
however, is that the WebBrowser control checks if it's inside another IE
in the private WebBrowser.CheckIfCreatedInIE() method :(
Is there a workaround, or some other way to get html rendering inside my
ActiveX hosted UserControl??
Regards,
Jim. Tag: detect row selected in datagrid Tag: 89087
WinForms and AppDomains
I have an application where I'd like to be able to run multiple instances of
a Windows forms application. Due to a heavy hit in our application startup
code it would be beneficial to be able to have a single process with multiple
instances of the form. Additionally, it would be useful to be able to
partition off each instance in it's own application domain. The current plan
is for a module to handle starting a new thread which will fire up a new app
domain and then load the form. This module will also handle firing up any new
instances by creating a new thread and application domain.
My concern is any issues surrounding the UI thread. I'm aware that only the
thread that calls Application.Run should access any of the UI components.
Typically you would only have one per process. In my situation I'll end up
with multiple UI threads. However, each application domain will only have a
single UI thread and only this thread will access any UI components.
Is the application domain enough of a boundary for the UI threads or am I
setting myself up for threading issues? Tag: detect row selected in datagrid Tag: 89082
Context Menu for ActiveX control in VB.NET
I'm using ActiveX control in my VB.NET project. It pops up but execution doesn't stop on Click event handler if I set a break point there.
From http://www.developmentnow.com/g/29_2004_7_22_0_0/dotnet-framework-windowsforms.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com Tag: detect row selected in datagrid Tag: 89072
Change value in bound ctrl when value of another bound ctrl change
I have been developing WinForms apps in .NET for several years and have never
discovered a good solution to this newbish problem. I frequently encounter a
situation where I want to change the value of a control when the user changes
the value of some other control and both controls are bound to the same row
in a DataTable.
For example, say I have a combobox of statuses and a textbox for comments
but comments are not applicable for certain statuses. When the user selects
one of these statuses I want to set the text of the textbox to an empty
string. So I add a handler to the combobox's SelectedValueChanged event and
set the TextBox's Text property to an empty string.
Doing this seems to cause unpredictable behavior. Sometimes I get an empty
textbox but the combobox is changed back to its original value and other
times the textbox is not cleared. I assume one change gets pushed to the
dataset and triggers a refresh of the controls from the dataset but I'm not
really sure. I have worked around this by clearing the textbox when the
combobox loses focus but users are never happy with this solution. Having
encountered this problem again I thought I would see if anyone can tell me
the "right" way to do this. Tag: detect row selected in datagrid Tag: 89071
PropertyGrid steals focus
Hi,
I have a MDI child Form that contains a couple of custom controls (both
Panel based viewers), a DataGrid, and a PropertyGrid.
Try as I might to have the DataGrid receive focus when the MDI child Form is
displayed, the PropertyGrid always grabs it.
I have registered an event handler for the MDI child Form's Load event and
VisibleChanged event and in both have tried to have the DataGrid request
focus and set the CurrentCell to (0,0). This has not worked.
Any ideas?
Thanks. Tag: detect row selected in datagrid Tag: 89068
datagrid event
I have a parent and child datatable which i am viewing in a datagrid. does
anyone know the event that is fired when the user expands the node to look
at the child table?
thanks. Tag: detect row selected in datagrid Tag: 89061
GUI design guideline
Hi!
I'd like to know if Microsoft has published a guideline for GUI design
for .NET applications (something about choosing the right flatstyle,
fonts...).
Thank you!
Simone. Tag: detect row selected in datagrid Tag: 89059
How to initialize hidden columns for newly added rows ?
I want to allow the user to add new rows. Not all columns from the bound
data tabled are mapped (i.e. there are hidden columns). But some of
those columns do not allow null. When I add a new row I get an exception:
A first chance exception of type 'System.Data.NoNullAllowedException'
occurred in system.data.dll
Additional information: Column 'REP_ID' does not allow nulls.
Question is, How can I provide a proper row initialization when the grid
creates a new row? That is, how can I detect the newly added row, and
perform some initialization on the row's column values? Tag: detect row selected in datagrid Tag: 89058
Sending e-mail through windows forms
Hello all -
I am very familiar with sending mail through asp.net (using the
System.Web.Mail class), but I do not have experience sending e-mail through
windows forms. I would assume the syntax is probably the same, but perhaps
the class or method of calling it could be different? Can this be done in
windows or do i need a web service(please, no)? Tag: detect row selected in datagrid Tag: 89057
writing functions in dll (newbie)
I have a task to write winform application while writing the functions that
return information, in a dll - for example opening a file. can someone please
give me an example for function that opens a file (openFileDialog) that will
be written in a dll file?
Thanks a lot Tag: detect row selected in datagrid Tag: 89056
how to make a fullscreen window?
I mean like VS.NET fullscreen windows?
I was thinking: simply remove the border, set maximized and topmost.
however I will have problem with dialog then (which would be behind my
window, don't they?) (uh?!)
any other idea? Tag: detect row selected in datagrid Tag: 89051
Multiple Screen environment...
Hello,
My appliccation saves form size and positions whenever they are closed so
they can be shown at the same size and position when opened next time.
My problem in here is that when it is used in Multiple screen enviornment, I
can't understand whether the window is in which screen and I also don't know
how to set the position of a window other than the primary screen?
Can anybody help me?
Regards,
Özden Irmak Tag: detect row selected in datagrid Tag: 89048
Inherited Forms
Hi all,
Anyone can tell me if the derived forms need to call the constructor of the
ancestor Form ?
Also it's needed to call InitializeComponent() from Ancestor form or not ?
Sample:
public Class AncestorForm: System.Windows.Forms.Form
{
Public AncestorForm() //:base() needed or not ?
{
InitializeComponent();
}
}
public Class DerivedForm: AncestorForm
{
Public DerivedForm(): base() //:base() needed of not ?
{
InitializeComponent();
}
}
Tanks for your help Tag: detect row selected in datagrid Tag: 89044
Load a form
Hello,
I have created an application in vb.net. I want to show a chaild
form on main mdi form. Since form contains many controls it is taking too
long to get displayed completely and it also flickers. I have tried
SuspendLayout and Resume Layout methods, but was not helpful.
Can I load this form in memory and then show it(using form.show
method) so that it will be displayed in lesser time? Will it help me? How can
I load the form in memory without displaying it?
Pls. reply soon.
Thanks in advance.
--RbanBph Tag: detect row selected in datagrid Tag: 89039
Printing from RichTextBox in .NET 2003
Hello.
Is there any way to print text from a RichTextBox in C++ Windows Forms.
I know that they got rid of this function but does anyone know about
any classes that can be added to your project in order to print text
from the richTextBox.
I have tried using the built in windows forms print dialog and print
function but it does not see text.
Any help would be great. Tag: detect row selected in datagrid Tag: 89036
Datagrid - Windows - DataGridBoolColumn - How can I disable all the check boxes in the column
I tried boolCol.ReadOnly = true and a bunch of other things but can't get
the check boxes for the datagrid's column for all rows to be disabled? Can
someone tell me how to do this?
MyGrid.ReadOnly = true;
MyGrid.Click += new EventHandler(MyGrid_Click);
MyGrid.CaptionVisible = false;
tableStyle = new DataGridTableStyle();
tableStyle.MappingName = "MyItemsData";
tableStyle.AllowSorting = false;
tableStyle.RowHeadersVisible = false;
//MyCheckBox Check
boolCol = new DataGridBoolColumn();
boolCol.MappingName = "MyCheckBox";
boolCol.HeaderText = "MyCheckBox";
boolCol.AllowNull = true;
boolCol.NullValue = string.Empty;
boolCol.FalseValue = false;
boolCol.TrueValue = true;
boolCol.Width = boolColWidth;
tableStyle.GridColumnStyles.Add(boolCol);
boolCol = null; Tag: detect row selected in datagrid Tag: 89035
3 windows, bring all to front
Hi All,
This should be pretty easy, and I'm sure there's a simple way to do it, but
it's eluding me.
The application has three windows open at all times. Needed functionality: a
click on any of the three windows should bring the other two to the front as
well so that they would all be above any other program windows.
I've been messing with BringToFront and the Activated event but everything I
do seems to lead into infinite loops.
Hopefully one of you knows the 'right' way to handle this common problem.
Thanks for any help!
- Tom Tag: detect row selected in datagrid Tag: 89030
How to impliment a wizard style SDI.....
In VC++ using MFC I created a SDI app and in the CFormView I created a
CPropertySheet added the CPropertyPage's to create a Wizard style SDI. How
can I do something like this in WindowsForms?
Thanks for you help?... Tag: detect row selected in datagrid Tag: 89028
Win2k3 SP1 affects IEExec ??
Has anyone encountered issues running NTD apps on 2003 SP1?
I have an application that runs fine when run from IE on 2003 SP0. It also
runs fine when run from the file system (i.e., double-click the exe) on 2003
SP1. For some reason, when we run the same app from IE on 2003 SP1 machines,
we're getting System.TypeInitialization exceptions in IEExec.exe . When
examined closer by building the app with debug symbols on the server, it
appears that (at least in this case) the TypeInitializationException is being
caused by an exception as a Web Proxy Class (for a web service) is being
initialized.
The Message is "The type initializer for "System.Xml.Serialization.Compiler"
threw an exception.
The stack trace begins:
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, Evidence evidence,
CompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings,
Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[]
mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
Has anyone seen behavior like this? Please post if further info would be
helpful.
Thanks in advance. Tag: detect row selected in datagrid Tag: 89027
No Touch Deployment using HTTPS?
Hi,
I am trying to use NTD with HTTPS and get this error: "An execption
'System.Security.SecurityException' has occurred in IEExec.exe". I must
access this exe through a https site. Is there a way to make this work?
Also - I put the Application.exe in the Virtual Directory to use NTD. Do I
also put the Application.exe.config in that directory as well? I haven't been
able to find many detailed examples on how to use NTD.
thanks in advance!
Bill Tag: detect row selected in datagrid Tag: 89025
why aren't changes in datasets recognized for bound controls?
Hi,
I've got a simple VB/Access app that binds text controls to various fields
in a database table. Everything works fine, EXCEPT that when I call the
Update method on the data adapter, nothing updates, because it thinks nothing
has changed!
If I make changes to the fields thru the bound edit boxes, and then check
the "HasChanges" method on the dataset, it runs FALSE - even though the
changes ARE reflected in the dataset's data! How do I fix this??? The Update
calls do nothing even if I edit all the fields because the dataset won't
recognized that anything has changed.
The updates and everything work fine if I manually set new values into the
fields; the update works and HasChanges returns true.
ex.:dataset.tables(0).rows(0)("my field") = foo
thanks!
B Tag: detect row selected in datagrid Tag: 89024
Help needed
I have to crete a windows form within a thread.
Can some post a code or direct me to some link to accomlish this?
I have background service which needs to pop up this form which will be
always on top of third party word editor. I am using ShowWindow and
SetWindowPos WIn APIs.
This is working on XP machines but I am having trouble with Windows 2000
machines. I have to make it working on windows 2000 machines as well.
Any help would be appreciated.
Thanks,
Dinoo Tag: detect row selected in datagrid Tag: 89023
How to track changes in a datagrid
I'm developing a desktop app that displays several screens of of data in a
two column fashion, the left column has the tiles and the right column has
the input controls (textboxes, dropdowns, etc) for input. Typically the app
is used to display preexisting data and the user would edit certain things.
The data is saved on a network drive and can be edited by many users who
have access to the drive (no concurrenct editing) so it needs to be able to
track who changed what when. If a value is changed 10 times by 10 different
user, it should be able to keep the history.
I'm thinking maybe a DataGrid control is the best choice for displaying and
accepting user input but not sure how it captures the change info. Could
anyone point me in the right direction? Tag: detect row selected in datagrid Tag: 89022
variable height TreeNodes in TreeView
Is it possible to create a TreeView with variable height TreeNodes? For
example, I may want to have text in a given tree node have hard return
characters that wrap that node's text to next line? There is the
TreeView.ItemHeight property but that only allows setting a height for all
TreeNodes in the TreeView's underlying tree model (which is limited to
TreeNode types of trees). Tag: detect row selected in datagrid Tag: 89019
RegEx for Acceptions Numbers with Dot
Hi
using regEx class in c# can u tell me how to accept input string [0-9] and
also accepting [dot][.] with 'n' times Tag: detect row selected in datagrid Tag: 89016
Cursor "stuck" In Databound Control/Caching?
I am having a strange issue and cannot solve it. Basically, I have a form
that edits information in a database. This form has many different controls
that are bound to a business object. When I first load the form to edit
the info everything works properly. The process of loading the object also
loads the object into cache (Isolated storage using Enterprise Library 2.0
caching application block). If I load the form again and attempt to edit
a field (say notes a textbox) my cursor gets "stuck" in the text box and
I cannot click on any other control in the form. However I can close the
form with the X in the upper right corner and the keys still function properly
(Enter saves the object and Esc closes the form). I have looked the stack
trace but it is giving me nothing. I have no idea where to begin. Has anyone
seen something similar or have any ideas what it might be? Any ideas how
I can go about getting some info to solve the problem? Tag: detect row selected in datagrid Tag: 89013
Form Display
Hello,
I have designed a form in vb.net. I have placed a tab control with 3
tab pages on the form. This tab control holds many controls in each tab page.
This form is MDIChild form. I have not written much code on the form.
Whenever I run the project, form is dipslayed as textboxes first
then Data grid followed by another tab on the form and so on. Form does not
display all the controls at once as complete form.
What I should do in order to avoid this?
Early response is awaited..
-RbanBph Tag: detect row selected in datagrid Tag: 89010
key events doesn't work
Hi.
I got some problem with the key events, they doesn't rise.
first I made a new win project in C#, and I set this.KeyPreview = true; also
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.fClient_KeyUp);
and then I test run the app, and the keyup event did evoke. then I added a
brower control into the form private AxSHDocVw.AxWebBrowser mviewer; and test
run the app again, but this time the keyup didn't evoke, I assume the the
browser control took the key events, how do I let the parent form evoke the
key events again? and the browser control seems don't have any key event
handler, am i right? any help would be greatful.
regards
Steve p Tag: detect row selected in datagrid Tag: 89008
Command button shortcut key
Hi!
i have a form in VB.Net with two command buttons CmdDelete and CmdAdd
i need to add shortcut keys for example F8 for CmdDelete and F4 for CmdAdd
but i don't have any code.
could someone plz show me a sample code...
Best wishes Tag: detect row selected in datagrid Tag: 89005
Enter key in Text box
I have a problem while using Enter key in text box.
when user presses enter in the text box information of customer is loaded.
and I have a clear button that clears all the controls on the form.
first it works properly. then I click on some other button (say detail
button) that opens some other form. after closing that form if clear the
form using clear button and again enter Id in text box and press enter. it
does not work instead click event of Detail button is fired.
Again I clear the form and press enter in the text box then it works and
shows the data in controls. It happens several times.
I am able to trace that. Control does not enter in event handler of key
press event when this problem happen.
no error is coming in any of the processes and no default button is set.
Any solutions to this problem?
--
Regards,
Lalit Bhatia Tag: detect row selected in datagrid Tag: 89003
Custom Designer
Hi, I'm writing a control called a validating submit button. Basically, you
can tell it to validate a number of controls when the user hits this button.
When they hit the button, it'll say, "You must enter yada yada..." and
highlight the bad field.
Ok, now that I've got that out of the way, I think this problem should be
relatively easy. Basically, I created a special designer that was a form that
had two lists, one of available controls, and one of controls it will
validate, in order. It would then add these items an arraylist of the
inherited button class. This seems to work fine! I can run my custom verb,
have it open up and show all the items that are currently selected to be
validated and all of that jazz, but it doesn't change the actual .vb file in
the InitializeComponent sub of the test form. So basically, it can change all
these values on the design-time copy of the actual control, but I can't
figure out how to add code to the initialize component of the form that'll be
using this control.
I figure that this question ought to be rather easy, as being able to create
a custom designer without being able to "save your changes," so to speak, is
pretty useless, and probably a commonly asked question.
Thanks for your time!
Bryce Covert. Tag: detect row selected in datagrid Tag: 89002
Windows XP doesn't restore its desktop background after closing a smart client app
Hi,
I have developed a smart client app and deployed it. In some of the
client machines, they have set a desktop background image. When the
user works with the smart client app and close after opening few
windows forms, the windows xp desktop image have some rectangular
borders all over it which were the size of the opened windows forms in
the smart client. Can anyone tell me how to refresh the desktop
background image in xp?
Thank you. Tag: detect row selected in datagrid Tag: 88999
Sometimes clicking on a TreeView node doesn't select it
Hi;
I have this case where when I click on a line in my TreeView, it selects it
for a second, and then moves the selection back to the previous selection.
Usually I have to click 3 times to get it to stick - then it's fine from then
on.
The tree is not set to accept drag/drop. HideSelection=false, otherwaise all
is standard.
This is the only event I have for the control - and it is the only control
in the form:
private void Tree_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
TreeNode node = treeDB.GetNodeAt(e.X, e.Y);
if (node == null)
return;
RootNode root = node.Tag as RootNode;
if (root == null)
return;
DoDragDrop(new DragDropData(app, root), DragDropEffects.Copy);
}
Any ideas?
--
thanks - dave Tag: detect row selected in datagrid Tag: 88998
How to get user information from the local system user accounts.
I am hoping to be able to (easily) write a program that will go into the
local computer (as long as you are logged in as the administrator) and get
information about the existing user accounts.
I want to do this for LOCAL accounts on computers that are NOT members of a
windows 2000 domain.
Can someone point me to the correct document/example that shows how this
could be done.
I have found many many many examples for Windows 2000 domains, but none for
local system accounts. Tag: detect row selected in datagrid Tag: 88996
Smart Client - Update from MSI Code?
What code do I have to add to my application to get it to check for updates,
then re-install itself via an MSI file? Any simple examples out there? Tag: detect row selected in datagrid Tag: 88995
Which event is fired when you select a row in a datagrid?
Or if there is not one, how do you achieve the same?