|
It's been said many times before in this forum (just Search first!), and as recently as yesterday, the TAPI 3.0 wrapper is heavily rumored to have problems, so you'll have to use a custom written TAPI 2.0 wrapper. You can find such an example here[^] on GotDotNet.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I would like some help on the next problem I've encountered.
I want to know on my mainform if a child form was closed using the close-x of the window.
Microsoft says that you have the OnMdiChildActivate methode but this happens,
I quote "Occurs when a multiple document interface (MDI) child form is activated or closed within an MDI application."
Can anyone help?
|
|
|
|
|
Assuming the child has a reference to the mainform, then just give mainform a ChildClosed member, and put something like
parent.ChildClosed(this); in the close handler for the child form
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Sorry,
I'm just a beginner, so put something like... is a bit to non-specific for me.
Can you give a bit more details please.
Like what do you mean with a ChildClosed member?
|
|
|
|
|
"ChildClosed" was just a suggestion for a name - what I meant was in your MDI container class add a member function (call it whatever you like - ChildClosed seems to be a sensible name to me) that takes a parameter of whatever your child form type is
e.g.
public void ChildClosed( MyChildFormType ChildForm )
{
}
Now assuming your child window has some kind of parent property that's set when the child is first created, you can call the ChildClosed member from within the child's close window handler
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Sorry but I'm not quite where I want to be.
I will try to rephrase the problem. In my mainform I'vr got a menu for the 'windows'. You know the standard cascading en windowlist stuff.
I want to hide this menu just untill there are elements in the MdiList,
if(this.MdiChildren.Length > 0)
windowMenu.Visible = true;
Where do I put this check on the Mdichildren so I can be sure that when the Child is closed, but whatever method, the check is performed?
I've tried this:
void MainFormMdiChildActivate(object sender, System.EventArgs e)
{
CheckMdiList();
}
This is called when you 'open' or 'close' the child. The problem is that at that moment the child still exists, so it's still in the list.
Is this making things cleare of just the opposite?
Either way, I already want to thank anyone for the given help.
|
|
|
|
|
Jonckheere wrote:
Where do I put this check on the Mdichildren so I can be sure that when the Child is closed, but whatever method, the check is performed?
Why not create a timer that fires, say, every half a second, and do your updating from there? Apart from the Window menu, you can update your toolbar, status bar and so on.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi all,
I want to know how to change a C# application to run in background from inside the program, i.e. the user can click a button in the GUI of the application, so that the application/or some of its process can run at background, so it won't compete resources with the other applications in foreground.
Thanks
Patrick
|
|
|
|
|
Hi!
Check out the usage of System.Threading.Thread - 'IsBackground' Property and use if it suits ur need.
Regs,
Manivannan.P
|
|
|
|
|
Hello .
Iam new to c#.
How a message to send to all clients in LAN network.
like "Net send" command
|
|
|
|
|
This has been covered in this forum many times. Whether or not you're new to programming or even just a particular language, basic research skills are a must in the field of development. Next time, please search first. You can search this site's articles using the search box at the top of every page, or click "Search comments" in every forum to search previous threads. You could also just google the entire web.
The simplest way is to just use "net send" using the Process class:
Process.Start("net", "send /domain Hello, world!"); The other way is to P/Invoke the native functions but requires you understand what P/Invoke is. If you want to go that route, I suggest you search for the previous threads about "net send" and you'll find links and examples, but the method above works just fine.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks for your suggetion
I have another doubt will please help me? link below
http://www.codeproject.com/script/comments/forums.asp?msg=949594&forumid=1649#xx949594xx
|
|
|
|
|
I'm using log4net in my app to print debugging information. I have added code as follows
static QuestionGroup()
{
log = log4net.LogManager.GetLogger(typeof(QuestionGroup));
isDebugEnabled = log.IsDebugEnabled;
isInfoEnabled = log.IsInfoEnabled;
}
public QuestionGroup()
{
questionGroupId="questionGroup"+questionGroupCreated++;
heading="Place your heading here";
subHeading="Place your subheading here";
position=-1;
this.questionList=new ArrayList();
if(isDebugEnabled)
{
log.Debug("QuestionGroup created with id :"+questionGroupId);
}
}
but in the output window it give the error
log4net:ERROR No appender named [LogFileAppender] could be found.
how can I fix it
samitha
|
|
|
|
|
I have just started to use log4net too in my shareware and I think its a great little tool. I think you need to look at your config file and clean it up abit and have only the things in there that you want/need. In mine I have a section named LogFileAppender, here it that section of my config (had to add spaces to get the xml to show up correctly):
< appender name="LogFileAppender" type="log4net.Appender.FileAppender">
< param name="File" value="log-file.txt" />
< param name="AppendToFile" value="true" />
< layout type="log4net.Layout.PatternLayout">
< param name="Header" value="[Header]\r\n" />
< param name="Footer" value="[Footer]\r\n" />
< param name="ConversionPattern" value="%d [%t] %-5p %c [%x] <%X{auth}> - %m%n" />
< /layout>
< /appender>
Steve Maier, MCSD MCAD
|
|
|
|
|
I'm getting the following messages
log4net:ERROR No appender named [LogFileAppender] could be found.
log4net: Appender named [LogFileAppender] not found.
log4net:ERROR No appenders could be found for category (Com.SriLogic.Qsurv.QBuilder.Gui.MainForm).
log4net:ERROR Please initialize the log4net system properly.
here is the config file
/**/
<?xml version="1.0" encoding="utf-8" ?>
<!-- .NET application configuration file
This file must have the exact same name as your application with
.config appended to it. For example if your application is testApp.exe
then the config file must be testApp.exe.config it mut also be in the
same directory as the application. -->
<configuration>
<!-- Register the section handler for the log4net section -->
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<startup>
<supportedRuntime version="V1.1.4322"/>
</startup>
<appSettings>
<add key="SerialQuestionID" value="1"/>
<add key="log4net.Internal.Debug" value="true"/>
</appSettings>
<!-- This section contains the log4net configuration settings -->
<log4net debug="true">
<logger name="Com.SriLogic.Qsurv.QBuilder.Gui.MainForm">
<level value="INFO"/>
<appender-ref ref="LogFileAppender" />
</logger>
<!-- Define some output appenders -->
<appender name="LogFileAppender" type="log4net.Appender.FileAppender,log4net">
<!--param name="File" value="c:\\error-log.txt" /-->
<file value="C:\\error-log.txt" />
<param name="AppendToFile" value="true" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] <%X{auth}> - %m%n" />
</layout>
</appender>
<!-- Setup the root category, add the appenders and set the default priority -->
<root>
<priority value="INFO" />
<appender-ref ref="LogFileAppender" />
</root>
<!-- Specify the priority for some specific categories -->
<category name="Com.SriLogic.Qsurv">
<priority value="INFO" />
<appender-ref ref="LogFileAppender" />
</category>
</log4net>
</configuration>
/**/
how can I fix this?
samitha
|
|
|
|
|
In my file I have my "logger" section defined at the end of the file under my "root" section. I think that yours might need to move down because it does not know the definition of the LogFileAppender before its defined. I can email you my file if you want too.
Steve Maier, MCSD MCAD
|
|
|
|
|
Hi all,
I came across a case in which a dll and html page are integrated to launch an application in IE and I have no idea of what it is. It is an URL as below,
res://C:\file-path\example.dll/page.html
in the registry setting of the Internet Explorer, so when the user right click the page text inside the IE, the context menu will have the example appliction menu item, and via it the example application can be launched.
So how is the example.dll and page.html are integrated in this case ?
And how can I create a example dll and html page like this to launch an application ?
Thanks
Patrick
|
|
|
|
|
Hi,
I am not entirely sure what is the best way to create these type of files, but I use a program called "Resource Hacker" (ResHacker.exe) - it is a freeware utility that allows you to read the resources from a dll. You can extract icons, etc...
The example that I would refer to would be the "Outlook Today" page within outlwvw.dll (in the standard office path), you can change the page that is displayed in Outlook by using Resource Hacker. Works really nicely. I am sure that there would be a way to insert a new HTML page for external access using this?
Hope this is helpful,
DJ
|
|
|
|
|
Thanks DJ,
But I would like to know how to create a DLL like this by programming in c# and how to contruct the corresponding html also.
Patrick
|
|
|
|
|
See my reply for how to embed HTML files (and other files) in a library, which has nothing to do with C#, BTW.
If you want to know how to construct HTML documents, you best pick up a book on HTML or learn by example and view source for other sites in additional to reading about the tags (don't just guess at what they do). This is not the forum to teach you about writing HTML (it's not considered programming since HTML is not a programming language).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks so much,
I know how to construct a html, but how can I construct a html page
with the dll with that it could launch an application in window ?
Patrick
|
|
|
|
|
You're using "construct" here a little liberally. Please be specific.
So you know how to construct the HTML page. I told you how to "construct" the DLL that contains the HTML page (same thing applies to images you might want to use in the page). As I mentioned, you can either create a native DLL project, embed the HTML page, then hack the .rc file; or you can open a managed DLL after you've built it (yes - every time after you build it in VS.NET) and embed the HTML with a filename for the ID property. If you use the command-line compiler you can use the /win32res (for csc.exe; /win32resource for vbc.exe) to embed a .rc file. Support for compiling native .rc files at compile-time (and embedding them at link-time) will be added in VS2005.
Now, if your question is how to "construct" (start/execute/etc.) a browse session using this HTML dialog, the answer I gave you already: the res: protocol, which is also documented in the http://msdn.microsoft.com/library[^].
Just like you'd specify a URL to a resource on the web, such as http://www.codeproject.com/index.asp, you'd specify the path to a PE/COFF executable (like a Windows DLL) - or, if the file's parent directory is in your PATH environment variable, just the filename will do - then the path to the resource using either it's name or ID like the following two examples:
res:
res:
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
page.html is an embedded Win32 resources in a DLL. This does not currently work for embedded manifest resources (i.e., ".NET embedded resources").
You do this by editing your .rc file (VS.NET 7.0 and 7.1 do not support this for managed code; VS 2005 will) or opening your .dll in Visual Studio and adding a resource as an RT_HTML resource. You can also use the command-line compiler (like csc.exe or vbc.exe for C# and VB.NET, respectively) with the /win32res: switch to embed a Win32 resource in your PE/COFF executable.
If you want to refer to the resource by name, you need to manually edit the .rc file and refer to the resource by a string name that is not defined in resource.h (or any header included by your .rc file), like so:
EXAMPLE.HTM HTML "Example.htm" The res: protocol is used to reference Win32 resources (this works for images and every other resources, too), so you simply refer to the DLL by name (if this DLL is in a directory specified in your PATH environment variable, you do not need to specify the path to the DLL) then / plus any directories then / and the resource name, like so:
res: If you have additional questions about hacking .rc files, please refer to the Visual C++ forums.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
how do i make installation kit ?
|
|
|
|
|
There are many ways of creating an installer. You could use the "setup and deployment" project template to create your setup. You could use a third party installer such as Install Shield, Wise, NSIS, etc.
Of course you have not said if it was for a web app or a Windows app. So some things might be a bt different for them, but overall its not that hard to make. Right now I prefer just making a setup project inside of VS and adding it to the solution.
Also if you want the installer to include the .NET redistributable inside of it, there is a plugin from Microsoft to let your setup project include the full .NET setup inside of yours. Each other installer system may or may not be able to include the .NET setup too.
Steve Maier, MCSD MCAD
|
|
|
|