Sunday, January 20, 2008

No createable public component detected.ActiveX DLL Project Doubt - VB 6.0

Question:
No createable public component detected.
Press F1 for more information.

Answer:
In VB 6.0, ActiveXDLL Project needs atleast one public class module and its instancing property is set to be " 5 - MultiUse ".
If the property is set as " 1-Private " means you encountered by the above error message.

With regards,
Francis Michael.

Friday, January 11, 2008

How to check the check box "Allow service to interact with desktop" programatically in .Net

Question:
For a Windows Service How to check the check box "Allow service to interact with desktop" programatically using .Net

Solution:
Its little bit tricky to do this. To achieve this you must deal with Windows Registry of the Local machine where exactly the Service is running. Add the following code snippet and call before the service OnStart() Method. Thats all!

Microsoft.Win32.RegistryKey seviceKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\YourServiceName", true);
if (seviceKey != null)
{
if (seviceKey.GetValue("Type") != null)
seviceKey.SetValue("Type", ((int)seviceKey.GetValue("Type") | 256));
}


With regards,
Francis Michael.

Wednesday, January 9, 2008

Windows Service Installation Error:

Question:
Exception occurred while initializing the installation:

System.BadImageFormatException: The format of the file 'App_Name.exe' is inval
id..
Solution:

If you try to use the InstallUtil.exe lower than the .NET version you used. At that time you encountered with this Message.

Tuesday, December 11, 2007

C/C++ Tips

Q: How to call a function without calling inside main() function in C/C++ ?

A:
#pragma startup [priority]
#pragma exit [priority]
These two pragmas allow the program to specify function(s) that should becalled either:
■ upon program startup--before main() is called,
or
■ upon program exit--just before the program terminates through _exit
■Function must be declared or defined before the #pragma line reached.

Example:
#include
void f(void);
#pragma startup f
void main()

{}
void f()
{
printf("i'm called before main()...");
}

Happy Programming!

Sunday, December 9, 2007

Web Technologies

What is J2EE :
Acronym for Java 2 Platform Enterprise Edition. An application server framework from Sun Microsystems, Inc., for the development of distributed applications.
What is .Net:
The set of Microsoft technologies that provides tools for connecting information, people, systems, and devices.

Wait Guys!
I'll Get back with lot of contents ;-)

Saturday, December 8, 2007

VB Crystal Reports Doubts

Answer
hi
my problem over. i got "Runtime Error: 20728" With a Single letter "F"?. Its because of lower version of file crystl32.ocx and crpe32.dll.
Thx for your reply.
With regards
Question
hi
In VisualBasic, i got "Runtime Error: 20728" With a Single letter "F"?.