|
OK, well, it doesn't sound to me like you're using COM interop at all. Where does COM come into it, if you're not writing COM dlls ?
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 )
|
|
|
|
|
I think we are not talking on the same line. Let me elaborate.
I have a .net application and some of the functionality of this application I have exposed through a dll. I have used COMVisible attribute to expose the functionality in this dll to other application. I register this dll with registry using regasm tool (and not through regsvr32 or something.... that's why I said I'm not registering the dll with registry). Now client developed in VB or VC++ can use this dll (registered as COM with registry) to consume the functionality exposed by my .Net application.
When I put my client application in a path other then my .net component path it fails to find out the path for the dependency dlls.
I hope now question is clear. Sorry for replying to your question is hush hush...
|
|
|
|
|
KrunalC wrote: that's why I said I'm not registering the dll with registry
KrunalC wrote: registered as COM with registry
OK, spot the contradiction.
If your DLL is COM, it's in the registry and you can put it anywhere. It may still need some dlls ( it sure needs the .NET framework ), and that could be your issue. Hard to say, based on the level of detail you've provided ( I did ask once about the dlls it needs, but you did not give a specific reply )
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 )
|
|
|
|
|
the COM interop dll is also using some dlls developed as part of our application. so it is failing to find these dlls n not the .net framework dll.
What i have done is I have put codebase entry in my registry along with dll registration. So i think it finds the COM Interop dll but com interop dll in turn fails to get the dependancy dlls.
hope things are clear now. If not pls revert back for more clarification. Thank you very much for your persistent support. I really appreciate it.
|
|
|
|
|
hi guys, i want to picking row from my database(sql server 2000) with cycling form. for example my database contain.....
name age roll no
first row:- samuel 23 900041
sec row:- sam 22 900042
third row:- raja 20 900044
.....
in this my request i am retrive first row and then my second request i want to pick sec row as well as i move first row into third row...
so if u have any solution reply me asap..
|
|
|
|
|
Hello,
I'm having a problem Serializing/Writing the objects that were initially generated by xsd.exe and then extended (by adding attributes) via partial class. Since it will be hard to read if I paste all my code, I'll try to explain it instead.
XSD generates classes from the schema. IN my case let's call them:
public partial class ParentClass {}<br />
public partial class ChildClass {}
All of these are generated inside a DataModel.cs class.
So I created another DataModelEx.cs class where I added the following:
public partial class ParentClass<br />
{<br />
private string dataRootField = string.Empty;<br />
<br />
public string DataRoot<br />
{<br />
get { return dataRootField; }<br />
set { dataRootField = value; }<br />
}<br />
}<br />
<br />
public partial class ChildClass1<br />
{ private ParentClass parent = null; }
Adding these, when I try put values in the class and serialize it, this is the error that I am getting:
Error: There was an error reflecting type 'NAVITAIRE.SkyPlan.utility.data.DirectorySettings'.<br />
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel)<br />
at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace)<br />
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)<br />
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)<br />
at System.Xml.Serialization.XmlSerializer..ctor(Type type)<br />
at NAVITAIRE.SkyPlan.utility.Util.WriteDataToXml(String outputFile, Object data) in C:\workspace\PlanningSuite_Local_Dev\gui\src\utility\Util.cs:line 1741
My guess is that I may be missing some tags like the following in declaring my attributes:
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]<br />
[System.SerializableAttribute()]<br />
[System.Diagnostics.DebuggerStepThroughAttribute()]<br />
[System.ComponentModel.DesignerCategoryAttribute("code")]<br />
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]<br />
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
I am not familiar about these [] tags before declarations, so please help me out. I tried experimenting by placing some [System.Xml.Serialization.XmlIgnore()] before the new properties but it didn't seem to work, or maybe I just placed them incorrectly.
Thank you for your help!
Sincerely,
Rafferty
|
|
|
|
|
Nasty problem.
Make sure your class is marked with [Serializable]. Certain complex types cause problems too I believe. Dictionary<> and the sort. Try putting [XmlIgnore] infront of these (which will prevent serialisation) and see if that helps, you may have to use more primitive types if that helps.
[DebuggerStepThroughAttribute] prevents the debugger from stepping into the generated code, not always that helpful so just find and replace these with an empty string may help with debugging.
Regards,
Rob Philpott.
|
|
|
|
|
Found the problem. Seems like a cyclical problem happens when you use "parent" objects in classes like these.
Thanks guys!
Rafferty
|
|
|
|
|
I'm using ClickOnce for deploying my smartclient (CAB) application. There are a lot of modules in my applications. When the new version of those modules have been deployed, I wanna show the list of modules that need to be updated to the user before downloading those latest version.. ( like Firefox extension's auto-updates style )
My question is: How can I get the list of latest module?
Thanks in advance.
|
|
|
|
|
hi all
plz help me
i am inserting date to the text box on the datagrid template.There is 2 column for that. one receive date and the other due date. due date should be greater than receive date. and the date format is dd/mm/yyyy. how to validate this. since the date format is dd.mm.yyyy, am not able to compare it with different month.plz help me to solve this. am doing this from past 4 days. but didnt end up with a solution
sample code is given below
if(((TextBox)(dgDetailData.Items[total].Cells[7].Controls[1])).Text != "")
{
try
{
DateTime txt=Convert.ToDateTime(((TextBox)(dgDetailData.Items[total].Cells[6].Controls[1])).Text);
DateTime tst=Convert.ToDateTime(((TextBox)(dgDetailData.Items[total].Cells[7].Controls[1])).Text);
string date=month+"/"+day+"/"+year;
if(DateTime.Compare(txt,tst)>0)
{
lblmsg.Text="error";
lbl1.Text=date.ToString();
}
else
{
lbl1.Text=txt.ToString();
InsertParam[9].Value=Production.FORMATYMONDTIME(((TextBox)(dgDetailData.Items[total].Cells[7].Controls[1])).Text);
}
}
catch(Exception err)
{
RegisterStartupScript("startup","<script>window.alert('1.Error:"+err.ToString()+"')</script>");
}
}
else
{
InsertParam[9].Value=DBNull.Value;
}
In this code the error occuring is if the received date is 01/10/2007 n due date id 30/09/2007, it is inserting value. if it is of same month it is working properly. ie 01/10/2007 n 10/10/2007 it accept and if it is 10/10/2007 n 01/10/2007 it is not accepting.
|
|
|
|
|
Hey all,
I've long been using CodeProject as a valuable resource, but have come to a problem that I can't find a solution for.
I have a .NET 2.0 app, written entirely in C#. In it, I have several controls (some simple, some complex), which I'd like to display detailed data about in a custom tooltip. I've got the tooltip content done and can easily make it be a Form or UserControl, whichever the tooltip class would need.
Ideally, I'm looking for some free class, where I can just do something like...
<br />
WonderfulToolTip tip = new WonderfulToolTip(myTooltipContentControl);<br />
<br />
...<br />
<br />
tip.Show(new Point(300, 400));<br />
<br />
...<br />
<br />
tip.Hide();<br />
I've looked around here, and other websites, and seen at least example of this working, however it wasn't free, and the code seemed way too in-depth, since it was a full control library, and I wouldn't be able to pick out just part I need. I found several different related options, like comboboxes with custom tooltips, or specific custom tooltips that didn't allow you to provide your own control. I know the funcitonality is there, but untangling it from the mess of things that aren't what I want seems very daunting. I've been a .NET C# developer from the start, so my eyes tend to glaze over when I see a huge chunk of code filled with windows API calls, endless enums, and other native code. I'd prefer not to reference any huge control libraries; I'd just like a class or two to add to my project.
Perhaps the desire for a simple custom tooltip class is a bit idealic, I'm not sure. Can anyone point me to the closest I can get, if nothing like what I'm looking for is available? Thanks very much for your time!
|
|
|
|
|
Will the MouseHover event suffice?
|
|
|
|
|
I'm not sure what you mean. I may use MouseHover to trigger when to show the tooltip, but I'm looking for how to display a usercontrol as a tooltip.
|
|
|
|
|
|
Yeah, I have. I'm looking for something I can add to my C# project, so either C# of VB.NET (I could translate it from VB fairly well, or use VS's converter).
|
|
|
|
|
Any other ideas? Could really use something simple.
|
|
|
|
|
While I haven't found what I was looking for, I did find another solution.
I had thought that the built-in System.Windows.Forms.Tooltip class handled text only... And basically that's true. But I just noticed (Thanks PNelson!) that it's got OwnerDraw functionality, so I'll just draw it myself.
|
|
|
|
|
txtInterestRate.Text.ToString = 12;
What am I doing wrong???
Im currently a student, trying to complete a task...and im stuck!
The code is currently under a method in my application.
Help Please
Im trying to set the InterestRate textbox value to 12.
|
|
|
|
|
OlieColie wrote: txtInterestRate.Text.ToString = 12;
What am I doing wrong???
Well, Text already returns a string , so there is no point in asking it to make a string from something that already is a string . It would be pointless.
You want to make the number a string, so perhaps you might want to write 12.ToString() , but if you are dealing with literal values, why not just say "12" and be done with it.
|
|
|
|
|
You have asked this at least three times across at least two forums. Please ask once in the right forum, and leave it at that.
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 )
|
|
|
|
|
Indeed, only post once.
Just to clarify, ToString() is a function that returns the value of an object, as a string, and it can't be set.
The TextBox.Text property is all you need, it is the text of the text box, so you can either do
txtInterestRate.Text = 12.ToString();
or simply
txtInterestRate.Text = "12";
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
My favorite word is still Callipygian.
|
|
|
|
|
Hi - I mean no disrespect to you in this post.
1 - you are a student, so I assume you are being 'taught'.
2 - the first chapter in most, if not all, C# beginner book handles strings, usually in the form string.Format("{0}" , 12) and, like the previous answers, obj.ToString() .
3 - are you paying for your course, and at what institution?
4 - Do you have any C# books?
I can't believe, in all honesty, that a C# student, would not have been taught how to convert a number to a string.
Seriously, how much are you actually taught, and how much are you left to figure out on your own, and are you given any learning material, or even any pointers on how to find out his info for yourself?
Vote me down if you want, but this is not meant as abuse - just pure curiousity at what is being taught.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
txtInterestRate.Text="12";
try this
|
|
|
|
|
How do I set a textbox value to 12.
I tried the ToString method, but it did not work.
|
|
|
|
|