I know that here there is a duplicate but I would like, if possible, to be able to define a relative path for 'Start External Program' or any workaround that do not constrain me to add a complete new empty project to my solution.
I am using VB.NET in Visual Studio 2010 environment developing WinForms apps.
...
I would like to know if there's any way to specify an inline array (lets say of strings)
to custom attribute on a property in vb.net.
I have the following example that doesn't compile in vb.net (.net 1.1):
Attributes.ManyToOne(New String() {"a", "b", "c"})> _
Public Property PaymentTerms() As PaymentTerms
The attribute is defined in ...
SO i would like to create this url blah.com/preview?h=yes
so i can do this
<% if request.querystring("h") = "yes" then %>
jquery stuff
<% else %>
don't do jquery stuff
<% end if %>
...
Hi, see below program.
I start a new thread x with function abc, then I do some longer task.
Why does x only start after end sub? Shouldn't it start right-away, before sleep ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New Threading.Thread(AddressOf abc)
...
I have a function that searches AD for members of various groups. If I remove the loop, I don't get the error "A column named 'cn' already belongs to this datatable", however, I need to iterate through each OU.
Function getCOMDLNames(ByVal searchStr As String) As DataTable
Dim MySearchRoot As DirectoryEntry = New DirectoryEntry("pat...
This link explains the Encoder.GetBytes Method and there is a bool parameter called flush explained too . The explanation of flush is :
true if this encoder can flush its
state at the end of the conversion;
otherwise, false. To ensure correct
termination of a sequence of blocks of
encoded bytes, the last call to
GetBytes ca...
I have a form that is used at design-time to configure various properties.
I've tried two ways to do a form-level catch all exception:
(1) I add a handler to Application.ThreadException in the constructor.
(2) I wrap the Show method, of the form, in a Try/Catch block
Both of these work at run-time when I test by adding a property gri...
Hi All,
I have a BitBlt wrapper function in my VB project. It works just fine when compiled as Any CPU, but when I aim it at x86 it creates an empty bitmap. I must use x86 as other parts of the app require it. Any ideas what could be wrong? Here is the code:
Imports System.Drawing.Imaging
''' <summary>
''' Provides the static meth...
The app I am trying to make needs a few info in the beggining, these questions include a radio button I have four radio buttons in the same frame and I want to change the grouping so there are two questions being answered
...
I'm looking for a solution to implement in web apps where I have the option to see a print preview or print either a gridview, datagrid, or datatable or export it to word or excel. What's the best method to do this or has someone written a class that does this, and does it well (I've seen many examples, but many still have errors)?
...
Hi,
I'm using a DataGridView to load data from a DataTable. This DataGridView is located on a tab (Forms.TabPage). When clicking this tab the datagrid takes a second or two to draw from the top down, regardless of wheather data is being loaded or not.
Is there anything I can do to speed up the Drawing\Rendering when clicking the Tab?...
In VB.Net with Winforms how do I make an image follow the cursor even when it leaves the form? I want to do this during a drag and drop operation. BCL and/or GDI is better for my usecase than P/Invokes.
If you are familiar with PeaZip, it does something of this sort when dragging a file from it's interface.
...
I have an ImageButton and a FileUpload controls in a child page of a master page. I would like to achieve something like when user click on the ImageButton, the browse file window will pop-up like what we did when we click on the Browse button of the FileUpload control.
How can call the browse file window of the FileUpload control when ...
I have a login page that stores a few values to localStorage (html5) then continues to a VB.Net page. I am looking for a method in VB that can read back those stored values and make them VB vars. Any ideas?
...
I wrote a page Page method in my aspx page. in web service method I need to call FindControl method return textbox and get text box value. But my findControl will take MasterPage object to iterate.
Please see my code
<script type = "text/javascript">
function ShowCurrentDateTime() {
$.ajax({
type: "POST",
...
I have a collection as follows
Private _bankRates As Dictionary(Of RateSourceBank.Key, RateSourceBank)
Where RateSourceBank.Key is simply
Public Class Key
Public RateType As String
Public EffectiveDate As DateTime
End Class
How can I retrieve a subset of _bankRates that have more than one EffectiveDate per RateType?
Unf...
Question: I get an exception serializing this class to a nHibernate xml file ({"Could not determine type for: System.Drawing.Image, System.Drawing, for columns: NHibernate.Mapping.Column(Settings)"}).
How to map System.Drawing.Image to nHibernate ?
And what MS-SQL dbtype is to be used?
using System;
using System.Collections.Generic;
us...
I'm trying to make an Aduto-Forum poster with VB.NET windows form application
This is the page, http://www.inviteshare.com/community/viewforum.php?id=9
First I'm trying to log-in automatically
I insert username & pass but I can't click the Login button because there are 2 buttons with the same ID on the page.
(
input type="image" name="...
Here's my query
Dim query as String = "Select * from openquery (devbook, 'SELECT wb.arrival_time FROM web_bookings wb ')"
All I need is to convert my arrival_time into a datetime field in the query
Is this possible?
Thanks
Jamie
...
I have a GUI that contains several components (combo boxes, textboxes, etc) with their associated labels. When a button is pressed, the selection in each input component is validated, and if found to contain an invalid value, the label color changes to red and an error message appears. This works fine on its own.
The problem arises when...