|
AFAIK ngen.exe tries to reduce the run-time execution time by adding a step to the
building process.
|
|
|
|
|
Thought he might be referring to run time compilation of MSIL - hence ngen.
|
|
|
|
|
Hi,
What is the default class access modifier?? I am using the4 correct terms??
If I have:
class MyClass
{
}
..is it private, public, or what?? Is it the same for variables?
Regards
ma se
|
|
|
|
|
the Default Class Access Modifier is Public.
Regards,
Satips.
|
|
|
|
|
If ur are not specify any modifier than it is Public
Regards
vijay sagar
|
|
|
|
|
So Public is the Default.
Regards,
Satips.
|
|
|
|
|
Nope.
"Types declared in compilation units or namespaces can have public or internal declared accessibility and default to internal declared accessibility."
http://msdn2.microsoft.com/en-us/library/aa691127(VS.71).aspx[^]
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Classes are 'internal' by default.
For methods, property accessors and fields the default is 'private'.
|
|
|
|
|
What's it matter? There should be no default. Always specify.
|
|
|
|
|
Hi,
I am using VB.NET 1.1 and I need to do URL rewriting. I don't understand what it is and how to go about it. If any one can help me please let me know soonest.
Regards
ma se
|
|
|
|
|
Hope the Article by Richard Birkby URL Rewritng[^] here in Cp will Help you.
Regards,
Satips.
|
|
|
|
|
|
I recently installed VS2005 Standard Ed. with the MSDN Library that came with it. I have configured, through Tools->Options->Help->Online for "Try local only, not online" and have only the "Local Help" checkbox selected. When I request help it shows the ms-help path but the tab says "loading" and never displays any text?
Anybody got a clue as to what I'm doing wrong?
I've tried repairing VS2005 and MSDN Help but to no avail.
Thanks
Mike
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
After installing, it will take some time to load, and first if you want to open the Help windows in the VS2005 and then try ot search it by the topic.
If you get the Same problem pls reboot the system and try again since the installation may not be completed successfully.
Regards,
Satips.
|
|
|
|
|
Satips,
Thank you for your help I'll give it a try.
Mike
Light travels faster than sound. That's why some people appear right until you hear them speak.
|
|
|
|
|
Glad to Help Always !
Regards,
Satips.
|
|
|
|
|
How to Creat validation on TextBox. We want input only numeric or Alphabatical or string or phone no.
thanks
|
|
|
|
|
use a masked text box, or use regex or some other method in the leave event. Or, handle the keypress event and prevent invalid input in the first place.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
My MaskedTextBox seems to have a bug in combination with the following function which gets called within the KeyDown event for all my TextBoxes:
<br />
private void dataEntryBehaviour(object sender, KeyEventArgs e)<br />
{<br />
if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Down)<br />
{<br />
<br />
e.SuppressKeyPress = true;
this.SelectNextControl((Control)sender, true, true, true, true);<br />
}<br />
else if (e.KeyCode == Keys.Up)<br />
{<br />
e.SuppressKeyPress = true;
this.SelectNextControl((Control)sender, false, true, true, true);<br />
}<br />
}<br />
The error is the following: After the user finishes entering the data, they can click a button to add the data into the database. The form then calls ResetText() on all the TextBoxes and the data entry begins anew. And here is where weird things happen: The first character typed into the MaskedTextBox disappears immediately after the second character input is typed (leaving a space behind). Also weird: If I don't set MaskedTextBox.SelectionStart = 1, the first character typed appears before what the Mask should allow ("(000) 000-0000").
Note that even if I set MaskedTextBox.SelectionStart = 1, which will display the first character to appear after the "(" literal, it'll still disappear after the second character is typed.
<br />
Attempting to type "3056667777" results:<br />
<br />
Without setting MaskedTextBox.SelectionStart = 1, "(056) 667-777_"<br />
<br />
With setting MaskedTextBox.SelectionStart = 1, "(_05) 666-7777"<br />
<br />
So, essentially, to get the results I want I'd have to not set MaskedTextBox.SelectionStart = 1, and type "33056667777".<br />
Now, this error only occurs on in my MaskedTextBoxes (not my vanilla TextBoxes) and only when ENTER is pressed to navigate away from that particular control. Also, if I use KeyEventArgs.Handled instead KeyEventArgs.SuppressKeyPress - the problem disappears. Unfortunately, I then get a "Windows XP Ding" every time I hit ENTER.
What am I doing wrong or is this just a bug with MS' new control?
Alex
|
|
|
|
|
Hi
I'm trying to implement a custom Color DataGridViewComboBoxColumn that shows a color list.
My problem is that Colors that I'm adding into Items collection appear several time and I cannot figure why.
Below is an archive with an example project with source code.
Example
Here is the code that creates a custom Cell:
<code>
public class DataGridViewColorComboBoxCell : DataGridViewComboBoxCell
{
private Color[] colorItems = { Color.Red, Color.Green, Color.Blue };
Color c;
protected int inMargin;
protected int boxWidth;
public DataGridViewColorComboBoxCell():base()
{
inMargin = 2;
boxWidth = 3;
for (Int32 i = 0; i < colorItems.Length; i++)
{
this.Items.Add(colorItems[i].ToArgb().ToString());
}
}
protected override object GetFormattedValue(
object value,
int rowIndex,
ref DataGridViewCellStyle cellStyle,
System.ComponentModel.TypeConverter valueTypeConverter,
System.ComponentModel.TypeConverter formattedValueTypeConverter,
DataGridViewDataErrorContexts context)
{
return (value);
}
public override Type EditType
{
get {return typeof(DataGridViewColorComboEditingControl);}
}
public override void InitializeEditingControl(
int rowIndex,
object initialFormattedValue,
DataGridViewCellStyle dataGridViewCellStyle)
{
base.InitializeEditingControl(
rowIndex,
initialFormattedValue,
dataGridViewCellStyle);
DataGridViewColorComboEditingControl ctrl =
DataGridView.EditingControl as DataGridViewColorComboEditingControl;
ctrl.ownerCell = this;
}
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)
{
base.Paint(
graphics,
clipBounds,
cellBounds,
rowIndex,
elementState,
value,
formattedValue,
errorText,
cellStyle,
advancedBorderStyle,
paintParts);
if (formattedValue != null && formattedValue.ToString() != "")
{
c = Color.FromArgb(Convert.ToInt32((string)formattedValue));
Graphics g = graphics;
g.FillRectangle(new SolidBrush(c),
cellBounds.X + this.inMargin,
cellBounds.Y + this.inMargin,
cellBounds.Width - (2 * this.inMargin + 1),
cellBounds.Height - (2 * this.inMargin + 1));
g.DrawRectangle(Pens.Black,
cellBounds.X + this.inMargin,
cellBounds.Y + this.inMargin,
cellBounds.Width - (2 * this.inMargin + 1),
cellBounds.Height - (2 * this.inMargin + 1));
}
}
}
</code>
As you can see I'm adding colors to Items collection in cell constructor only. Normally it should show only 3 colours in combobox, but I get 3 times more , as you can see in screen below:
Image
So, I think I'm missing some important point in creating custom columns. Might not fully understand the whole picture of how it works and should be done.
Could someone point me where is the problem?
Thanks,
Alexandru
|
|
|
|
|
Hi,
the behaviour is really weird and I cannot explain it. But here is another way to fill the combo with values:
public DataGridViewColorComboBoxCell():base()
{
inMargin = 2;
boxWidth = 3;
string[] colorItemStrings = new string[colorItems.Length];
for (int i = 0; i < colorItems.Length; i++)
colorItemStrings[i] = colorItems[i].ToArgb().ToString();
base.DataSource = colorItemStrings;
}
Robert
|
|
|
|
|
Thank you, Robert.
Your solution solved the problem.
Regards,
Alexandru
|
|
|
|
|
Hello community,
I'm experiencing problems while working with persisted workflows.
As long as I keep the assemblies containing my Activity-types unchanged everything works great.
But as soon as I make changes to my activities/workflows (i.e. deleting single child-activities from a sequence) and start my host application, those workflow instances using the changed activites won't reload and continue running.
The problem is of course, that because the types have changed, SqlWorkflowPersistenceService is not able to deserialize the data stored in our database.
What I want to do is keeping backups of my assemblies, so that even if there is a more current version of the assembly, the old workflow instances will use the backup version and thus be able to deserialize without any trouble and continue running.
I tried writing my own assembly management routines (by subscribing to AppDomain.ResolveAssembly) which would provide the backup versions. The problem is, that SqlWorkflowPersistenceService does not seem to save the whole AssemblyQualifiedName of the serialzed types, so the Service would always try and deserialze to the types held in the most current assembly.
Now my question:
Is there a way to change SqlWorkflowPersistenceService's default behaviour of only saving the type name to saving the AssemblyQualifiedName which would solve all my problems in an instant?
If there's no such way, how would I implement my own WorkflowPersistenceService? As far as I've seen, all the custom implementations out there resolve to using Activity.Load and Activity.Save, which seem to show the same behaviour (of only saving the type name without assembly qualification).
Any help would be greatly appreciated.
Greets,
The Lord
|
|
|
|
|
|
Got the problem solved by accident ;D
Providing the correct Assembly by use of AppDomain.AssemblyResolve works perfectly well, AS LONG AS the Assemblies are SIGNED. Otherwise the AppDomain.AssemblyResolve event won't even be called.
So there's no need to change anything on SqlWorkflowPersistenceService's behaviour.
Thanks for attention.
|
|
|
|
|