|
Thank you...it's working.
|
|
|
|
|
hi ALL,
1)can anyone plz tell me how to disable the "property sheet" of any files..
When we right click we will see a context menu with the last one as properties.. which will display a set of properties such as General, Security etc. i want to disable this sheet...
2) how to disable the read only property of a file ... .
I need the registry keys for the same...
help me plz...
Proud To Be an Indian
|
|
|
|
|
There are no registry keys, you cannot stop windows from doing this, at least, I can't imagine how without writing what would essentially be a virus.
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 )
|
|
|
|
|
its not for a virus . .. i agree that some will be using that but u know i need it my client. They want me to create an Undeletable file . .. There are keys which can disable Sharing, security. Even SYstem properties can be dsabled .. .
so plz if anyone know plz tell me
Proud To Be an Indian
|
|
|
|
|
vivekphlp wrote: They want me to create an Undeletable file
Even stuff in the System32 folder is deletable - and that will break your system if you delete the right files.
One way would be to create a windows service that opens the file and keeps it open. This would ensure that the file could not be deleted (you cannot delete a file if a process has opened it)
This has some drawbacks.
No other process can open the file with exclusive access.
If the windows service were to be stopped then the file would be deletable again. (This is very easy to do)
|
|
|
|
|
it was possible if there was 2 user accounts - the clients insist to have only one USER - that too {{ADMIN}} . . .
Proud To Be an Indian
|
|
|
|
|
vivekphlp wrote: it was possible if there was 2 user accounts
What do the number of user accounts have to do with it?
vivekphlp wrote: the clients insist to have only one USER - that too {{ADMIN}} . . .
They are going to be disappointed because Windows requires other accounts for itself. Most notably the System account (which has greater rights than Administrator)
|
|
|
|
|
Your client is a retard. It's not possible to have a file that cannot be deleted. There are ways to fight the user trying to delete it, but you can't make it impossible. You can make it hidden, but you can't stop them from deleting it when they find it.
One possible solution, is to store a copy of the file in another location, and when your program runs ( or a service perhaps ), it copies the file back if it was deleted. But, you can't stop users from finding both files and deleting them, either.
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 )
|
|
|
|
|
Hi all,
Iam using a client application developed in c# that connects to a webservice in a remote server.I have set the Client protocol version to 1.0 in the client application. The code is
protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest) base.GetWebRequest(uri);
webRequest.ProtocolVersion = System.Net.HttpVersion.Version10;
return webRequest;
}
I compiled the application connecting to the webservice in the remote server.
But when i viewed the HTTP post info using Ethereal the POST info displayed was
HTTP POST/xx/xx.asmx HTTP1.1
RequestMethod:POST
RequestVersion:HTTP/1.1
Iam using the protocol version set to 1.0 in the code but the application is still using HTTP 1.1.Why?
Can anyone help me resolve this issue.
Any help will be appreciated.
Thanks
Ramya
|
|
|
|
|
I tried MSDN DatagridView CalendarColumn sample for entering dates to DataGridView columns.
This control does not allow to set column to null value.
I set ShowCheckBox = true but null value is not stored to grid column.
How allow users to select date OR null value in DataGridView ?
I need to enter whole date form keyboard using as few keystrokes as possibe.
After entering two first digits of data this control requires pressing right arrow for entering next two digits.
How to enable entering whole date without using additional keys ?
Andrus
|
|
|
|
|
Hi!:
I have created a usercontrol with one textbox and a button, and I need this control to be loaded in the datagridview. In a cell the value is the text property of the textbox. I have seen some examples but with the keyboard and the focus have problems. (There are answers in some links by Mark Rideout and Zhi-Xin Ye, but not a complete example running with the keyboard).
Any complete code example?
Thanks
|
|
|
|
|
hello i'm making a database based windows application
so now i can't know the best way to present data :
1- there are some forms like users ... i prefere to put them in a data grid and 4 sure to edit them i made another form, so double click on the name on the liste and then edit in the next form.
2- there are forms like receipt,facture, ...
there are an identifier and i have a lot of , so i can't use data grid ...
i don't feel that my ways are user friendly ...
what do u think the way to use? can anybody helps me ???????
thanks
|
|
|
|
|
Normally when you are developing a windows based application, there are certain set of rules that can be followed for and effective presentation:
1) Always go for a parent-child window forms concept i.e. MDI windows, this will help you to connect the complete flow from single source.
2) Always try to minimize the number of window forms needed for one use, i.e., use only one form for one module for eg. if you are working on the User admin module of the app, wherein u can add and modify users, it is a better idea to put the data in grid and allow for modification/deletion/and addition in the grid itself, it will optimally use the available form space and will leave enuf room for future changes
3) Group related controls together using a group box for e.g. buttons together, and other fields togther.
4) Use same font and color settings thruout the app
5) Hide unnecessary details from the user.
|
|
|
|
|
thanks man
but u didn't tell me how to acess data of recepts and factures ! where the number is a auto increment number
|
|
|
|
|
Hi,
I've encountered a problem where windows preempts for 16ms on a very simple code i'm running.
In order to check it out I've written a simple code :
while (1)
{
int t = timeGetTime();
Sleep(1);
printf ("%d,",timeGetTime()-t);
}
the result i got where interesting - on some machines i got 1-2ms and on others 16ms.
all machines run XP with no processes running in the background.
I've tried running the same process in real-time and in normal mode - the results where the same.
|
|
|
|
|
The code you have written would try to consume 100% of your CPU. When the windows system needs some CPU time it will pause your program and use the CPU. You can set your program to be a higher priority, but I wouldn't suggest that. I guess what I am wondering is what are you trying to accomplish?
Ben
|
|
|
|
|
The parameter specified is not the actual time slept, but is the MINIMUM time that the thread should sleep. It's possible that the thread will sleep longer than the time speicified. Also, this is the minimum time that the thread will return to the ReadyToRUn state. It doesn't mean that the thread WILL run at the end of that time.
Also, if the interval speicified is lower than the resolution of the system clock, the minimum time a thread will sleep IS the resolution of the system clock.
I suggest checking out the docs on the Sleep[^] function.
BTW, the "no processes running in the background" thing doesn't mean anything. Windows has can have over 150 threads running at the same time before you even see a Desktop. These are grouped into many different processes that are needed just to run Windows. So, this statement is actually false and quite impossible to achieve.
|
|
|
|
|
Thanks,
nevertheless, i see consistent behavior - on some machines i see 1-2ms and on others 16ms.
the reason i did that experiment is that i have another simple code, without the sleep
that preempts on some machines to 16ms and on others 1-2ms.
this behavior is consistent.
|
|
|
|
|
So? Link the documentation said, it's system dependant. You have zero control over this. The Sleep duration specified is only specifies a requirement for the MINIMUM time that the thread must sleep, subject to many factors. There is nothing you can do to make the thread sleep for EXACTLY 1 to 2 ms.
|
|
|
|
|
Hi
I have a composite (complex) CustomControl in VB.NET.
In the *.Designer.vb file a control is set to a Settings value:
Me.nudtags.Value = Global.Project1.My.MySettings.Default.pastags
I suspect this fires the ValueChanged event (even though the Designer.vb file calls Me.SuspendLayout?)
Private Sub nudtags_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles nudtags.ValueChanged<br />
<br />
DoMethod(nudtags.Value)<br />
End Sub
The "DoMethod" can not run in design-time, but it fires and runs as soon as I add the control to a form (in the same project).
There must be a way to prevent this event from firing in design time and/or after the CustomControl is loaded in runtime?
PS: I tried Me.DesignMode but with no luck.
|
|
|
|
|
There is no way to stop an event from firing. you just have to get creative in the method you handle it at different times.
The ValueChanged event fires because, well, the value changed. The Value has nothing to do with SuspendLayout.
Normally, the value would be used as design time, as well as runtime, to update the visuals of the control in the designer.
If you wanted to not run the DoMethod, I'd do something like this:
Private Sub nudtags_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles nudtags.ValueChanged
If Not DesignMode Then
DoMethod(nudtags.Value)
End If
End Sub
I've heard of DesignMode not being reliable, though I've never had aproblem with it. You might want to read this[^] for some clarifications.
|
|
|
|
|
I tried exactly what you had there before posting the question. That DesignMode for some reason returns False .
Thanks for the reply. I think that article will be a help...
For now I have worked around it with my own designmode boolean I set to false during runtime
|
|
|
|
|
Hallo
Does anybody know of any method to make a listbox scroll without the user having to do anything. e.g As the form loads the listbox scrolls from the top item to the last item(not by making the mouse click on the scroll button though). Any help would be greatly appreciated.
Thanks
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
hi,
you can use the select item property of the listbox to select the last item whenever a new item is added or after all the data have been added.
hope this helps
regards
|
|
|
|
|
Will try that
thanks
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|