|
When you use OwnerDraw, then you have to draw everything you want to see yourself,
including shortcuts.
Obviously you would still want to set the Shortcut property itself so it remains operational.
|
|
|
|
|
yeah i thought id have to but how can i do that?
after i draw the menuitem i did this
menuItem3.Shortcut = Shortcut.CtrlV;
menuItem3.ShowShortcut = true;
obviously that wasnt enough
so how can i do it???
thanks in advance
|
|
|
|
|
Hi,
use the same way you do the menu text itself, call Graphics.DrawString using a font, a color and a position of your choice.
|
|
|
|
|
and that would make it operational too? because the other problem is that it doesnt work when i do Crtl + S, it doesnt do anything
thanks i will give it a try hopefully i dont return here in a few minutes
modified on Friday, December 26, 2008 11:06 AM
|
|
|
|
|
well i still cant make my shortcut functional
now the text is correct "MenuItem3 Ctrl+S"
but when i set the Shortcut property Shortcut.CrtlS;
the menu starts blinking and still it doesnt work when i press the shortcut keys i set
|
|
|
|
|
hi,
i have a small question..
How can i add and access a ComboBox in dataGridView..
i means,how can i add new Lines in these ComboBoxes and check which line is selected?
thank you
G.
|
|
|
|
|
Admin887 wrote: how can i add new Lines in these ComboBoxes
You find the correct column from the datagridview's columns[^] collection (which is an instance of DataGridViewComboBoxColumn). Then on DataGridViewComboBoxColumn you have Items[^] collection or DataSource[^].
Admin887 wrote: check which line is selected
Through the Value[^] property.
|
|
|
|
|
Thank you!!
i am very appreciate your help
thank you again!
|
|
|
|
|
You're welcome
|
|
|
|
|
Ok, So I made Dlls in C# in the past but whenever I wanted to use those in another project it has to be in the same place as the .exe, I was wondering if I could story all my dll's in a separate folder from the .exe and still have the program work?
Thanks.
|
|
|
|
|
You need to subscribe to AssemblyResolve event of Appdomain class.
|
|
|
|
|
If you have strong-named assemblies (strong name consists of assembly name, version number, culture information, as well as, a public key and a digital signature) you can register them in GAC.
A couple of links to start from:
Global Assembly Cache[^]
Strong-Named Assemblies[^]
Regards,
Lev
|
|
|
|
|
Hello everyone,
I am not sure whether it is possible to setup a security policy like this with store procedure. The user account foo could only access database through store procedure, not possible to do other operations, like select/update on the tables of the database directly without using the store procedure.
My store procedure is doing some select/update job. My confusion is, as the user needs to use the store procedure and the store procedure is doing select/update job, then I have to grant the user to have select/update privilege of the database tables? Then the user could skip using the store procedure and select/update database tables directly which causes a security hole. My purpose is to let user use store procedure all the time, no walk around to access database without using store procedure.
Any advice to solve my probleme?
thanks in advance,
George
|
|
|
|
|
As long as security concerned a application users sql account should only have the execute permission on stored procedures and should not have any permission on tables. İf you gave the user execute permission there is no need to give specific permission on objects(tabkes views ets) that sp uses.
|
|
|
|
|
Thanks Tamer!
I have tested your idea. But met with a issue.
I created a new user which is using SQL Server authentication type. The user default database is AdventureWorks. I grant the user rights of execute one store procedure of AdventureWorks (the store procedure is used to query some specific table) and denied the select rights of the user to select the specific table directly (using table, permission, deny select permission in management sonsole).
But when I tried to use the user to login the management console (in order to test with execution of the store procedure and the select statement), I met with the following error when click login from management console. Do you have any ideas why?
TITLE: Connect to Server
------------------------------
Cannot connect to ..
------------------------------
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
regards,
George
|
|
|
|
|
i would like to be able to use multiple components in one place like tabs allow you to layer things and show when u click the tab open. i would like to do this without tabs instead using buttons. i have tried using usercontrol but i couldnt get it to go. if someone could lead me to an example of help me out in some way it would be greatly appreciated. thanks. callum
|
|
|
|
|
The natural way to do is it via the TabControl.
If you want to use buttons however, then one idea is putting buttons where you want your tabs to be, and use them to show or hide panels that are the different components you need...
|
|
|
|
|
is there any way to have a base panel in my main form then somehow import seperately made panels with all the components as everytime i have tried to use panels i end up droping them within each other. or to simply remove all the border and tabs from tab control?. btw thanks for the fast reply
got it (finally)
UserControl g = new UserControl1();
panel1.Controls.Clear();
panel1.Controls.Add(g);
g.Dock = DockStyle.Fill;
it always ends up being bugger all code -.-
modified on Friday, December 26, 2008 8:25 AM
|
|
|
|
|
Hi,
I'm trying to implement a drag-and-drop into a list box. The code is copied below.
The problem is that it works fine on my (development) computer but when I share the executable with my colleagues in the office (who're using XP), it doesn't work!
The DragEnter seems to be working (since the cursor changes), but the DragDrop doesn't work (the MessageBox doesn't show).
Can any one help?
Here's the code:
// when a user drags files into the list box
private void MyListBox_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.All;
else e.Effect = DragDropEffects.None;
}
// when a user drops files into the image list box
private void MyListBox_DragDrop(object sender, DragEventArgs e)
{
// display message
MessageBox.Show("Drag drop successful");
// pick filenames dropped into the list box
string[] sFileNames = (string[])e.Data.GetData(DataFormats.FileDrop, false);
}
Thanks!
|
|
|
|
|
Hi
I want to create a .net application in c# that permit me to get information about all available policies of my windows computer,but i can't able to do it.
Regards!
|
|
|
|
|
josenicolas wrote: but i can't able to do it.
Just what is stopping you?
|
|
|
|
|
i try to obtain this information using wmi, but i don't know what is the correct class.
someone said me that a wrapper of wnet permits me to obtain this information but i haven't found any information about it.
regards
|
|
|
|
|
How to solve this bug ?
thanks
|
|
|
|
|
A static constructor/initializer is throwing an exception.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I am using WebBrowser control and I want to save the loaded page from my application.
I am using following code.
webBrowser1.ShowSaveAsDialog();
This shows save dialog box but after that I want to add code whether user has clicked on Save or Cancel button. This method returns void so I am not able to decide what happend after showing dialog box. Can any help ?
Thanks.
|
|
|
|