Problems with Inherited Forms....
Hi,
I've created a new template class with some forms. one of
them is a main form (a MDIContainer-Form) with some
controls. It also contains a simple menu (everything is
PUBLIC).
Ok. Now I've a new project. I've created a new form
inheriting my templateform. Now, I'm able to add some menu
items to the menucontrol. So far so good, but if I close
the form (within the designer) and reopen it again : I
loose all my menuitems ! But if I run the project ->
everything is on my form !! So, the CODE for the menuitems
is there, but the designer doesn't show these..is this a
problem with the sub intializecomponent ? Any ideas ?
Thanks for your help.
Cheers,
Dominic Tag: BUG Report. Please confirm. Tag: 57475
How to disable my Component in the toolbox?
Hi,
i have written a custom component that derives from
System.ComponentModel.Component.
It gets added to the toolbox correctly but I want it
to only be droppable on Forms, not on UserControls etc.
When a Form is currently displayed, the component should
be enabled in the toolbox, otherwise not.
Like the MainMenu component toolbox item does. It is
disabled when a UserControl is in design mode.
How do I get the same effect?
TIA
Martin Tag: BUG Report. Please confirm. Tag: 57474
Escape characters in RichTextBox....
Hi !
I have a form. The form has a textbox and a richtextbox.
There is a button also. When the button is clicked,
whatever text was typed into the text box, must be copied
to the richtextbox.
At runtime, I enter the following string into the text
box:
Hi\nHello\nHow\nDo\nYou\nDo
Then I click the button. In the richtextbox I am expecting
Hi
Hello
How
Do
You
Do
But what I get is:
Hi\nHello\nHow\nDo\nYou\nDo
Ne idea to workaround this probs?
...Sinex Tag: BUG Report. Please confirm. Tag: 57473
PropertyGrid with Multiple Selections
I have a propertygrid on a form, and I set SelectedObject or
SelectedObjects.
Everything is working perfectly if I set the PropertySort =
CategorizedAlphabetical.
If, however, I set the sort to Categorized, and then select multiple
objects, the property grid does not show all the properties that it
should show. For example, if I select 2 objects, both having
properties Hole1...Hole18, Hole2..9, and Hole18 show up but
1,10,11,12,13,14,15,16,17 do not show up.
Does anyone have an idea why? I am using a
System.ComponentModel.TypeConverter on the object that Hole1..Hole18
points to along with a UITypeEditor.
Just to repeat, EVERYTHING works fine if I set to
CategorizedAlphabetical. Everything except all the properties work
fine if set to Categorized.
Please do not ask WHY I am setting to categorized (it's just what I
want) or ask if stuff is working properly besides the display. They
all are working properly. Tag: BUG Report. Please confirm. Tag: 57472
Control tips
I think I must be going mad. This has to be included in .Net and I just
can't find it. Controls on a windows form. How do I get explanatory text
to display when the user hovers the mouse over a control? (i.e. the stuff
that Access calls control tips)
Thanks.
--
Rob Oldfield
www.realuk.co.uk Tag: BUG Report. Please confirm. Tag: 57471
Language support for UI application in win98
Hi all,
I have developed a application that supports localization in .net.
It shows all the controls with english and hindi text depending on the
culture selected.
The application runs well on windows 2000 and windows xp but when run on
windows 98 the hindi text appears as garbage. Can anyone help out
with this.(I have installed the .net framework on windows 98)
Regards,
Kuldeep Pawar
Programmer,
Maximize Learning, Pune. Tag: BUG Report. Please confirm. Tag: 57454
Integral Number of Text Lines in RichTextBox
Hello,
I would like to set up a RichTextBox so that the text
shows an integral number of text lines when the text box
is scrolled all the way down. How can this be done?
I tried this: I set ClientSize.Height to be a multiple of
Font.Height, verify that it's set, but I get slightly
fewer than the expected number of lines. This means that
when the text box is scrolled all the way down, part of a
line shows at the top, which looks bad.
using System;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
class TextBoxTesterForm : Form
{
public TextBoxTesterForm()
{
d_rtb = new RichTextBox();
d_rtb.SuspendLayout();
d_rtb.Parent = this;
d_rtb.Location = new Point(10,10);
int desiredTextHeight = lines * d_rtb.Font.Height;
d_rtb.ClientSize = new Size(200, desiredTextHeight);
d_rtb.ResumeLayout();
Console.WriteLine("lines={0}", lines);
Console.WriteLine("rtb Font.Height = {0}",
d_rtb.Font.Height);
Console.WriteLine("rtb Font.GetHeight() = {0}",
d_rtb.Font.GetHeight());
Console.WriteLine("desiredTextHeight = {0}",
desiredTextHeight);
Console.WriteLine("rtb ClientSize = {0}",
d_rtb.ClientSize);
Console.WriteLine("rtb DisplayRectangle = {0}",
d_rtb.DisplayRectangle);
Console.WriteLine("rtb Size = {0}", d_rtb.Size);
Console.WriteLine("rtb Multiline = {0}", d_rtb.Multiline);
}
RichTextBox d_rtb;
int lines = 5;
}
class TextBoxTestMain {
static void Main()
{ Application.Run(new TextBoxTesterForm()); }
} Tag: BUG Report. Please confirm. Tag: 57449
CheckedListBox crashes after complex datasource is modified
Hi,
I am using a checkedlistbox on a windows form and binding it to a
collection of classes.
clbAliases is the checkedlistbox control
selectedplace is a class with property placealiases.This property is a
collection of placealias classes. Hopefully the rest is
self-explanatory..
I bind the control as follows:
If SelectedPlace.PlaceAliases.Count > 0 Then
SetCLBAliasDataSource()
Else
clbAliases.DataSource = Nothing
End If
Private Sub SetCLBAliasDataSource()
clbAliases.DataSource = Nothing
clbAliases.DisplayMember = "AliasName"
clbAliases.DataSource = SelectedPlace.PlaceAliases
End Sub
Then when I modify the underlying collection ( specifically for delete
functionality )
I have this:
Private Sub btnDeleteAlias_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnDeleteAlias.Click
If SelectedPlace.PlaceAliases.Count = 1 Then
MsgBox("You cannot delete the primary alias.")
Exit Sub
Else
Dim item As Object
For Each item In clbAliases.CheckedItems
'clbParents.Items.Remove(item)
SelectedPlace.PlaceAliases.Remove(item.placenameid)
Next
'this forces the control to rebind to the modified
collection
SetCLBAliasDataSource
End If
End Sub
Everything works as expected, EXCEPT once the item is removed, and the
user clicks into the checkedlistbox area , specifically on any
remaining item in the box, the following error occurs:
"An unhandled exception of type 'System.ArgumentOutOfRangeException'
occurred in mscorlib.dll
Additional information: Index was out of range. Must be non-negative
and less than the size of the collection."
I have experimented with refreshing the checkedlistbox, and a number
of various other attempted workarounds without success.
The error occurs whether I specify a ValueMember property or not. When
I inspect the underlying collection in the locals window, it appears
normal, as does the items collection of the control. And both contain
the expected number of items. In addition the control correctly
displays the remaining items.
I can only assume that the control is referencing a non-existent
collection member somewhere in the click event event args. Execution
breaks on the line with the class definition :
Public Class GISMain
Can anyone point out a workaround, or my mistake??
Thanks in advance for any help..
Matthew Evans
Someone replied in another ng saying that checkedlistboxes were flaky,
specifically on 1.0... So I tried a rebuild of the application on
VS.2003 / V1.1 of the framework , and the error occurs there too. the
error message on that platform is :
"An unhandled exception of type 'System.ArgumentOutOfRangeException'
occurred in microsoft.visualbasic.dll
Additional information: Specified argument was out of the range of
valid values."
Similar, but not identical....
Once again, any help / pointers much appreciated... Tag: BUG Report. Please confirm. Tag: 57432
Getting data from a datagrid
Hello,
I have a bound datagrid called dgjobs that is bound
to a dataset called dsjobs using the following code.
Me.dgJobs.DataSource = dsJobs.Tables!Jobs
cm = CType(Me.BindingContext(dsJobs.Tables!jobs),
CurrencyManager)
The grid populates just fine however when the
currentcellchanged event is triggered (i.e. when you
scroll or click another row) I wish to get the value of the
first column (jobkey) in the currently selected row so
that I may use this as a parameter for a procedure. Any
ideas how I can read the data from the grid.
Thanx in advance
Robert Batt Tag: BUG Report. Please confirm. Tag: 57421
Layout problem - Mainmenu + toolbar + a "filled" control
I have a form that has a main menu (dock: top) and a tookbar (dock: top)
I tried to insert a control that is (dock: fill)
I found that the toolbar actually 'covered' the top of the 'filled'
control....
how should I solve this?! Tag: BUG Report. Please confirm. Tag: 57420
Process -> MainWindowHandle always coming back as 0???
I'm using a mutex to ensure only 1 instance of my app is created. It works
fine.
If an instance of my app IS already running, I want to use the following
code to bring the window to the foreground. BUT, the MainWindowHandle is
always 0 (I checked all processes and they are all 0). How can I get the
window handle back? Or, is there another way to popup my application?
Thanks,
Steve
if (!grantedInitialOwnership)
{
Process[] ps =
Process.GetProcessesByName("AppName");
IntPtr hWnd = ps[0].MainWindowHandle;
// Show existing instance
if (hWnd.ToInt64() != 0)
{
SetForegroundWindow(hWnd);
ShowWindow(hWnd, 5); // SW_SHOW
}
} Tag: BUG Report. Please confirm. Tag: 57414
The listmanager's position must be equal to rownum.
Please help me.
I must correct this error :
The listmanager's position must be equal to rownum.
Parameter name : rownum do you want to correct the value ?
I have this error with VS2002 and also with VS2003.
______________________
I'd like to have a datagrid with all the columns of my table EXAMPLE and a
new column with a checkbox to select some row.
So.. i use a select to put my data in my data adapter.
( SELECT example.ID, example.name, ...........,false as col_for_sel
.... the col_for_sel is the column that i'll use to check or not the row )
I fill with my D.A. a new datatable....
I'll use a data grid to view my data with a datagridestyle.
I don't know what i can control :-(
-------------------------------- Tag: BUG Report. Please confirm. Tag: 57408
Preventing deletion of certain characters
In a textbox control, how can you prevent the deletion of
certain characters? For example, a user shouldn't be able
to delete the backslash "/" character but can delete other
characters. Thanks a lot :) Tag: BUG Report. Please confirm. Tag: 57405
Validating events
Hello,
How can i disable the Validating Event of all the controls of a form after a
click on a Cancel Button and close the Form?
Or how can fix the order of Validating events of the controls in a Form?
Thanks in advance.
Pascal Tag: BUG Report. Please confirm. Tag: 57401
How to get App path of WinService
I was using Environment.CurrentDirectory when I tested my class in a winform
wrapper, but but now that I've move it to a WinService this gives me
"C:\WinNT\System32"
How can I get the Path of my assembly?
Thanks in Advance,
Byron Tag: BUG Report. Please confirm. Tag: 57397
adding objects to the clipboard in .NET
I am unable to add a button to the clipboard. This is
required to do drag and drop of the object - button.
I am able to add a string to the clipboard. The following
is a summary of my steps. Any help greatly appreciated.
Button button2 = new Button();
DataObject data = new DataObject();
data.SetData("myButton", button2);
Clipboard.SetDataObject(data, true);
IDataObject data = Clipboard.GetDataObject();
object obj = data.GetData("myFormat"); // returns obj
== null
Button btn = (Button)data.GetData("myFormat"); //
returns btn == null
btn = (Button)data.GetData(typeof(Button)); // returns
btn == null
Thanks... Tag: BUG Report. Please confirm. Tag: 57393
WinService Uninstall failed How do I clean up?
Hi, I followed the tutorial for setting up a WinService install and got the
messages below. If it's already on the system as it says then I should be
able to see it in the Services list but I didn't see it there.
How can I remove a WinService manually?
Thanks in Advance,
Byron
-------------
InstallUtil.InstallLog:
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the c:\program files\twsm\ecpu\ecpu.exe
assembly's progress.
The file is located at c:\program files\twsm\ecpu\ecpu.InstallLog.
An exception occurred during the Install phase.
System.ArgumentException: Source eCPU already exists on the local computer.
The Rollback phase of the installation is beginning.
See the contents of the log file for the c:\program files\twsm\ecpu\ecpu.exe
assembly's progress.
The file is located at c:\program files\twsm\ecpu\ecpu.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
------------
eCPU.InstallLog:
Installing assembly 'c:\program files\twsm\ecpu\ecpu.exe'.
Affected parameters are:
assemblypath = c:\program files\twsm\ecpu\ecpu.exe
logfile = c:\program files\twsm\ecpu\ecpu.InstallLog
Installing service eCPU...
Creating EventLog source eCPU in log Application...
Rolling back assembly 'c:\program files\twsm\ecpu\ecpu.exe'.
Affected parameters are:
assemblypath = c:\program files\twsm\ecpu\ecpu.exe
logfile = c:\program files\twsm\ecpu\ecpu.InstallLog
Restoring event log to previous state for source eCPU. Tag: BUG Report. Please confirm. Tag: 57385
Can't start new projects in VS 2003
I can start a new project in VS2003, and don't put any controls or code in
form1, leave everything as VS writes it. Now I run it. Should just pop up a
blank form right? UhUh.
An unhandled exception of type "System.NullreferenceException' occurred
in Unknown Module.
Additional information: Object reference not set to an instance of an
object.
If you break there is no code for the current location. The app will build
without errors but I can't run it outside of vs either.
I can do this over and over again (definition of stupid) Once a few days
ago, I started one of these in a directory other than the default (actually
a subdirectory) and it worked and I could then write a small utility without
further problems. Runs fine in debugger still.
However it doesn't seem to make any difference where I put a new project
now.
I have read every forum posting on this problem and tried everything
suggested. Have also uninstalled and reinstalled the framework 1.1 as well
as VS twice to no avail.
Suggestions?
Many thanks Tag: BUG Report. Please confirm. Tag: 57384
.Net App deployment - Removing files problem
How do I instruct the Windows installer to remove the entire application
when the user clicks Remove program from Windows control panel?
After a successful setup, any files created by the application in the
application folder are not removed. This is so when the program is
"removed" from the Windows control panel. This becomes a problem if the
user decides to reinstall the application in the same location. The
*old*/legacy files, e.g. app config files, may cause a problem with the
*new* installation of the application file.
My installer program was created with a "setup and deployment" type project
is Visual Studio.NET 2003 for a .NET v 1.1 Windows Forms application. It
appears all of the property pages in the VS.NET editor address installation
and few removal issues. I reckon I'm sniffing around for a solution in the
wrong place.
--
Peter O'Reilly Tag: BUG Report. Please confirm. Tag: 57382
.Net App deployment - Removing files problem
How do I instruct the Windows installer to remove the entire application
when the user clicks Remove program from Windows control panel?
After a successful setup, any files created by the application in the
application folder are not removed. This is so when the program is
"removed" from the Windows control panel. This becomes a problem if the
user decides to reinstall the application in the same location. The
*old*/legacy files, e.g. app config files, may cause a problem with the
*new* installation of the application file.
My installer program was created with a "setup and deployment" type project
is Visual Studio.NET 2003 for a .NET v 1.1 Windows Forms application. It
appears all of the property pages in the VS.NET editor address installation
and few removal issues. I reckon I'm sniffing around for a solution in the
wrong place.
--
Peter O'Reilly Tag: BUG Report. Please confirm. Tag: 57380
Changing the line colors of a Crystal Report at runtime?
Hello
I am running .NET 2003, Framwork 1.1, Crystal Report Version 9. I am writing
all my code in C#.
I have two questions:
1) Does anyone know if the line color in a chart on a Crystal Report can be
changed at runtime?
2) Does anyone know if a report can be created from a collection?
If the answer to either of these is yes, can you please supply sample code
in either VB.NET or C#.NET? Thanks in advance for your time!
Ken Tag: BUG Report. Please confirm. Tag: 57378
inputbox for C#
Hello,
Just wondering if there is an equivelant available to C#
for quick string input. I am NOT using vb.net so i cant
use that version.
TIA,
Mel Tag: BUG Report. Please confirm. Tag: 57374
Can't disable Add New row at bottom of Datagrid
--------------F34FF1FF13222AD377793457
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Based on this post from Clay Burch and the SyncFusion FAQ website, I
tried to disable my add new row at the bottom of my datagrid. However
the add new row still shows up. When I click on it my app crashes. Can
anybody look at the routine I've included at the bottom and tell me what
I did wrong?
Thanks,
Steve
Clay's Post:
You can do this by getting at a dataview associated with the datagrid,
and
setting its AllowNew member. Here is one way you can do this.
CurrencyManager cm =
(CurrencyManager)this.BindingContext[dataGrid1.DataSource,
dataGrid1.DataMember];
//no adding of new rows
((DataView)cm.List).AllowNew = false;
===================================
Clay Burch
Syncfusion, Inc.
My Routine:
private void loadMessagesDataGrid(ref DataTable msgsDataTable)
{
DateTime startDateTime = DateTime.Now.AddDays(-1);
string messagesSelectStr = "SELECT id, fldtimestamp, "+
"payload, direction, state, transNum, port "+
"FROM messages "+
"WHERE port = "+Port+" "+
"AND fldtimestamp > #"+startDateTime+"# "+
"ORDER BY fldtimestamp DESC";
// Create data adapter objects
MessagesDataAdapter = new OleDbDataAdapter(messagesSelectStr,
Db.getConnection());
MessagesDataAdapter.TableMappings.Add("Table1", "messages");
createMessagesInsertAndUpdateCommands(MessagesDataAdapter, Db);
try
{
MessagesDataAdapter.Fill(dgDataSet, "messages");
}
catch (Exception ex)
{
Log.WriteLine("Exception Filling messagesDataAdapter: "+ex.Message);
return;
}
DataGridTableStyle messagesStyle = null;
try
{
messagesStyle = new DataGridTableStyle();
messagesStyle.MappingName = "messages";
}
catch (Exception ex)
{
Log.WriteLine("Exception getting DataGridTableStyle: "+ex.Message);
return;
}
// HERE IS THE FIRST LINE SUGGESTED BY SYNCFUSION
CurrencyManager cm = (CurrencyManager)BindingContext[dgDataSet,
"messages"];
try
{
int numCols = dgDataSet.Tables["messages"].Columns.Count;
DataGridColoredTextBoxColumn aColumnTextColumn ;
for(int i = 0; i < numCols; ++i)
{
aColumnTextColumn = new DataGridColoredTextBoxColumn(this);
aColumnTextColumn.HeaderText =
dgDataSet.Tables["messages"].Columns[i].ColumnName;
aColumnTextColumn.MappingName =
dgDataSet.Tables["messages"].Columns[i].ColumnName;
if(i == 1) // fldtimestamp
{
aColumnTextColumn.Format = "g";
}
messagesStyle.GridColumnStyles.Add(aColumnTextColumn);
}
messagesStyle.GridColumnStyles["fldtimestamp"].Width = 110;
messagesStyle.GridColumnStyles["payload"].Width = 250;
messagesStyle.GridColumnStyles["direction"].Width = 0;
messagesStyle.GridColumnStyles["state"].Width = 75;
messagesStyle.GridColumnStyles["transNum"].Width = 0;
messagesStyle.GridColumnStyles["port"].Width = 0;
messagesDataGrid.TableStyles.Clear();
messagesDataGrid.TableStyles.Add(messagesStyle);
// HERE IS THE SECOND LINE SUGGESTED BY SYNCFUSION
((DataView)cm.List).AllowNew = false;
}
catch (Exception ex)
{
Log.WriteLine("Exception setting up TableStyles: "+ex.Message);
return;
}
// bind messages data grid with messages data table
try
{
msgsDataTable = dgDataSet.Tables["messages"];
messagesDataGrid.DataSource = msgsDataTable;
msgsDataTable.DefaultView.Sort = "fldtimestamp DESC";
}
catch (Exception ex)
{
Log.WriteLine("Exception: "+ex.Message);
}
}
--------------F34FF1FF13222AD377793457
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<br>Based on this post from Clay Burch and the SyncFusion FAQ website,
I tried to disable my add new row at the bottom of my datagrid. However
the add new row still shows up. When I click on it my app crashes.
Can anybody look at the routine I've included at the bottom and tell me
what I did wrong?
<br>Thanks,
<br>Steve
<p>Clay's Post:
<p><font face="Courier New,Courier"><font size=-1>You can do this by getting
at a dataview associated with the datagrid, and</font></font>
<br><font face="Courier New,Courier"><font size=-1>setting its AllowNew
member. Here is one way you can do this.</font></font>
<br><font face="Courier New,Courier"><font size=-1></font></font> <font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>CurrencyManager cm =</font></font>
<br><font face="Courier New,Courier"><font size=-1>(CurrencyManager)this.BindingContext[dataGrid1.DataSource,</font></font>
<br><font face="Courier New,Courier"><font size=-1>dataGrid1.DataMember];</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>//no adding of new rows</font></font>
<br><font face="Courier New,Courier"><font size=-1>((DataView)cm.List).AllowNew
= false;</font></font><font face="Courier New,Courier"><font size=-1></font></font>
<p><font face="Courier New,Courier"><font size=-1>===================================</font></font>
<br><font face="Courier New,Courier"><font size=-1>Clay Burch</font></font>
<br><font face="Courier New,Courier"><font size=-1>Syncfusion, Inc.</font></font>
<p>My Routine:
<br> private void loadMessagesDataGrid(ref DataTable msgsDataTable)
<br> {
<br> DateTime startDateTime = DateTime.Now.AddDays(-1);
<br> string messagesSelectStr = "SELECT id, fldtimestamp, "+
<br> "payload, direction, state, transNum, port "+
<br> "FROM messages "+
<br> "WHERE port = "+Port+" "+
<br> "AND fldtimestamp > #"+startDateTime+"# "+
<br> "ORDER BY fldtimestamp DESC";
<p> // Create data adapter objects
<br> MessagesDataAdapter = new OleDbDataAdapter(messagesSelectStr,
Db.getConnection());
<br> MessagesDataAdapter.TableMappings.Add("Table1", "messages");
<p> createMessagesInsertAndUpdateCommands(MessagesDataAdapter,
Db);
<p> try
<br> {
<br> MessagesDataAdapter.Fill(dgDataSet, "messages");
<br> }
<br> catch (Exception ex)
<br> {
<br> Log.WriteLine("Exception Filling messagesDataAdapter:
"+ex.Message);
<br> return;
<br> }
<p> DataGridTableStyle messagesStyle = null;
<br> try
<br> {
<br> messagesStyle = new DataGridTableStyle();
<br> messagesStyle.MappingName = "messages";
<br> }
<br> catch (Exception ex)
<br> {
<br> Log.WriteLine("Exception getting DataGridTableStyle:
"+ex.Message);
<br> return;
<br> }
<br>
<br>// HERE IS THE FIRST LINE SUGGESTED BY SYNCFUSION
<br> CurrencyManager cm = (CurrencyManager)BindingContext[dgDataSet,
"messages"];
<br> try
<br> {
<br> int numCols = dgDataSet.Tables["messages"].Columns.Count;
<br> DataGridColoredTextBoxColumn aColumnTextColumn ;
<br> for(int i = 0; i < numCols; ++i)
<br> {
<br> aColumnTextColumn = new DataGridColoredTextBoxColumn(this);
<br> aColumnTextColumn.HeaderText = dgDataSet.Tables["messages"].Columns[i].ColumnName;
<br> aColumnTextColumn.MappingName = dgDataSet.Tables["messages"].Columns[i].ColumnName;
<br> if(i == 1) // fldtimestamp
<br> {
<br> aColumnTextColumn.Format = "g";
<br> }
<br> messagesStyle.GridColumnStyles.Add(aColumnTextColumn);
<br> }
<p> messagesStyle.GridColumnStyles["fldtimestamp"].Width
= 110;
<br> messagesStyle.GridColumnStyles["payload"].Width
= 250;
<br> messagesStyle.GridColumnStyles["direction"].Width
= 0;
<br> messagesStyle.GridColumnStyles["state"].Width =
75;
<br> messagesStyle.GridColumnStyles["transNum"].Width
= 0;
<br> messagesStyle.GridColumnStyles["port"].Width = 0;
<p> messagesDataGrid.TableStyles.Clear();
<br> messagesDataGrid.TableStyles.Add(messagesStyle);
<p>// HERE IS THE SECOND LINE SUGGESTED BY SYNCFUSION
<br> ((DataView)cm.List).AllowNew = false;
<p> }
<br> catch (Exception ex)
<br> {
<br> Log.WriteLine("Exception setting up TableStyles:
"+ex.Message);
<br> return;
<br> }
<p> // bind messages data grid with messages data table
<br> try
<br> {
<br> msgsDataTable = dgDataSet.Tables["messages"];
<br> messagesDataGrid.DataSource = msgsDataTable;
<br> msgsDataTable.DefaultView.Sort = "fldtimestamp DESC";
<br> }
<br> catch (Exception ex)
<br> {
<br> Log.WriteLine("Exception: "+ex.Message);
<br> }
<br> }
<br>
</body>
</html>
--------------F34FF1FF13222AD377793457-- Tag: BUG Report. Please confirm. Tag: 57371
Tab Control with Combo Box
I have a windows form that contains a tab control. On
one of the tabs I have a combo box bound to a datatable.
When I first enter the tab I initialize the selectedindex
of the combobox to -1. I then type text into the combo
box that does not match any entries in the dropdown
list. If I then choose a different tab and return to my
tab with the combo box, the selectedindex has been
changed to 0 and the text I entered is replaced with the
text from list item 0. Why does the combo box not retain
a selectedindex of -1 with the text I entered? How can I
correct this?
Thank You,
Don Tag: BUG Report. Please confirm. Tag: 57370
Help with ListView
I am trying to get data from a CollectionBase derived class into a ListView.
Currently the output is one continuous line of data that is of Boolean type
e.g. True True False True False False False True .
No other data or header information is displayed.
public class RecFormCtxSaved
{
private Boolean enabled;
private Boolean selected;
private string column;
private string text;
}
private void createListView()
{
ListViewItem lvi;
this.listView1.Columns.Add("Enable", 50, HorizontalAlignment.Left);
this.listView1.Columns.Add("Select", 50, HorizontalAlignment.Left);
this.listView1.Columns.Add("Column", 50, HorizontalAlignment.Left);
this.listView1.Columns.Add("Text", 50, HorizontalAlignment.Left);
foreach (RecFormCtxSaved rec in coll)
{
lvi = new ListViewItem();
lvi.Text = rec.Enabled.ToString();
lvi.SubItems.Add(rec.Selected.ToString());
lvi.SubItems.Add(rec.Column);
lvi.SubItems.Add(rec.Text);
this.listView1.Items.Add(lvi);
}
} Tag: BUG Report. Please confirm. Tag: 57367
Wish List Item - Slim CLR For Download
For Java code, there is a "slim" download from Sun that contains just
enough code to host an applet plus the capability to download other
classes/jars as needed. There are seperate options from Sun (SDK
download containing jar.exe, etc) for those that need more.
I wish the same could be done for the .NET CLR; I would like to host
"C# applets" in my web pages, but a 20mb download plus a reboot is a
lot to ask.
Why can't Microsoft distribute a "slim" CLR download weighing in
around 5mb that just contains the base classes for XML, Remoting,
System.Data, and WinForms, a "medium" one with some more features, and
still distribute the full sized one?" Tag: BUG Report. Please confirm. Tag: 57366
OpenFileDialog ShowDialog hangs
Hi there,
has anyone run into this problem? I have a simple winforms app that
uses the OpenFileDialog to open a file. If I choose to open a file
from a different machine on my network everything is fine. However, if
I now close down my app and shutdown the other machine and try again
the OpenFileDialog hangs. The call stack shows that it is waiting in
RunFileDialog.
It looks as though the app persists the current directory somewhere,
but runs into trouble when that path is no longer available. When I
try the same thing with Word it goes back to My Documents when the
network path is not available.
Any ideas?
Thanks,
Tom Tag: BUG Report. Please confirm. Tag: 57365
Lock fields
Hi
I am trying to lock fields on my form (VB.NET), so that they cannot be
edited by the user. So far I have accomplished my goal for the text box
by setting its read only property. But what should I do for combo box
and mask edit box (added as an reference). list box etc. I don't want to
use the enabled property, since that makes the controls text to fade or
not seen prominently.
Does anyone know how can we achieve this in VB.NET ??
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: BUG Report. Please confirm. Tag: 57359
Datagrid question
I've a editable datagrid where the user sometimes needs to enter more
characters than can be displayed on the screen.
The current behavior is, I believe, a bit confusing to the user. When
they fill up the visible portion of the cell, the entered text moves
left off the screen, leaving the cursor in the left-most position of
the cell, ready to accept more data.
This is confusing because it appears that the entered text has
"disappeared". I'd rather have it behave like a standard textbox,
where it scrolls one character at a time when the visible width is
reached.
Is there a property that controls this behavior?
TIA. Tag: BUG Report. Please confirm. Tag: 57358
No touch deployment - offline question.
Hi, I've been reading a lot about no touch deployment and it could be the
solution to my design. But I have a question:
What happens if the client is not 'connected'?
Is there anyway to run the app from the client chache?
Where can I find information about that?
I've read in some articles on MSDN about this posibility, but I can't find
any info about that.
Thanks in advance,
JOSE Tag: BUG Report. Please confirm. Tag: 57350
question on docking
(sorry if you see this message twice - I got a "message expired" on my
last post)
Hi,
My GUI is driving me crazy. It's a little complicated, so I'll explain
the part that I find troubling:
I have a Panel which includes a UserControl of mine. The UserControl is
put in the Panel at runtime.
Although UserControl has Dock=Fill, resizing the Panel doesn't resize
the UserControl. (I check by hitting a breakpoint and using the
Immediate window)
How is this possible? Is there some other property I should set? Tag: BUG Report. Please confirm. Tag: 57349
Framework Configuration
Hi!
As I can make to configure framework with one setup. The
configuration that I am to speak is:
Control Panel->Administrative Tools->Microsoft .NET
Framework 1.1 Configuration:
Run Time Security Police->Machine->Code Groups-
>All_code->Local_Intranet Zone and to insert a new rule
to have permissions to accede to an application that if
finds in another machine.
thx,
David Tag: BUG Report. Please confirm. Tag: 57348
dll version
When I call a class in a dll from an application, how do I tell the version
of the dll as oposed to the application calling the dll?
Andrew Tag: BUG Report. Please confirm. Tag: 57346
basic question on docking
Hi,
My GUI is driving me crazy. It's a little complicated, so I'll explain
the part that I find troubling:
I have a Panel which includes a UserControl of mine. The UserControl is
put in the Panel at runtime.
Although UserControl has Dock=Fill, resizing the Panel doesn't resize
the UserControl. (I check by hitting a breakpoint and using the
Immediate window)
How is this possible? Is there some other property I should set? Tag: BUG Report. Please confirm. Tag: 57344
Problem with localized usercontrol
Hi
i must develop an multilanguage application (german,
italian). I have a localized winform with the description
in this 2 languages. Now i have a Usercontrol which is
localized too. If i would like drag this usercontrol from
the toolbox of the vs.net into my winform the vs.net give
me the following error:
An exception occurred while trying to create an instance
of PFUtilityLibrary.USCWeekDaysCheck. The exception
was "Could not find any resources appropriate for the
specified culture (or the neutral culture) in the given
assembly. Make sure "USCWeekDaysCheck.resources" was
correctly embedded or linked into
assembly "PFUtilityLibrary".
baseName: USCWeekDaysCheck locationInfo:
PFUtilityLibrary.USCWeekDaysCheck resource file name:
USCWeekDaysCheck.resources assembly: PFUtilityLibrary,
Version=1.0.1361.25253, Culture=neutral,
PublicKeyToken=null
I use the Framework 1.0, somebody have an idea what is
the problem?
thx Tag: BUG Report. Please confirm. Tag: 57341
possible listbox BeginUpdate() / EndUpdate() bug?
Hi
I have the following code which lodes names of=20
wordtemplates into my .NET windowsforms app:
--
//lsbTemplate.BeginUpdate();
lsbTemplate.Items.Clear(); =09
System.IO.DirectoryInfo di =3D new System.IO.DirectoryInfo( =20
p_sPathToTemplates );
System.IO.FileInfo[] arFi =3D di.GetFiles( "*(*" +=20
p_sHelpDesk + "*).dot" ); =09
if( arFi.Length =3D=3D 0 )
{
lsbTemplate.Sorted =3D false;
//lsbTemplate.EndUpdate();
return;
}
else
{
lsbTemplate.Sorted =3D true;
}
=09
foreach( System.IO.FileInfo fi in arFi )
{ =09
if( fi.Name.IndexOf( "~" ) < 0 )
{//DO not show templates which include ~ ...
lsbTemplate.Items.Add( fi.Name );
}
} =09
//lsbTemplate.EndUpdate();=09
---
Notice the calls to BeginUpdate and EndUpdate at the=20
beginning and the end. When theese lines of code are=20
active ( not commented out ) the listbox doesn't show any=20
items if there's only one items loaded. Actually, by=20
clicking the listbox you can click the top item, but there=20
is no text shown. If there are 2 or more items all items=20
show up ok.
After commenting out BeginUpdate and EndUpdate the listbox=20
show's this one item ok.
I haven't been able to think of any reason for this. I=20
would like to use BeginUpdate and EndUpdate because it=20
boost's GUI performance when updating the listbox, but=20
until this is resolved I will skip them.
Any hint's welcomed, best regards, =C1g=FAst from Iceland Tag: BUG Report. Please confirm. Tag: 57339
standard commands display text
hello,
in System.Windows.Forms.Design.MenuCommands is a class StandardCommands with
static members for some standard commands iE: StandardCommands.Delete
i want my document implement some of these commands and the toolbar show
these commands.
how can i get culture specific names of these commands (iE: engl. "Delete")
?
how can i get the toolbar bitmap? (16x16)
Frank Tag: BUG Report. Please confirm. Tag: 57338
No Touch Deployment.
No Touch Deployment.
I use "No Touch Deployment" for my Window Forms
application. The question is why my EXE-file is downloaded
three times and not just one.
My shortcut:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\IEExec.exe
http://ozzy/conet/client/bin/co.win.exe?server=ozzy
IIS Logfile:
cs-method cs-uri-stem cs-
uri-query sc-status sc-bytes cs-
bytes time-taken
GET /conet/client/bin/co.win.exe
server=hk0073.config 200 823562
232 16766
GET /conet/client/bin/co.win.exe
server=hk0073 200 823562
225 17328
GET /conet/client/bin/CO.Win.DLL -
404 4203 211
0
GET /conet/client/bin/CO.Win/CO.Win.DLL -
404 4203 218
0
GET /conet/client/bin/bin/CO.Win.DLL -
404 4203 215
0
GET /conet/client/bin/bin/CO.Win/CO.Win.DLL -
404 4203 222
0
GET /conet/client/bin/CO.Win.EXE -
200 823562 211
17594
Thanks in advance! Tag: BUG Report. Please confirm. Tag: 57337
Update dataset
I have a Windows form that does a insert and then a update to a dataset.
When I do the insert/update and all the fields are filled in it works fine.
But when there is a null value or when the field is empty I get the usual
update error.
I'm using a Access database and none of the fields are required.
I don't want to have to make a seperate object to merge the changes like
most of my forms do.
VB6 had shortcuts and I would like to use one in VB.NET
I want to have a If Then Else or something to use as a shortcut around this.
Like:
If textbox1 = NULL then
skip
Else
Add textbox1.text = recordset.....
I have found limited info on the Null field problem. Something like
System.DBNULL
In the old way I would do something like a IIF(NULL) etc...
Does anybody have any ideas.
Thanks.
Erik Tag: BUG Report. Please confirm. Tag: 57319
.net bug in order of events w/ listview control??
i've found what appears to be a bug and i'm looking for
confirmation. as a result of problems i found w/ an
application i made, i created a simple vb.net program
that includes a single form with a listview control, a
text box and a button. i coded events for ENTER and
LEAVE for the listview control and textbox. i also coded
a SELECTEDINDEXCHANGED event and a CLICKED event for the
listview. each event writes to a string that it
occurred there is no other code. the button is used to
display the string. finally, i hard-coded two items into
the listview control.
i'm running a windows xp computer with visual studio.net
installed and .net 1.1. on that computer, when i run the
test program, if i click on item one in the listview
control, then click on the text box, then click back to
the listview control on item two, the following events
occur....
entered listview->clicked on listview->left listview-
>entered textbox->left textbox->entered listview-
>selected index changed->selected index changed->clicked
on listview
aside from the SELECTEDINDEXCHANGED event getting called
twice, which i dont' understand, it works as i would
expect. however, if i run this same program on any other
computer (that doesn't have visual studio.net installed),
the order of events is different. what i get is...
entered listview->clicked on listview->left listview-
>entered textbox->selected index changed->selected index
changed->left textbox->entered listview->clicked on
listview
!!! the SELECTEDINDEXCHANGED event gets called before the
event for leaving the textbox. what's the deal with
this? is this a bug or am i missing something? if it is
a bug, it seems like a fairly serious one (for me at
least).
thanks,
glenn Tag: BUG Report. Please confirm. Tag: 57317
Column order when binding DataGrid with typed collection
I need help for setting the order of columns in a=20
DataGrid populated by binding it with a fixed-type=20
collection of custom objects. Actually I don=B4t even know=20
where to start.
The binding was easy and works with a simple
myDataGrid.DataSource =3D myCollection;
But the order of the columns messes the data; related=20
columns appear separated each other. How can I specify=20
column ordering? Should I change the order in the=20
DataGrid (How?). Or there is a way to make Reflection=20
work automatically on the type to get the properties and=20
fields on the right order, so whenever I bind them with a=20
grid the columns appear in the right place? Tag: BUG Report. Please confirm. Tag: 57315
GUI similar to Visual Studio .NET
Dear Everybody,
I am designing the editor which has very similar GUI to
Visual Studio.NET.(Main menu, toolbar, toolbox, Solution
Explorer, properties, Editing area, etc).
Specially, because this editor handle multiple file
format, a file will be open by solution Explorer and
correspoding Editor form shoud be opened. As an object is
m