|
Hello,
is it possible to launch an other program,
for example notepad as MDI Child in your programs MDI Parent?
Im making a funny Fake OS for my friend and it would be cool if this is possible.
I hope someone can help me,
Thanks
|
|
|
|
|
No, it isn't.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
|
1 because i want to do this in C#!
2 i thought the most things of VB.Net are possible in C# and maybe he didnt know it was possible in VB.Net, and maybe there are other people.
no offence
|
|
|
|
|
See this and rewrite it using C#.
http://www.thescripts.com/forum/thread46983.html
|
|
|
|
|
thanks!, ill try!
(so it is possible(probally))
|
|
|
|
|
You can put any window inside another.
use SetParent.
You could show Notepad's window inside you button if you wanted.
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
I am doing some development work with a login page passing a
Session["name"]= this.txtLogin.Text;
Session["Program"] = "PromoLeads";
Response.Redirect(url.ToString());
The database returns 1 or 0 based if the password and user matched. However this will not work with IE 6.0 on a Windows 2003 Server IIS. But it will work on a Windows 2000 IIS. If I use firefox it works fine regardless of what server its going to.
My question is, is there a setting on the IIS server (W2003) that I am over looking?
Thanks
|
|
|
|
|
Through reading forums and pages. My server name has an _ (Underscore) in the name, there seems to be some sort of bug with that based on a security property.
The options to fix this is use the IP address for the server instead of the name or rename the server if thats an option. There are other options as well, however, this was the easiest.
|
|
|
|
|
Hi all,
I'm having problems with SetNotificationPositions, using Managed DirectSound with C#.
Basically, I'm using a SecondaryBuffer in streaming mode, so I'm looping through it and continually adding new data. Eventually I come to the end of the data so I want to set a Notify point in the buffer so that when the buffer gets to playing the end of the data it can throw a notify and be stopped. So I call SetNotificationPositions on the (running) buffer.
However, sometimes, seemingly at random, SetNotificationPositions throws an InvalidCallException - unhelpfully the docs don't give me any idea when or why it throws this.
I can provide (extensive) code samples but I just wondered if this was a known problem and anyone could shed any light on why it's happening.
Cheers,
Tom
|
|
|
|
|
I have a list<t> such as for example:
// simplfied class:
class someObject{
private int i;
setI(int i)
{
this.i = i;
}
}
List<someobject> list1 = new List<someobject>
list1.add(someObject);
list1.add(someObject);
list1.add(someObject);
so there are objects in the list that store integers or some other numerical values.
Now I need to get the object that stores the largest element:
so I tried this:
someObject s = GetLargestObject();
public someObject GetLargestObject()
{
double largestobject= 0;
return list1.Find(delegate(someObject o)
{
if (o.I > largestobject)
{
largestobject= o.I;
}
return true;
});
}
of course that doesn't work...any ideas on how to get this to work?
Is there a way to get find to work?
_ra
|
|
|
|
|
Then you can sort the list using the comparer.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I know I can sort it, the thing is I need to preserve the order.
One way of course would be to copy the list and then sort the copy, but again I don't want to do this.
_ra
|
|
|
|
|
You don't need to sort the list. Just iterate through the list and use the comparer to compare the current item with the currently largest item. Alternatively, implement a CompareTo() method on your object. (You'll still need to iterate thru the list).
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
public class SomeObject {
private int i;
public Int Value {
get { return i; }
set { i = value; }
}
}
class Thingy {
List list1 = null;
private SomeObject GetBiggest() {
SomeObject biggest = null;
foreach (SomeObject so in list1) {
if (biggest == null || biggest.Value < so.Value) {
biggest = so;
}
}
return biggest;
}
}
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Hi,
Can any body tell me how to run any custom application depending upon the file extension through the code in .NET, for example if the file is "test.doc" then checking the extension, the MS Word application is launched and the document is opened... how can we encorporate that in .NET code...
Thanks,
Regards.
|
|
|
|
|
Hi, you can use Process.Start() method. It will open an application wich is associated with the file extension.
System.Diagnostics.Process.Start(fileName)
|
|
|
|
|
Thanks alot... for the quick reply... well can you please help me a bit more, I have to wait for that process to complete or to close, and have to block the code till the application ends... will be a great favor...
Thanks again.
Regards.
|
|
|
|
|
Process process = new Process();
process.StartInfo = new ProcessStartInfo(fileName);
process.Start();
process.WaitForExit();
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Thanks alot...
God bless you...
Regards,
Waqas.
|
|
|
|
|
XP handles this processing for you if you let it. Just start a process with test.doc as the name.
System.Diagnostics.Process.Start("c:\\test.txt"); will open said text file if it exists.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I have a receiver connected to the sound card of a computer through the Line In port. Currently, I have some old, unpleasant C++ code that captures the sound to a file locally. What I want to do now is to write some C# code instead that captures the sound off the sound card and uses probably UDP to send packets of the sound data to another computer, which will then play that streamed sound. I need some ideas of how to go about this, if anyone has any helpful suggestions. I would need to know:
1) How in C# to capture sound from the sound card on the system connected to the receiver.
2) How on the other machine to feed the incoming sound packets to ?? DirectSound or Windows Media Player ?? so that the user can hear it as it comes in.
It is not really a constant stream of data, like a streamed radio station (though to be quite honest I don't know how streamed radio stations work either). The user on the second computer chooses which receiver-equipped-computer he wants to connect to in order to receive sound.
I'm basically clueless on the two points above, so I would appreciate any suggestions.
-- modified at 12:52 Friday 14th July, 2006
|
|
|
|
|
ok folks, i am currently using a dataset that pulls data from sql server database and wish to show the results in a label. can someone point me in the right direction or even show me how to do this.
Thanks in advanced
PS: i am building a web application not a windows form.
-- modified at 12:39 Friday 14th July, 2006
|
|
|
|
|
First thing if this is a web app then the APS.NET forum would probably be more appropriate.
Does this dataset contain multiple records or a single result?
label.Text = ds.tables[0].Rows[0][0].ToString();
Or use a databound container such a repeater and create a template that includes a label control.
|
|
|
|