|
Thanks Vikram,
ur idea of making the login dialog modal worked very well. Initially I also had the same idea, but at that time I got the error, I dont remember what was that. I think i had not set IsMdiContainer prperty true at that time.
But now ur idea worked very well...........
Thanks,
Sandeep
+919891027854
|
|
|
|
|
Hi,
I would like to diplay ToolTip for the items in the ComboBox in ASP.NET. The ToolTip should be same as that of the items in the ComboBox.
Can any one Help on this probnelm.
Advance Thanks to Everyone
Sahu
|
|
|
|
|
Hi
I have one Solution file(.sln) which consists of 3 projects files,in that many number of .cs files
so let me know i want to execute only one file in one project,,in Visual studio 2005 beta 2 version..
cheers
Sridevi
Sridevi
|
|
|
|
|
What kind of file?
You can never execute a single file in a project. If you are creating a windows application, you can only execute the application itself. If you are creating a web application, you can execute any of the pages, but a page normally is the result of several files.
---
b { font-weight: normal; }
|
|
|
|
|
ok thank u sir,I created windows application ,which i added class files(.cs) so i want to indidual class file execution?
possible or not?
or
-->how to add/write class files in C# template without using windows application or console applications?
Sridevi
|
|
|
|
|
sridevi2005 wrote: i want to execute only one file in one project
So, you want to execute just one cs file within one project? Is that right?
For what purpose? If it is just for testing then you might like to look at a testing framework like NUnit. While it won't execute the single file you can use it to invoke methods in the class in the file through a test fixture that you build.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
yaaa exactly sir for testing & i am asked indidual file(.cs) execution also this is not possible naa?
already i wrote class with TextFixtures & test cases,,so i used NUnit but how to execute single class file in testing
sorry for the distbance
Thanks & Regards
Sridevi
Sridevi
|
|
|
|
|
NUnit comes with a number of samples to show you how it works, an a quick start tutorial[^]
You create a TestFixture class in a test assembly. This class will have a number of Tests. The test methods create the class you want to test, called the class-under-test (CUT) and invoke methods on it. You can then set up various assertions to see if the test ran as expected. If you are unsing NUnits GUI runner then you get a nice green bar if everything went okay. Or a red bar if it failed.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thank you very much,actually my test class is in windows application,i think ,i have problem,now i have changed to class library which added to class so that is the dll naa
ok i will proceed further thanks for good suggestions gave to me with intime..
Thanks & regards
Sridevi
Sridevi
|
|
|
|
|
Hi all,
Someone say that, C# is stronger than VB.Net.
What do you think?
Can you help me to list the strength of C# that VB.Net hasn't.
Nice day.
Thanks.
inew
|
|
|
|
|
How do I retrieve a list of all the objects created in the currently running application?
I want to perform some resource validation routines as our application is running.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
use this.Controls[]
i hope it can help you.
|
|
|
|
|
I doubt it. I think he wants a reference to *each and every* object that his program creates. AFAIK, there's no way to do this.
Cheers,
Vikram.
|
|
|
|
|
hey you guys know any nice approach in providing helps with my windows application? I saw the microsoft word help. and it's really nice. but I'm not sure how you have those links if it's in a richtextbox control.
any suggestions much appreciated!
thanks!
|
|
|
|
|
FieldInfo[] fi44 = obj.GetType().GetFields();
for(int j = 0; j < fi1.Length; j++)
{
object obj3 = fi44[j].GetValue(obj);
}
I am using this code to retrieve objects using reflection. For certain values of j the object is of type System.Array. I want to retrieve the individual elements in the array. If i use the quick watch tool i see that the obj3 has elements defined as obj3[0] in the quick watch window.
How do i go about converting the object obj3 into an array if it is of type system.array.
Any help or references will be greatly appreciated.
thanks
subbu
|
|
|
|
|
I'm getting an exception that looks like below when my debug C# app calls
into my debug C++ dll (which uses the MS CRT, debug dll).
Apparently if I go to the Menu>Debug>Exceptions>Managed Debugging Assistants
and unchecked Loader Lock checkbox, the exception goes away but I get a
message saying that I'm trying to use a dll that's loading the CRT without a
manifest file.
This must all be part of this new manifest side-by-side stuff that is
introduced in VS2K5. However I am not getting this problem when I run the
release build of my solution and I cannot for the life of me figure out what
Microsoft wants you to do here. All I want to do is call into my dll, why has
this become so hard to do in the new version of VS.NET ??
Loader Lock was detected:<br />
Attempting managed execution inside OS Loader lock. Do not attempt to run <br />
managed code inside a DllMain or image initialization function since doing so <br />
can cause the application to hang.<br />
-- modified at 18:14 Monday 5th December, 2005
|
|
|
|
|
|
Well that changed the way the error was thrown, but it looks to be throwing the same error.
Here's what it is saying:
Managed Debugging Assistant 'LoaderLock' has detected a problem in 'D:\Dev\throwaway\pinvoke\pinvoke\bin\Debug\pinvoke.exe'.<br />
Additional Information: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.[/code]<br />
<br />
Here is what my DllMain looks like, but again why isn't this happening with my release version?<br />
<br />
<code><br />
BOOL APIENTRY DllMain( HMODULE hModule,<br />
DWORD ul_reason_for_call,<br />
LPVOID lpReserved<br />
)<br />
{<br />
switch (ul_reason_for_call)<br />
{<br />
case DLL_PROCESS_ATTACH:<br />
case DLL_THREAD_ATTACH:<br />
case DLL_THREAD_DETACH:<br />
case DLL_PROCESS_DETACH:<br />
break;<br />
}<br />
return TRUE;<br />
}
|
|
|
|
|
I need to call three C++ methods from C# which are defined as follows:
initHdr(HDR **hdr)
readHdr(HDR *hdr)
freeHdr(HDR **hdr)
The HDR struct is defined as follows:
typedef struct HDR {
long hdr_size;
unsigned char *hdr_data;
}
initHdr - mallocs hdr and hdr_data.
readHdr - fills hdr_data.
freeHdr - frees hdr_data and hdr.
I am trying to write a test program in C# that calls these three methods and use the data.
Any suggestions on the best approach to take, and how to declare the struct in C#. I'm struggling with how to declare an unsigned char pointer in C#. I thought that "unsafe" allowed you to declare C++ types, but I wasn't able to do it.
Thanks, Cindy
|
|
|
|
|
www.pinvoke.net[^] is the BEST source of info on this stuff around.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Cindy,
First, have a peek at PInvoke.net[^]. It's a great website that can help you out with lots of examples of calling native code from managed code, which is what you're trying to do.
Secondly, the unsafe keyword just lets you use pointers. It doesn't allow you to write C++ types in C# code.
So go look at PInvoke.net, as you'll find examples of how to marshal things like unsigned character pointers properly. If I were to guess (and this is only a guess), try something like
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
struct HDR
{
int hdr_size;
string hdr_data;
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hi
I've got a problem with CodeDom Serialization. Could anybody HELP me?
Please spend some time to read the description 'cause I spent 5 days to find clasic solution and I don't have it yet.
I've got custom control:
[DesignerAttribute(typeof(MThemeControlDesigner)), DesignerSerializer(typeof(MThemeControlCodeDomSerializer), typeof(CodeDomSerializer))]
public class MThemeControl : System.Windows.Forms.UserControl
it has property:
[Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ControlColors Colors{get{return _theme.Colors;}}
there is ControlColors class declaration:
[TypeConverter(typeof(ControlColorsTypeConverter))]
public class ControlColors
{
..........
public ColorSet AddColorSet(string Name, ColorSet BaseColorSet) {....}
......
}
I would like to have next code into Form Designer generated code:
this.mThemeControl1.Colors.AddColorSet("ColorSet1", this.mThemeControl1.Colors.ColorSets["Default"]);
It isn't so difficult, BUT:
When I try to switch to Design mode, I've got an exception:
C:\Work\C#\WindowsApplication1\WindowsApplication1\Form1.cs(65): The designer cannot process the code at line 65: this.mThemeControl1.Colors.AddColorSet("ColorSet1", this.mThemeControl1.Colors.ColorSets["Default"]); The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.
When I try to trace Deserialize method of MThemeControlCodeDomSerializer - i cannt do i 'cause exception throws early. When I try to trace any method of MThemeControlDesigner - the same.
HELP me please! What shall I do?
I didn't apply Serializator code 'cause it's very simple code, just append some CodeStatement expressions (...MethodRefenece and like this...)
|
|
|
|
|
My problem is resolved.
Actually, designer can't understand indexer in my code.
.... this.mThemeControl1.Colors.ColorSets["Default"] ....
I donno why it happen.
Just find to alternative way...
|
|
|
|
|
Hello everyone, I was wondering if there was a way to know when the X button was pressed at the upper right hand part of the screen
Thanks,
The Major Rager
|
|
|
|
|
The Closing and Closed events of the form both are activated by this click. Closing happens first and will allow you to abort the shutdown.
|
|
|
|