|
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
|
|
|
|
|
|
Hi,
I have this regular expression to read a comma delimited text file.
((?<field>[^\",\\r\\n]*)|\"(?<field>([^\"]|\"\")*)\")(,|(?<rowbreak>\\r\\n|\\n|$))
But the issue arise, when it is end of file for a SINGLE row if we give a line break, it counts as 2 rows, if we don't give a line break it counts as 6 columns, when in real there are only 5. It seems to add an extra ROW or COLUMN.
This csv file is read into a datatable - it is better to control this behaviour in datatable or something up with expression itself.
Many thanks for your time.
|
|
|
|
|
I'm not familiar with the method that you are using to read the csv. I would have thought that you would want to read one line of the csv at a time into a string. Then for each line you would split the string on the "," character to create an array. Then load the array into a datarow and add it to the table. Perhaps your way is easier, I just thought I'd give you an alternative way to do it. Could you explain your method a little more? Maybe show some of your code?
|
|
|
|
|
That is pretty much what is being done - parsing for comma, reading into array and then into a datatable.
By specify the regular expression, we specifying the exact delimiter we are looking for - it could be a tab or any other form od differentiator.
But looks - like to acknowledge the end of file - we would have to specify a end of line.
thanks.
|
|
|
|
|
Hi Friends,
I have to provision records in a Directory Server(Solaris Machine) from a client machine(Windows Machine).
The procedure followed for provisioning is
1. Open the provisioning file.
2. Read the file one subscriber record at a time.
3. provision the record in the Directory Server(DS) by providing the IP address, User name, Password and Port Number of the DS.
The Problem here is, the Server and the client are in different LANs. Each LAN have their own Proxy Servers. These two LANs must(can) be accessed via a Router.
I want to connect the Directory Server through VB.NET Code.
I am using the following code.
Dim LDAPtest As New DirectoryEntry("LDAP://192.168.0.122:389/o=TS,c=HA", "CN=sdfrun,o=TS,c=HA", "abcd", AuthenticationTypes.Delegation)
If LDAPtest.Exists("LDAP://192.168.1.9:389/o=TS,c=HA") = True Then
-->
-->
End if
If the Directory server and LDAP Client are in the single LAN my code is working fine.
If it is different LAN I am getting the following Error.
"The Server is not operational"
Please clarify.
Thanks,
Tharma
|
|
|
|