|
VS2005 has alot of autoformating features that you can turn on and off. You can even turn on adding a space before and after a . for a class member. Its one of the many settings, but I don't know why they have some of them. I would look in the options->Customize and see if you can find these autoformat settings.
Steve Maier, MCSD MCAD
|
|
|
|
|
Steve Maier wrote: would look in the options->Customize and see if you can find these autoformat settings.
I've looked but found nothing. I'm hoping there's some undocumented Registry setting or something like that to allow me to adjust it.
I find it hard to believe the Microsoft guys actually like using that convention. I've never seen it before -- what a waste of space!
Thanks,
Alvaro
I cannot take anything the Bush administration does seriously. The corruption, the cynical disregard for humanity, the cronyism and incompetence, all wrapped in a slimey flag of ultra-marketed nationalism repulses me. -- consdubya from fark.com.
|
|
|
|
|
When my listview control loses focus the selected item is unhighlighted but not removed from the SelectedItems collection. How can I keep it highlighted even after a different control gains focus.
|
|
|
|
|
dan neely wrote: How can I keep it highlighted even after a different control gains focus.
Sent the .HideSelection property to false .
Share and enjoy.
Sean
|
|
|
|
|
I have a user that is wanting to automatically log in to some web pages, and I've got most of them doing this, but there's still one that's giving me fits that I'm hoping someone can help me with. I'm writing the code in C#, and am displaying the webpage via the Microsoft Web Browser COM component. The webpage that I'm having issues with is popping up a login box that looks very much like an AD login box. Any idea how I can capture control for this box so I can programatically populate it and hit the "OK" button?
|
|
|
|
|
Some more information:
I'm using the old VB WebBrowser COM Component (AxSHDocVw.AxWebBrowser). I think I've narrowed it down to the fact that I need the headers passed to the Navigate method to include the authentication information, but I'm not quite sure how to do this. Does anyone have any sample code (like this for Posting) for the Headers/Authentication?
Thanks
-- modified at 15:00 Wednesday 30th November, 2005
|
|
|
|
|
Hi.
I am trying to build a VS 2005 addin and I want to add a commandbar with a custom image (I am using VS's AddNamedCommand and a satellite dll). It seems that if the image is 16-colored then it is correctly attached to the commandbar. If it is 256-colored, then all I can get is a blank (missing) image. Is there any way to have 256 bitmaps attached to custom commandbars? Thanks.
Daniel
|
|
|
|
|
Hi,
I have some kind of synchronisation problem. I have a C# Word Add-in,
and in it I want to close a file and then delete it. I use code as follows,
// Close the file
pDoc.Close(ref saveChanges, ref missing, ref missing);
// Delete the file
System.IO.File.Delete(pDocStr);
This works fine for a small file, but for a very big file I catch an
exception that says that "the file x.doc being used by another
process".
Anybody any suggestions for handling the synchronisation?
Thanks in advance
|
|
|
|
|
Hi,
I have not mailed to help you in solving your query. In fact seeing your query I thought you might help me in solving my query. I think you have used word document in C#. I am getting problem in opening existing word document in c#. I hope you may help me in solving it. Thanks in advance
Hiral
|
|
|
|
|
if i can help then sure, send me some details of the problem.
|
|
|
|
|
Hi,
Thanks for replying. Actually I got my solution.Anyways thanks for your help.
Hiral.
|
|
|
|
|
Hi Everyone,
I got this code:
if(file.Name.StartsWith(Cont_"))
{
engine = new FileHelperEngine(typeof(Contact));
Contact[] details = (Contact[])engine.ReadFile(file.FullName);
foreach(Contact info in details)
{
txtoutput.Text += info.toString();
}
}
else
{
engine = new FileHelperEngine(typeof(OSFUNOUT));
OSFUNOUT[] details = (OSFUNOUT[])engine.ReadFile(file.FullName);
foreach(OSFUNOUT info in details)
{
txtOutput2.Text += info.toString();
}
}
and wanted to change it to this sort of code:
System.Type type;
if(file.Name.StartsWith("Cont_"))
{
type = typeof(Contact);
}
else
{
type = typeof(OSFUNOUT);
}
engine = new FileHelperEngine(type);
type[] details = (type[])engine.ReadFile(file.FullName); *****
foreach(type info in details) ****
{
txtoutput.Text += info.toString();
}
However the lines with the **** are giving me problems, how do I create an instance of that type?
I could change it to
object[] details = engine.ReadFile(file.FullName);
foreach(object info in details) ****
{
txtoutput.Text += info.toString();
}
however i still need then to cast info to the class I'm working with...how would i do this (type)info doesn't work...
thanks.
|
|
|
|
|
This should work.
Array details = engine.ReadFile(file.FullName) as Array;
if (details == null)
return;
for(int i=0; i < details.Length; ++i)
{
txtoutput.Text += details.GetValue(i).toString();
}
If you need to access a non virtual method of the object.
Use type.GetMethod("methodName").Invoke(details.GetValue(i), null); or
type.GetProperty("propertyName).GetValue(details.GetValue(i), null);
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-- modified at 14:27 Thursday 1st December, 2005
|
|
|
|
|
Thanks, it works nicely. The help is greatly appreciated.
|
|
|
|
|
Hi,
I've done some "net send" program and it all works great but there is something missing. I want to replace standard popup window with my own, where i can have reply button and textbox for copy-paste of sended text. is this possible in C#?
Thanks in advance.
|
|
|
|
|
|
How can it be done? Do you know any site where i can find some information about this?
|
|
|
|
|
i want to know how can i convert my C# code into its corresponding assembly code for me to convert the assembly code into the corresponding .hex representation or convert it directly to hex ?
cause iam beginner to robotic field and i want to do that to use C# syntax and its OOP style in programming those chips and microcontrollers.
Any help regarding that.
By the way it is possible cause some companies already did that but for java coding style.
Mess With The Best And Die Like The Rest
|
|
|
|
|
If I understand what you want to do correctly you should prepare for bad news. C# doesn't compile to a native assembly language, it compiles to an intermediate form called MSIL. MSIL is JIT (just in time) compiled at runtime by the .NET CLR to native code, and this native code will only get generated if the CLR considers it safe.
All this makes C# an extremely bad choice for low level programming - you have no native code, and what you do have is useless without a .NET runtime for the platform you're running on.
I'd recommend a more traditional language like C++ for what you are trying to do.
Regards,
Rob Philpott.
|
|
|
|
|
Hi!
I know, When you read this subject you asked yourself "What the problem is this ?!"
Ok, I'm working on a Custom DateTimePicker in Shamsi Calendar User Control (for Iran) like .Net DateTimePicker Control. In first UserControl form i have just one ComboBox and on second form i have several objects.
But I cant change first forms ComboBox's Text from second form !!!
I changed it's Modifiers to public but also i can't access it.
Please Help me about multi page User Controls like this.
Thank You.
-- modified at 5:21 Wednesday 30th November, 2005
|
|
|
|
|
freshonline2003 wrote: I changed it's Modifiers to public but also i can't access it.
Really? Could you post some code that illustrates the problem?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello Again
Dear S.Senthil Kumar
I started new Windows User Control project, I named that form to 'ucFirst'. I just added one ComboBox to it and change it's Modifier to public, then i added another User Control and named it 'ucSecond' and added several objects like panel and labels to it and changed Modifier property of them to public. Now i can access ucSecond's object from ucFirst as :
ucSecond copyucSecond = new ucSecond() ;
copyucSecond.Label1.Text = "something" ;
but i dont need this, Problem is I want to access ucFirst's ComboBox from ucSeond.
when i'm in ucSecond's code section and i want to type ucFirst i see in autocomplete there is no ucFirst and i have not access to ucFirst !!!
Ok, If you can Please help me about this.
So Thanks for your attention.;)
|
|
|
|
|
Hi Everybody,
While using the compute sum method of the Dataset, I'm getting an error like Invalid usage of aggregate function Sum() and Type: String. How to solve this. Pls help me whoever knows this problem.
Thanks
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|
|
Hello raja_raman
It seems that you want to obtain a Single Value from a Database.
if your problem is this i use SqlCommand :
SqlCommand ordersCMD = new SqlCommand("SELECT Sum(orderprice) FROM Orders", nwindConn);
Int32 count = (Int32)ordersCMD.ExecuteScalar();
Maybe this solve your request, if not please mail me more about that.
I can help you.
Bye.
|
|
|
|
|
Hi,
Thank you very much for the mail. I'm sorry that I didn't make clear well about my query. I didn't want to obtain the value from Database. All the computed values which are stored in Database are displaying correctly. My problem is while computing that sum, I'm getting the error. Let me give you an example so as to make more clear.
Suppose I have a dataset called Ds1 which contains two fields, namely Country and No.of Women DegreeHolders. Say, for Eg. UK-50, US-40, Africa - 20, India - 80 etc. like that. Now If I try to take the sum of all Women Degreeholders of all the countries,say 190, it is giving error. I cannot take the sum from Database. I want take the sum from Dataset. Hope this is clear. Thanking you once again for your sincere help.
Raja Raman S
Reuters India Pvt.Ltd.
Bangalore
|
|
|
|