|
Set the uiMode property of Media Player to none
Cheers,
Kannan
|
|
|
|
|
We have a service here, a telephone number (00973900717) which you can call and send songs and voice jokes to friends (as a phone call not an SMS). I need to develop the same but on a web ite or a windows application, something like:
1. Create audio files (compatible format).
2. start the application.
3. Choose the song or joke or..
4. Eter a friend number.
5. Submit the audio file.
6. Friend will receive it as a phone call
Can I do the same using C#?
Jassim Rahma
|
|
|
|
|
I want to build a snap-in with C#.
How can I do this?
Mahdi Sadegh
|
|
|
|
|
|
Can you do shell type commands (ex. executing programs) in a web form?
Me, wrong!?! Nah, you just need to change your thinking to make me right.
|
|
|
|
|
Yes, using the same classes you would with a Windows Form: System.Diagnostics.Process . I (and thousands of other experienced developers) would warn you against this, however. Web servers are open to enough worms as is without providing a means to execute any command on the server. If you don't protect it well enough (and proper protection isn't as most people think), anyone could run any command on your server, such as extracting your server's SAM database (system and user accounts), copying it to a publicly accessible directory, downloading it, and running a brute-force cracker on it like l0pht crack. Then they become your computer's administrator. Much more is possible, especially in larger corporate networks. I advise against it.
Also, this does not qualify as shell programming. Shell programming works with the UI to provide and consume services to and of the UI. This is simply process execution. If you are asking if you can bring up the "Browse for Folder" dialog on the web site, you can't do it in the server context (its a blocking call and no one can close the dialog) and on the client you would need a thick client application, but then you have security to deal with from the browser. Using ActiveX in this way is tricking and using .NET embedded user controls[^] is even trickier. If this is the case, just deploy a regular application to your clients.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Here's what I'm wanting to do:
* when the user selects an item in the listview I want to change the font color, background color and add a border to the row instead of the default row highlighting.
I've read through some of the ownerdrawn examples on CP, but it's not exactly what I'm after.
Barring adding a border, here's what I have so far:
private void listView4_Click(object sender, System.EventArgs e) {
int i = listView4.SelectedItems[0].Index;
listView4.Items[i].Selected=false;
listView4.Items[i].BackColor=Color.GreenYellow;
listView4.Items[i].ForeColor=Color.Black;
}
Main problem is that the row first highlights then switches to the greenyellow color.
I'm keen for an easy solution to this prob., but I haven't found one yet.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
The default painting is what is causing this, so owner-drawing your ListView is exactly what you need. Even if you override ListView.OnSelectedIndexChanged (doing what your doing is not soon enough in the event chain) you still have to take care of all these color changes. To implement this form of owner-drawing, however, you'll probably have to override WndProc and having the LVN_* and NM_* notifications of Win32. You could try doing this in OnSelectedIndexChanged , but that won't give you the border you want.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
There are a couple of reasons why it might not work :
- the view style must be "report" : this.View = ListView.View.Report;
- the view must be properly activated : this.Activation = ListView.Activation.(OneClick | Standard | TwoClick);
- the custom styles must be really set as used : your items must have the "UseItemStyleForSubItems" property set to true.
That said, it is not possible to add a border without really ownerdrawing the listview, ie override WndProc.
PS : the funny thing about the owner drawn capabilities of ListView is that the CustomDraw implementation is really exactly the same than the WIN32 NMCUSTOMDRAW handling (NMLVCUSTOMDRAW struct, item stages, ...).
|
|
|
|
|
I am writing C# application that needs to do some job with Excel 2000. I add Microsoft Excel 9.0 Object Library to the project and in code I try to create an Excel object:
private Excel.ApplicationClass ExcelApp = new Excel.ApplicationClass();
OK, object is created, but when I try to access its properties I always get an error: Old format or invalid type library!!
Does anyone have an idea what am I doing wrong?
MarixmaN
|
|
|
|
|
My recommendation is to download Office PIAs[^].
|
|
|
|
|
I already tried that way but still does not work! Bay the way I am using Win 2000 professional. I tried my application on Win XP and everything worked properly. But msdn says it should work on both platforms.
|
|
|
|
|
Ok, then try to upgrade your Office 2000 install and install the latest service pack.
|
|
|
|
|
|
Because you have Office 2000. PIAs work only with Office XP.
Alexandre Kojevnikov
MCP (SQL2K)
Leuven, Belgium
|
|
|
|
|
Looks like data in the registry went out of sync with your Office 2000 type libraries. As .S.Rod already suggested, try re-installing Office 2000, and applying the latest service packs.
Alexandre Kojevnikov
MCP (SQL2K)
Leuven, Belgium
|
|
|
|
|
I just reinstalled office2000, installed SP3, and I am still getting this error ("Old format or invalid type library..."). Maybe there are other updates or SP that I should install? I get this error on all computers where I tried to run my application. What is about that data in registry and Office2000 type libraries, how to sync them?
|
|
|
|
|
I've spent all night looking on the net and havent been able to really find any examples of TAPI programming in C#. Does .Net have its own library for handling telephoney? thanks
|
|
|
|
|
The easiest way of calling TAPI from .NET is to use COM interop. You can either use the existing TAPI 3 com interface or roll your own COM interface around TAPI 2.
Michael
Wonder Woman, Wonder Woman.
All the world's waiting for you,
and the power you possess.
In your satin tights,
Fighting for your rights
And the old Red, White and Blue.
|
|
|
|
|
|
Hi,All
I am writting UserControl ,which has property that returns my own collection.
Property looks like this
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content),Description("Get/Set Properties of each Cell")]
public ColumnsCollection AddColumns
{
get{ return clmCollection;}
set{ clmCollection = value;}
}
ColumnsCollection class is derived from CollectionBase(contains collection of ChbColumns objects) which looks like:
public class ColumnsCollection : System.Collections.CollectionBase
{
public ChbColumns this[int index]
{
get{return (ChbColumns)this.InnerList[index];}
set{this.InnerList[index] = value;}
}
public ColumnsCollection()
{
}
public int Add(ChbColumns info)
{
this.InnerList.Add(info);
}
}
ChbColumns class is simple class which contains bool value:
public class ChbColumns
{
private bool m_ShowCheckBox;
public ChbColumns()
{
m_ShowCheckBox = false;
}
public bool ShowCheckBox
{
get{return m_ShowCheckBox;}
set{m_ShowCheckBox = value;}
}
}
Now at design time when i click AddColumns property Collection Editor opens when i add values in it and say ok it doesn't go in set part!(at run time it works)
where should i collect the changes made to this collection(From Collection Editor) at design time?
Thanks and Regards
Tushar.
|
|
|
|
|
Hello to all,
Can you guys help me out i'm a complitly newbie but i want to try and make something with C#.
For now i was undering if you guys could explain if its possible to have a windows form controling a command line program,
what i'm trying to says is i have a prog.exe that only show information that is always printing in the cmd constatly, and i want to be able to see that info in a windows form and possible minimize it to tray, and make him capable of give commands to that console.
Thanks and sorry for the bad english.
|
|
|
|
|
for command line args at start up try something with Enviroment.GetCommandLineArgs();
something like :
<br />
foreach(string jr2 in Environment.GetCommandLineArgs()){ <br />
count++;<br />
string ComandArgs = jr2.ToLower();<br />
byte[] jr = new byte[]{1};<br />
try{<br />
if(count !=1){
switch(jr2.Replace("-",null)){<br />
case "commandarg1":<br />
break;<br />
)
}
)
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
Sorry but has i sad i'm a newbie i didn't understand could you point me to a tutorial.
Thanks
|
|
|
|
|
want me to send you my code ? (program)
The Code Project Is Your Friend...
|
|
|
|