|
Mujz......... wrote: i was'nt creating an instance that's why could not access these functions
You can access them without creating instance but you will get an exception during runtime
|
|
|
|
|
Giorgi Dalakishvili wrote: You can access them without creating instance but you will get an exception during runtime
I think he meant that he was attempting to call them as if they were static methods, rather than instance methods.
|
|
|
|
|
It seems that I have misunderstood
|
|
|
|
|
Don't worry - I was a bit confused about what he meant for a moment too.
|
|
|
|
|
The best way to do this is to create both forms as custom controls, put them both on the one form, and change which one is visible ( and resize the form if need be )
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 to everyone. I 've a ref class.
In a method of the class i want to stop a while loop when a button is clicked.
How can i write this condition? thanks in advance for answers, regards.
|
|
|
|
|
The while loop needs to take place in a thread, then you can set a variable in your click event, which the loop checks every time through, and stops itself when it's set appropriately
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'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.
|
|
|
|