Anchor Property Not Working On Two Out Of A Group Of Objects
May 14, 2010
I have a form with a series of basic objects,, a list box a few buttons, a few text boxes and a few labels..
Anchor property works just fine on all of them except one text box and one label. The property is clearly SET on both objects and I can't, for the love of me, figure out what is making these two act "disobediently".
[URL]..I cannot seem to get a regular panel control to anchor Left/Top/Right while place in a FlowLayoutPanel which is docked to a Form. It defaults to a Left/Top position and I cannot seem to get it to anchor to the Right as well either by code or by manual input in the Properties window.
Does this imply that there is an issue with my VS Studio 2008 Express?
I am reading from a log file.My target is to display the 10 most popular requested URL's of a website.One way to do this is to read all log entries and save each URL to a Dictionary. The dictionary has the URL as the Key and the number of visits as the Value. If a URL exists in the dictionary the Value of that URL's Key is increased +1, otherwise a new Key/Value pair is added with a value of 1.
Once the processing is finished the dictionary is sorted by Value and the top 10 entries are shown.This might work, however it could cause a serious memory problem when dealing with a log file of a website which has thousands of different page url's (think query strings).Since I only need the top 10 entries, is there a way to avoid placing all the URL's into memory and still get the top 10 URL + Visits count?
How do I order by and group by in a Linq query?I tried..Dim iPerson = From lqPersons In objPersons Where Len(lqPersons.Person) > 0 Group lqPersons By key = lqPersons.Name Into Group Order By Group descending Select Group, key
For Each i In iPerson tmp = tmp & vbNewLine & i.key & ", " & i.Group.Count Next
I am having trouble following some of the examples at MSDN for LINQ.Basically I have a List Of MyObject. MyObject has a property called Value which is an integer.I want to group all the MyObjects together that share the same Value and then return that Value where the count of the group is greater than 5.I have tried the following,
dim foak = From o as MyObject in MyObjectList _ Group o By o.Value into Count _ WHERE Count > 5 _ Select o.Value
i am using controls (textbox, combobox, checkbox, etc) with Groupbox and without groupbox in the form
Tab function key is not going to the Groupbox Controls
For Example
Form1 { Textbox1
[Code]....
Once form1 loaded, textbox1 will be focus, then i click the tab it's going to textbox2, combobox1 and save button. The Tab is not going to Group box (textbox3, checkbox)
What I want is a property that like Font property, it has "Name", "Size", "Unit", "Bold" and the other property in it. I tried the solution in the post I tried the solution like this:
<TypeConverter(GetType(ExpandableObjectConverter))> _ Class TestingClass 'Some property here
WinForms. VB.NET VS 2010 Professional. So I am building a form that has 3 radio buttons on one side of it.Then on the left side I have 2 group boxes named Group1 and Group2 for this question that I have placed in the designer so that the one covers the other one and have set both of the groupboxes visible property to false.. When a user click on the second radio box group1.visible changes to true and group2.Visible changes to false.. When a user clicks on the third radio group1.visible changes to false and group2.visible changes to true. If the user clicks the first radio button both group1 and group2 visible changes to false.Only one of the group boxes shows.If I open the designer and ONLY change which one is on the bottom then it will show and not the other.[code]
I'm experimenting with xml literals in vb.net and there's something I don't get. Here's a small sample that illustrates the problem. I'm adding two PropertyGroup nodes to an empty Visual Studio project. The first one is added as xml literal, the second as new XElement:
Imports <xmlns="[URL]"> Module MyModule Sub Main() Dim vbproj = <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="[URL]"> [Code] .....
This code writes the following output: <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="[URL]"> <PropertyGroup xmlns="[URL]"></PropertyGroup> <PropertyGroup /> </Project> As you can see, the first PropertyGroup node contains a redundant xmlns declaration. Why is that, and can it be avoided?
this questions has be answered partially, but I can't find any full tutorial for this problem.I created my own user control (an advanced list with columns). Each column has different attributes like width, colour and text.I want to able to add this user control onto a form and select/edit the different attributes of each column. Hence, for each column in my user control (these columns are created beforehand, no columns can be added or removed from it) there should be a property in the property-menu. Each of these column-properties should be expanded (like the normal size-property in most default vb-controls that can be expanded with the little plus to show the width and height individually.What i mean by this, is: In the property-menu there should be attributes like Column1, Column2, Column3. Each of these attributes should be expanded to show the attributes like width or colour.
Currently I have different properties for different values of the same column, like Column1Wodth, Column1Colour, etc, but I want to group this under one value Column1.I think this is quite an easy solution, but forgive me, I spent more than 4 hours on google, but couldn't find a proper solution.
I was toying around with some of the linq samples that come with LINQPad. In the "C# 3.0 in a Nutshell" folder, under Chater 9 - Grouping, there is a sample query called "Grouping by Multiple Keys". It contains the following query:
from n in new[] { "Tom", "Dick", "Harry", "Mary", "Jay" }.AsQueryable() group n by new {
I am trying to create a property for objects, though I am not sure if that is what it is called. For example, PictureBox.Image instead of Image I want to use my own property.
Private Sub btnPurchase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPurchase.Click Dim objCustomer As Customer Dim objProduct As Products Try
[code]...
1- why not just write queries those manipulate the database rather then creating objects, making changes and then going back to database.
2- now that i have got the new balance and the product oder has been made so every time this happens a query has to be sent to change database or there is any other better why of doing it?
I need some advice: I need to create an app involving draging images to a treeview. What should happen is once the image is dragged to the node it must take an instance of a property. For example
Private Sub MakeMeSomeXmlBeforeRyanGetsAngry() Dim db As New MyDBDataContext Dim customer = From c In db.Customers Select c
[code]....
I am attempting to serialize my linq collection of customers. But it keeps throwing
Type 'System.Data.Linq.DataQuery`1[MyDB.Customer]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. See the Microsoft .NET Framework documentation for other supported types. My issue is that I have already marked the dbml Serialization Mode to UniDirectional and when I check the dbml codebehind all of the DataContract()> and DataMember()> elements are there. I have tried adding various dataloadoptions and setting deferredloading to false, but no luck.
I need to iterate a collection of objects. Based on a property value of the object, I need to group objects together. I also need a total count of each discrete property value. I do not know how many groups there will be and there could be 1 to n objects in each group.How do I do this? Are there algortihms that could help me out with this? Psuedocode or references are fine.
I have designed a small component I need to derive. The problem is one property from base class doesn't make sense in derived class, but won't hurts too (just it's ugly in property editor)
Now there is a solution to make that property non-derivable or hidden in derived objects?
I have a custom class (Class1) with a bunch of properties. One of the properties of this class is another custom class (Class2) with its own properties.I have a property grid with the selected object set to Class 1. I can see Class 2 as a property, but i would like to expand Class 2 to show its properties in the same property grid.
Im basically trying to do the exact same thing as the Font Class on a form. If you look at the properties of a form in the designer, you can see the font property. You can then expand that to show the properties of the font class.
I'm writing a program that reads a directory of xml files (not well-formed), parses the xml, and dumps the data into an Excel Workbook.The file contents are similar in that they have many common xml nodes/attributes.Some files have additional nodes/attributes.The xml in these files represent configuration settings for a Web Application, one file per user.The expected output is a worksheet with a column for each node/attribute combination and a row of node/attribute values for each user.I'm just about finished with the program, but I've run into a bit of a snag.As the final step in the process, I need to loop through a generic list of array objects (that represent a user row) and send the array elements to Excel.I don't know the correct syntax to get the array objects out of the list and have been unable to find sample code specific to generic lists of array objects.[code]
I have a dropdownlistbox in a webform. When the page loads, it displays the initial text, that is ok. When selection is made, it works ok. But when i tried using the text property ie msgbox(cbomodel.text), what shows in the previous text. The newly selected item is never recognized. Is there a way to bind the text to the listbox after a selection is made?
Is there any reason why a picture box wouldn't be saving the image location and loading it into the box the next time the window loads through the picture box property binding 'ImageLocation'?