|
Well you could say what spawnlp does... it would save me from googling.
Take a look at Process Class[^]
David
|
|
|
|
|
It's gone from C++ .NET apparently...
_spawnlp, _wspawnlp
Create and execute a new process.
int _spawnlp( int mode, const char *cmdname, const char *arg0, const char *arg1, ... const char *argn, NULL );
|
|
|
|
|
I found it thanks.
using System;
using System.Diagnostics;
using System.ComponentModel;
It's Process.Start("someprogram.exe");
|
|
|
|
|
Does anyone know how to override the Listview items property so that it will populate the listview with my custom ListViewItemCollection? I was able to use:
ListViewItemsExtra m_ItemsExtra = new ListViewItemsExtra();
new public ListViewItemsExtra Items
{
get{ return m_ItemsExtra; }
}
this did override the property and adds my custom listview items to the collection, but they do not show up in the listview. I was hoping to overide the ListViewItemCollection and have it use my custom Item without redrawing the objects in the listview.
Lamont Bullock
|
|
|
|
|
I don't know if you can make the ListView using m_ItemsExtra instead of the, probably, private class member it uses to list its items.
Why not trying a different thing? I mean.. if I want more/own functionality in "my" ListViewItem, I'd inherit ListViewItem.
public class MyListViewItem : ListViewItem
I can still use it with the ListView because it is implicitly casted to ListViewItem (I guess on the implicit cast).
|
|
|
|
|
Zarrab,
Sorry for not being more clear on how I went about the Listview control. I did create a new Listview class and it does inherit the properties of the .net listview class. This is why I want to override the listview's items collection with my own. I tried creating a new property called ItemsExtra and a custom ListViewItemExtraCollection to store the ListViewItemsExtra class objects. using the get{} accessor I am able to add ListViewItemsExtra to the collection fine, but the IDE doesnt automatically create the code
below that it does for a normal listview item.
listViewExtra.addrange( new ListViewItemsExtra.ListViewItemsExtraCollection{
this.listViewItemExtra1, this.listViewItemExtra2, this.listViewItemExtra3, etc } )
If I could override the Items property and have it add my custom ItemsExtra object or override the Add() method on the ListViewItemCollection class I may be able to successfully get the ItemExtras in the listview without haveing to redraw them with code. It also works to change the code for a normal listview item to my ItemsExtra object, but that isn't clean like I would like. I want to be able to re-use the control whenever I need it, with the ease of other controls and not have to jerry rig code.
Do you have any suggestions?
Lamont Bullock
|
|
|
|
|
Hi,
Can someone PLEASE help me out.
I keep getting this error: Exception from HRESULT: 0x800A03EC
whenever I get to this line of code:
excel.ThisWorkbook.SaveAs(@"C:/",
Excel.XlFileFormat.xlXMLSpreadsheet, Type.Missing,
Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
And the localization is already set to "en-US"
E-mail me if you can help out! schoudhr@hotmail.com
it would be GREATLY appreciated
|
|
|
|
|
First, "C:/" is an invalid path. Second, it also doesn't specify a filename.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
thanks for the reply, that was just my many attempts to try anything. this is the original code (which gives the same error):
excel.ThisWorkbook.SaveAs(Server.MapPath("Upload/test.xls"),
Excel.XlFileFormat.xlWorkbookNormal/*xlXMLSpreadsheet*/, Type.Missing,
Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
I've tried EVERYTHING. If anyone knows how to take that excel object and send it direcly to the client for download as an .xls that would be equally great.
schoudhr@hotmail.com
|
|
|
|
|
I'm creating a custom error dialog, and want it to use the same bell sound as an error MessageBox. I tried writing an ascii 7 (BEL) to the error text, but it didn't work and I'm not sure what else to
|
|
|
|
|
Hello
You can try to interop MessageBeep for that
Andrew
|
|
|
|
|
How? The example project I found here won't build out of the zip. I fixed the reference to the other project in it, but I can't find the two directX references to readd.
http://www.codeproject.com/csharp/MessageBeep.asp?df=100&forumid=14167&exp=0&select=904080#xx904080xx
|
|
|
|
|
for example, something like this:
[DllImport("user32.dll")]
public static extern int MessageBeep(int type);
and some where in your code:
MessageBeep(0);
Andrew
|
|
|
|
|
Andrew Kirillov wrote:
[DllImport("user32.dll")]
public static extern int MessageBeep(int type);
WHen I coppied that code into .net it errors on 'int': "Expected class, delegate, enum, interface, or struct".
|
|
|
|
|
dan neely wrote:
WHen I coppied that code into .net it errors on 'int': "Expected class, delegate, enum, interface, or struct".
Wow, what a strange error. And where did you copy it ? Can you post your code ?
Andrew
|
|
|
|
|
[code]
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace foo
{
[DllImport("user32.dll")]
public static extern int MessageBeep(int type);
public class FooFrm : System.Windows.Forms.Form
{ /* ... */ }
}
[/code]
|
|
|
|
|
1. don't forget about
using System.Runtime.InteropServices;
2. declare MessageBeep in your class as a method.
public class FooFrm : System.Windows.Forms.Form
{
[DllImport("user32.dll")]
public static extern int MessageBeep(int type);
}
}
3. It looks like you need more learning C#
Andrew
|
|
|
|
|
Andrew Kirillov wrote:
3. It looks like you need more learning C#
Thanks. And this does fall under the catagory of something I've never had to do before (in any langauge). If I knew the answers I wouldn't have to post the questions.
|
|
|
|
|
dan neely wrote:
And this does fall under the catagory of something I've never had to do before (in any langauge).
Yes, I understand you. But still, declaring a method outside class is unknown technique to any language
Andrew
|
|
|
|
|
I forgot c# didn't allow standalone procedures. :-/
|
|
|
|
|
|
Dominik Reichl wrote:
A whole article exists on this topic: http://www.codeproject.com/csharp/MessageBeep.asp[^]
I found it. IT won't build out of hte zipfile, and while I fixed the problem with the 2nd project not being in the solution, I can't find either dx9 reference to import. Now that I think about it, it's probably a moot point since IIRC the client for this project's running on older windows and is unlikely to have dx9 to begin with.
|
|
|
|
|
hi all.
i developed client/ server interaction program and i tested it well on my local pc but when i gave my friend the client tool through talking with him on yahoo messenger i uploaded my client and he downloaded it so i gave him my ip address iam using dial up connection i ran my server listening on my new ip address from my connection so i gave him my ip address to provide it in the client tool to try connecting he put the ip address but he couldn't be connected knowing he was using DSL connection why that iam using tcplistener and tcpclient in asynchronous socket connections what is that problem .
Miss With The Best And Die Like The Rest
|
|
|
|
|
Could be any number of things. First, can your friend ping your IP address? Is your server application running on Windows XP SP2? Are you running any firewall software on your machine? ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Iam running my server on windows xp without any firewalls
but i want to do something like yahoo connection you can connect your messenger from any network even if you wre behind the firewall you can allow the packet transmision on this port and it will work i need my application to run and connect to my server like any hacker tool
Miss With The Best And Die Like The Rest
|
|
|
|