|
it doesnt work like this.. =|
is there any other way?
|
|
|
|
|
Hi
I'm trying to add a button to my office Word 2003.
I managed to do it in outlook 2003 but for some reason it doesn't work.
I think the problem is in the OnStartupComplete method.
Here's the method
public void OnStartupComplete(ref System.Array custom)<br />
{<br />
CommandBars commandBars;<br />
commandBars = applicationObject.ActiveWindow.Document.CommandBars;<br />
<br />
try<br />
{<br />
btnGetEMailStats = (CommandBarButton)<br />
commandBars["Standard"].Controls["Send To Group"];<br />
}<br />
catch<br />
{<br />
btnGetEMailStats = (CommandBarButton)<br />
commandBars["Standard"].Controls.Add(1,<br />
System.Reflection.Missing.Value,<br />
System.Reflection.Missing.Value,<br />
System.Reflection.Missing.Value,<br />
System.Reflection.Missing.Value);<br />
btnGetEMailStats.Caption = "Send To Group";<br />
btnGetEMailStats.Style = MsoButtonStyle.msoButtonCaption;<br />
}<br />
btnGetEMailStats.Tag = "Send To Group";<br />
btnGetEMailStats.OnAction = "!<AddinExample.Connect>";<br />
btnGetEMailStats.Visible = true;<br />
btnGetEMailStats.Click += new<br />
_CommandBarButtonEvents_ClickEventHandler(<br />
btnGetEMailStats_Click);<br />
}
|
|
|
|
|
By the way, I created another Addin project according to the article here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;302901
and chekced the Excel, Outlook, word and PowerPoint applications.
The thing is, only in the word application the button wasn't created.
Any idea?
|
|
|
|
|
Hello..
How I can create COM+ application in Component Services->Computers->My omputer->COM+ Application->[My COM+ App] from my own program?
How I can run commands 'Shutdown', 'Start' and 'Disable' for my COM + Application?
Is it possible?
Please, help me if somebody know..
|
|
|
|
|
I have multi dimensional array, which has to be produced in report (.rdlc)
microsoft's reports
i hope i should use object data source, but i am unable to make it up... (ARRAY) i know how to do it with variables...
kindly help me out
|
|
|
|
|
hello,
i have made a window service for my some xyz purpose and its working fine.but the problem is that
InternetExplorerClass IE = new InternetExplorerClass();<br />
IE.Visible = true;<br />
IE.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(IE_DocumentComplete);<br />
isDocumentComplete = false;<br />
object empty = "";<br />
IE.Navigate("www.google.com", ref empty, ref empty, ref empty, ref empty);
when i'm using this Code with Window Service this code is not working even IE.navigate function is not navigating the site or not openning the IE browser..while when i use use this code with simple asp.net with c# project
its working fine.
suggestion are most welcome.
thanks and regards
Amit Agarwal
Dotnet
|
|
|
|
|
I use WinForms Microsoft ReportViewer in local mode.
I want to use C# syntax in report expressions.
How to use C# instead of VB.NET syntax ?
I'm thinking about the following approaches:
1. Create pre-processor which converts expressions in RDL file from C# to
VB. NET
2. Replace all expressions with a method which takes C# expression as string
parameter, evaluates it returns result.
Any idea how to implement this ?
Where to find any samples of C# expression evaluator or C# to VB .NET expression converter ?
Andrus.
Andrus
|
|
|
|
|
Hello,
The business class of my application caters to both, a web service and the windows UI application. One of the business class, loads an assembly dynamically and invokes a particular method on the type in that assembly. This works fine when the call is originated from Windows UI app. but when I call the same method of BC from webService I get an exception of "Method not found" when the method is invoked after loading the assembly dynamically.
Not understanding the reasonong, I tried various things. One of them was using remoting. I created a marshallar class (a class inheriting from MarshalByRef Class) and wrote an Invoke method in that. In the constructor of Marshallar I created the handler by creating instance of type from assembly which I wanted to load dynamically. In the invoke method I wrote type.InvokeMember. By loading this marshallar assembly into a new AppDomain, my webService call completed without any exception !!!
but now I have another problem, this particular assembly is used for processing of heavy amount of data and when the method is invoked as a remote method call, it takes too much of time and the performance is getting hampered greatly.
Can anybody tell me why a remote call succeeds and a local call fails in case of web service ?
Thanks in advance.
|
|
|
|
|
Hi,
I register a custom url handler (abc://) in registery in HKEY_CLASSES_ROOT,
it can now work in IE if I type "abc://example" in IE URL,
it activate my stuff, but if I paste the url into MSWord,
it won't highlight as other url link. What else should I
perform in order to get my custom link highlighted in MSWord ?
Thanks
|
|
|
|
|
Hi all
I'm doing a C# function retrieving a line of text from a Win32 edit box.
Platform SDK says the folowing: before sending the message, set the first
word of this buffer to the size in TCHARs, of the buffer. For ANSI text, this is the
number of bytes; for Unicode text, this is the number of characters.
How to do that with StringBuilder? I tried to set
StringBuilder ItemText = new StringBuilder(256);
//ItemText[0] = 250; //I'm not usre of that!!!!
IntPtr lenOfString =
Win32Api.SendMessage(
_hWnd,
EM_GETLINE,
IntPtr.Zero,
ItemText
);
but it doesn't work even if for example I set ItemTex[0] = 'a'
with a caracter.
How to handle dimension I want into first character of the stringBuilder
so that WinApi read it correctly?
Regards
ManuStone
-- modified at 4:48 Tuesday 27th March, 2007
|
|
|
|
|
C# is Unicode. I believe you'll find it's the length of the string * 2.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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,
I need to export data from a list view in a Windows Form, to an excel sheet or to a notepad..
Can anyone tell me how to do it??
Thanks for your time and help.
-Seema
|
|
|
|
|
Hi,
I have a requirement as follows.
The Page1.aspx page is having the following input controls.
User Name, account number and date of birth.
The user enetered the information in Page1.apsx page and navigated to Page2.aspx. Now the user is coming back to Page1.aspx. How can I prepopulate previously entered data in Page1.aspx. (Where Can I save the data when the first time entered to prepopulate while coming back?)
Please Note: I should not use Sessions.
Thanks in Advance,
Reddy
rr
|
|
|
|
|
Hi
Use Profiles to manage user settings. This is a new feature in ASP.Net 2.0.
Harini
|
|
|
|
|
Is it possible to do in 1.1?
rr
|
|
|
|
|
The easiest way to do this, is to make page1 and page2 controls that exist on the one page. You can then change which page is visible at any time, and both pages will still have viewstate, so when you go back, page1 will not have lost it's values.
The other way to do it, is to pass an Id on the Url and use that to get your values from your database, if they are something that has been saved there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
there is a dll. code below
--------------------------
namespace CommonFunctionLibrary
{
public class ClsMain
{
public string setValue(string a,ref string b)
{
b = a;
return a;
}
}
}
-------------------------------------------------------
and there is a Host
--------------------------------------------------------------------
string filepath = @"E:\VS2005_work\CommonFunctionLibrary\CommonFunctionLibrary\bin\Debug\CommonFunctionLibrary.dll";
string s = string.Empty;
string p = string.Empty;
Assembly myDllAssembly = Assembly.LoadFrom(filepath);
Type dllType = myDllAssembly.GetType("CommonFunctionLibrary.ClsMain");
MethodInfo dllMethod = dllType.GetMethod("setValue");
if (dllMethod != null)
{
Object dllObj = Activator.CreateInstance(dllType);
s=(string)dllMethod.Invoke(dllObj, new object[] {"goldli",p });
MessageBox.Show(s+"\r\n"+p);
}
myDllAssembly = null;
------------------------------------------------------------------------------
question:
1、the Invoke method no need to use "ref" ,why?
2、the "p" parameter has no return value,why?
|
|
|
|
|
Hi..
I'm not sure but:
1. the ref is only valid in method calls and causes a parameter to be passed as pointer so it can be modified.
2. p does not contain the new value because this doesn't work either:
<br />
string s1, s2;<br />
s1 = "Blah";<br />
s2 = s1;<br />
s2 = "foo";<br />
Console.WriteLine(string.Format("{0} {1}",s1,s2));<br />
the output will be "Blah foo" because a new string is a new object.
the way i understand it, you should do the following:
<br />
string filepath = @"E:\VS2005_work\CommonFunctionLibrary\CommonFunctionLibrary\bin\Debug\CommonFunctionLibrary.dll";<br />
string s = string.Empty;<br />
string p = string.Empty;<br />
Assembly myDllAssembly = Assembly.LoadFrom(filepath);<br />
Type dllType = myDllAssembly.GetType("CommonFunctionLibrary.ClsMain");<br />
MethodInfo dllMethod = dllType.GetMethod("setValue");<br />
if (dllMethod != null)<br />
{<br />
Object dllObj = Activator.CreateInstance(dllType);<br />
object[] parameter = new object[] {"goldli",p };<br />
s=(string)dllMethod.Invoke(dllObj, parameter);<br />
p = parameter[1].ToString();<br />
MessageBox.Show(s+"\r\n"+p);<br />
}<br />
myDllAssembly = null;<br />
|
|
|
|
|
|
Hey Guys,
I'm developing a C# application this time i've decided to include crash reporting. I searched CP and found this
See this
Its in C++ though. I know i can call the unmanaged DLL from C# but Id prefer one in managed code. Is there a crash reporting library in managed code? I couldn't find any!
|
|
|
|
|
Hello everyone,
I have a ListView which I am sending some information HH:MM:SS into it everytime the user click a button. I wish to have a column which increments evertime the button is clicked and an item is added to the ListView.
Is there any easy way I can get this one done?
Thank you so much for your help and have a great day.
Khoramdin
|
|
|
|
|
If you have a new column, it's going to appear for every row. You can just add a column, and have the button click find the values there and increment them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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,
im developing an application in c# .net 1.1 using VS2k3.
In that app I'm trying to open a System.Windows.Forms.FolderBrowserDialog.
Here is the code:
<br />
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();<br />
folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory;<br />
folderBrowserDialog.ShowNewFolderButton = true;<br />
DialogResult res = folderBrowserDialog.ShowDialog(this.maindlg);<br />
if(res == DialogResult.OK)<br />
{<br />
...
}<br />
It works just great, except that when I click on the "Create new directory" button, a new directory will be created, but not shown in the dialog. When I close the dialog and start it again, then the new created dir will be shown. So there is a need to refresh the directory list in the dialog when the user hits the "create new dir" button.
Does anyone know how I can perform this?
thx and best regards
~Humppa
|
|
|
|
|
It works in my VS2003. Try to use only .ShowDialog();
|
|
|
|
|
Hi,
thanks for your reply.
I checked it out with .ShowDialog():
<br />
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();<br />
folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory;<br />
folderBrowserDialog.ShowNewFolderButton = true;<br />
DialogResult res = folderBrowserDialog.ShowDialog();<br />
if(res == DialogResult.OK)<br />
{<br />
...
}<br />
Unfortunatelly there is still the same problem.
Please note that I'm running on WindowsXP and that the code is part of an internal class which is not inherited from UserControl or Form.
~Humppa
|
|
|
|