vb.net

Closing a TCPlistener/client connection

Is it necessary to close the connection of a tcplistener or tcpclient after every message received, or is it possible to close it at a later time while it continues to receive data? Is there any major security issue with leaving it open and listening? I know trojans tend to open a listener and leave it open, will my program be detected a...

Auto update: Is this secure?

Dot Net Auto Update I felt like .net was lacking a simple secure automatic update library so I've implemented something and put it up here. Before anyone considers using the library I was keen for the update process to get a bit a peer review. Here are the steps: The client software is populated with a public key and URI to poll. Cl...

Drawing Transparent Plane with holes in GDI+

I need to draw a transparent plane over a User control in my DotNET 2.0 app. That much is easy at least. The hard bit is that I need some (potentially overlapping) holes in this plane. Shape and size of the holes is not known at compile-time. I tried to approach this with Region and excluding a bunch of GraphicPaths from it. This works ...

My.Resources in WPF XAML?

Hello! Is there a way to access My.Resources thru Xaml? Like this <Image Source="{Binding MyImage, Source={x:Static my:Resources}, Converter={StaticResource MyBitmapToImageSourceConverter}}" /> This is the error I get: \Application.xaml(122,36): error MC3029: 'my:Resources' member is not valid because it does not have a qual...

using excel sheet as DB (datasource with connection string)

I have the following database defined in app.config now: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\table.mdb can I use excel instead as datasource there? are there any limits if I use excel file, the database is simple 300 rows, and it would be more handy to use excel file. does excel need to be readonly? ...

Binding to indexed property with String key

Say I wanna bind to dictionary that TKey is string with XAML: <Label DataContext="{MyDictionary}" Content="{Binding Item("OK")}" /> Doesn't work. How should I do it? I am talking about the Item("Key") ...

Project Addin to Create VB Projects VS 2005 IDE

My VS 2005 currently allows to create only Projects in C#. Is there any seperate Add In available for download using whcih I can Create VB.Net Projects. ...

getting the name of the calling method

Basically i've got a web service that i'm trying to put some kind of usage logging in. To do this i've created a class with a logging method. I instatiate the class on the service and then call the logging method in each of the web methods. I'm trying to find a way of getting the name of the method that has called the loggong method Pu...

Textchanged event is not firing when using jscript

hi guys, In my asp.net application, i am using a lookup to enter data to a textbox.For making lookup i have used jscript.I have a button for this lookup from which i am entering data to this textbox.so, i am not entering values directly to the textbox.After entering values to textbox, the textchanged event is not working.What could be t...

SQL select return value to variable

working with: ASP.net using VB.net connecting to MS SQL Server What I'm trying to do is take the result of a SQL select query and place that in a string variable so it can be used in things like a textbox or label. code so far that doesn't work... Imports System.Data.SqlClient Partial Class dev_Default Inherits System.Web.UI.Page...

creating my own Word wrapper for string

How to make my own word wrap function for string, I want each line to be no longer than 50chars and take respect existing CRLFs ...

Using Backgroundworker in a class and generate events for client application

i have designed a class for posting data to server, which is a time consuming task so that i have used background worker in my application. instead of repeatedly using backgroundworker in my application, i decided to add it to my class and generate two events PostWorkerReportProgress, PostWorkerComplted for my application. how can i do t...

Updating VB.net windows applications over the internet

Hello, I have a windows application developed in VB.net 2005. The application is installed in several machines. Is there anyway when I do any modifications and publish the code it updates in all the machines. PS: All the machines are connected to internet. thanks ...

HTML tag replacement regex not quite working correctly

This is a follow up to another question of mine. The solution I found worked great for every one of the test cases I threw at it, until a case showed up that eluded me the first time around. My goal is to reformat improperly formatted tag attributes using regex (I know, probably not a fool-proof method as I'm finding out, but bear with...

Updating PictureBox control every one minute in windows form

I am new to dotnet. I have an application with one login screen and three other screens. On login user can go to any of the other three screens by selecting the options. On all three screens i have a Picture box which i need to update the Image every one minute based on some logic.Can you please help me on how to do it. Note: I have a b...

Is it a bad idea to put frequent file I/O operations within a SyncLock block?

Say I have some code that does this: Public Function AppendToLogFile(ByVal s As String) As Boolean Dim success As Boolean = True Dim fs As IO.FileStream = Nothing Dim sw As IO.StreamWriter = Nothing Static LogFileLock As New Object() SyncLock LogFileLock Try fs = New IO.FileStream(LogFilePath) ...

Does referencing the JDK namespaces from within a .NET application require the Java runtime to be installed?

I'm in a VB.NET application. I have referenced some java.* namespaces in my file and am utilizing objects and methods from this namespace throughout the code. Presumably this is relying upon J# to compile. Imports java.util Imports java.util.zip Imports java.io Are these JDK namespaces fully contained in the .NET framework, or will my...

ASP/VB .NET Formatting every row of a gridview?

I have a Gridview that has a timestamp as one of the rows. When I read the data from the database the data is in the format( mm/dd/yyyy hh:mm:ss ). I've figured out how to format the way I want it which is just the ( mm/dd/yyyy ) and droping of the (hh:mm:ss) with the following code: Dim numrows2 = GridView1.Rows.Count For i = 0 To ...

How do I upgrade a .NET 2.0 website to 3.5?

My website is VB.NET 2.0. I already opened a it in VS2k8 and told it not to upgrade. Now I want to upgrade, how do I trigger it? All the posts say 'just open it in 2k8 and it will prompt you'. Well I did, and it did, and I didn't want to yet. Now I cant get it to come up. ...

.NETCF 2.0 WebBrowserControl Pocket IE enable JavaScript

Need help to get Pocket IE configured to execute javascript in WebBrowser Control from a VB app. Get message that security settings for Pocket IE do not authorize scripts. Is it possible to configure Pocket IE on .NET CF 2.0 to execute client side scripts? Thanks in advance and happy coding. ...