|
com.vmi.CardioIMS.Document.WordClass.SignDocument is just a class that uses the Micrsoft Word 10.0 object library to open up word and add a paragraph.
I am just frustrated since this code was working before. You do not need to use the Interop Assemblies. Plus the code I am partially using is from a Microsoft web site.
Nicholas Ingratta
ningratt@hotmail.com
|
|
|
|
|
Yes, you do need to use Interop assemblies. That is what you're doing. .NET is not a COM client and requies a wrapper. you can write your own RCWs, but they're required nonetheless. The PIAs I'm talking about are from Microsoft and tested. The interop assemblies you created when you referenced the Word 10 library in Add References (VS creates them automatically; just expand your References under your project) are probably the same but, unless you set up your signing key in the project under VS, are not signed (meaning that stricter code access policies may block the interop assemblies from being loaded).
Again, it's only a recommendation to use PIAs. Either way you're using interop assemblies.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Yeah, I'm stuck with a similar issue The only way to interact with desktop is either using localsystem, or user, but user doesnt allow interactive startup either it appears.
Found this on MSDN:
ServiceType Enum
The creation of interactive services is not supported. To workaround this, you can create a non-interactive service and a separate control GUI application that communicates with the service using sockets or remoting. For code samples on remoting, see Remoting Examples.
So it seems you will still need some form of extra application...
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
Impersonating an interactive user account (or anything but SYSTEM) disables "Allow service to interact with desktop") because it's already assumed that the user is an interactive user (to be an interactive user, they must have the SE_INTERACTIVE_LOGON_NAME right).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
i'm a .NET newbie and hope someone can help me. I try to build something like an applet (Java) with C# and .NET. I've been told this can be done by a windows forms control assembly embedded in a html page via the well known <object> tag. Indeed, everything works fine except the control's database access to a local database. Here i get the exception "SQLClientPermission denied". I'm sure the problem lies in the CLR access policies for the code of the embedded control (coming from the intranet zone). Can anyone tell me how to grant this SQLClientPermission to the code of my control?
Thanks for your help,
Fridtjof
|
|
|
|
|
Control Panel->Administrative Tools->Microsoft .NET Framework 1.1 Wizards->Trust an Assembly
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
I would suggest you check into Code Access Security[^] (part of the .NET Framework Developer's Guide). Using the .NET Framework 1.1 snap-in for the Microsoft Management Console, you can evaluate what permissions apply to a particular assembly under the "Runtime Security Policy" and then selecting "Evaluate Assembly". Within the security policy section you are able to make many other changes as well as adjusting the security zone and increasing the level of trust for a particular assembly. This should get you started.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hello.
I have a web C# project with a form with 3 buttons and 3
placeholders, each placeholder contains a Web User Control,
when I click over button 1 it shows the data of WUC1, when
I click over button 2 it shows the data of WUC2 and when I
click over button 3 it shows the data of WUC3. My solution
was to make initially invisible the 3 placeholders and when
a button is clicked then I made visible the corresponding
placeholder, as the following code from button 1 shows:
this.PlaceHolder1.Visible = true;
this.PlaceHolder2.Visible = false;
this.PlaceHolder3.Visible = false;
This works well, but I think it's not too eficient to have
loaded the 3 WUCs, so I'm trying to make a dynamic load of
each WUC depending the button clicked, example of button 1:
private void btn1_Click(object sender,
System.EventArgs e){
this.PlaceHolder1.Controls.Clear();
this.PlaceHolder2.Controls.Clear();
this.PlaceHolder3.Controls.Clear();
this.PlaceHolder1.Controls.Add(LoadControl("WUC1.ascx"));
//Only load the WUC1
}
This code load well the WUCs, show the data, but it can't
execute the events of the WUCs, because in each WUC I have
buttons that perform some operations and this events don't
execute, i put a breakpoint and show that the page_load of
the page that contains the WUCs, I think it's a problem of
dynamic load of controls, any idea would be appreciated.
Thanks a lot.
|
|
|
|
|
|
Hi all,
After I loaded a dll component(c#)and use it in the program,
how can I destroy it(remove it from memory) in C# ?
Thanks
|
|
|
|
|
You will need to load the assembly into another AppDomain[^] and then use the static method AppDomain.Unload to remove it when you are done.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I have this code in a C# class library
[Conditional("DBC_CHECK_ALL")]<br />
public static void Assert(bool assertion)<br />
{<br />
ExceptionAssert(assertion);<br />
TraceAssert(assertion);<br />
}<br />
<br />
[Conditional("DBC_USE_EXCEPTIONS")]<br />
static void ExceptionAssert(bool assertion)<br />
{<br />
if (!assertion) throw new AssertionException("Assertion failed.");<br />
}<br />
<br />
[Conditional("DBC_USE_ASSERTIONS")]<br />
static void TraceAssert(bool assertion)<br />
{<br />
Trace.Assert(assertion, "Assertion failed.");<br />
}
which is attempting to implement Anding of attributes as per this topic
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfconditional.asp[^]
However, when I define either or both of DBC_USE_EXCEPTIONS or DBC_USE_ASSERTIONS in a Console app. that uses the library neither ExceptionAssert nor TraceAssert gets called.
Note: when all this is done within a single console app. it works OK.
Kevin
|
|
|
|
|
In .NET Compact Framework, System.Threading.Monitor.Wait(Object obj) and
System.Threading.Monitor.Pulse(Object obj) are not available. Does anyone know to use these functions or replace by other functions in .NET Compact Framework? Really Thanks a lot!!!!!
|
|
|
|
|
Hi everybody,
now for something completely different
I just read an article on pathfinding here on CP(http://www.codeproject.com/csharp/CSharpPathfind.asp) but it did not really get me started as I am too dumb to convert this to 3D
MY PROBLEM:
I have to write a program which checks if there is a path through a threedimensional cube, which consists of smaller cubes (scubes)
The cube dimensions are fixed (20x20x20 scubes) and each scube may be filled or void.
The is one variable, p, which determines the probability of a scube being filled (p) or being a void (1-p). This does not change as we iterate through the scubes on startup.
I have this cube ready to go and should now determine if there is a path from the top side to the bottom side.
Movement Rule: No Diagonal Moves, only along the three axis.
I smell recursion here, but I can't figure out how to do this
If I had some Lego(tm) here, I might have BUILT a cube and found a solution, but right now all I have is one sheet of paper and a pencil.
Can anyone get me back on track?
Cheers
Sid
|
|
|
|
|
find string Expire and change the first two lines after Expire to Code project
example
Expire
12345
23423 cool
To
Expire
Code project
Code project
thx
|
|
|
|
|
So, what's the qustion? And, no, we're not going to write the code for you. If you're having a problem with the logic or some code issue, we can help with that. But don't expect anyone to write the whole thing for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I recommend looking up, 'String'
IM PROUD TO BE A GMAIL;
|
|
|
|
|
I recommend telling the person who originally posted the question, not me...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi! I’m working on a simple Windows.Forms database project. It would be nice for me to work with DataGrid (set properties & behavior of its elements) mostly via designer. Before setting DataSource & DataMember of the DataGrid I need to fill relative dataset with data. For that purpose I call myDataAdapter.Fill method.
The question is: Where can I paste myDataAdapter.Fill method to get filled DataGrid in the designer?
I’ve tried to put fill method in InitializeComponent, but designer recreates this section every time I change any property with it. Putting fill method somewhere in myForm constructor takes no effect on the designer. So maybe there is an attribute saying [no recreate] to mark constant section of designer region?
Thanks!
Dizzy
|
|
|
|
|
I might be wrong but I'm practically sure u can't make a DataGrid's databinding "active" in design time.
|
|
|
|
|
As long as the dataset exists and the datagrid's datasource property is set, filling the dataset in the c.tor has always worked for me... maybe paste some code (including your initializecomponent method) and it would be easier to see your problemo.
|
|
|
|
|
So, there is no special attribute for designer region. That’s ok. Maybe I've pasted fill method to the wrong constructor.
Let’s simplify my question, so there is no need to paste a lot of code.
Now I have a form & a button. There is my form constructor.
public Form1()<br />
{<br />
InitializeComponent();<br />
this.button1.BackColor = Color.Red;
}<br />
Initialize component is fully generated by designer and not takes a point of interest for us.
Please help me. In which class constructor I've to paste "this.button1.BackColor = Color.Red" to have colored button in the designer?
Dizzy
|
|
|
|
|
As far as I know, you cant create any method that the designer will run when creating a new instance of the control/component. It only does that with InitializeComponent() and it must be hardcoded because the method doesnt have any Atribute to tell the designer to run it in design time.
The only way u might be able to achieve what I think you want is creating some Browsable Get/Set property and putting the DataSet binding code in the setter. Then create a new form inheriting from the one u just created and go back to the designer and change the derived form's property. That should run whatever code you want.
Haven't tested it, but it should work. I dont know what the use in doing this is unless u want to get a better idea in design time how ur DataGridStyle is looking when displaying data but ...if thats the case, once it looks good just copy all generated code to ur original form and ur set.
|
|
|
|
|
How can I allow the Form to only do paint and move, resize, maximize and minimize events? I have the code for paint below.
private const int WM_NCPAINT = 0x0085;
private const int WM_PAINT = 0x000F;
private const int WM_ERASEBKGND = 0x0014;
private const int WM_PRINTCLIENT = 0x0318;
[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true)]
protected override void WndProc(ref Message m)
{
if (this.Buzy)
{
if (!((m.Msg == WM_PAINT) || (m.Msg == WM_NCPAINT) || (m.Msg == WM_ERASEBKGND) || (m.Msg == WM_PRINTCLIENT)))
{
return;
}
base.WndProc(ref m);
}
|
|
|
|