|
A dropdown button is a normal button with a separate section on the right (or left) side with an arrow image. When you click on the arrow, a little dropdown container pops open. The container can provide other options related to action performed by clicking the button.
:josh:
My WPF Blog[^]
|
|
|
|
|
The Infragistics NetAdvantage suite has the UltraDropDownButton control. Other than that, there's no dropdown button control in WinForms that I know of.
:josh:
My WPF Blog[^]
|
|
|
|
|
I am using Microsoft visual studio 2005
Now Bussiness objects provide 3 different kinds of merge modules....
1-> Crystal Report for .Net Framework 2.0 x86 Redistributable package(32 bit)
2-> Crystal Report for .Net Framework 2.0 IA 64 Redistributable package(64 bit)
3-> Crystal Report for .Net Framework 2.0 x64 Redistributable package(64 bit)
Now i am not able to figure out which modules will suite my application.
Can any one help me in figuring it out.
How to find wheather my .net framework is x86 (or) IA 64 (or) x64.
Thank U.
Jats
|
|
|
|
|
Hi,
I am hosting a browser control(framework 2.0) in a form of fixed size. Control is docked as fill in the win form.
The control navigates to some url and displays the web page. Now if the web page size exceeds the win form size scrollbars appears.
I want to calculate the complete height and width of control(complete scrollable height and width). Let me know how i can do it.
Note that i can do it using the HTMLDocument's scrollheight and scrollwidth properties but the problem is it returns correct values only when the height and width are specified. Correct values are not guaranteed through it.
Thanks,
Yash
|
|
|
|
|
Why can’t we use Exception class for handling all exceptions. Why do we use specific calsses like Arithmetic Exception, IOException etc...
Thanks
Simha
simha
|
|
|
|
|
...you can like this (C#):
try
{
}
catch (Exception ex)
{
}
But all you get is a signal if anything fails. By using different exception types, you can perform different actions when failure occurs.
try
{
}
catch (ArgumentException ex)
{
}
catch (IOException ex)
{
}
Regards,
Rob Philpott
|
|
|
|
|
You should however have a blanket catcher at the end of your highest level catch blocks to do a clean shutdown when an unanticipated error occured because the app could've ended up in an incoherant state.
|
|
|
|
|
This works because all the other exceptions inherit from System.Exception (although, not directly). A child exception should be listed before its parent in a list like above. Lets say I made two custom exceptions:
BadDataException
and
BadIntegerException : BadDataException
A BadInteger is a specific kind of BadData so I have it inheriting from BadData. This means I have to option of catching any BadData and doing something or:
<br />
catch (BadIntegerException)<br />
{<br />
}<br />
catch (BadDataException)<br />
{<br />
}<br />
which would do something if it were an integer, but something else if it were a different kind of bad data.
This:
<br />
catch (BadDataException)<br />
{<br />
}<br />
catch (BadIntegerException)<br />
{<br />
}<br />
Is bad because an BadIntegerExceptions that get thrown will be caught by the first catch and the code in the second block will never get executed.
|
|
|
|
|
It does make sense to me that it would, but when I have multiple assemblies that examine the (TraceLevelSwitch), which is configure for a different value in each assembly. However, they all seem to operate on the same value, rather than the one configured in the individual .config files.
Detail:
Assembly A - .dll
Assembly B - .dll
Assembly C - windows forms app .exe
All assemblies use the following code:
private static System.Diagnostics.TraceSwitch _TraceLevelSwitch = new System.Diagnostics.TraceSwitch("TraceLevelSwitch", "Tracing level");
All assemblies seem to pick up the value for Assembly C, which runs/loads first.
Anyone got some insight into this?
|
|
|
|
|
.DLL's can't have their own config files. They'll always use the .EXE's config in which their running.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I was afraid of that.
Perhaps I could use different explicit switches in the main app's .config?
Thanks for the reply.
|
|
|
|
|
The configuration is on the AppDomain level. If you're bonkers enough you can create a new appdomain, set its base directory/config file path etc, load your satellite assemblies in to that, and call them dynamically, but its a rubbish idea and I wish I'd never said anything now.
Regards,
Rob Philpott.
|
|
|
|
|
No Worries.
By constructing the key (value) name at run-time, based on the assembly name, I can control the behavior of each assembly individually from one .config file, which is a better solution anyway.
Thanks for the info.
|
|
|
|
|
|
My application needs to detect the insertion of a USB memory stick and get the device path of it.
I've wrote:
/* treat lParam a pointer to a standard structure DEV_BROADCAST_HDR */
lpdb = (PDEV_BROADCAST_HDR)lParam;
/* check the type */
if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME)
{
But I'm not sure if USB mass storage class is DBT_DEVTYP_VOLUME or DBT_DEVTYP_DEVICEINTERFACE.
Anyone, please help me.
|
|
|
|
|
I am writing a client application that will have its own database, all the modifications takes place in that database. I want to synchronize this database with the main database residing on Server machine.
I am using SQL Server Database.
I'm struggling to find anywhere some recommended techniques for synchronizing two databases.
Can somebody send me some links that discusses some of these ideas in detail?
Thanks
.Net Programmer, Software Engineer
|
|
|
|
|
Check out these guys:
Red Gate
Unfortunately, I have not found any free solutions. However, Red Gate is 250-500$ where others are 25,000$-50,000$.
If anyone knows of any good SQL Comparision tools for FREE please post those links here!!!!
Fred
fred[at]eastpointsystems.com
|
|
|
|
|
I am thinking about migrating an existing application from J2EE to .NET as an exercise to help learn some of the less conventional enterprise features of .NET and related technologies. Let me mention a few unconventional things I did in J2EE and then get to my question about how I might port these unconventional ideas to .NET.
First, the application is basically middleware. There is no user interface except a web service (or 2 or 3) on the front end. Second, the goals for the application include efficient memory use, low bandwidth, modularity (as in independently deployable apps that discover each other at runtime), and vendor independence. I don't give a hoot about scalability. This is all living on the same machine.
The application receives xml data from several sources at regular and irregular intervals. Separately, clients call a web service to retrieve a filtered set of the data. I've decoupled the client's web service call from receiving the data from the sources so that the client is not impacted by the availability of the sources. The data is kept in an in-memory cache, and I use an xpath/xquery engine to retrieve the data. I don't care about persistence in a database because the cached data is completely replaced over the course of 10 - 120 minutes anyway. And I don't want to spend time installing, configuring, and maintaining a database, not to mention wasting processor, bandwidth, and disk space to send information to it when persistence is so irrelevant.
The unconventional things I did include:
* creating a J2EE-blessed container-managed single instance of an object to hold the memory cache by taking advantage of the MBean feature. I could have used an entity bean, but those god-awful things are anything but vendor-neutral when it comes to deployment.
* take advantage of the J2EE container's management to pass object references between modules (session beans and wars) so that objects aren't copied to the stack. I found that without this feature, the app was so busy putting data on the stack that the garbage collector had no time to run, and the JVM kept running out of memory. Now it uses hardly any memory at all and is blazing fast.
So, what I want to know is:
1. Does the .NET framework allow me to create a single instance of an object that multiple assemblies can access? If so, can someone point me to a reference for doing this?
2. Does the .NET framework allow me to pass objects by reference between assemblies and/or COM+ components? I mean truly by reference to achieve a similar effect as bullet 2 above, not simulated reference via marshalling. If so, is this achieved by a particular attribute or C# keyword?
3. Is there a good reference on doing some serious tricks with enterprise development using .NET? I'm not talking about the 3-dozen shopping cart/course catalog books that are easy to find. I'm talking about some of the less-used, less-conventional, domain-agnostic tricks.
Thank you!
|
|
|
|
|
How do you get an HWND handle inside a Form object in C++, VC2005 ?
Thanks
swine
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
It's the .Handle property, I believe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Is it a HWND type? I get a compiler error saying:
Error 3 error C2440: 'type cast' : cannot convert from 'System::IntPtr' to 'HWND'
My code is:
HWND h = (HWND)Handle;
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
I'm not sure how to do that conversion, but I've passed the Handle in from C# when I make pinvoked API calls and it's worked fine.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
That's great but here it doesn't work.
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
To verify that the Handle property really contains a HWND:
MSDN quote:
"Syntax
public IntPtr Handle { get; }
Property Value
An IntPtr that contains the window handle (HWND) of the control.
Remarks
The value of the Handle property is a Windows HWND. If the handle has not yet been created, referencing this property will force the handle to be created."
---
b { font-weight: normal; }
|
|
|
|
|
If form was your form object, try:
(HWND)form.Handle.ToPointer()
|
|
|
|