vb.net

ASP.NET Development Server permissions and Network Resources

My ASP.NET 4.0 Web App is unable to access Network Printers, while debugging on VS 2010. It can access local printers. Seems like it may be a permissions issue. Since VS2010 Debugging runs on ASP.NET Development Server, it must be running under the account I used to log into Windows, right? Does that user need to be added as an Admin...

Overriding a Sub procedure in VB.NET

I have a main class that has a Sub procedure with no implementation. Any derived class should override and implement this procedure, so I used MustOverride in the base class. Now, any time this procedure is called, I need to set a specific Boolean variable to True at the beginning of the procedure and set it to False at the end. Is the...

Get links from webpage to textbox (vb.net + html agility pack)

Im making a vb.net app and im using htmlagilitypack. I need hap to get the profile links from yellowpages.ca Here is an example of the html: <a href="/bus/Ontario/Brampton/A-Safe-Self-Storage/17142.html?what=af&amp;where=Ontario&amp;le=1238793c7aa%7Ccf8042ceaa%7C2ae32e5a2a" onmousedown="utag.link({link_name:'busname', link_attr1:'in_li...

How to make custom buttons in vb.net

Do you know of any tutorial that could help me make a custom button in vb.net. Because visual studio 2008 doesn't allow you to create buttons in circle or triangular shapes. I've tried searching and found this one but, I cannot make use of it because there are lots of errors. http://www.codeproject.com/KB/buttons/CButton.aspx ...

How to change Server.Transfer code to PHP redirect code with member_id

Hi, I have a code in VB that looks like this: 'Server.Transfer(txtUser.Text + "_page.aspx") which is taking a forms authenticated user to their page. For example if John logs in, it will take him to john_page.aspx. How will I be able to integrate this in a PHP login script? I'm trying something like: header("location: $member . _pag...

Disable conversion of & to shortcut indicator (winforms)

I have a tab control (in my case a UltraTabControl from Infragistics) and I add a new tab. The text of this new tab is set to "Escape &Characters". lTab.Text = "Escape &Characters" When visualizing the tab control the & will become an _ (underscore) for the next character - in this case "C" I know that & is the Microsoft way of ind...

Control.Bindings.Add problem, exception telling me that the program cannot bind to a column that does not exist (but it does)

When I try to use the following line of code: cboSite.DataBindings.Add("Text", _dtSite.Select("Site <> 'ALL'"), "Site") I get the following exception: EXCEPTION : Cannot bind to the property or column Site on the DataSource.{10}Parameter name: dataMember details I am connecting to an Access database and using .net 3.5 and writing th...

Problem deriving from ToolboxItemAttribute in .Net, Winforms

As an example, here's a simple attribute, derived from ToolboxItemAttribute: <ToolboxItemX(False)> _ Public Class Class1 Inherits Button End Class Public Class ToolboxItemXAttribute Inherits ToolboxItemAttribute Public Sub New(ByVal defaultType As Boolean) MyBase.New(defaultType) End Sub End Class The probl...

How do I use linq to do a WHERE against a collection object (using Netflix data source)

Hello I am using LinqPad to learn Linq by querying the NetFlix OData source. (BTW I know their is a similar question already on SO...didn't help me). Here is the query I got working which is awesome. from x in Titles //where x.Rating=="PG" where x.Instant.Available==true where x.AverageRating>=4.0 //where x.Rating.StartsWith("TV")...

Adding a string to visual basic form

How can I add a string to my visual basic form? I'm creating a study application for myself and this is what I have: Imports System.Diagnostics Public Class Form1 Dim amounts As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Timer1_Tick(ByVal sender...

How to support for Enter key to make focus moving in a text column of the listview

I created the following view <ListView.View> <GridView> <GridViewColumn Header="Tester" DisplayMemberBinding="{Binding User}" /> <GridViewColumn Header="Executed On" DisplayMemberBinding="{Binding ExecutionDate}" /> ...

Get USB serial number using VB.net?

Can anyone tell me how to get USB serial number(Hardware ID) using VB.net? ...

How can i reference Server.UrlEncode in an ASP.NET class?

I have created an ASP.NET class. In that class i would like to use the Server.UrlEncode. Why intellisense is not helping me at all and instead of Server.UrlEncode it displays the HttpServerUtility? I have already a reference to system.web ...

Get text from selected row in datagridview and use it in a SQL query vb.net

Hi I have a data grid view with data from a SQL table. I need to use cellclick and get the text from a specifik coloumn in the selected row to use it in a new SQL query. How do I do that in vb.net? Thanks Morten ...

In VS2010, how to get VB.NET enum values to autocomplete without typing the enum type first?

In VS2008, you could write, for instance, dim enumValue as MyEnum enumValue = .. and then as soon as you typed the =, you'd get a list of possible values of MyEnum. With VS2010, you have to type dim enumValue as MyEnum enumValue = MyEnum. ... before getting the list on typing the final . This makes for a lot more typing and seem...

Why is VB flamed for being easy and yet Python is not?

I have always wondered about this and seen this among lots of programmers. Why is a VB programmer or VB code easily dismissed as too noobish and easy while the same does not apply to Python or Python code? After all, isn't Python as easy as VB is? And it does provide drag-n-drop GUI application building also. So why is it that VB is flam...

On failure (if the app fails)

I have an app and it fails randomly sometimes because my internet is not so fast (my app uses the webbrowser). How can I make my app restart itself it it fails? Or make my app click button1 on my form if it fails. ...

LINQ to Object comparing two lists of integer for different values

I accept both C# and VB.NET suggestion, even though I'm writing an app in VB.NET I have two lists of intergers List1 {1,2,3,5} List2 {2,4,6,7} I want to have new List3 {4,6,7} which is composed of elements of List2 that are not in List1. I know I can write a nice For Each loop for this but I want it done in LINQ I've been lookin...

How do I send real-time data over UDP?

I have to send a sequence of video frames over UDP as fast and real-time as possible and while I got the basics working, I am running into all sorts of difficulties. Some of my goals: Data will normally be sent over dial-up (hence UDP instead of TCP), but also needs to support fast Ethernet. It's OK to occasionally drop frames (hence U...

If first line in RichtextBox doesn't contain numbers

I need some kind of code to check if the first line in a richtextbox contains numbers or not. Something like this: If Richtextbot1.Lines(0) contains Numbers Then Goto startbot Else End If Here is an example of my richtextbox lines: 2245 queen st west, ON, M6R2W7 12 RRw Rd, ON ON, M2N4E3 If the first line contains 4 or more nu...