|
.Net Bug:
Myself and 4 other developers using .Net (C#) in the development of new
software applications have the same problem with .Net. We are all working
on different products seperately and have all seen the same bug.
Bug:
The user develops user controls (UserControl) and stores them in a common project.
User adds this project to his main application project. User adds these
controls to his forms in his project. User goes a few weeks to months designing
his GUI. One day user opens his project to find controls and/or code
missing from his forms. The damn generated code just disappears along with
the controls on the form. This first happended to me 3 months ago and just
reappeared again.
I am one of these users. I use Source Safe, other people have used StarTeam
with the same results. Retrieving previously saved versions from SourceSafe
doesn't help because the .Net IDE has a mind of it's own and removes these
controls once again.
If anyone has any idea of what can be causing this or have experienced the
same, please let me know. This is my first post here so if this has been a
common topic before please excuse me.
Thanks,
TonyJ
|
|
|
|
|
Yes, that's known and easy to reproduce. To avoid it, read this[^].
How low can you go ? (MS rant)
|
|
|
|
|
.S.Rod.,
I am using fully qualified names for my controls. For example,
private [namespace name].ControlName m_Control
After I did this my code was actually stable for about 3
months and it just reappeared again last week. It reappeared
after the library failed to build. I fixed the library bug that
I introduced and now .Net has a mind of it's own. On my
simplest form I readded my controls, closed and saved them,
then reopened them to find the controls missing again.
.Net IDE even removed some event handling code.
|
|
|
|
|
Yes, I know. Make sure to use fully qualified using xxx; statement as well.
How low can you go ? (MS rant)
|
|
|
|
|
Hi,
I am using SDI window application in which I create multiple child windows.
I create child windows in this way
Form3 obj2 = new Form3();
obj2.TopLevel = false;
obj2.Parent = this;
obj2.Show();
But the child window's title bar always stays greyed out giving an impression that it is not in focus.
I do not want to go for MDI APP.
Could any one give any ideas on this
Thanks in Advance
Kiran
|
|
|
|
|
The only way I know of is to override WndProc and handle the various commands related to WM_ACTIVATE and WM_ACTIVATEAPP. If you haven't done it before, a search here and on Google might help you find someone who has implemented it in .NET. (I know there is one, I just can't remember where.)
John
|
|
|
|
|
Hi all,
I keep getting a casting exception in the following section of code. I can't seem to convert from the object to int.
Also,
is there any way of getting the first element from queryCollection other than having to enmerate through it?
Thanks for yeer help,
J.
[code]
ManagementObjectCollection queryCollection = query.Get();
int tempint;
Object obj;
foreach(ManagementObject mo in queryCollection)
{
obj = mo.InvokeMethod("Terminate", null);
Exception here------>tempint = (int) obj;
return tempint;
}
[/code]
|
|
|
|
|
Don't know if this is the problem, but you can't cast an int from an object unless the object is an int. I've no idea what Terminate returns, so it's impossible to say whether it is an int in these terms.
You might want to try tempint = Convert.ToInt32(obj); instead of direct casting.
Paul
I think there're pieces of me you've never seen - Tori Amos, Tear in Your Hand
|
|
|
|
|
Thanks, I'll give it a go.
|
|
|
|
|
How to disabled some TabPage?
I find property Enabled , but not found.
|
|
|
|
|
What does the C# command this.BeginInvoke(new CaptureDone(this.OnCaptureDone)); ? And what's this in C++? Is it a message (like a windows message WM_???) or is it a callback funktion, that will be called?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
It is similar to a callback function; except that BeginInvoke will call the method from a different thread.
James
Sig code stolen from David Wulff
|
|
|
|
|
Invoke and BeginInvoke are related. They are directly related to threading. If "this" is a System.Windows.Control or a descendant, then they also have a correspondence with windows messages.
BeginInvoke just triggers the activity and keeps on moving.
Invoke waits until the activity is finished before continuing.
Example 1:
Thread 1 creates a Form with a list view.
Thread 2 wants to change the content of the list.
Thread 2 calls Form.BeginInvoke(...).
Thread 2 keeps on doing stuff while Thread 1 does the work.
Example 2:
Thread 1 creates a Form with a list view.
Thread 2 wants to change the content of the list.
Thread 2 calls Form.Invoke(...).
Thread 2 waits until Thread 1 finishes the work.
Thread 2 continues.
It is easy to see that for list view changes, this is posting messages and either waiting or not waiting for a response. The message thing also relates to the idea that only the Creating thread should make changes to the window.
If you were talking about generic BeginInvoke and Invoke for use with Delegates, then the message relation is thrown out and we're talking solely about callbacks.
John
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Greetings!
I found myself trying to create an add-in in Vs.net using C# but was not quite sure where to start. I have searched the site and several others including the msdn.microsoft.com site for information in regards to this.
If anyone has any information/tutorials/point in the right direction type assistance please inform!
My end goal is to create an add-in for outlook..
Thanks!
-theBeings
|
|
|
|
|
I have no experience in writing Outlook add-ins but something like this might be of interest...
http://groups.google.com/groups?q=VS.NET+Outlook+add+in&hl=
en&lr=&ie=UTF-8&oe=UTF-8&selm=%23BDiKy%23qBHA.1860%40tkmsft
ngp04&rnum=2
Good luck!
steve
|
|
|
|
|
|
Are there anything like C++ "%s" or "%f" in C#? Essentially if you have a big query and you have 10 placeholders, what is the cleanest way of filling it up...for instance, in MFC you could do ,
LPCSTR lpQuery = "EXEC MySP %s, %s,%s";
CString szQuery;
szQuery.Format("a", "b", "c");
which is clean and simple....how would you do something like this in c#?
|
|
|
|
|
You can do a similar thing in C# with the String.Format() method.
See:
http://search.microsoft.com/gomsuri.asp?n=3&c=rp_Results&
siteid=us/dev&target=http://msdn.microsoft.com/library/en-us/
cpref/html/frlrfSystemStringClassFormatTopic.asp
The long and short of it is this:
sQuery = String.Format("EXEC MySP {0}", sSPVariable);
Steve
|
|
|
|
|
This kind of code can lead to some bugs and security issues. If you want to keep with it or for uses other than SQL queries, use String.Format(), or, for better performance and solve the bugs I've mentioned, use classes like SqlCommand and SqlParameter.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
In my project ,we use a share VSS to manage our codes.Problem occured in
this case:
I referenced a dll into project,but when other people checked out this
project,the reference of the dll will unusable,he can not check out the
copy of the dll.
what shall I do???
lost my way
|
|
|
|
|
Enable Shared Checkouts[^]
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
?????????????????
lost my way
|
|
|
|
|
Hi,
this is my first posting to this message board... i hope you can help me and i can help you in further questions:
is it possible to create an indexer that is defined as followed:
public String this[Object NestedObject]
is it possible to define a Indexer that is defined as followed:
public String NestedObjects[Object NestedObject]
so that i can access as followed:
Object.NestedObjects[Object2];
is that possible in C# or not possible. As i need to access in that way to nested objects, which are defined in the object as an array:
Object [] NestedObjects = {};
thx in advance
littleguru
________
love your code and code your love
|
|
|
|
|
I have an application that creates a Mutex before calling Application.Run. With a call of Mutex.WaitOne(1, True) I check to see if it is blocking. If it is blocked that means there is another instance of the application already running so I exit, and if it is not blocked then I continue executing the application.
The debug build works as expected: the first call to my executable loads and displays the MainForm with subsequent calls to the executable quiting after realizing it is blocked. However, the release build does not work correctly. Subsequent runs of th executable do not get block, and I end up with multiple instances of the application running simulataneously.
I have no DEBUG conditional or specified code. With some testing I was able to figure out that if I turned off compiler optimizations and turned on the generation of debugging information, the release mode would work as expected.
Anyone know what could be causing this strange bahavior? Do Mutexes behave differently under different project configuration properties?
Thanks for any help or ideas.
|
|
|
|