|
|
Click on View Detail, on the View Detail popup, look at the first line of StackTrace and see where is the line at which the exception is thrown, then drill down from there.
Seems to me there's something wrong in your frmIME. You should step into the code of the initialization of that form (F11) and see where it went wrong.
|
|
|
|
|
Hi.
I did what you suggested.
Here is the copy of the error that was given. Not sure i quite understand how to fix it, since the problem is, as reported, in security??
System.TypeInitializationException was unhandled<br />
Message="The type initializer for 'Primoz_Trubar___Popotovanje.frmIme' threw an exception."<br />
Source="Popotovanje Primoža Trubarja"<br />
TypeName="Primoz_Trubar___Popotovanje.frmIme"<br />
StackTrace:<br />
at Primoz_Trubar___Popotovanje.frmIme..ctor()<br />
at Primoz_Trubar___Popotovanje.Program.Main()<br />
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)<br />
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)<br />
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)<br />
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()<br />
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)<br />
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)<br />
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()<br />
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />
at System.Threading.ExecutionContext.runTryCode(Object userData)<br />
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)<br />
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)<br />
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />
at System.Threading.ThreadHelper.ThreadStart()<br />
InnerException: System.Security.SecurityException<br />
Message="That assembly does not allow partially trusted callers."<br />
Source="Popotovanje Primoža Trubarja"<br />
StackTrace:<br />
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)<br />
at Primoz_Trubar___Popotovanje.frmIme..cctor()<br />
InnerException:
What to do next?
Oh, and is there a possibility to use the DLLs from my computer? I only use the DirectX.AudioVideoPlayback.dll (i think this is it, cus VS copies this file to the debug output as asked).
Força Barça!
|
|
|
|
|
Hey guys...
this is a bit of a brain fart... but is it possible to have more than one condition in a case statement?
eg...
switch (myString)
{
case "hehe" || "haha":
break;
}
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Why don't you give it a try? If you are lazy opening Visual Studio for such simple tests, you can use snippet compiler, it's quite a handy tool.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
i did try...
just wrote that bit of code as an example of what i mean by multiple conditions
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
case "hehe":
case "haha":
break;
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
You asked this question several hours ago. Why are posting it again? It's rude.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Dear All,
i am developing OMR application using c# and i would like to create or build my own defined kernel. what i mean is that I have a plus sign as a kernel image and now i would like to make or build my kernel based on that image using c#. please provide me references of how to build your own kernel ....
you are appreciated...
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
You asked this question several hours ago and Christian Graus has answered you. Why are posting it again? It's rude. If you need to continue conversation reply to that message.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
How to insert data to a table in the database by using c# language?
|
|
|
|
|
|
Well, the trouble with your question is two fold
1 - we have to ask ourselves if it's worth helping someone who is unwilling to invest in a book, search the web, or show any signs of having tried to learn for themselves
2 - even if we were so inclined, we'd soon find that any help we tried to give would be limited given the typical length of a forum response, and the amount of detail required to properly cover the topic.
I recommend you read the article linked to in my sig, then type C# database insert into google. Typing the name of your database ( such as SQL Server, Oracle or Access ) will give you even more specific help.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
cc is my ConnectionClass object.
cmd is SqlCommand object.
con is the object of SqlConnection
cc.cmd.Connection = cc.con;
cc.cmd.CommandText = "insert into tblName ([col1],[col2],...) values ('" + val1 + "','" + val2 + "',...)";
cc.cmd.ExecuteNonQuery();
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
I want to load treeview nodes in background. Information about them are stored in an xml file
<node some="" info="">
<more info="" />
<subnode sth="" else="">
</subnode>
</node>
etc.
This file can be quite big and computers can be quite slow. So, I want to have a repsonding UI and TreeView items should appear one after another.
Of course, I did something, but it is dangerously close to a WTF zone. That's it:
1. Start some Load method in a new thread.
in the Load method:
2. Handle Menu.OnNodeLoaded event -> menu_OnNodeLoaded.
3. Call a function which reads data from a file, sth like. Menu.FromXml(...).
in that function:
4. Iterate throught an xml file.
5. Create a MenuNode object, which contain a Path property, e.g. "node/subnode"
6. Fire OnNodeLoaded.
in Window.menu_OnNodeLoaded:
7. Iterate through menuNode.Path to find a TreeViewItem place where a new TreeViewItem should be added.
8. Create a TreeViewItem and add it to the treeView.
How to do that better?
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
I'm trying to draw a line on the form in C#.
When i place the below draw line code in Form1_Load() method it does not draw the line when application starts. But if the same code is placed in Form1_Paint() method it works.
System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.Red, 5);
System.Drawing.Graphics formGraphics = this.CreateGraphics();
formGraphics.DrawLine(myPen, 10, 10, 150, 200);
Why does the code not work in Form_Load(). Is is required that all graphics code needs to be executed in Form_Paint() method only?
|
|
|
|
|
Well, probably because in one case you did it properly, and in the other, you did not. CreateGraphics creates a graphics object that is invalidated the next paint event. So, it's for drawing temporary things. Forms are always invalidated after the form load event, so your code was never going to visibly work.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your answer. Well i have another problem. On the form i have a groupbox. I want to draw line inside the groupbox. How can i do this?
|
|
|
|
|
you'll need to handle it's paint event and draw your line.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hallo,
I am working with graphic object, in which I draw lines using g.drawline,also few lines are moving on mouse move function, I want to add tooltip on the lines, which diplay information abt line. I know tooltip only work for window controls and line is not window control, is there any way to do that?
thank you in advance
|
|
|
|
|
cooltoad123,
Only way i can think to do it is to check the MouseMove event and see if it hits the line with the mouse cords.
Regards,
Gareth.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
No, the line is not an object, you will need to write the code to show that yourself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello
when i open richedit in microsoft word format of text disappear
how can solve this problem
|
|
|
|
|
When you open an rtf in Word, the format disappears ? Are you sure ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|