|
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
|
|
|
|
|
Chris Meech wrote:
That method is for inclusion within an ASP.NET page. In my case I'm looking to put this in my web service
If you mean it doesn't work for WebSerivce, no it works there too. No difference. Trace file exist there too.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
If you mean it doesn't work for WebSerivce
It won't work if it doesn't compile. There is no documentation within the .NET Framework for Context.Trace.Write() so how does one use it? The closest I could find was a WebService member called TraceContext.Write().
Still trying to get this data access to work in a web service.
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 read the page that I sent its link for you again and it say the things that I told you is the same as TraceContect.Write(),I mean them are the same things. I think you are developing without VS.NET. In that article it is mentioned that how to use it and you can place it in different place of your code for tracing purpose. As much as I understand it can help you.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
I think you are developing without VS.NET.
Hit the nail on the head. I am not using VS.NET. But why should that make any difference to developing web services? Does VS.NET bring extensions to the .NET Framework? My understanding was it gave you an IDE to develop with and a whole whack of wizards to generate code for you.
I'm going to try and use the Oracle data provider as Guillermo has suggested.
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
|
|
|
|
|
What Oracle provider are you using ?
Free your mind...
|
|
|
|
|
Oracle Client 9.2 installed. With the error of DLL not found, I was using the Oracle classes that ship with .NET Framework v1.1. With the HTTP 500 error, I was using the Odbc classes that ship with .NET Framework v1.1. For the Odbc test, I was using the Oracle ODBC driver. I was also trying the Microsoft ODBC driver for Oracle, but could even get it to pull data into Excel, so I gave up trying to get it to work.
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
|
|
|
|
|
Seems that few people uses Oracle on CP.
To be honest, I've never used the Oracle Provider that comes with .NET Fw v1.1. Since we start developing an application at work, we used the Oracle Data Provider from Oracle[^], and we only had 1 problem with the assembly. What I did was register the ODP.NET into the GAC (Global Assembly Cache) and everything is fine now.
Why don't you give a try, and use this provider ?
Hope this helps.
Free your mind...
|
|
|
|
|
Considering that with my Odbc test I couldn't get the Microsoft driver to even connect to the database, I think this is a fine suggestion. I'd add that I've used the OO4O (Oracle Objects for OLE) product when doing at lot of C++ development and it was out standing to use. Maybe I'll have the same success with the Oracle Data Provider for .NET.
Thanks for idea and I'll let you know the outcome.
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
|
|
|
|
|
Hi Guillermo,
I installed the ODP.NET but was still unsuccessful in getting the service to work. It still HTTP's error 500 Internal server error.
I also converted a console test application to use these classes and the application still tested perfect.
Here's something I don't understand though. Even though the installation of ODP.NET registers the namespace/DLL in the GAC (I confirmed it's existence using the assembly viewer), when compiling either my service or my console programs I must append a reference to the DLL explicityly
csc /t:library /out:C:\Inetpub\wwwroot\bin\ForwardRate.dll ForwardRate.cs /r:c:\oracle\ora92\bin\Oracle.DataAccess.dll Once I specified what namespace I'm using within my source file, I would have expected that if that namespace exists within the GAC, the appropriate DLL reference would not be needed?
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
|
|
|
|