|
Thanks, Richard, Can you give me a detail example on how to copy this?
|
|
|
|
|
songll wrote: Can you give me a detail example on how to copy this?
Not exactly. You need to modify your C# structure to contain only basic types that will map directly to C++ types. You can then use the wcscpy_s[^] function to copy text into the structure. See also Interoperating with Unmanaged Code[^], for more details and examples.
|
|
|
|
|
May be an old issue But I am not able to solve.
I have a Microsoft reportviewer report in my application. The report loads tables from a datatable and loads some other values from my object class properties. So far OK
I have a image control in my report. I have to load a image from my application folder at runtime. cannot use embedded as the image is being changed before every time report loads.(Image is actually a graph image from zedGraph)
How to do it. I saw some posts but cant get the idea clearly.
please help
Thanks
With Regards
Roy Thomas
"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.
|
|
|
|
|
You can get the path to the folder that your app was launched from using Application.StartupPath and build the fully qualified path to your file using the Path class:
string fullPath = Path.Combine(Application.StartupPath, "myfilename.bmp");
|
|
|
|
|
Possible solutions :
- modifying the registry in HKCU
- modifying the registry in HKCR
- using ClickOnce
So far I haven't been able to find a method that actually works with all 3 OS's.
Does somebody have some example code how to go about this ?
(Everybody always points to the FileAssociation code on this site, but that doesn't work under Win7)
|
|
|
|
|
Why would you need code to do something that only needs to be done once?
Doesn't work on Windows 7?? Worked fine for me...
|
|
|
|
|
hello there...
I need to do a graphic like this one:
http://zedgraph.org/wiki/index.php?title=Stacked_Bar_With_Labels_Demo_v4[^]
but the x axis values need to be date and the first value is the current datetime.
I am using the code you find in the link, but added this line:
myPane.XAxis.Type = AxisType.Date;
myPane.XAxis.Min = (double)new XDate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")));
and the x1,x2,x3 variables set with
(double)new XDate(.....)
can someone help me??
sorry my English! :P
|
|
|
|
|
You are better off asking the vendor
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Zedgraph is free, so there is no vender...
anyway, i will try theirs website.
|
|
|
|
|
It didn't just materialize out of thin air. SOMEONE had to write it! There is a discussion forum on the project site.
|
|
|
|
|
looool
really ?
I think i got it.. wrong BarType
thanks!
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:58am.
|
|
|
|
|
hey,
I' am going to update to the latest version and try your code.
It will probably solve my problem.
thanks a lot.
|
|
|
|
|
Hi,
I'm working on a WebDAV Application.. I can now connect to an ip, say, http://localhost:9005/MyWeb/ by creating a web folder. I could create and delete the web folder using C# code... I could traverse my web folder thoroughly... Is it possible for me to map this web folder to a new drive (using C#) so that I can access the contents from a drive in My Computer..? A software by name NetDrive is able to do it... Pls suggest on how I can achieve this...
Thanks,
ramzg
|
|
|
|
|
If I create a new Windows Forms Application and double click on Form1.cs in Visual Studio, the code editor appears. Normally, I'd expect the designer to open up so I can drop controls and the like on my new form.
There's a setting somewhere I think - but don't know where.
Any ideas?
Regards,
Rob Philpott.
|
|
|
|
|
Cancel that, I've found it. Right-click then open with and set as default. I am stupid.
Regards,
Rob Philpott.
|
|
|
|
|
additional you have above the form1.cs in your solution view several buttons..
one is to show the code and an onther one is to show the designer..
|
|
|
|
|
Hello Friends,
i am working on a desktop application that i have build in VS2005 using C#.
In this application user needs to login to get in. first i have placed my database created in MS Access in same installed directory and i have connect with it to verify the users credentials. now my requirement is bit change. i want to place MS data base on a center point from where every one can access the DB for login. can u please let me know how i can establish the connection between them.
my previous connection string was this.
string strDBPath = AppDomain.CurrentDomain.BaseDirectory + dbChartImager.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDBPath + ";Jet OLEDB:Database Password=supna786;Mode=ReadWrite|Share Deny None");
this was working fine.
now i have upload my db on a server and trying to access with following connection string but is not working.
string strDBPath ="http://domainname.com//dbChartImager.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDBPath + ";Jet OLEDB:Database Password=supna786;Mode=ReadWrite|Share Deny None");
please let me know how i can access it. and if possible please provide some sample code that can help me.
Thanks
|
|
|
|
|
And what is the error you're receiving..?
|
|
|
|
|
i am getting the exception when i try to connect that "Not a valid File Name"
|
|
|
|
|
You're probably entering the wrong path to the .mdb file then. I'm not sure how the syntax for the connection string to an Access database is suppose to look..
modified on Wednesday, December 2, 2009 6:13 AM
|
|
|
|
|
i am giving the right path of file. There is no problem with path. do you think that i am doing right to access the MS Access file in this way from a hosing server. is there any other way to access a mdb file from a hosting server to window's application?
|
|
|
|
|
You could access it using a webservice and let the webservice reside on the same machine as the database. Then have a reference to the webservice in your client (windows) application.
|
|
|
|
|
why do you use "http://domainname.com//dbChartImager.mdb";
why not "http://domainname.com/dbChartImager.mdb"; ??
|
|
|
|
|
The error you're getting is telling you it's NOT correct.
And it's rigt - you cannot access an Access database over HTTP. Access is a file-based database and you haven't provided a filesystem based path to the database.
|
|
|
|