|
my problem is,showing one arrow mark and plus sign in datagrid,if i click the plus sign means,the table come like tree node,then i click table means,then values are display from sql database with header name as new dataset.so i want to hide that arrow mark,plus sign and new dataset.how to hide these?i want only values display without that arrow mark,plus sign.
|
|
|
|
|
The Arrow you can get rid of by not showing the row headers, there is a property that you can set this, and the plus you can get rid of by only binding a DataTable to the datagrid, and not a DataSet. so instead of Datagrid1.datasource = dataset1 use datagrid1.datasource = dataset1.tables(0)
|
|
|
|
|
Setting permissions for new folders .NET 2.0 8mins ago
Hello,
I have seen the vb.net sample code on msdn for setting permissions for new folders (below), but still have some questions about it. I am writing a program that creates new folders, and sets permissions for the new folders. An Access database contains the permissions for each group. I have found very little information and examples for this subject. If anyone is familiar with security and the .NET 2.0 framework, I would greatly appreciate the help. Thank you for reading this message!
Imports System
Imports System.IO
Imports System.Security.AccessControl
Module DirectoryExample
Sub Main()
Try
Dim DirectoryName As String = "TestDirectory"
Console.WriteLine("Adding access control entry for " + DirectoryName)
' Add the access control entry to the directory.
AddDirectorySecurity(DirectoryName, "MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow)
Console.WriteLine("Removing access control entry from " + DirectoryName)
' Remove the access control entry from the directory.
RemoveDirectorySecurity(DirectoryName, "MYDOMAIN\MyAccount", FileSystemRights.ReadData, AccessControlType.Allow)
Console.WriteLine("Done.")
Catch e As Exception
Console.WriteLine(e)
End Try
Console.ReadLine()
End Sub
' Adds an ACL entry on the specified directory for the specified account.
Sub AddDirectorySecurity(ByVal FileName As String, ByVal Account As String, ByVal Rights As FileSystemRights, ByVal ControlType As AccessControlType)
' Create a new DirectoryInfoobject.
Dim dInfo As New DirectoryInfo(FileName)
' Get a DirectorySecurity object that represents the
' current security settings.
Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()
' Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(New FileSystemAccessRule(Account, Rights, ControlType))
' Set the new access settings.
dInfo.SetAccessControl(dSecurity)
End Sub
' Removes an ACL entry on the specified directory for the specified account.
Sub RemoveDirectorySecurity(ByVal FileName As String, ByVal Account As String, ByVal Rights As FileSystemRights, ByVal ControlType As AccessControlType)
' Create a new DirectoryInfo object.
Dim dInfo As New DirectoryInfo(FileName)
' Get a DirectorySecurity object that represents the
' current security settings.
Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()
' Add the FileSystemAccessRule to the security settings.
dSecurity.RemoveAccessRule(New FileSystemAccessRule(Account, Rights, ControlType))
' Set the new access settings.
dInfo.SetAccessControl(dSecurity)
End Sub
End Module
AR
AR
|
|
|
|
|
where I can download the SAP.net Connector set up MSI to use with Visual Studio .net 2005
|
|
|
|
|
sunder vel wrote: where I can download the SAP.net Conne
What happens if you type "SAP.net" into Google?
|
|
|
|
|
I am creating a progam for a client where I have to create a application that have a forex exchange on it but the problem is I have no code to create please help!!!!
Romeo
|
|
|
|
|
I take it you're talking about the The Foreign Exchange Market??
Help with what? Don't ask us to write code for you - that's just not going to happen. Why should we break a sweat so you can take credit for it?
|
|
|
|
|
It's been a very long time since I used that stuff, but, IIRC, no there isn't. You'd have to use a third party reporting library, like CrystalReports, to do this.
|
|
|
|
|
i have a software Written in VB.Net, i want to add two Buttons, i need to Write another vb.net application from scratch, is it possible to intergrade those buttons?
Vuyiswa
|
|
|
|
|
What do you mean by 'integrate' ? You can create controls and reuse them, yes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i want to add the button in a form, the application is already deployed.i want to add a functionality as a button in an exsisting Application.
Vuyiswa
|
|
|
|
|
Have you got the source code to the application?
If not is the application got support for scripting with VBA or VBScript?
If you have the source code, then modify it accordingly. If not, but the app has support for VBScript then hopefully then form is exposed to scripting engine so you can add controls.
If none of the above applies then I think you are out of luck
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Steven is correct. If you don't have the source code to the other app or it doesn't expose any kind of functionality to add controls, you're out of luck.
You can't add another control to a seperate application without pulling off some serious C++ and Win32-Fu. The technique is called "DLL Injection" and it can't be done using Managed Code.
|
|
|
|
|
can any one tell me
How to disable Ctrl P keys in vb.net ??
please help me out
thanks in advance
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
Ctrl P ? What does that even do ? Do you want to disable it in your app, or across the system ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Ctrl P ? What does that even do ?
It's usually the shortcut key combo to bring up the Print Dialog. Usually... With all the wacky people writing code now-a-days, who knows what it'll represet from one application to the next any more.
|
|
|
|
|
Christian's question needs to be answered in order to answer your question. Do you need this capability system-wide or just in your application?
|
|
|
|
|
It's funny how many people ask vague/unanswerable questions nowadays and never respond when you ask for more info....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What are the various aspects that can be considered to check whether my program is installed on the machine.
I mean if i am naming my setup as setup1 .... then it is possible to create an another setup which will have same name
in the control panel u will find
setup1
setup1
two times.
|
|
|
|
|
First of all, name your setup program after your application. Then, you shouldn't have any issues.
If I want to check if my app exists, I create a registry key within the app, that I can then check for on the machine.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank You
|
|
|
|
|
It is all based off the productcode and upgradecode. You can name your install programs both setup as long as you don't store them in the same directory and have separate setup projects for each.
Take a look at an article I wrote, it might be helpful.
http://www.codeproject.com/dotnet/Win_App_Setup_Project.asp[^]
Ben
|
|
|
|
|
Thank You
|
|
|
|
|
For Each dg As DataGrid In DataGrid1.DataBindings
Dim cb As CheckBox = CType(dg.Item.Controls(1), CheckBox)
If cb.Checked Then
Dim id As Integer = Convert.ToInt16(dg.Item.Text)
endif
the above code is vb.net windows application code.
when i run the above code,the following error is shown.
"Overload resolution failed because no accessible 'Item' accepts this number of arguments"
this error shown in dg.item (2nd and 4th line).this code is for edit.how to solve this.can u send other vb.net windows apllication code for edit a record in datagrid.
|
|
|
|
|
Your code all the way though assumes that it's cast operations will work. Write code that is more defensive, step through it in the debugger, and you will probably see what the problem is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|