|
hi
this is my code in vs 2005 :
//Resource_1.exe is .net v2.0 file
string fullName = this.GetResourceFullName("Resource_1.exe");
Stream stream = current.GetManifestResourceStream(fullName);
byte[] bytes = new byte[stream.Length];
stream.Read(bytes, 0, (int)stream.Length);
Assembly a = Assembly.Load(bytes);
MethodInfo entryPoint = a.EntryPoint;
entryPoint.Invoke(null, new object[] { new string[0] });//error show me for second argumant of this function
private string GetResourceFullName(string resName)
{
string fullName = null;
foreach (string str in this.current.GetManifestResourceNames())
{
if (str.EndsWith(resName))
{
fullName = str;
break;
}
}
return fullName;
}
when i compile my app and click the button to run these code an error shown me that "parameter count mismacth"
what is my problem and how to solve it ?
|
|
|
|
|
Imagine the following was the commandline argument.
Path=d:\f\Backup\"Wolf's Documents"\"Visual Studio 2005"\Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.dll
I already took care of the spaces in their with the quotes, but i tried everything i could think of to deal with the apostrophes in "Wolf's Documents" including one sites suggestion of using a '\' infront of them which didn't seem to have an affect.
|
|
|
|
|
1. Is there any reason this can't be Path="d:\f\Backup\Wolf's Documents\Visual Studio 2005\Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.dll" so that one set of quotation marks takes care of the whole situation?
2. So, what's the problem?
--
I've killed again, haven't I?
|
|
|
|
|
|
I want to retrieve the icon used to represent a removable or local hard disk.
I know I can use SHGetFileInfo to get the icon if the disk exists, but what if the disk doesn't?
Basically I want to create a tree structure representing a device that has a removable disk and a local disk. These devices will exist on a virtual device that I am representing.
Is there a way to retrieve an icon for a Device that doesn't exist? i.e. can I specify something that denotes to SHGetFileInfo that I want a device's icon for a device's type that I specify?
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
Hi,
I'm calling a web service from my app and its execution lasts a few minutes, normally. I would like to leave it executing without making my app wait until it finishes. How can I do this? Some type of thread or something?
Thanx for any help!
|
|
|
|
|
Here's a simple snipet:
using System.Threading;
...
public void myProc( object stateobject )
{
MessageBox.Show( "This is a thread." );
}
private void button1_Click(object sender, System.EventArgs e)
{
ThreadPool.QueueUserWorkItem( new WaitCallback( myProc ) );
}
|
|
|
|
|
Thank you!
|
|
|
|
|
Hi.
I like PieDoes anyone know of any cheap, or free VC# skinning programs?
Thanks
Hengy
I like Pie
|
|
|
|
|
Hey.
Can anyone help me with this.
I have an object, that can grow bigger or smaller.
I need to save it in a file after I encrypt it.
The problem -> How can I clear the file before saving new stuff in it? if I won't clear it, it will write in the start 1 object, then I will have the same object PLUS the new object, then I will have the 2 last object PLUS the new one.... etc...
So... How can I do it?
Thanks...
NaNg.
|
|
|
|
|
Well the FileStream constructor goes like this:
FileStream( string path,FileMode mode );
Now, FileMode is an enum with member names:
Append, Create, CreateNew, Open, OpenOrCreate and Truncate.
If you use FileMode.Create it will overwrite the old file or create a new one if the file doesn't exist.
Hope this helps.
|
|
|
|
|
|
Hi!
I'vw been having some odd problems with connecting elements in Dundas diagram. I have an Element with 3 ConnectionPoints ( on is an input, and two ara outputs ) and when I try to connect a second Element's input to one of the outputs it always connects to the same ConnectionPoint no mater which I specify in the code. Like:
ElementFunctionality.ConnectElements( myConnector , TheOtherPoint , myElement.ConnectionPoints[ "Yes" ] );
//and
ElementFunctionality.ConnectElements( myConnector , TheOtherPoint , myElement.ConnectionPoints[ "No" ] );
will both connect to the "Yes" ConnectionPoint of the elment. I've even tried connecting manualy without using the ConnectElements function. I'm realy out of ideas.
Can someone help? Oh, and here is a screenshot.
|
|
|
|
|
Try support@dundas.com
Regards,
Nish
|
|
|
|
|
Hi
I have been trying to get my code working for days now, but I have run out of ideas of what could be wrong.
My problem is that I have a program where I want to save a file path from an openfiledialog into a XML document. It sounds pretty simple, but I keep getting an XML error, saying that my XML file does not exist :-S Even though it is the correct path.
I was wondering if anyone had a piece of code, which does the above-mentioned? That way I may be able to find a solution to my problem.
//Nick
|
|
|
|
|
It would help if you posted a code fragment.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
public class ClassFunctions : FormMain
{
private string strXMLLocation = @"..\..\WallpaperDatabase.xml";
public string fxGetFileName()
{
string strFileName = "";
this.openFileDialog1.Multiselect = false;
this.openFileDialog1.ShowDialog();
if (File.Exists(openFileDialog1.FileName))
{
strFileName = openFileDialog1.FileName;
}
return strFileName;
}
public string fxGetString()
{
string strFileName = "";
this.openFileDialog1.Multiselect = false;
this.openFileDialog1.ShowDialog();
if(File.Exists(openFileDialog1.FileName))
{
strFileName = this.openFileDialog1.FileName.ToString();
}
this.openFileDialog1.Dispose();
return strFileName;
}
public void fxAddPicture()
{
string strFilePath = fxGetFileName();
string insertXML;
XmlDocument xdoc = null;
XmlTextReader xreader = null;
XmlDocumentFragment xdocFrag = null;
try
{
xdoc = new XmlDocument();
xreader = new XmlTextReader(strXMLLocation);
xreader.Read();
xdoc.Load(xreader);
xreader.Close();
insertXML = "<Wallpaper><FileName>" + "test" + "</FileName><FilePath>" + strFilePath + "</FilePath></Wallpaper>";
xdocFrag = xdoc.CreateDocumentFragment();
xdocFrag.InnerXml = insertXML;
xdoc.DocumentElement.AppendChild(xdocFrag);
xdoc.Save(strXMLLocation);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
Here are the two functions within my class which are supposed to do the job J
//Nick
|
|
|
|
|
Perhaps you should try
private string strXMLLocation = Application.StartupPath + @"..\..\WallpaperDatabase.xml";
|
|
|
|
|
Adis H. wrote: Perhaps you should try
private string strXMLLocation = Application.StartupPath + @"..\..\WallpaperDatabase.xml";
When i try that i get the following error:
The syntax in the filename, the folder or the disk unit is incorrect.
but the XML file does exist.
|
|
|
|
|
Sorry make that:
private string strXMLLocation = Application.StartupPath + @"\..\..\WallpaperDatabase.xml";
You see the StartupPath returns a path like C:\blah_blah\App_Folder
without the "\" at the end, so you need to add it.
|
|
|
|
|
Thanks a lot it is working just fine now
|
|
|
|
|
I have a "List<CSomeObject> someList" with several properties. When I assign my "dataGridView.DataSource = someList" it populates the DataGridView, but the order of the properties is seemingly random. Can I specify the order somehow? Also, can I change the name of the columns instead of being forced to use the Property name?
-- modified at 15:45 Monday 12th June, 2006
|
|
|
|
|
You can create your own columns for the DataGridView by setting its AutoGenerateColumns property to false and then adding DataGridViewColumn-derived (e.g. DataGridViewTextBoxColumn ) columns to it with your desired HeaderText and DataPropertyName properties, in the order you want, preferably prior to data binding.
--
I've killed again, haven't I?
|
|
|
|
|
How do I call a different application from the one I am running on a CE.net device in C#. It appears that the Process class is not supported in the CF.
|
|
|
|
|