|
so this is a webpage using ASP.NET, correct? If so you want to use sessions try: Session.Add("name", value) and refer to it by Session.Item("name"). This line: "i am doing a shopping cart project using vs.net 2005." kind of makes me think you're creating a windows project, but your scenario sounds to me like a webpage. If it is a winapp, post back and go from there.
Big Pimpin, Spendin Gs
Nate Lindley, .NET Aficionado
|
|
|
|
|
i want to change the data grid background color which the default is grey color. when i print the data out the grey color will print out too so it will look like the data was inside the box... how can i change it??
i didnt found the function for it in the properties.
I'm using vb6
|
|
|
|
|
Hi,
i have three questions about own usercontrols:
1.) How can i include this menu with the most impartant settings for my usercontrol (The small arrow at the top right corner, e.g. on TabControl)
2.) How can i define objects to be visible only in the designing-mode. I want to show a TabControl in designing mode and while running there should only be the single Panels.
3.) How can i provide an own window for these typical items-property. E.g. when you click on the "..." button in the property-window you can see such one.
If there are any language mistakes i'm sorry about... my english isn't the best
schachmat
|
|
|
|
|
1 - not sure what you mean. You can expose properties to the designer, in fact, I thought you have to suppress them, or they are all shown.
2 - There's a DesignMode property ( I could have the name wrong ) which could be used to write code to render only in the designer.
3 - I don't know what you mean. A pop up window ? Define it as a form and use it within the control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for the answer, i uploaded some screenshots:
1.) http://img113.imageshack.us/img113/6743/09192006233321os7.jpg
2.) Where and how can i activate this DesignMode?
3.) http://img20.imageshack.us/img20/7590/09192006233639iw8.jpg This window appears, when you click on the "..." button in the property window. e.g. on DataGridView.Columns. I want to know how to define a property to show such a (selfdesigned?) window.
schachmat
|
|
|
|
|
1 - Oh, you want that pop up in design mode ? I imagine there's an attribute you can use to expose properties that way
2 - It's built in. Just have your controls OnPaint check for it, and draw depending on it
3 - Oh, OK, you're worried entirely about making your control work in the design mode. I'm not sure, I prefer to write code I'd recommend looking into MSDN for more info.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
1.) Yes i thought so too, but didn't find the name and values for this attribute
2.) Ok, Thanks i found it XD
3.) I've allready searched for 2 hours.... But ok, i'll search two other ones now
|
|
|
|
|
On 3. If the property is a subclass of CollectionBase, on the designer you should be able to have the elipse (...) button show up, and popup a property dialog where you can add/update/remove items (similar to tab control - tab pages).
If you want more customized dialog, you may need to use TypeEditor (hope I remember the name correctly).
You may want to look at this to see how to persist the items that are added on designer:
http://www.codeproject.com/csharp/dzcollectioneditor.asp
|
|
|
|
|
1.) But in this popup i can also click on links like "Add TabPage"... That isn't a property, so the Attribute should also be available for methods, right?
3.) I'll try this with the CollectionBase later... hope you're right
I also found some intresting via Reflector: system.windows.forms.designer I didn't look up, if i am right, but i think, with this namespace i can define own Designers for own Datatypes...
schachmat
|
|
|
|
|
1) Yes the "Add" and Remove will be on the popup. You can even have a collection in a collection in a collection..... The popup (editor) will take care of it.
2) I have done something similar, on the designer, the custom controls (buttons) have a UserAccess property which is a collection class of an access class containing an enum of user group and the description. I can add "Administrator", then add "Operator" on the designer, and the designer will add them on the form's initializacomponent.
If you need to have customer popup (editor) such as a graphical editor, then you will need to do more work (search CP for some example), like what you'd said in last paragraph.
|
|
|
|
|
1.) But where can i define which items to show in this popup?
schachmat
|
|
|
|
|
On the custom control, you will add a public property of a collection of a class that you defined, that class will be the item shown on the popup (on the property grid on the right side of the popup).
|
|
|
|
|
I needed to start project test over. I did what I always do in VB 2003. I closed VB and renamed the directory the project was in, test, to oldtest. I then opened VB and told it to create a new project called test. It told me it could not because there was already a project by that name?????? Somehow it found the project even as I tried to prove to it it didn't exist any more by clicking test in the recently used projects section and after a long wait it came up!!! I looked in explorer and it had renamed the directory oldtest back to test. Damn it!!!! How do I delete a project?!
|
|
|
|
|
You already did it. The problem is that something else prevented you from renaming the folder. Maybe you still had the old project open? Perhaps an instance of the project .EXE was running? You don't have the rights to rename that folder? ...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The directory was indead renamed. Somehow it got renamed back. I can't explain. I rebooted the pc and then renamed it again and this time it worked.
|
|
|
|
|
I have a crystal report on an intranet server and remote users can not access it easily. I need to pass a parameter to the report so that when the user opens it just their info will show. How can this be done in vbscript? I have the email code and have tried getobject and createobject("CrystalReportRuntime.Application"). Thanks for any wisdom.
Seeker55
Seeking that which expands the limit
|
|
|
|
|
Hello,
I am using vb.net 2005 to make a simple stock chart!
I am trying to make a simple stock chart, open, high, Low, Close. In my picturebox I need to scale bars so the highest high is at the top of the chart and the lowest low is at the bottom. Does anyone have any idea's?
Gary
|
|
|
|
|
You want to paint this chart directly into your picturebox, right?
First you should sort the values for the single parts from high to low. Then you can paint rectangles (with GDI+) into your picturebox. For the n-th part the start-hight is the sum of all hights of the previous parts.
schachmat
|
|
|
|
|
Yes I will paint this directly into the picturebox.
Let say I have two bars, the first bar's high is 30 and the low is 10, the second bar's high is 60 and the low is 30.Now I have 2 bars I need to scale these so they fill up the chart. The 60 should be all the way to the top of the chart and the 10 should be all the way to the bottom of the chart. Let's say the chart is 300 high and 400 wide.
Hope that explains it better
Gary
|
|
|
|
|
Hi,
I am using grid in my window form.I have 1 problem.
>>How to show image in grid
I hope somebody know something.
Regards,
Nagraj
|
|
|
|
|
You can use Template column to display the image in the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I just want to make clear that this is not asp.net page,I have problrm with VB.net windows application
I hope I am clear now.
Regards,
Nagraj
|
|
|
|
|
I am sorry I just misunderstood it. You can derive a custom columnstyle and override its Paint method to draw the image.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
Basically I have saved images in sql database not I want to fetch and show them in datagrid.
So its not matter of displaying single image.
Please If u can send me some link or code then it will help me lot to understand.
Regards,
Nagarj
|
|
|
|
|