Bigger Large Icons in listview, possible?
Hi all,
I'm just wondering if it's possible to make the icons under large icons
view in listview bigger? For some reason, I think the default is set at
16 X 16 pixels?
I don't think I've done anything wrong?
-----------------------------------------------------------------------------------------------
this.listView1.View = View.LargeIcon;
this.listView1.
ImageList il = new ImageList();
il.Images.Add(Bitmap.FromFile("C:\\pictures\\topics\\1.gif"));
listView1.LargeImageList = il;
ListViewItem item1 = new ListViewItem("ALL");
item1.ImageIndex = 0;
listView1.Items.AddRange(new ListViewItem[] {item1});
---------------------------------------------------------------------------------------------------
Even though it was set to largeIcon, it's still only 16 X 16 pixels at
best. Any help will be appreciated.
Cheers
Edmond Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100805
How to attach to a process middle tier for debugging
Hi,
I'm consulting on a project that has two solutions, a client solution, and a
middletier solution. The middle tier solution is hosted in asp.net.
I want to debug something in the middle tier, and I've been told that I have
to attach to the asp.net process.
So I add a breakpoint on the code in the middle tier. I build the middle
tier solution and then the client solution in debug mode. Then I start the
client application. Then I'm supposed to attach to the ASP.NET process.
I've tried to attach to the asp.net process from both solutions but the
debugger doesnt stop at the breakpoint.
The middletier is not in the client solution, but is referenced
Can Anyone help? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100803
TextBox Size.Height
Is there any way to control a TextBox Size property's Height? Besides making
it Multiline?
Everytime I set the Size, it always reverts back to Size.Height = 20 (or
whatever value based on the current font, I think). I've tried setting the
Min/Max Size but that only seems to hold during design time. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100800
Marlett not allowed? [VS 2005]
I want to display a right-pointing triangle glyph like that indicating a
submenu. This is "8" in the Marlett font. However, when I put a label on a
form and set its font to Marlett, all I see is a regular "8", both in the
designer and when the app is running. Is there a limitation?
I once created a drop-down button by explictly drawing text in Marlett, and
that worked, but I had to do it that way because I was using two fonts (one
for the button text and one for the down glyph). I'd like to avoid doing
that much work when it seems like the control should handle it for me.
Suggestions? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100794
Form -> Panel -> Child Form -> Resize -> Bug?
I'm using the following code to show/hide a form located inside a panel that
is located on my main form. The panel is set to DockStyle.Fill so that when
the main form is resized the panel is also resized. The problem is that the
included child form never resizes beyond it's initial starting size. Don't
child forms respect the DockStyle setting during resize of parent controls?
If I take out the commented lines of code it works - but of course it looks
like crap while doing it.
Button click event:
if (f2 == null)
{
f2 = new Form2();
f2.TopLevel = false;
this.pnl_childform.Controls.Add(f2);
}
if (!f2.Visible)
{
f2.Show();
f2.BringToFront();
f2.Dock = DockStyle.Fill;
//f2.WindowState = FormWindowState.Minimized;
//f2.WindowState = FormWindowState.Maximized;
}
else
{
f2.Hide();
} Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100792
AD Replication Problem
Hello All,
I recently restored two of my Windows 2003 domain controllers from a backup.
They were backed up using Symantec LiveState Recovery 6.0. Everything seemed
to be just fine, but just recently I noticed that AD Replication is not
working. I've received Event id: 13559 Source: NtFrs. I did some research
and tried what's suggested at the following link
http://www.eventid.net/display.asp?eventid=13559&eventno=657&source=NtFrs&phase=1
That doesn't seem to resolve my problem, after creating the
NTFRS_CMD_FILE_MOVE_ROOT file with no extension in C:\winnt\sysvol\domain,
and running "net stop ntfrs" and then "net start ntfrs" I notice much diff.
I did get Event Id: 13508 Source: NtFrs. Also, I can see both the servers in
Sites and Services. But when I try to manually replicate i get "The Source
server is currently rejecting replication requests"
Does anywhere know how I resolve this issue? It's causing major issues for
me and I need to figure it out ASAP. Last thing I wanna do rebuild any of
the servers! Please HELP!
--
Raghbir Flora
Network Administrator Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100790
How to get ValueChanged event from PropertyGrid collection using default editor?
When makign a change to a collection using the default editor in the
property grid, you do not get a value change event. Now I know I can
code up my own editor and deal with the valeu change myself, but I have
40 lists I'd have todo this with and it seems like there should be a
way to get the default editor to work... Anyone have any ideas? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100783
Problem with Waiting Form Owner
I have a process that take some time to process data in formA.
While processing the data I wish to pop a "waitingform". The waiting
form have it's own thread and show the process advancing between 0 and
100%.There is a timer within the
Waitingform, on each tick the progress percentage is read and display,
also this reflect that
the program is still running. When the processing finish, the waiting
form just close.
I have done everything and it's work well except for one thing. I wish
the waiting form to be modal and own by the main form.
If I set the waitingform owner :
WaitingForm->Owner = FormA
The waitingform doesn't appear before the data process finish, the form
disappear as soon as it appear. If I dont set the owner, the
waitingform works as expected, but can be lost behind other windows,
and user may believe there is a problem when it's not.
I use multiple threads in my application. The data processing thread is
not the same as formA nor the same as the Waitingform.
Does someone have an idea how I can set the ownership of the waiting
form and still keep the behavior i wish? Thank you Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100777
how to raise the click event by code
Hi all,
I want to raise the event click of a control by code. How can i do that ?? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100773
Best way to organize large project
I am working on rewriting a Fox 7 ODBC app. and teaching myself .NET in the
process. So far I have over 130 of the screens rewritten, but debug
performance is terrible. It would be much better if I had each screen as
seperate solutions, but then I'm constantly having to remove and readd
references which became way too much hassel. So currently my solution has
the 130+ projects included.
But when I start debugging it rebuilds EVERYTHING! eventhough I haven't
changed a single thing!! I can play a hand of Solitaire before it finally
starts executing. Not finding this situation very productive at all!!! Is
there an option that can be set to only rebuild changed modules? Or has the
size of my application exceeded the capability of .NET? It sure is looking
that way.
Or how should an application of this size be organized? The two ways I've
discovered each have serious flaws and I'm seriously wondering about the
feasibility of developing large application in .NET.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/winform/200605/1 Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100759
scroll user control?
I am painting my control entirly and need it to show scroll bars when it's
being resized below it's min size. Please suggest how to go about this.
Simply setting autoscroll to true does not work. Thansk in advance. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100755
deployment
i was finish project with visual basic 2003 + SqlCE database for POCKET
PC, and now i have to create setup
can someone help me a little, couse all that is realy confused for me :-( Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100747
capture application output
Hi,
How can I capture the text output of a console app?
For example, I would like to capture the outpur of "qwinsta"
Thanks. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100746
How to kill a terminal server session (VB.NET)
Hi,
Is there a way to kill a Terminal Server session from vb.net?
I have to constantlly access our servers to reset ureser that get hung. I
would like to have a web interfave that I can access via my PDA/Phone. It
dose not have to be a wab page that does this. I could write to a queque
that is read by a windows servrice on the TS server and then reset the user.
Thanks.
George. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100745
ErrorProvider in Datagrid with Comboboxcolumn
Hello,
I have got a Datagrid containing a Datagridtablestyle which is a
comboboxcolumn derived from DataGridColumnStyle. When validating my datagrid
the error icons appear but the tooltip does not appear. Not having a
comboboxcolumn everything is fine.
My first idea is to implement the IDataErrorInfo interface in my
Comboboxcolumn but there is no effect! Can anybody help me?
Thanks Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100741
grid component similar to Excel
Hi all
I need a suggestion.
I have a customer that wants the grids in the application i'm going to
develop lokoking as much as possible as Excel grids.
I suppose he wants the filtering possibilities of Excel in the header of the
grid, the possibility to copy&paste from one cell to the other etc.
My question is:
is there any component that can suit my needs?
something that someone used/has used for large scale apps?
Please give me a suggestion! Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100736
how to point the cursor in specific cell
Hi everybody,
im working in infragistics ultragrid.
Can any one know how to get the cursor in to active cell .
i need to check the empty field before leaving cell.
if its empty then cursor should be forced to come into the empty field.
ive tried in beforedeactivecell event but the cursor is not coming to the
empty field when i changed the cursor to another cell.
below is my code
***
//function returns bool if cell is empty
chekemfield =checkemptyfield();
if(chekemfield ==true)
{
MessageBox.Show("Field must be
entered","V-1550",System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
ultraGrid1.ActiveRow=ultraGrid1.Rows[actrowinx];
Infragistics.Win.UltraWinGrid.UltraGridCell acell;
acell = ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"];
ultraGrid1.ActiveCell = acell;
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
//function
public bool checkemptyfield()
{
string duty=ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"].Value.ToString();
string
material=ultraGrid1.ActiveRow.Cells["INSULATION_MATERIAL"].Value.ToString();
if(duty==string.Empty || material==string.Empty)
{
chekemfield=true;
return chekemfield;
}
else
{
chekemfield=false;
return chekemfield;
}
}
****
can anyone help me
--
We cannot find solution but will arise from SuperConscious.
Regards
Prabakar Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100735
infragistics how to get the cursor in specific cell
Hi everybody,
im working in infragistics ultragrid.
Can any one know how to get the cursor in to active cell .
i need to check the empty field before leaving cell.
if its empty then cursor should be forced to come into the empty field.
ive tried in beforedeactivecell event but the cursor is not coming to the
empty field when i changed the cursor to another cell.
below is my code
***
//function returns bool if cell is empty
chekemfield =checkemptyfield();
if(chekemfield ==true)
{
MessageBox.Show("Field must be
entered","V-1550",System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
ultraGrid1.ActiveRow=ultraGrid1.Rows[actrowinx];
Infragistics.Win.UltraWinGrid.UltraGridCell acell;
acell = ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"];
ultraGrid1.ActiveCell = acell;
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
//function
public bool checkemptyfield()
{
string duty=ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"].Value.ToString();
string
material=ultraGrid1.ActiveRow.Cells["INSULATION_MATERIAL"].Value.ToString();
if(duty==string.Empty || material==string.Empty)
{
chekemfield=true;
return chekemfield;
}
else
{
chekemfield=false;
return chekemfield;
}
}
****
can anyone help me
--
We cannot find solution but will arise from SuperConscious.
Regards
Prabakar Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100733
How to control date format in combo
Hi All,
This SHOULD be simple, but I just can't see it...
I have a combo box which uses a dataset as its list source. The
displayed member is a date column from the underlying table. When I
run it, the date in the combo is formatted as d/m/yyyy hh:mm:ss, which
I don't want - I just want the date part. How can I control the format
of the date? Do I have to delve into owner-drawing? Surely not!
Thanks Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100730
Processing Enter on Form Controls
I've been having trouble correctly processing the "Enter" key on form
controls. Here's what I've done:
Set the "AcceptsReturn" property to true
Overridden IsInputKey and KeyDown; on KeyDown, if the "Enter" key was
pressed, I set e.Handled to true.
So now I'm receiving the event, which is good but.... When I press
"Enter" in that control (it's a text box, if that makes any difference)
I get the Windows "Default Beep." I don't want the default beep. Who
else is receiving this event, and why is it causing the default beep?
How do I stop this behavior?
On a related note: I remember writing Windows software back in the day,
and there were handy programs that would show me *all* of the events a
particular control received...event watchers. Does Visual Studio have
such a program and, if not, I assume there is something out there...if
anyone has any recommendations, I would welcome hearing them. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100726
Newlines in TextBox
I'm trying to programatically add new lines to the content of a
(System.Windows.Forms.)TextBox and, while I have found a solution, I
feel that it can't be very efficient. There must be a better way.
I first tried:
textBox.AppendText( "\n New line" );
But that didn't work. Nor did variations on the theme, like
textBox.Text += ....
Here's what *did* work:
String[] lines = new String[textBox.Lines.Length+1];
textBox.Lines.CopyTo( lines, 0 );
lines[lines.Length-1] = textBox.Text;
textBox.Lines = lines;
This seems very inefficient since we're copying the *entire* contents of
the text box just to add a single new line.
Am I missing something here?
-- T Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100724
Problem with ServiceController.ExecuteCommand
Running ServiceController.ExecuteCommand on my custom service raises a
"Cannot control service on machine <machineName>". Drilling thru the inner
exceptions, I come across an "Access is denied" error msg. Funny thing is I
can start and stop the service using the same ServiceController instance, so
an issue on permissions seems remote. Service originally runs under
LocalSystem; changed it to my Windows account but had no effect.
Any help will be greatly appreciated. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100718
How to disable search i ListBox/ComboBox
This is a multi-part message in MIME format.
------=_NextPart_000_000F_01C67355.993BB800
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi, All:
In ListBox and ComboBox when you type a letter, say 'k', it will jump to =
the first item starting with 'k'. I want to disable it and do my own =
search that can search more than one letter, like 'kite', not just one =
character which ListBox currently does. But I cannot disable ListBox's =
own search. everytime when I type 'i', then jump to the item starting =
with 'i', not the one starting with 'ki'. Do you know how to disable it?
Thanks,
Dennis Huang
------=_NextPart_000_000F_01C67355.993BB800
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi, All:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>In ListBox and ComboBox when you type a letter, say =
'k', it=20
will jump to the first item starting with 'k'. I want to disable it and =
do my=20
own search that can search more than one letter, like 'kite', not =
just one=20
character which ListBox currently does. But I cannot disable =
ListBox's own=20
search. everytime when I type 'i', then jump to the item starting with =
'i', not=20
the one starting with 'ki'. Do you know how to disable it?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Thanks,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Dennis Huang</FONT></DIV></BODY></HTML>
------=_NextPart_000_000F_01C67355.993BB800-- Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100717
tool window & shortcut keys
In my application I have some tool window.
some of these tool window do accept key input.
yet I would like key shortcut (CTRL+S, F2, etc...) to be handled by the main
menus of my main window.
how could I achieve somethink like that? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100716
Consolas
Hi,
Many people using this font...Is there a system or screen requirment.
http://www.microsoft.com/downloads/details.aspx?familyid=22E69AE4-7E40-4807-8A86-B3D36FAB68D3&displaylang=en
I could get used to it as it probably save screen space. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100715
Drag & Drop Multiple Items between ListBoxes
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C67351.6BF06660
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi, All:
Do you know how to do drag & drop multiple items between listboxes? I =
can only do with single selection.
Thank you,
Dennis Huang
------=_NextPart_000_0006_01C67351.6BF06660
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi, All:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Do you know how to do drag & drop multiple items =
between=20
listboxes? I can only do with single selection.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Thank you,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Dennis Huang</FONT></DIV></BODY></HTML>
------=_NextPart_000_0006_01C67351.6BF06660-- Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100714
Disabled DataGridView Textbox column
Hi,
I am having difficulties creating a derived class for
DisabledDataGridViewTextBoxColumn and cell when the VisualStyle is not
supported. Basically I am down to either using ControlPaint or Graphics
to achieve this. But with Graphics, I am not sure how I can make them
diabled.
Below are my codes:
class DataGridViewDisabledTextBoxColumn : DataGridViewTextBoxColumn
{
public DataGridViewDisabledTextBoxColumn() {
this.CellTemplate = new DataGridViewDisabledTextBoxCell();
}
}
public class DataGridViewDisabledTextBoxCell :
DataGridViewTextBoxCell {
private bool enabledValue;
public bool Enabled {
get {
return enabledValue;
}
set {
enabledValue = value;
}
}
// Override the Clone method so that the Enabled property is
copied.
public override object Clone() {
DataGridViewDisabledTextBoxCell cell =
(DataGridViewDisabledTextBoxCell)base.Clone();
cell.Enabled = this.Enabled;
return cell;
}
// By default, enable the textbox cell.
public DataGridViewDisabledTextBoxCell() {
this.enabledValue = true;
}
protected override void Paint(Graphics graphics,
Rectangle clipBounds, Rectangle cellBounds, int rowIndex,
DataGridViewElementStates elementState, object value,
object formattedValue, string errorText,
DataGridViewCellStyle cellStyle,
DataGridViewAdvancedBorderStyle advancedBorderStyle,
DataGridViewPaintParts paintParts) {
// The button cell is disabled, so paint the border,
// background, and disabled button for the cell.
if (!this.enabledValue) {
// Draw the cell background, if specified.
if ((paintParts & DataGridViewPaintParts.Background) ==
DataGridViewPaintParts.Background) {
SolidBrush cellBackground =
new SolidBrush(cellStyle.BackColor);
graphics.FillRectangle(cellBackground, cellBounds);
cellBackground.Dispose();
}
// Draw the cell borders, if specified.
if ((paintParts & DataGridViewPaintParts.Border) ==
DataGridViewPaintParts.Border) {
PaintBorder(graphics, clipBounds, cellBounds,
cellStyle,
advancedBorderStyle);
}
// Calculate the area in which to draw the textbox.
Rectangle textBoxArea = cellBounds;
Rectangle textBoxAdjustment =
this.BorderWidths(advancedBorderStyle);
textBoxArea.X += textBoxAdjustment.X;
textBoxArea.Y += textBoxAdjustment.Y;
textBoxArea.Height -= textBoxAdjustment.Height;
textBoxArea.Width -= textBoxAdjustment.Width;
// Draw the disabled textbox
if
(System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsSupported &&
Application.RenderWithVisualStyles) {
if
(System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsElementDefined(System.Windows.Forms.VisualStyles.VisualStyleElement.Button.PushButton.Normal))
{
TextBoxRenderer.DrawTextBox(graphics,
textBoxArea, System.Windows.Forms.VisualStyles.TextBoxState.Disabled);
// Draw the disabled text.
if (this.FormattedValue is String) {
TextRenderer.DrawText(graphics,
(string)this.FormattedValue,
this.DataGridView.Font,
textBoxArea, SystemColors.GrayText);
}
}
} else {
Brush brsh = new SolidBrush(Color.Gray);
Brush brFill = new SolidBrush(Color.LightGray);
Pen p = new Pen(brsh,1);
graphics.DrawRectangle(p, textBoxArea);
graphics.FillRectangle(brFill, textBoxArea);
graphics.DrawString((string)this.FormattedValue,
this.DataGridView.Font, brsh, textBoxArea);
}
} else {
base.Paint(graphics, clipBounds, cellBounds,
rowIndex,
elementState, value, formattedValue, errorText,
cellStyle, advancedBorderStyle, paintParts);
}
}
}
I would appreciate if anyone can point me out here.
Thanks,
Sunny Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100713
Smart Client - IIS error
I'm writing the download stub for a Smart Client, following the QuickStart
samples that come with the Updater Block 2.0.
Tested against my local IIS, the stub works perfectly, but when I deploy it
to a server, I get "The system cannot find the file specified" in my browser.
Local Machine is IIS 6.0, Remote Server is IIS 5.0
Thanks for your help Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100710
HttpContext?
In Windows Forms, is there anyway to get the HttpContext for a web server
running on the localhost? TIA.
</joel> Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100709
how to create dynamic event handlers
i'm building an desktop windows app in C#. the main menu for the
application will be different depending on the admin rights of the
user. i've built the entire app. in delphi and i simply activated or
deactivated the menu items in that case, but all the menu items are
visble. i'm hoping / thinking that with .NET, i can dynamically
generate the click events for the dynamically generated menu, so that
only the menu items, that a particular user has access to will show,
along with their events. is this possible? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100708
Datagridview customize data display URGENT!!!!
Is there a way to show data bound to the datagridview vertically instead of
the default horizontally?
Any samples or guidance would be greatly appreciated.
Thanks in advance...
Chris Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100707
"line break" disapears in text box after resizing the form
I put a text box on a form and set it to "multi line".
I use it to show some log information.
Every time there is some information, I use TextBox.AppendText method to add
a information string and a "\n" into the text box. There will be a line
break after the infromation string for the "\n" charactor.
But after i resized the form or click some other window on the task bar and
switch back, the line break disapears. All the text turns into only one
single line.
Is there something wrong using "\n" in multiline text box?
Is there any solution for this issue? or I should use richtextbox or detail
listview instead? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100706
BackgroundWorker Control for VB 2005
To Everyone,
I'm getting an InvalidOperationException for the following code sample below:
This BackgroundWorker is currently busy and cannot run multiple tasks
concurrently.
If you can reply in VB or C#, then that would be acceptable! No preference
because any help would be greatly appreciated!!
Form Load Code:
Disable.CloseButton.Disable(Me)
Me.ProgressBar1.Value = 1
'Change the cursor to wait status!
Me.Cursor = Cursors.WaitCursor
Me.BackgroundWorker1.WorkerSupportsCancellation = True
Me.BackgroundWorker1.WorkerReportsProgress = True
'Tell the background control, the secondary thread, that the work
will be done on the selected text file!
If Me.BackgroundWorker1.IsBusy = True Then
Me.BackgroundWorker1.CancelAsync()
Me.BackgroundWorker1.Equals(Nothing)
Me.BackgroundWorker1.Dispose()
Me.BackgroundWorker1.CancellationPending.Equals(True)
Me.BackgroundWorker1.RunWorkerAsync()
Else
Me.BackgroundWorker1.RunWorkerAsync()
End If
Cancel Button code:
If MsgBox("Are You Sure You Want To Cancel Generating The .LST
Files?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
If Me.BackgroundWorker1.IsBusy = True Then
Me.BackgroundWorker1.CancelAsync()
Me.BackgroundWorker1.Equals(Nothing)
Me.BackgroundWorker1.CancellationPending.Equals(True)
Me.BackgroundWorker1.Dispose()
Me.Cursor = Cursors.Default
Me.Close()
Else
Me.Cursor = Cursors.Default
Me.Close()
End If
End If
BackgroundWorker1_DoWork Code
try
''Do Stuff
'Report the progress of the operation
System.Threading.Thread.Sleep(30)
Me.BackgroundWorker1.ReportProgress(CInt(((count)) / (mMax)
* 100))
'If Cancellation is pending for whatever reason then go
ahead and cancel the operation!
If Me.BackgroundWorker1.CancellationPending = True Then
e.Cancel = True
Me.BackgroundWorker1.Dispose()
Me.BackgroundWorker1.CancelAsync()
Exit Sub
End If
Catch
'Catch errors!
End Try
BackgroundWorker1_ProgressChanged Code:
'Report the progress back to the Progress bar on the form!
Me.ProgressBar1.Value = e.ProgressPercentage
BackgroundWorker1_RunWorkerCompleted Code
If e.Cancelled Then
' The user canceled the operation.
If MsgBox("Operation was canceled", MsgBoxStyle.Exclamation) =
MsgBoxResult.Ok Then
Me.Cursor = Cursors.Default
Me.Close()
End If
ElseIf Not (e.Error Is Nothing) Then
' There was an error during the operation.
Dim msg As String = String.Format("An error occurred: {0}",
e.Error.Message)
If MsgBox(msg, MsgBoxStyle.Exclamation) = MsgBoxResult.Ok Then
Me.Cursor = Cursors.Default
Me.Close()
End If
Else
'Operation completed successfully!
If MsgBox("The .LST File(s) Were Generated Successfully!",
MsgBoxStyle.Exclamation) = MsgBoxResult.Ok Then
Me.Cursor = Cursors.Default
Me.Close()
End If
End If
--
Keal75 Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100705
Setup Project - Prompt user for Start Menu location
Currently my setup project installs its shortcuts into a hard-coded location
under the user's Start Menu. What I want to do is to allow the user to
override this on installation (and if possible to remember that location on
upgrading). How can I do this ? Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100704
.NET 2.0 CommonDialog - Attempt to read or write protected memory
Hello,
Iam getting this strange error with the CommonDialog box on ShowDialog.
Below is the stack trace. Any help is very much appreciated. Thank you.
****
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
at
System.Windows.Forms.UnsafeNativeMethods.GetOpenFileName(OPENFILENAME_I ofn)
at System.Windows.Forms.OpenFileDialog.RunFileDialog(OPENFILENAME_I ofn)
at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)
at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)
at System.Windows.Forms.CommonDialog.ShowDialog()
at UMDCEEE.CoilDesigner.UI.CDUIElements.GetCDFileName(Boolean
forOpeningTrue) in
D:\Users\vikrant\Work\VSNET2\CoilDesigner.NET\CoilDesigner\CoilDesignerUIControls\Components\CDUIElements.cs:line 97
at UMDCEEE.CoilDesigner.UI.CDUICreator.HandleFileOpenClick(Object sender,
EventArgs e) in
D:\Users\vikrant\Work\VSNET2\CoilDesigner.NET\CoilDesigner\CoilDesignerUIControls\Components\CDUICreator.cs:line 1038
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
********
Thanks. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100701
PrintDialog.UseEXDialog problem
Hello All,
If I use -
ContractPrintDialog.UseEXDialog = true;
- My dialog does not get focus after showing thus having a caption (dark
bleu) of the active window, I always have to click on the dialog before I
can type or before a button responds.
When I do not use the extended dialog I do not have this problem.
Is there a work around or so.
Greets
Jean Paul
www.on7ami.be Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100698
PrintDialog problem
Hello all,
IS this a bug or what am I doing wrong;
I make a print Dialog
ContractPrintDialog = new PrintDialog();
I set the property's of my PrinterSettings;
ContractPrintDialog.PrinterSettings.Duplex =
System.Drawing.Printing.Duplex.Horizontal;
I show my dialog.
myPrint = ContractPrintDialog.ShowDialog();
And when I go looking in the dialog to see if the duplex attribute is set,
it is always off, no mather if I set it to Horizontal, .Vertikal, Simplex or
what ever.
If I do not change the checkbox in the dialog the printer does what it has
to do on behave of my settings, evenso, if I look at my
.PrinterSettings.Duplex after colsing the dialog my pre-setting is still
there and if I change the checkbox the new setting is in the setting.
I'm using the Multilaguage-duch version of XP all patches loaded and VS-2005
Dev Team Edition Microsoft Visual Studio 2005 :
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Enterprise
Someone has a suggestion or a work arround?
Jean Paul
www.on7ami.be Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100697
Why my NumericUpDown DataGrid Column can't set the value for new r
I've make some NumericUpDownColumn class that inherited the
DataGridTextBoxColumn and override the SetColumnValueAtRow method as below:
protected override void
SetColumnValueAtRow(System.Windows.Forms.CurrencyManager source, int rowNum,
object value)
{
try
{
base.SetColumnValueAtRow(source, _currentEditRowNum, numericUpDown.Value);
Commit(source, _currentEditRowNum);
}
catch (Exception)
{
Abort(rowNum);
}
}
And also override other methods such as Edit etc., In the
numericUpDown_Leave method, I call the SetColumnValueAtRow method.
I found it works fine for the rows that already exists in the datasource
which bound to DataGrid, but for the new added row, after I set the value and
click the mouse to other row, the value of the new row dispears. Seems that
it can't add row & set value for new row.
Does anyone could help me for this ?
Thanks!
--
Do or do not, there is no try. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100693
Need *formatted* value from DataGrid...possible?
Hello, all.
I have a Windows Forms app with a datagrid control, with several custom
column styles applied. One of the columns holds a decimal data type,
with a format string of "C" for currency, and this works precisely as
intended, eg the value 1234.56 is formatted as $1,234.56.
In another portion of the application, I need to get the *formatted*
rendering of that value from the grid. I've tried the simple
grid[row,col] syntax, but it merely returns the underlying value, but I
need the resultant value after the column style is applied. My ultimate
intent is to measure the width of the formatted string to autosize the
width of the column, and what I have now only formats the raw data, and
that won't work.
Is what I need even possible? I've gone through the DataGrid FAQ and
MSDN and not found what I'm needing, so I'm turning here for help.
Many thanks in advance,
-intrepid Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100688
MC ++ reference types and their scope
Hello,
I'm back from some old fashioned project and something has changed in
comparison to my first hours of programming in Visual C++. I'm up to build a
tool and started by means of the Express Edition 2005 of VC++ aka VCM++.
I decided to use the advantages of Managed Code but I'm wondering about the
designer generated code.
It's a Windows Form App. I use Managed Strings and other built in types.
My question is if I instantiate an object of type Int32 or Double or String
have I order to delete such objects explicitly or is GC doing it.
As I can see the code designer doesn't add code to order to destroy such
objects explicitly but for one it is doing it.
System::ComponentModel::Container ^components;
and in the destructor
if (components) {
delete components;
}
As I read all members will be implicitly destroyed when they come out of
scope.
Does this also include the reference members?
I read some articles from the msdn mag and know how the finalize mechanism
works but I'm just unsure since as I started to program I used the old new,
delete mechanism which is obsolete now. Please let me know what can I do to
avoid misdesigns. May be it's to basic for the good old programer on this
thread but please help. Thanks in advance. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100686
Listview Disappears
I have a listview control placed on a tabpage. The tabpage is the second one
on my tabcontrol. Sometimes when I click on this second tabpage, the
listview control is not visible. I am using vb.net 2005 for development.
What would cause the control to paint sometimes and not paint at other
times? I have looked and cannot seem to find the problem.
--
Danny Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100683
Menuitem Shortcut for AltEnter
Hi,
I've added a menuitem named "Properties" and would like to assign it the
standard Alt+Enter shortcut. Alas, the Shortcut enumeration does not contain
a value for this.
Any suggestions?
Thanks,
Jamie Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100680
Specifying Parent to a Windows Form Where Parent Form is in VB 6
I have built a class library in Visual Basic .NET 2005 that exposes a class
as a COM class using the ComClass attribute. This COM class allows (among
other things) loading a Windows Form. I am using this .NET class library from
Visual Basic 6 as if it were a COM DLL using the new features of Visual
Studio 2005. The Visual Basic 6 application contains an MDI form. I can load
the Windows Form contained in the .NET class library from Visual Basic 6 by
means of the COM class exposed. This works fine as long as the Windows Form
is loaded as a non-child form. The problem is that I want the Windows Form to
be loaded as a child form of the Visual Basic 6 MDI form. How can I specify
to the .NET Windows Form that the parent form is a form in Visual Basic 6?
Thanks in advance! Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100675
MySQL solutions + feedback
Hello,
Coulf you tell me, the solution you use to use MySQL 5.x database with a
winforms application ? I'd like a feedback to use the best solution.
Thanks,
C. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100673
Show an SQL Server Integration Services Raw File in a Datagridview
Dear all
I want to give administrators of a datawarehouse a possibility to have a
look at the extracts of the source systems a SSIS Packages puts in a
datawarehouse.
I thought the best way would be to let the package generate an Raw file
with the extract and write a .NET windows application to show this SSIS RAW
File in a .NET 2.0 DataGridView.
Unfortunately I could not find out how this works.
Can you please point me to the right direction?
Thanks, Marc
Regards,
Marc Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100671
hide/show pane win app
Hi guys
I want to create a tabbed Modal Win app that is going to be like the
solution explorer inside the VS IDE but without the IDE, I mean an App
behaving like a hide/show pane in the left or right side of mi XP desktop
(allowing me to see the items on my desktop) , and the option to fix it or
not.
I have the idea to setup the size of the app but I donâ??t know how to
implement the hide/show behavior.
Any link where I can read?
thanks
--
Kenny M. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100667
VS2005 Opening a Form in Designer Sets the Modified (Dirty) Indica
I have project that has forms derived from another form in a class library.
I just converted this project to VS2005 from VS2003.
Whenever I open one of the forms the tab showing the name of the form with
an asterisk (*) so that it appears like it is modified without me making any
changes. When I click the close button it then asks me if I want to save the
changes? If I say yes and compare the before and after there is no
difference.
Has anyone seen this? I'm assuming it's probably being caused by something
in my base class (form) but I have no clue what it could be.
Any help is appreciated.
Thanks,
--
gw Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100665
Capture maximize events of any form
Is it possible to capture the maximize event of any open form? I want to
create an app that sits in the tray and performas a tast every time a window
is maximized. Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100659
Handling Different DPI Settings when Manually Setting Coordinates
If I'm manually setting the size and position of controls, how do I
determine what the coordinate should be if the user changes the windows
DPI setting?
I have a problem when I run an app, which was compiled in 96 dpi, in
120 DPI. I have the property, AutoScale, set to DPI.
If I manually set the size and position of any one control and get it
to show up where I want in 96 DPI, the control shows up in the wrong
place under 120 DPI. Since the DPI is higher, the X and Y coordinates
should be higher as well. I know how to detect the DPI setting. So how
do I know what values to use based on the DPI setting? Can I just
multiple all manual coordinate settings by 1.25 if the DPI is 120?
I'd like to take advantage of the Autoscale property, but I'd like to
just change the position of one or two controls depending on user
bevahior. Is this something built in or do I have to come up with
complex spacing algorithm?
Ed Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100657
How to pass null parameter value in CR.net
I have created a report using c# and cr.net. Report fetching data from
database. I pass parameter value to report from my win form to specify what
data to fetch. If I pass null means I need to fetch all the data from table.
I wnat to know how to pass null value for a parameter.
Can any one help, or point me to another group?
Thanks,
Shailesh Tag: Type of member 'DataReader1' is not CLS-compliant. Tag: 100651
Hi,
Why do I have this error in one project but not another?
Type of member 'DataReader1' is not CLS-compliant.
Re: Type of member 'DataReader1' is not CLS-compliant. by guffa
guffa
Wed May 10 02:57:39 CDT 2006
Probably because you specified in the AssemblyInfo that the assembly
should be CLS compliant. Unless you do, the compiler doesn't care if it
is or not.
Jared wrote:
> Hi,
>
> Why do I have this error in one project but not another?
>
> Type of member 'DataReader1' is not CLS-compliant.
>
>
Re: Type of member 'DataReader1' is not CLS-compliant. by Jared
Jared
Wed May 10 21:47:15 CDT 2006
So I cant make code CLS compliant if it is a 3rd party DLL/ object?
"Göran Andersson" <guffa@guffa.com> wrote in message
news:uL%23xtdAdGHA.4428@TK2MSFTNGP03.phx.gbl...
> Probably because you specified in the AssemblyInfo that the assembly
> should be CLS compliant. Unless you do, the compiler doesn't care if it is
> or not.
>
> Jared wrote:
>> Hi,
>>
>> Why do I have this error in one project but not another?
>>
>> Type of member 'DataReader1' is not CLS-compliant.