|
You're using the wrong language - you need to set up some system hooks, which I believe requires C++, although it may be possible using some sort of funky interop stuff.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
|
Ctrl+Alt+Delete is not something you can hook, though. This is by design. One can hook Ctrl+Tab and similar key combos.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
One thing you can do that fairly easy is to set your app as the shell, this will stop access to Start menu and the entire desktop, but not Ctrl-Alt-Del.
|
|
|
|
|
Is there anyway of blocking or diabling the CTRL-ALT-DEL option then in windows using C# or anything that can run with C# as shutting down my app will allow them back in to mess around with the settings and unfortunately defeats the purpose of doing it Any ideas?
|
|
|
|
|
|
Hi,
I am implementing a custom control which has a listview as one of its sub controls. I am able to populate this list at design time through the control properties. The populated list then appears as expected in design time.
Once I run the application, the list appears empty. Terminating the application and re-opening the form (in design time), shows the list as empty!
How can I retain the values of the properties provided by the user at design/runtime!??!!
Thanks in advance,
Victor
phpWebNotes is a page annotation system modelled after php.net.
http://webnotes.sourceforge.net/demo.php[^]
|
|
|
|
|
You probably have to save the values to a file
|
|
|
|
|
thomasa wrote:
You probably have to save the values to a file
There must be another way of doing it. For example, if you have a form with two edit boxes, the first is set to TextBox1 and the second is set to TextBox2. I am sure these design time values will not be saved to files, however, they will be part of the form or something.
Regards,
Victor.
phpWebNotes is a page annotation system modelled after php.net.
http://webnotes.sourceforge.net/demo.php[^]
|
|
|
|
|
I'm not shore what you meen, but if you still have your Main application open, and it is a sub application you close and reopen, then you can tranfere the values from your sub application to your Main application, and vica versa. A preferd item to store the values is an ArrayList or something like that.
On cration of your sub application you could write something like
(in Main)
MyListViewLib.MyListView myListView = new MyListViewLib.MyListView(myArrayList)
(in Sub(a constructor))
MyListView(ArrayList anArrayList)
{
for(int i = 0; i < anArrayList.Count; i++)
{
theNewListView.Add(anArrayList[i])
}
or something like this...
If you close all your applications then you have to save it to a file.
Hope it helps
|
|
|
|
|
Your properties mite need to apply the DesignerSerializationVisibilityAttibuteThatPerhapsIsMisspeltAttrribute
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Hi
I'm trying to do a batch manager, and I use a CheckedListBox to display the status of the jobs, but I want to change the color of every item, there is a way to do it???
Thanks
----
hxxbin
|
|
|
|
|
Extend the CheckedListBox control and override OnDrawItem . In the DrawItemEventArgs passed to the method (and don't forget to call base.OnDrawItem when done), set the DrawItemEventArgs.BackColor to a color based on the checked state of the item (which you can get the index for in DrawItemEventArgs.Index ).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Aright, I'll try to do it
Thanks
----
hxxbin
|
|
|
|
|
Is there anyway to remove/hide the vertical scrollbar in a listbox control?
|
|
|
|
|
You mean ScrollAlwaysVisible property ?
Mazy
No sig. available now.
|
|
|
|
|
no, that property does not remove the scrollbar. I never want to see the vertical scrollbar, even when i have allot of elements.
|
|
|
|
|
If you look at the class member documentation for the ListView , Scrollable should jump out. Set this to false to never show scroll bars.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
The listbox control is not the same as the listview or?
|
|
|
|
|
Sorry, I missed that for some reason.
To make a ListBox with no vertical scroll bar (there is a ListBox.HorizontalScrollbar that you can set to false ), extend ListBox with your own class and override the CreateParams like so:
public class MyListBox : ListBox
{
private const int WS_VSCROLL = 0x00200000;
protected override System.Windows.Forms.CreateParams CreateParams
{
get
{
System.Windows.Forms.CreateParams parms = base.CreateParams;
parms.Style &= ~WS_VSCROLL;
return parms;
}
}
} That will get rid of the vertical scroll bar. If you want, you could add a VerticalScrollbar that controls whether the WS_VSCROLL is set or unset and then call RecreateHandle after setting it:
public class MyListBox : ListBox
{
private const int WS_VSCROLL = 0x00200000;
protected override System.Windows.Forms.CreateParams CreateParams
{
get
{
System.Windows.Forms.CreateParams parms = base.CreateParams;
if (!this.verticalScrollbar)
parms.Style &= ~WS_VSCROLL;
return parms;
}
}
private bool verticalScrollbar;
public virtual bool VerticalScrollbar
{
get { return this.verticalScrollbar; }
set
{
if (this.verticalScrollbar != value)
{
this.verticalScrollbar = value;
this.RecreateHandle();
}
}
}
}
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
After a couple of frustrating days, my webservice is still not operational. Since I believe that the error message 'DLL not found (oci.dll)' was not the real problem, but having no ideas of what to try next, I converted my C# code from using the Oracle classes to using the Odbc classes. I'm now getting an HTTP 500 error 'Internal Server Error' when I invoke my web service. Besides the web server log that also indicates this same error, is there any other logging information that I could use to figure out what could be wrong. Thanks for any thoughts (and condolences ).
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
Chris Meech wrote:
is there any other logging information that I could use to figure out what could be wrong.
Check Context.Trace.Write() . Whiich place a messages in trace.axd file and you can browse it inside your webservice folder.But you have to enable trace tag in your web.config.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
Check Context.Trace.Write().
Do you mean the TraceContext.Write() method ?
What I'm after is to get some kind of a 'stack trace' of where things have gone wrong.
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
Chris Meech wrote:
TraceContext.Write()
I haven''t test method you say. This is what I talk about:
Writing Trace Messages[^]
You can use Context.Trace.Write() method whenever you want, inside try/catch block to write message error in a trace filr.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
Context.Trace.Write()
I understand. That method is for inclusion within an ASP.NET page. In my case I'm looking to put this in my web service and I think I should be using the TraceContext.Write instead. Thanks so for the pointer.
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|