|
Greetings!
I found myself trying to create an add-in in Vs.net using C# but was not quite sure where to start. I have searched the site and several others including the msdn.microsoft.com site for information in regards to this.
If anyone has any information/tutorials/point in the right direction type assistance please inform!
My end goal is to create an add-in for outlook..
Thanks!
-theBeings
|
|
|
|
|
I have no experience in writing Outlook add-ins but something like this might be of interest...
http://groups.google.com/groups?q=VS.NET+Outlook+add+in&hl=
en&lr=&ie=UTF-8&oe=UTF-8&selm=%23BDiKy%23qBHA.1860%40tkmsft
ngp04&rnum=2
Good luck!
steve
|
|
|
|
|
|
Are there anything like C++ "%s" or "%f" in C#? Essentially if you have a big query and you have 10 placeholders, what is the cleanest way of filling it up...for instance, in MFC you could do ,
LPCSTR lpQuery = "EXEC MySP %s, %s,%s";
CString szQuery;
szQuery.Format("a", "b", "c");
which is clean and simple....how would you do something like this in c#?
|
|
|
|
|
You can do a similar thing in C# with the String.Format() method.
See:
http://search.microsoft.com/gomsuri.asp?n=3&c=rp_Results&
siteid=us/dev&target=http://msdn.microsoft.com/library/en-us/
cpref/html/frlrfSystemStringClassFormatTopic.asp
The long and short of it is this:
sQuery = String.Format("EXEC MySP {0}", sSPVariable);
Steve
|
|
|
|
|
This kind of code can lead to some bugs and security issues. If you want to keep with it or for uses other than SQL queries, use String.Format(), or, for better performance and solve the bugs I've mentioned, use classes like SqlCommand and SqlParameter.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
In my project ,we use a share VSS to manage our codes.Problem occured in
this case:
I referenced a dll into project,but when other people checked out this
project,the reference of the dll will unusable,he can not check out the
copy of the dll.
what shall I do???
lost my way
|
|
|
|
|
Enable Shared Checkouts[^]
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
?????????????????
lost my way
|
|
|
|
|
Hi,
this is my first posting to this message board... i hope you can help me and i can help you in further questions:
is it possible to create an indexer that is defined as followed:
public String this[Object NestedObject]
is it possible to define a Indexer that is defined as followed:
public String NestedObjects[Object NestedObject]
so that i can access as followed:
Object.NestedObjects[Object2];
is that possible in C# or not possible. As i need to access in that way to nested objects, which are defined in the object as an array:
Object [] NestedObjects = {};
thx in advance
littleguru
________
love your code and code your love
|
|
|
|
|
I have an application that creates a Mutex before calling Application.Run. With a call of Mutex.WaitOne(1, True) I check to see if it is blocking. If it is blocked that means there is another instance of the application already running so I exit, and if it is not blocked then I continue executing the application.
The debug build works as expected: the first call to my executable loads and displays the MainForm with subsequent calls to the executable quiting after realizing it is blocked. However, the release build does not work correctly. Subsequent runs of th executable do not get block, and I end up with multiple instances of the application running simulataneously.
I have no DEBUG conditional or specified code. With some testing I was able to figure out that if I turned off compiler optimizations and turned on the generation of debugging information, the release mode would work as expected.
Anyone know what could be causing this strange bahavior? Do Mutexes behave differently under different project configuration properties?
Thanks for any help or ideas.
|
|
|
|
|
I figured out some more details of what's going on. It is still a mystery to me.
My application actually does more than just shutdown when it finds out that there is another instance of the application running. It notifies the first instance that there was an attempt to open another instance. It does so by using Remoting, marshalling a communicator object using a TcpChannel.
When the first instance starts it begins by creating a Mutex, it then creates the communicator object, publishes it to a Uri, creates a TcpChannel, and registers the TcpChannel. The Mutex suceeds in blocking all subsequent instances up until the point it creates the TcpChannel. The thread should still own the Mutex since I neither removed the Mutex nor exited the thread. The funny thing is that when debug information is included and compiler optimization is turned off, the Mutex blocks until the first instance is closed...
The line that creates the TcpChannel, and which seems to be causing the problems with the Mutex is as follows:
TcpChannel tcp = New TcpChannel(props, null, null);
where props is justa hastable with bindTo=127.0.0.1 and port=0.
Any ideas?
|
|
|
|
|
|
That is what I based my code on. The code dealing with the mutexes is pretty much identical, my program really only differs in how it responds to subsequent launches of the application.
I was able to get it working in the Realase version of the application by adding a fix. I recreate the Mutex right after I create the TcpChannel that causes the program to lose the Mutex for some reason. I have no idea what is going on, but it works now, so that's nice. I would still like to do it without this fix if possible, if anyone has so idea.
|
|
|
|
|
I am using Charles Petzold's "Programming Microsoft Windows with C#" to learn Windows Forms programming. Unfortunately, it does not include using the IDE. I have modified one of his examples of a tree to include several panels and various controls to test the class member functions. I have also added controls with the IDE. A couple of times, my hard work of listing the Nodes for the tree has disappeared as I use the IDE to add components, modify the size of the panels, etc. I have gotten a little smarter and included the node-code in a separate "populateTree()" method. The typing is saved, but the call to the function disappeared on me once.
How can I avoid this. Is this happening because I put the code in the "InitiateComponents()" method?
When you come to a fork in the road, take it! Y. Berra
|
|
|
|
|
That's a known bug of VS.NET 1.0. Hopefully, this will be fixed in next release.
In the mean time, don't hesitate to add the using System.Windows.Forms.TreeView; statement. And don't hesitate to use a fully qualified method name, instead of a short name (assuming the using xxx; provides the compiler with the missing path).
In fact, the mess occurs when you switch from the code to the designer view. The designer view takes the opportunity at this very moment to rebuild the Form from scratch and, because there's that tiny bug, it may decide on his own there's no more treectrl. And it removes it. Either the tree ctrl disappears from the designer view, or methods disappear, etc.
By using more explicit namespaces, as I have said earlier, I have never got this problem back again.
Good luck then!;P
How low can you go ? (MS rant)
|
|
|
|
|
Donald Blachly wrote:
Is this happening because I put the code in the "InitiateComponents()" method?
Yes, never ever ever ever ever put code in the InitializeComponent() method. (There is a reason there is a comment saying "Required method for Designer support - do not modify the contents of this method with the code editor." Its because the forms designer places all of its initialization code in that method re-writing it when major/minor changes occur.)
IIRC, this is part of the reason Petzold didn't use the IDE for the book; the code generated by the designer isn't the prettiest.
Instead put your code after the InitializeComponent() call in the constructor or override the OnLoad method or attach a handler to the Load event.
James
Sig code stolen from David Wulff
|
|
|
|
|
Thanks for both the above comments.
/don
I will not put code in the InitializeComponent() method!
I will not put code in the InitializeComponent() method!
I will not put code in the InitializeComponent() method!
I will not put code in the InitializeComponent() method!
I will not put code in the InitializeComponent() method!
|
|
|
|
|
Donald Blachly wrote:
I will not put code in the InitializeComponent() method!
James
Sig code stolen from David Wulff
|
|
|
|
|
James T. Johnson wrote:
Yes, never ever ever ever ever put code in the InitializeComponent() method
Hmmm, I have a habit of doing just that, especially if InitializeComponent isn't collapsed.
So far I haven't been bitten. But I remember, Delphi used to make designer generated code uneditable by default. I always thought that was a good idea.
ASP.NET can never fail as working with it is like fitting bras to supermodels - it's one pleasure after the next - David Wulff
|
|
|
|
|
I was wondering how to tell a Validation Control to perform validation only when the next button of a form is pressed and not perform validation when previous button is pressed/
Also, I was wondering how you can retrieve IP address information of users hitting your site in C#?
thanks
|
|
|
|
|
This should really go in the ASP.NET forum...
You will now find yourself in a wonderous, magical place, filled with talking gnomes, mythical squirrels, and, almost as an afterthought, your bookmarks
-Shog9 teaching Mel Feik how to bookmark
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
Anonymous wrote:
I was wondering how to tell a Validation Control to perform validation only when the next button of a form is pressed and not perform validation when previous button is pressed
well, if you name your next button submit, and the previous button submit, then you can check to see which of the two where pressed, by checking the value of the submit argument sent to the page, it would have a value of the text on the button pressed. I think that should work, but i dont know how to retrieve the variable information.
Anonymous wrote:
Also, I was wondering how you can retrieve IP address information of users hitting your site in C#?
cant help you here, but in php you can just duse the $REMOTE_ADDR variable. at david stone.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Hey you're back! How was the trip?
Nnamdi Onyeyiri wrote:
but in php you can just duse the $REMOTE_ADDR variable. at david stone.
But in ASP.NET you can just use Request.ServerVariables and then you use the $REMOTE_ADDR stuff just the same... So 2 at you.
You will now find yourself in a wonderous, magical place, filled with talking gnomes, mythical squirrels, and, almost as an afterthought, your bookmarks
-Shog9 teaching Mel Feik how to bookmark
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
David Stone wrote:
Hey you're back! How was the trip?
OK, got a little boring, it was more of a look at your inheritance trip than a holiday.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|