.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MsgBox error..?

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
493 Views, 11 Replies

MsgBox error..?


It doesn't seem to matter how I use this tool I keep getting errors.. 
like this..



Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.



Anyone know what I need to do to fix this?..    (I got that error from
this code..   MsgBox("Hi")   )

--

Work: VISTA Ultimate x32 - AMD 64 X2
Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce
6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150

11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: Anonymous

Spend some time learning the .NET framework, rather than
treating VB.NET as an incremental upgrade to legacy VB.

See the MessageBox.Show() method in the docs.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"C Witt" wrote in message news:5985624@discussion.autodesk.com...
It doesn't seem to matter how I use this tool I keep getting errors.. like this..

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Anyone know what I need to do to fix this?.. (I got that error from this code.. MsgBox("Hi") )

--
Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150
Message 3 of 12
Anonymous
in reply to: Anonymous

ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:
> Spend some time learning the .NET framework, rather than
> treating VB.NET as an incremental upgrade to legacy VB.
>
> See the MessageBox.Show() method in the docs.
>
Message 4 of 12
Anonymous
in reply to: Anonymous

>> I only used that method as that is what is used in the labs (that you
seem to think i should be following). <<

Yes, the labs are what you should follow, *after* you've learned the basics of using the .NET framework and the programming language you're using.

The labs are primarily for learning the ObjectARX API, not the .NET framework or any .NET language.

I'm not sure if its written anywhere, but the labs and most of Autodesk's learning/training materials presume that you already have a reasonable level of knowledge/experience with the .NET framework and the .NET language you're using.

Your problem (in this case) has nothing to do with the AutoCAD .NET API, you just haven't taken the time to learn about the .NET framework (something that does not exist in legacy VB). So, essentially, you're trying to run before you've learned to walk.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"C Witt" wrote in message news:5985846@discussion.autodesk.com...
ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:
> Spend some time learning the .NET framework, rather than
> treating VB.NET as an incremental upgrade to legacy VB.
>
> See the MessageBox.Show() method in the docs.
>
Message 5 of 12
Anonymous
in reply to: Anonymous

Please show more of your code.

Joe ...


"C Witt" wrote in message
news:5985846@discussion.autodesk.com...
ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:
> Spend some time learning the .NET framework, rather than
> treating VB.NET as an incremental upgrade to legacy VB.
>
> See the MessageBox.Show() method in the docs.
>
Message 6 of 12
Anonymous
in reply to: Anonymous


There really isn't "any other code"..  even when i strip it down to
just the box, it still happens..



public sub test()

    msgbox("hi")

end sub

---------------------------------------------



Imports System.Windows.Forms

public sub test()

    messagebox.show("hi")

end sub



Both result in security errors..     Now I don't remember having this
problem at the start of the year.. so I'm thinking it could be a recent
windows security patch for vista?  (I'm using .Net Express 2005)



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Joe Sutphin wrote:

Please show more of your code.

Joe ...


"C Witt" <cwitt_AT_trkeng.com> wrote in message
news:5985846@discussion.autodesk.com...
ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:


Spend some time learning the .NET framework, rather than
treating VB.NET as an incremental upgrade to legacy VB.

See the MessageBox.Show() method in the docs.




Message 7 of 12
Anonymous
in reply to: Anonymous


Just switched to 2008 express..  same errors..



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





C Witt wrote:

There really isn't "any other
code"..  even when i strip it down to
just the box, it still happens..



public sub test()

    msgbox("hi")

end sub

---------------------------------------------



Imports System.Windows.Forms

public sub test()

    messagebox.show("hi")

end sub



Both result in security errors..     Now I don't remember having this
problem at the start of the year.. so I'm thinking it could be a recent
windows security patch for vista?  (I'm using .Net Express 2005)



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64
Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Joe Sutphin wrote:

Please show more of your code.

Joe ...


"C Witt" <cwitt_AT_trkeng.com> wrote in message

href="news:5985846@discussion.autodesk.com">news:5985846@discussion.autodesk.com
...
ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:


Spend some time learning the .NET framework, rather than
treating VB.NET as an incremental upgrade to legacy VB.

See the MessageBox.Show() method in the docs.






Message 8 of 12
Anonymous
in reply to: Anonymous

Copy and paste into a reply, the the entire contents of the detail shown in the error dialog.

Also, is this a standard Windows .exe or dll loaded into AutoCAD?

Lastly, how did you create the project?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"C Witt" wrote in message news:5986559@discussion.autodesk.com...
Just switched to 2008 express.. same errors..


Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150


C Witt wrote:
There really isn't "any other code".. even when i strip it down to just the box, it still happens..

public sub test()
msgbox("hi")
end sub
---------------------------------------------

Imports System.Windows.Forms
public sub test()
messagebox.show("hi")
end sub

Both result in security errors.. Now I don't remember having this problem at the start of the year.. so I'm thinking it could be a recent windows security patch for vista? (I'm using .Net Express 2005)


Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150


Joe Sutphin wrote:
Please show more of your code.

Joe ...


"C Witt" wrote in message
news:5985846@discussion.autodesk.com...
ok,

I only used that method as that is what is used in the labs (that you
seem to think i should be following).


Tony Tanzillo wrote:
Spend some time learning the .NET framework, rather than
treating VB.NET as an incremental upgrade to legacy VB.

See the MessageBox.Show() method in the docs.
Message 9 of 12
Anonymous
in reply to: Anonymous


The 2 commands..



<CommandMethod("Box1")> _

Public Sub testbox1()

    MsgBox("hi")

End Sub



<CommandMethod("Box2")> _

Public Sub testbox2()

    MessageBox.Show("hi")

End Sub



Attached are the txt files with the errors





It is a dll loaded into AutoCAD (2009)



The original project was created in 2005 Express from the "AutoCAD
VB.NET Application" template (installed with a program from
www.vbcad.com).



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Tony Tanzillo wrote:

Copy and paste into a reply, the the entire contents of the detail shown in the error dialog.

Also, is this a standard Windows .exe or dll loaded into AutoCAD?

Lastly, how did you create the project?



Message 10 of 12
Anonymous
in reply to: Anonymous

Is your project and DLL on the local system, or on a network drive (mapped to a local drive letter) ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"C Witt" wrote in message news:5986674@discussion.autodesk.com...
The 2 commands..

_
Public Sub testbox1()
   MsgBox("hi")
End Sub

_
Public Sub testbox2()
   MessageBox.Show("hi")
End Sub

Attached are the txt files with the errors


It is a dll loaded into AutoCAD (2009)

The original project was created in 2005 Express from the "AutoCAD VB.NET Applicatio n" template (installed with a program from www.vbcad.com).


Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB< /font>
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150


Tony Tanzillo wrote:
Copy and paste into a reply, the the entire contents of the detail shown in the error dialog.

Also, is this a standard Windows .exe or dll l
oaded into AutoCAD?

Lastly, how did you create the project?
Message 11 of 12
Anonymous
in reply to: Anonymous


Well this is annoying..   I had a thought..  I moved all the files onto
a networked drive at the start of the year..     I just moved them to
my local drive, ran the programs and it works great.



Good to know, but sucks for potability (I work on this at work &
home).



Back to the grind.   Thanks Tony/Joe.



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





C Witt wrote:

The 2 commands..



<CommandMethod("Box1")> _

Public Sub testbox1()

    MsgBox("hi")

End Sub



<CommandMethod("Box2")> _

Public Sub testbox2()

    MessageBox.Show("hi")

End Sub



Attached are the txt files with the errors





It is a dll loaded into AutoCAD (2009)



The original project was created in 2005 Express from the "AutoCAD
VB.NET Applicatio
n" template (installed with a program from

href="http://www.vbcad.com">www.vbcad.com
).



Work: VISTA
Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram,
color="#666666">GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64
Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB
<
/font>

Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Tony Tanzillo wrote:


color="#000000">

Copy and paste into a reply, the the entire contents of the detail shown in the error dialog.

Also, is this a standard Windows .exe or dll l
oaded into AutoCAD?

Lastly, how did you create the project?





Message 12 of 12
Anonymous
in reply to: Anonymous

The security model .NET uses requires that assemblies located on the intranet (as opposed to the local system), must be explicitly 'trusted', which can be done using the .NET configuration tools.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

"C Witt" wrote in message news:5986706@discussion.autodesk.com...
Well this is annoying..  I had a thought.. I moved all the files onto a networked drive at the start of the year..    I just moved them to my local drive, ran the programs and it works great.

Good to know, but sucks for potability (I work on this at work & home).

Back to the grind.  Thanks Tony/Joe.


Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150


C Witt wrote:
The 2 commands..

_
Public Sub testbox1()
   MsgBox("hi")
End Sub

_
Public Sub testbox2()
   MessageBox.Show("hi")
End Sub

Attached are the txt files with the errors


It is a dll loaded into AutoCAD (2009)

The original project was created in 2005 Express from the "AutoCAD VB.NET Applicatio n" template (installed with a program from www.vbcad.com).


Work: VISTA Ultimate x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB< /font>
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram, Nvidia GeForce 6150


Tony Tanzillo wrote:
Copy and paste into a reply, the the entire contents of the detail shown in the error dialog.

Also, is this a standard Windows .exe or dll l
oaded into AutoCAD?

Lastly, how did you create the project?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost