|
Yeah, I figured I was going to have to do something ugly like that.
Thanks tho.
Simon
|
|
|
|
|
Visual themes are a different sort of beast. There are themes installed on your system that define way more categories of representations than SystemColors , and if you want to use themes you have to owner-draw these on your controls yourself. .NET 2.0 makes this fairly easy for controls in the base class library (BCL). For your Windows Forms application's entry point, use the Application.EnableVisualStyles() method like so:
class Application
{
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new MainForm());
}
} If you want to draw themed text, borders, etc., on your owner-drawn controls, read Rendering Controls with Visual Styles[^] and Custom Control Painting and Rendering[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Cheers, that really helps.
Simon
|
|
|
|
|
I am facing a very rigid problem. Project requirement is to integrate NUNIT with Crystal Reports and then write NUNIT Test cases for each Crystal reports designed... Please help me in integrating NUNIT with Crystal Reports And afterwards in writing NUNITs for the same
Harshal M Nemade
|
|
|
|
|
how to use a WMI Provider to monitor chat application...
how to insert a Provider in chat application...
kim
|
|
|
|
|
|
Hello All:
I was able to create a package .EXE & MSI. But on the installer I want to add some checking on the target machine if it has .NET Frame work install or not. If target machine had .Net Framework install skip,and if it does not have .Net Framework then install it. Please help
Thanks in advance.
Eyungwah
|
|
|
|
|
Try using NSIS. It's a scripting system used and developed by the winamp team.
company, work and everything else @ netis
|
|
|
|
|
Hello!
Im trying to write a deployment project in VS.net 2005.
What Im trying to do is this.
Take the target installation path and write this string value to the registry.
I just cant figure out how to do this. I know how to write to the registry, but somehow I need to get the target path and write this parameter to the registry.
Very thankfull for any help.
|
|
|
|
|
The VS deployment projects aren't very flexible. You might be better off using WiX[^]. That said, you can use [TARGETDIR] for your registry value in most cases. If you're trying to write the exact location of a file you can use the notation [#filekey] but that where things get difficult, since the VS.NET deployment projects don't show you the component, file, registry, etc. key names (the deployment projects compile into .msi files, which are relational databases processed by Windows Installer).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello!
Thanks for your answer!
I found out [TARGETDIR] right after I posted
What is WiX and where can I find it?
Best regards!
|
|
|
|
|
|
It looks promissing I must say!
Does this integrate into VS.net?
|
|
|
|
|
If you create your own project installer (System.Configuration.Install.Installer), you can easily get the install path by just using reflection on the executing assembly. Here is some code I use to do this in my installer:
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
string baseAppDir = (new System.IO.FileInfo( asm.Location )).DirectoryName;
RegistryKey softwareKey = Microsoft.Win32.Registry.LocalMachine
.OpenSubKey( "Software", true )
.OpenSubKey( "Company Name", true )
.OpenSubKey( "Application Name", true );
softwareKey.SetValue( "InstallLocation", configFilepath );
Keep in mind that I added a registry value in setup project that creates the HKLM\Software\Company Name\Application Name\InstallLocation key with some default or empty value. The setup project actually creates the keys you specified in the registry editor part of the setup project before it calls your code in the Installer class.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
hi,
how i can apply transaction on a dataset ?
|
|
|
|
|
neerajxp wrote: how i can apply transaction on a dataset ?
A dataset is a disconnected set of data. There is nothing to transact against.
|
|
|
|
|
I have successfully used binary remoting with an object containing generic signatures on its public methods on XP development machines.
I am trying to implement the client web site and the serving remoting site on a Windows 2003 server.
I am finding that methods without generics work fine, but ones with generics are failing.
There appears to be a problem with handling the declared class instance as T. Again, on an XP machine this works fine.
Here is an excerpt from my remoting web config.
"
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
"
Here is an excerpt from the web client web config
"
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
"
Here is the code that makes the remoting call
"
IDataService obj = RemotingServices.Connect(typeof(IDataService),
ConfigurationManager.AppSettings[WebConfigContants.REMOTINGSERVERURL]) as IDataService;
"
The exception I get back on the web site client is to the effect
"
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Remoting.RemotingException: The argument type 'MyDomain.MyDomainClass' cannot be converted into parameter type 'T'.
at System.Runtime.Remoting.Messaging.Message.SoapCoerceArg(Object value, Type pt, Hashtable keyToNamespaceTable)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectFromSoapData(SerializationInfo info)
at System.Runtime.Remoting.Messaging.MethodCall.SetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Remoting.Messaging.MethodCall.RootSetObjectData(SerializationInfo info, StreamingContext ctx)
at System.Runtime.Remoting.Messaging.SerializationMonkey..ctor(SerializationInfo info, StreamingContext ctx)
--- End of inner exception stack trace ---
Server stack trace:
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
"
Any suggestions would be most welcomed.
Luke Hammond
|
|
|
|
|
Remoting web config should read
<system.runtime.remoting>
<customerrors mode="Off">
<application>
<channels>
<channel ref="http">
<serverproviders>
<formatter ref="binary">
<service>
<wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objecturi="DataService.rem">
Client web site config should read
<system.runtime.remoting>
<application>
<client>
<wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces">
<channels>
<channel ref="http" usedefaultcredentials="true">
<clientproviders>
<formatter ref="binary">
|
|
|
|
|
O.K. I need to use preview and figure out what is happening to my text
Here is the remoting config
system.runtime.remoting
customErrors mode="Off"/
application
channels
channel ref="http"/
serverProviders
formatter ref="binary"/
/serverProviders
/channels
service
wellknown mode="Singleton" type="MyApp.DataServices.DataService, MyApp.DataServices" objectUri="DataService.rem"/
/service
/application
/system.runtime.remoting
And here is the web site client config
system.runtime.remoting
application
client
wellknown url="http://localhost:##/MyRemotingVirtualDirectory/dataservice.rem" type="MyApp.DataServices.Interfaces.IDataService, MyApp.DataServices.Interfaces"/
/client
channels
channel ref="http" useDefaultCredentials="true"
clientProviders
formatter ref="binary"/
/clientProviders
/channel
/channels
/application
/system.runtime.remoting
|
|
|
|
|
Hi all,
I have to make a application for synchronous and Asynchronous socket communication so right now i am able to Asynchronous socket by AsyncCallback
function but i am unable to synchronous socket so please tell how can i cretae synchronous socket in .net framwork.
if any body have idea please share with me.
thanks
bankey
|
|
|
|
|
I have a requirement to draw a rectangle and a line on a the
container control and sometimes as i move the mouse the drawing must
occur on top of user controls and other controls, which are placed in
the container control...
I'm using System.Drawing namespace (C#) to perform the drawing.
But as i move the mouse and draw the rectangles, the drawing takes
place behind the user controls....I have a requirement to draw the
shapes on top of the controls...
Please helppppppp
|
|
|
|
|
The controls will always be drawn on top of your rectangle because your drawing on the container the controls are in.
What you need to do is draw on the controls themselves when appropriate.
You can do this by handling the controls paint event.
Simon
|
|
|
|
|
I can call JavaScript functions from my C# dll, but I was hoping I could send information via function calls from the javascript back to me C# dll.
I can not find anyway to do this. Please let me know where this information would be at in this great web of ours.
Thanks
|
|
|
|
|
Hello
You can call C# functions from javascript using XMLHTTP calls ...I think you can use Mschwarz ajax library( http://weblogs.asp.net/mschwarz/ )
Cheers
Navaneeth!!
|
|
|
|
|
As has already been suggested, you can use AJAX, but if you just want to post back user input, you can also just set the value of hidden fields using your javascript code. Just register a hidden field in your form by some name that will be known both in your javascript and your server side C# code. Then have javascript obtain that field by using document.getElementById and set its value to whatever you want. Then, when the page gets posted back, you will have access to the value that was placed in that field.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|