|
Problem!
I want to show some icons against menu items just like when we open Msword in its File menu there is different icon to the left most of each menu item . How to achieve this any help or idea.
Thanks In Advance
|
|
|
|
|
Visual Studio .NET 2005 (beta) provides MenuStrip control for this.
You need to handle the DrawItem event of the menu and set ownerdraw property to true (sorry I don't know the details. google for owner drawn menu with bitmap)
If you don't come up with the solution then google for VolveNet Menu Extender
|
|
|
|
|
Hello!
I am sorry if I am unable to state my problem clearly.
I am using an SQL Server 2000 database for my .NET Windows application(VB/C#).
My main MDI form has a large number of menus and options.
Do I use a table in the database for maintaining the users and their encrypted password and other details?
i.e User ID, Full Name, Password, Working Shift, Email Address etc.
OR
I must use SQL Server logins and roles?
If I use the first approach my triggers and stored procedures will not be able to utilize the User_Name() SQL Server function for logging the User transactions.
If I use the second approach, then, where do I store the detailed information about the user (i.e infomation about the user as in Windows Active Directory for a domain)
In most of the forms in my application each form is related to a single table of the database. And each of those forms performs Update, Insert, Delete operations on the table.
How do I enable/disable the Insert, Update, Delete buttons on my form accoring to the user permissions on that table?
Does SQL Server's Application Role have something to do with my problem?
And
How do I use the Application Role best.
I hope you understand my problem.
Anticipating a quick reply.
Thank you.
-- modified at 8:23 Thursday 13th October, 2005
|
|
|
|
|
You can do whatever suits your application best, but it's typical in large application settings with lots of users to have all access to the database take place through a small number (or one) login. Doing so has certain administrative benefits as well as performance benefits to the database server (wrt connection pooling, and cacheing commands).
If you're interested in doing declarative security, I would recommend checking out the IPrincipal interface and the classes that inherit from it. If you're writing a WinForms application, you may be able to take advantage of the WindowsPrincipal to leverage your AD security without making a lot of concessions. If that's not an option, you can make your own Principal, and roll your own authentication scheme as well. Either way, the Principal is a built-in authorization structure in .Net.
Best of luck.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
How can I create a standalone .EXE file for my Windows Application, and the installation files for this application?
Thank you.
|
|
|
|
|
Not easily. The only langauge in vs.net that will produce native code directly is unmanaged(normal) c++. There are a few 3rd party tools that will compile the IL produced by the other .net langauges into an executable but they're all afaik expensive.
|
|
|
|
|
It is theoretically possible but what possible application would there be for doing such a thing? Not only would your application have to be "compiled" again but all subsequent assemblies have to be sucked in. You'd either end up with a very large executible or a complete duplication of the .Net Framework in a C runtime format.
You could ask the same thing about VB 6 to C and note no one does this. The possible advantages of changing runtime formats is way outweighed by the complexity of doing so.
|
|
|
|
|
can anyone tell about implementing mobile and intelligent agents in C#
|
|
|
|
|
Hi
I'm trying to work out how to nest datagrids. The parent child way that is supported by default is a little bit limited for my needs.
Here is an image of what i'm trying to do, I quickly photoshopped this together so theres no drill down buttons and lines showing the hierarchy.
Example
I also need to add things like combo boxes to certain columns (which I think I can do) I'm fairly new to windows forms, so I don't know by way around very well. I can find tons of stuff for ASP.NET but thats not helpful for my windows app. i'm trying to do this in C# using .NET 1.1
The data that goes into this datagrid comes from a join between two tables. Its a shame you can't write windows forms in HTML and CSS and it generates a windows interface from that
|
|
|
|
|
Hi Everyone,
Does anyone know if there exists Assemblies in .Net 1.1 with which I can do load balancing on a server app that accepts TCP connections?
Thanks and Cheers!
Phi?
|
|
|
|
|
As far as I know, load balancing is not done at the software application level. If NICs are load balanced they should automatically balance the traffice between the merged NICs. When you send traffic using .NET the load balancing should be auto handled.
|
|
|
|
|
Raheem is correct. Applications are not expected, nor recommended, to do their own load balancing. This is best left up to the server/network level. Your application must be written with load balancing in mind, though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
When the treeView control's nodes are right-clicked,
the selectedNode of the treeView won't be changed unless
it is a left-click mouse event.
My problem is that I associated context menu to the tree
nodes, so user just right click the node to use the context
menu, however the selectedNode isn't the node that the context menu
is launched.
So how can I set the selectedNode to the node that is right-clicked ?
Thanks
|
|
|
|
|
Hi!
You could catch the MouseUp event and then use TreeView.GetNodeAt() to get the node the mouse is over currently.
Regards,
mav
|
|
|
|
|
Excel enables the creation of user-defined functions that can be used in Excel formulas. So I use these code to create a COM introp.
-------------------------------------------------
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace AutomationAddin {
[ClassInterface(ClassInterfaceType.AutoDual)]
public class MyFunctions {
public MyFunctions() {
}
public double MultiplyNTimes(double number1,
double number2, double timesToMultiply) {
double result = number1;
for (double i = 0; i < timesToMultiply; i++) {
result = result * number2;
}
return result;
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type type) {
Registry.ClassesRoot.CreateSubKey(
GetSubKeyName(type));
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type type) {
Registry.ClassesRoot.DeleteSubKey(
GetSubKeyName(type), false);
}
private static string GetSubKeyName(Type type) {
System.Text.StringBuilder s =
new System.Text.StringBuilder();
s.Append(@"CLSID\{");
s.Append(type.GUID.ToString().ToUpper());
s.Append(@"}\Programmable");
return s.ToString();
}
}
}
-----------------------------------------------------
And set project build property,checked output item,register COM interop.
Building the project,that's success.
Launch Excel and choose Add-Ins from the Tools menu to display the Add-Ins dialog. In the Add-Ins dialog, click the Automation button. But I can't find the class I created by looking for AutomationAddin.MyFunctions in the list of automation servers.
What's wrong? Please help me !Thanks,by the way,My development tool is VS2005 ,Office 2003 (sp2)simply chinese.
|
|
|
|
|
Hi guys,
I want to ask a question about diabling a control.
I have to select boxes, regions and areas. And a text box that represents a unique ID.
Now I only want the user to search either by location, or by unique ID. So if the user selects a region, all the areas for that regions are loaded in the area select control. Then, in the same process, it should make the textbox ReadOnly (so that no data can be entered), which works fine. But my problems comes is, if the user starts to type in a unique ID, then it should disable the 2 select boxes. If the textbox is cleared, then the 2 select boxes are enabled again.
I'm not sure if there is an event that checks for this? I think there is an event for the textbox something like text changed, but this doesn't work when I start typing in text, probably because it doesn't make a trip to the server. Is my only option for this via Javascript? Or can I do this on the server? I'm using C#.
Regards.
-- modified at 3:23 Thursday 13th October, 2005
|
|
|
|
|
Unfortunately for right now, if you're wanting to do real time text checks on the web page then some type of Client side script (such as Javascript) is your only option. The only way for the server to manage this is for the page to postback to the server every time the user presses a key in the textbox, which would keep them from typing more than say.. 3 words per minute.
|
|
|
|
|
ma se wrote: but this doesn't work when I start typing in text, probably because it doesn't make a trip to the server.
That's exactly why. ASP.NET is a server-side only technology designed to generate HTML for browsers. It's can't interact with the client in real-time.
ma se wrote: Is my only option for this via Javascript?
Yep. JavaScript is your only option if you want cross-browser compatibility.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
I have written a user control and on its Load and Resize event i have aligned an activex control as follows
AMC.Location=new System.Drawing.Point(this.Location.X,this.Location.Y+26);<br />
AMC.Size= new System.Drawing.Size(this.Size.Width,this.Size.Height-40);
The problem is with AMC.Lication
one problem is when i am using the user control,if its (AMCs) Location.X is set to Location.X of its parent (user control) + some value whjich doesnt make sence as i have set it to this.Location.X only
what more is bothering is
i am creating 3 instances of this user control in my form and by calling the statement
AMC.Location=new System.Drawing.Point(this.Location.X,this.Location.Y+26); it is setting Locatin of each of the AMC to the locatin if first instance, the prob. is not with ActiveX AMC because i have tried it with a Label as well an the probleaim is still the same
please help me
Regards,
Arus
-- modified at 1:56 Thursday 13th October, 2005
|
|
|
|
|
Hi all,
How can we know that the Richtextbox is scrolled up or down?
can we get these events separately?
i need to do two separate things in
these events.
It would be great if anyone of you could help me
Thanks and Regards,
Pramod
|
|
|
|
|
Hi!
You'll have to override WndProc for this and scan the messages for WM_SCROLL and related messages.
Regards,
mav
|
|
|
|
|
Hi !
Please for me a exemple : Send Pack Data from Server To Client In C# by Tcp Socket programing ?
EX :
Data pack :
+ CodeStudent
+ NameStudent
+ MarkStudent
How do you Send Data pack this from Server to Client ?
After that Show Data Pack this !
Please Send your result for me by Email :
My Email : dlugroup@yahoo.com
Thanks ! ! !
Please help me !
-- modified at 0:41 Thursday 13th October, 2005
|
|
|
|
|
Or....Not. We're not in the business of answering homework problems here. If you have a question once you've started, feel free to ask...but you need to show some work before we're going to start helping you.
Picture a huge catholic cathedral. In it there's many people, including a gregorian monk choir. You know, those who sing beautifully. Then they start singing, in latin, as they always do: "Ad hominem..."
-Jörgen Sigvardsson
|
|
|
|
|
What is the best way to handle an invalid input?
void DrawComplexNumber1(Graphics g)
{
Pen p = c_xy.GetNextPen();
p.DashStyle = DashStyle.Dot;
c_xy.SetOrigin(xIndent + graphRect.Width/2, yIndent + graphRect.Y/2);
cmplxValue1.Real = Convert.ToDouble(textComplex_1Real.Text);
//wHAT IF INVALID? need CODE
cmplxValue1.Imaginary = Convert.ToDouble(textComplex_1Imaginary.Text);
//WHAT IF INVALID? need CODE
g.DrawLine(p, 250, 250, (float)(250 + (xIndent * cmplxValue1.Real)), (float)(250 - (yIndent * cmplxValue1.Imaginary)));
}
thanks a lot....
|
|
|
|
|
Hi all,
I'm trying to implement a view of a grid simliar to a view that you would see on an AS400. The same data is display for all views, but the columns (left to right) change based on the view selected.
grid col 1,2,3,4,5,6,7,8,9,10
user changes to view based on #4
4,3,2,1,5,6,7,8,9,10
user changes to view based on #8
8,9,10,1,2,3,4,5,6,7
I hope this defines it accurately. Same data, same columns, same table, same dataset, just juggle the columns around based on a user defined criteria.
Any help at all would be greatly appreciated!
BTW, I'm new to C# so URL's, references to help text, etc. is greatly appreciated as well .
TIA
|
|
|
|
|