vb.net

Printing only starts after last page spools.

I'm having a problem that printing in VB.net where any network printer i choose is waiting untill the last page is spooled before printing begins. However i'm looking to have it begin printing after the first page. The printer is set to 'Start printing immediatly', and this is giving me huge problems as we're trying to print duplex docu...

Best way to Search

I am building a real estate website. I have a table for properties (i.e. "houses"), a table for pictures, a table for features, etc. So each property's data comes from three, not only one table. I need to provide a function that retrieves requested property data depending on a search criteria, for example: property of the week feature...

VB.Net Web Services For Dummies

(Edited to add an example and hopefully make it a bit clearer) I'm mainly a VB6 developer, but am currently trying to write a web service using VB.Net to allow for communication between our product and a third-party. The third-party software will invoke our web service to update various data. I've read up various things on how to do t...

why can't I create new instance of form after calling myForm.close()?

[Edit] See this post as to why I'm declaring form elements globally. I chose to rewire my code to get rid of the global definitions. [End Edit] I'm creating a from dynamically at runtime. the form, all buttons, and the combobox are all declared globally to the parent form. dim myForm as new form I put some buttons on it and a combo ...

Programatically Hide Field in PropertyGrid

Using <System.ComponentModel.TypeConverter(GetType(System.ComponentModel.ExpandableObjectConverter))> _ on the declaration of a class (which is a property of another class) that consists of a number properties. I load an instance of this class with simply ... PropertyGrid1.SelectedObject = oColumn Obviously I don't want to manuall...

What is a better design?

I have a scenario at hand which has some design discussion going on. To break it down in simple words, think about a hierarchy as such Company -----> Customer ------> Orders (ignore the details of how the orders have products etc) if I was to expose an API to work with this, what would be a better design. a) Dim comp As New Company co...

Why group by key of anonymous objects does not behave the way expected ?

I have a csv file of this formart A,B,value a1,b1,10 a2,b1,12 a2,b1,15 a2,b2,14 a1,b1,12 which I am converting as datatable in my application. Dim enumerable = _dt.AsEnumerable Dim groupedResults = enumerable.GroupBy( _ Function(x) _ New With { _ ...

How do I determine if an XmlNode has a specific attribute?

I would like to place an if condition within the sub that will tell it to run when the xml node STORE with attribute TEST="test.doc" does not exist. Any suggestions would be great. I'm new to vb. Sub InsertNode(ByVal doc As XmlDocument) Dim City As XmlNode = doc.DocumentElement Dim Location As XmlElement = doc.CreateElemen...

Authenticating to Google Search Appliance using Basic HTTP auth and ASP.NET (VB)

I've run into a snag though which has to do with authentication between the Google Search Appliance and ASP. Normally, when asking for secure pages from the search appliance, the search appliance asks for credentials, then uses these credentials to try and access the secure results. If this attempt is successful, the page shows up in the...

Unable to create PDB file

For some reason this error started popping up today on one of my projects. Error 1 Unable to write to output file 'C:\MyProject\Release\MyProject.pdb': Unspecified error If I go into advanced compile options and change it to not generate and debug info, my project compiles fine. I have tried setting the permissions on the Rele...

What is the fastest way to compare two byte arrays?

I am trying to compare two long bytearrays in vb.net and have run into a snag. Comparing two 50 meg files takes almost two mins so I'm clearly doing something wrong. I'm on an x64 machine with tons of memory so there are no issues there. Here is the code that I'm using at the moment and would like to change. _Bytes and item.Bytes ar ...

Coalesce operator and Conditional operator in VB.NET

Hi guys, Can we use Coalesce operator(??) and conditional ternary operator(:) in VB.NET as in C#? ...

My VB.NET Website Hangs For A Long Time Then Displays Nothing

Okay, this is a weird issue that I've been having with a recent project I'm undertaking. Occasionally, my website will stop functioning and anytime an ASP page is accessed, the browser will hang for many minutes before bringing up a correctly formatted HTML page with nothing in the tag. It seems to happen whenever more than one person ...

How to Bind a custom class with no strongly typed properties

hey guys, here are my requirements: I need a simple class with only one Public property and no Public methods (the final Class will be more complex, but for testing this is all I need) The Property is "Item" and takes a "String" as a parameter. It returns a "String" based on the parameter. I then want be able to add instances of this ...

How to enlarge image to normal size in ASP.NET 2.0

Hi My users uploads a picture and the picture get saved into my SQl Server Database My users view the picture on the page in a normal Image WebControl with size 150px by 150px - example can be found http://www.erate.co.za/CompanyProfile.aspx?ID=112 - the USA flag is the Image i am talking about. If the user uploads a picture of 300...

Date Time Conversion

I want to convert mm/dd/yyyy to dd/mm/yyyy. My application is asp.NET with VB. I tried following code DateTime.Parse(oldDate.ToString("dd\mm\yyyy")) But got the error: "The string was not recognized as a valid dateTime. There is an unknown word starting at index 2" Can any one give the appropriate code? ...

DataGridView column order does not seem to work

I have a DataGridView bound to a list of business objects: Dim template As New IncidentTemplate Dim temps As List(Of IncidentTemplate) = template.LoadAll Dim bs As New BindingSource If Not temps Is Nothing Then bs.DataSource = temps Me.dgvTemplates.DataSource = bs End If I then add an unbound button column and make some of th...

Prevent form from stealing focus

When I run my VB.NET Winforms app I do not want it to steal the focus from the other open apps. FYI, my app is started from the command line but that shouldn't make a difference. I've seen question 577076 but that doesn't seem to work. What is the best way to do this? ...

Different style on buttons in messagebox in different projects.

Hi! I have a problem with the style of the button in a messagebox. If I call the following line of code in a current project the button get one type of visual apperance/style. And If I create a new VB.NET Windows Application project it gets a standard Windows apperance/style. Windows.Forms.MessageBox.Show("Yaay", "Yaay!", Windows.Forms...

SSRS - Last page does not show on print preview

We're using SQL Server Reporting Services embedded using the Report Viewer control on a Win32 VB.net page. Currently targeting .net 2.0, we can possibly move to 3.5 if it'll fix the issue. When you view the report you can see the entire thing, however, when pressing print preview the last page of the report fails to be shown. The page...