|
Hi Toby,
At first I had several security problems but I was able to resolve them by adding some custom installer actions to set the user's pc security policy as directed by these two articles on msdn.
http://msdn2.microsoft.com/en-us/library/bb332051.aspx[^]
http://msdn2.microsoft.com/en-us/library/bb332052.aspx[^]
Then when I added the following line of code.
parmFormResult = exportParameterForm.ShowDialog();
At that point in time it will not execute my new code. The exportParmaeterForm object is a winform object not an outlook form. When I comment out the line of code the addin will execute on the user's PC.
Does and addin have the capability to call a winform object?
Thanks,
Patrick
|
|
|
|
|
Hi Patrick,
I certainly show Winforms modally using .ShowDialog() from VSTO addins, but I haven't done it from Outlook - only Word, Excel and Powerpoint. Also I'm using VSTO v3 and Office 2007; I'm not sure what version you're using, but VSTO can be quite different between releases. What's happening when you run it in debug and put a breakpoint there? You really need to know what the exception being thrown is so try to trap the error so you can read it.
Cheers,
Toby
Toby
-- modified at 20:27 Wednesday 8th August, 2007
|
|
|
|
|
Toby,
I am using the defualt install that comes with Visual Studio 2005 Team Edition. Also, I am using Outlook 2003.
When I do help | about this is what is displayed:
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Enterprise
Microsoft Visual Studio Tools for Office
Microsoft Visual Studio Tools for the Microsoft Office System
------------------------------------
How else can I find the exact version of VSTO?
When I run the addin in debug mode it does work. I am going to put more try/catches in to capture the error. Thanks for your help and advice.
Patrick
|
|
|
|
|
Patrick,
From that list I would say you don't have the VSTO SE (v3) installed as it tells you it is VSTO SE. The project types change with each release, as do the capabilities. I am currently using purely VSTO v3 with Office 2007 so my experience with it will differ from your's. I do, however, remember using VSTO 2005 (the 2nd release) with Word 2003 when VS2005 was first released and don't think I had any trouble with Windows Forms then either... Outlook is different from Word in many regards though. I suggest you try the MSDN VSTO Forums, you'll usually find you receive answers there, generally from MVPs, quite quickly. Try http://forums.microsoft.com/msdn/showforum.aspx?forumid=16&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=0[^]
|
|
|
|
|
Toby,
The problem was that I was not granting full trust to my logging dll used to write a text log file. I had given the primary addin assembly full trust but my setup project did not grant full trust to the logging assembly. So the setup utility was changed to grant full trust to all assemblies that reside in it. This is an acceptable solution as long as the assembly is used with in my company. If I was working for a company that sold software, it would be best to grant the individual assemblies full trust since I would loose control of what is placed in the application folder.
A nice support person from MS Support showed me why it was not working.
Thanks for all your help and taking the time to reply to my post.
Patrick
|
|
|
|
|
Hy guys , i m new to .net i have a scenario in which i have to open a MDI form in a MDI form i have tried lot but i m unable to implement it, if any body knows please help me thanks in advance.
Aamir Dharani
|
|
|
|
|
This is not supported by Windows. It has nothing to do with the .NET Framework.
You cannot have a window be both an MDI Parent and an MDI Child at the same time.
|
|
|
|
|
how to test a method in vs2005 if this method create a configuration or launch a form
dghdfghdfghdfghdgh
|
|
|
|
|
how to create a tray icon for adialog box??? what is the function to be used for this???
|
|
|
|
|
Hi,
there is a NotifyIcon class; you can create an instance, give it some Icon,
and make it Visible; probably you want to set a ContextMenu too.
I did all of this in my TrayIconBuster article.
|
|
|
|
|
well...thanks but a m not able to implement his yet..ca u provide me with some code...here's my code or a dialog box now i want to make a tray icon for this..please provide help in coding for this...thanks
#include <windows.h>
#include "resource.h"
#include <cstdlib>
#include<atlstr.h>
#include <fstream>
#include<iostream>
//---------------------------------------------------------------------------
LPSTR lpString;
HWND hWnd;
LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
//---------------------------------------------------------------------------
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLGFIRST),hWnd, reinterpret_cast<dlgproc>(DlgProc));
return FALSE;
}
//---------------------------------------------------------------------------
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
TCHAR cPath[20];
TCHAR cUserName[20];
TCHAR cPassword[20];
switch(Msg)
{
case WM_INITDIALOG:
{
return TRUE;
}
case WM_COMMAND:
{
switch(wParam)
{
case IDOK:
{
size_t nLen;
GetDlgItemText(hWndDlg, IDC_EDIT1, cPath, 20);
nLen = strlen(cPath);
if (nLen == 0)
{
MessageBox(hWndDlg,"Please Enter SVN Path","Error",MB_ICONERROR);
break;
}
GetDlgItemText(hWndDlg, IDC_EDIT2, cUserName, 20);
nLen = strlen(cUserName);
if (nLen == 0)
{
MessageBox(hWndDlg,"Please Enter your user name","Error",MB_ICONERROR);
break;
}
GetDlgItemText(hWndDlg, IDC_EDIT3, cPassword, 20);
nLen = strlen(cPath);
if (nLen == 0)
{
MessageBox(hWndDlg,"Please Enter your Password ","Error",MB_ICONERROR);
break;
}
EndDialog(hWndDlg, 0);
std::ofstream file ("config.txt");
file << " SVN Path entered by user is -> "<<cpath <<="" std::endl;
="" file="" "="" svn="" user="" name="" entered="" by="" -="">" <<cusername <<="" std::endl;
="" file="" "="" svn="" password="" entered="" by="" user="" -="">"<
|
|
|
|
|
If you are not trying to create friction, please get it together and ask in the right forums. The code you've posted is Win32 ( I still don't understand why ), so you need to ask in the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
In my application I need to insert a clock.
So How can I insert a running clock in my Form.
Please suggest me an Example.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
The keywords are Windows.Forms.Timer and Label.
Everything else is up to you.
|
|
|
|
|
What language are you using?
And is google[^] broken?
|
|
|
|
|
good old Latin for roman numbers ...
|
|
|
|
|
i have used a text box in my dialog box in WIN32 programming....now i want that the data entered by user can be copied to a text file on pressing ok. what method can i use for this??
|
|
|
|
|
Telling us what programming language your using would be good for a start :P
c++ for a guess?
|
|
|
|
|
|
|
this guy has been asking so many times this question that i doubt he really know what he wants, or at least, what the words he uses actually mean...
i have the impression that he is coding using managed C++ (or C++/CLI), be he's always employing the name of "Win32" in his messages...
|
|
|
|
|
Turns out he is stuck with using Win32, he obviously is a little lost, he can't work out what forums to use, and it's taken several tries, and several correct answers from different people, for him to work out how to create a text file. I'm pretty sure he was wrong when he said that he already knew C++ well.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: I'm pretty sure he was wrong when he said that he already knew C++ well.
yeah, he was probably talking about VB6++.NET
|
|
|
|
|
I'm still trying to help him, but he's obviously very lost. I think he's doing a course that teaches Win32, and he feels he needs to use API calls instead of standard C++ ones. Whatever the course is, I hope he doesn't expect a job out of it. win32 ???
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|