I'm currently working on a plugin for excel (using VB.net--not VBA) that will attempt (among other things) to recognize the format of the source data of a chart and configure the chart's series' number format strings appropriately. That is, yearly data should always be two numbers, monthly data should always be a 3-letter month followed...
Why would my try-catch block still be throwing an error when it's handled?
Exception Details:
System.NullReferenceException: Object
reference not set to an instance of an
object.
Try
Here >> : _MemoryStream.Seek(6 * StartOffset, 0)
_MemoryStream.Read(_Buffer, 0, 6)
Catch ex As...
In my gridview I have fields for inserting a new record in the footer.
In my objectdatasource selecting event if no records came back I bind a single mock row to force the footer to show so they can still add records. Since the row does not contain real data I hide the row.
...
If result.ItemCount = 0 Then
result = mock...
Using either VB.NET, C#, or VBScript, how can I check if the IIS 6 Management Compatibility feature and its subfeatures have been installed on a machine running IIS 7.x?
...
OK, I know how to call a simple old fashion asmx webservice webthod that returns a single value as a function return result. But what if I want to return multiple output params? My current approach is to separate the params by a dividing character and parse them on teh client. Is there a better way.
Here's how I return a single function...
I would like to easily validate dates in this format and only this format. Any otehr format should be considered invalid.
...
Ever since I moved from VB6 to VB.NET somewhere in 2005, I've been using CType to do casting from one data type to another. I do this because it is simply faster to type, used to exist in VB6 and I do not know why I have to be using DirectCast if there is apparently no difference between them.
I use TryCast once in a while because I und...
Hello
I don't know enough about VB.Net yet to use the richer HttpWebRequest class, so I figured I'd use the simpler WebClient class to download web pages asynchronously (to avoid freezing the UI).
However, how can the asynchronous event handler actually return the web page to the calling routine?
Imports System.Net
Public Class Form1...
I have a program that works when, a file is opened with it using the right click menu in explorer. But if I select multiple files and then right click and open with my program then it opens multiple instances of my program, instead of just passing the multiple files as arguments to a single instance. The program is written in vb.net but ...
Hi all,
I have one question about EF. If I understand correctly EF does not support Contains. I try to achieve this: I have column(nvarchar) with this: for ex.row1. 1;3;4;5,row2. 3;4;6 row3. 7;8;16 etc.
I have list(of string) with 1,6. My goal is to get row1 and row2 in result set.
I try with linq to entity and with linq to sql but i can...
I want to use System.Net.Mail.SendAync in an ASP.NET MVC2 application. I see that it throws an InvalidOperationException if there is already a SendAsync call in progress. Does this mean only one SendAsync is allowed per host, or per thread? For example, if I simultaneously have 2 web users from 2 different remote hosts, can each use S...
I am trying to create a UserControl that is a composite control for entering Dates. It involves 2 drop down controls (one for month and one for day) and a text box for year. It also has a CustomValidation control that I would like the user of the UserControl to be able to set the ClientValidationFunction property and have it triggered w...
I know many people ask how some of these are done, but I do not understand the context in which to use the answers, so...
I'm building a code editor for a subversion of Python language, and I found a very decent way of highlighting keywords in the RichTextBox through this:
bluwords.Add(KEYWORDS GO HERE)
If scriptt.Text.Length > 0 T...
Hi,
I wonder if someone can help me. I've got a console App which I use to debug various components as I develop them.
I'd like to be able to log to the console every time an event is fired either in the object I've instantiated or in anything it's instantiated [ad infinitum]. I wouldn't see some of these events normally due to them be...
Hello, all.
I am messing around with the WMPLib component provided by Windows Media Player 12 (wmp.dll) in VB.NET with .NET Framework 3.5 SP1.
I am trying to retrieve a media item from my media library based on its name (assuming there are no duplicate names). At the moment, I'm grabbing the entire media library, and looping through ev...
I have a situation where I need to return a directory path by reading the registry settings. Registry value returns me a path in the format
%CommonProgramFiles%\System\web32.dll
while the consumer code is expecting it in the format
C:\Program Files\Common Files\System\web32.dll
How can I resolve such directory path in .net code?
...
When starting the default browser like this:
Dim trgt1 As String = "http://www.vbforums.com/showthread.php?t=612471"
pi.FileName = trgt1
System.Diagnostics.Process.Start(pi)
It takes about 40 seconds to open the page.
If I do it like this, though this isn't the default browser
Dim trgt1 As String = "h...
I have a large piece of text in which there is something simular to this:
!#_KT_#!COMMANDHERE!#_KT_#!
I want, in VB.Net, to get the 'COMMANDHERE' part of the string, how would I go about doing this? I have this so far:
Dim temp As String = WebBrowser1.Document.Body.ToString
Dim startIndex As Integer = temp.IndexOf("!#__KT__#!") + 1
Di...
Hi, Recently the study vb.net but I still have not figured out how do I remove an image or an executable from the resource.
If I put an image and add to the resource and I would extract
C: \ foto.jpg
how can I do?
Thanks in advance, I apologize for my vb knowledge is that English
...
In WPF I have one window opening a second window that allows some data selections to occur on. Once the selections have been made I then want to submit/close the second/sub window and have the data pushed back to the opening/parent window.
I can push data into the sub window from the parent via public properties, but have not worked out...