|
E6AD wrote: how can I build a C# COM Object from VC++ 6.0?
You can't. Do you mean to call one ? The same as you call any COM component, COM is language neutral.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks a lot Christian. You are right,I meant to call.
Thanks,
E.A.
|
|
|
|
|
How do I create a shorcut (in the esktop)for an existing exe file?
|
|
|
|
|
You need to pinvoke some shell stuff to do that, from memory.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi everyone,
Can someone please tell me how can I build a DLL in C#?
Best Regards,
E.A.
|
|
|
|
|
Is there not an option to make a Class Library? In VS.net Standard, the option is not there, but you can always use SharpDevelop[^]. It is a free development environment.
Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski
|
|
|
|
|
The "Class Library" project type always compiles into a .dll. Keep in mind, though, that this is a .NET assembly, not your common Win32 .dll that can be linked into an MFC app. If you need a .dll that can interop with a normal windows or MFC app, you will want to go into the projects properties, and enable exposing the project through COM.
|
|
|
|
|
Thanks Jon.
But is that the only step required to expose the project through COM?
Do you have any detailed link that can help me out with that?
Thanks again,
E.A.
|
|
|
|
|
Hi all - if I have a user control, is there a way I can write code that will only execute at runtime, not when the control is rendered in the forms designer ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Control.DesignMode does the trick !!!
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I like how you always answer your own questions, Christian. Its very entertaining, not to forget helpful to the community.
|
|
|
|
|
*grin* I find that asking someone else is really helpful in my finding a solution. It worked when I was starting out and had to ask a senior programmer, and it still works today.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi every body
i need help
i want to know steps to build my own chat room
iam beginer . my dream is building chat room .
pls tell me
engriri2006
|
|
|
|
|
engriri2006 wrote: my dream is building chat room .
You need to be a bit more specific than this. For starters, what have you built already ? How long have you been using C# ? The web is full of people who install an Express Edition and set about creating their dream, but life does not work like this. You should have done a few smaller projects before you start this one, all of them designed to help you build knowledge of the language, and also the libraries that you will need to use to make this program happen.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You hit the nail on the head. I started out the same way a couple years ago, and was in for a lesson in reality.
Rome was not built in a day.
Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski
|
|
|
|
|
I have an application that can be used via a GUI interface or command line arguments. If arguments are passed the GUI isnt displayed.
Now this all works fine, but I have one small problem that I cant fathom.
When running in "command line" mode I use Console.Writeline to output messages (e.g. errors). If I run the application via a command window with command line parameters the Writeline doesnt output anything at all. Although the code does execute successfully. I can only assume that the Writeline data is being directed somewhere else, not exactly sure where though.
Interestingly if I run it in debug through Visual Studio, the VS output window does show the messages.
Does anybody know whats going on here?
p.s. The project is compiled as a Windows Form, and the form has the Main function in it. Within Main I check for command line arguments if they exist the form is not initialised and the code diverts off into a command line process class.
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
Did you build your application with /t:winexe (Windows Application in the New Project Dialog)? In that case, you won't get console output because immediately after launching the application, you'll go back to the command prompt.
Try changing it to console application and see if it works (Project Properties->Output Type)
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Heres the thing, if I change the output type to console it does work
The problem with doing this is that if the app is launch in GUI mode, I get a rather ugly (and unnecessary) console window sat behind the windows form
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
MrEyes wrote: I get a rather ugly (and unnecessary) console window sat behind the windows form
Where would you expect the console output to appear then?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
MrEyes wrote: I get a rather ugly (and unnecessary) console window sat behind the windows form
I'm afraid you're stuck. My guess is Windows shows the console window depending on the type of the application (console/GUI), so either get a console window or none at all. I don't know if you can selectively writing to the console depending on command line parameters.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Using Visual Studio C#
I am creating an instant messanger for LAN purposes only.
I would like to have multiple forms(windows) open at once for mulitple conversations with
different users.
But when i try an open one form using the form.showDialog() method it opens but it stops all execution until the form is closed. There for it wont let me open another form if a new connection comes in.
I have an additioal thread setup just to listen for new connections...execution stops here too!!!
Then i try and use form.Show() method and the forms loads to a blank screen and when i mouse over the form i get the hour glass symbol.
Must i use Multiple Document Interface to accomplish this or will i run into the same problems.
I also dont want the forms confined inside of a parent form....
This has to be possible didnt know it could be this difficult
Thanks in advance
Kouvoisier
"13 Thieves of the Diamond" SPR 2K2 A.K.A. NASTY NUPES
|
|
|
|
|
When you use Show, because the parent dialog doesn't stop and wait, the method that calls Show will continue to execute. As a result, you need to make the form you're going to show a member variable ( or if you want to create them dynamically, have a collection to hold them in as you create them ), so that a reference exists and the form is not garbage collected.
kourvoisier wrote: and the forms loads to a blank screen and when i mouse over the form i get the hour glass symbol.
That's weird, there's a problem in your code causing this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the response.
I am confused....
Christian Graus wrote: because the parent dialog doesn't stop and wait
Parent dialog... could you elaborate what exactly you mean when you say parent dialog.
Christian Graus wrote: you need to make the form you're going to show a member variable
I need to make the form im showing a member variable of the class that this is being created in?
is this what you mean?
Christian Graus wrote: so that a reference exists and the form is not garbage collected.
I did create refrences i beleive.
ex. form1 derived from form class
form1 myform = new form1();
myform.Show()
- is myform the actual reference or just an instance of the form1 class
i may have my vocab wrong help me out on that if im wrong
-gives me blank form with hour glass icon when mouse over
hope all makes since
Kourvoisier
|
|
|
|
|
kourvoisier wrote: could you elaborate what exactly you mean when you say parent dialog.
The class instance which is calling Show on an instance of another form.
kourvoisier wrote: is this what you mean?
Yes
kourvoisier wrote: form1 myform = new form1();
myform.Show()
Exactly what I'm talking about. Show does not stop execution. myForm is a local variable, so it will immediately go out of scope and be garbage collected. It needs to be a member variable.
kourvoisier wrote: is myform the actual reference or just an instance of the form1 class
It's a reference with a very short lifespan
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ok
This is my basic setup in
class1.cs
public class1
{
Form1[] myForms; //member variable array of Forms
public class1() //class1 constructor
{
myForms = new Form1[50];
myForms[0] = new Form1();
}
class2.cs
public class2
{
static void Main()
{
class1 myClass = new class1();
myClass.myForms[0].Show();
}
}
Ok after i run that code i still get form loaded blank and hour glass when mouse over
I added the form as a member variable What else must i do? or what im a doing wrong.
I just want multiple forms thats all...
Run the code above you try it..... Help me out please
Thanks again Christian Graus
Kourvoisier
-- modified at 22:55 Tuesday 8th November, 2005
|
|
|
|