Let's say I have 2 interfaces defined like so:
public interface ISkuItem
{
public string SKU { get; set; }
}
public interface ICartItem : ISkuItem
{
public int Quantity { get; set; }
public bool IsDiscountable { get; set; }
}
When I go to implement the interface in C#, VS produces the following templated code:
public cl...
I'm developing a VB.NET Windows service which is costantly checking a BMS database for new alarms and making phone calls to warn operators remotely. I'm currently using a .NET TAPI wrapper and the SAPI 5.3 interop assembly, and the steps I'm taking to speak over the phone are:
Initialize TAPI interface;
Make the call to the operator's ...
Why is it that some components/controls will not be inherited visually in a child form if they are declared with the access modifier Friend vs when they are declared with Protected.
For example, I've got a DataSet object in my Parent Form that was initially "Friend" (I drag and dropped it to the form, so it was shown as a control in th...
This question is a follow-up to my last question with a reference to COM Interop.
Let's say I have the following 2 interfaces and implementing classes:
public interface ISkuItem
{
public string SKU { get; set; }
}
public interface ICartItem : ISkuItem
{
public int Quantity { get; set; }
public bool IsDiscountable { ...
I would like a relatively hack-free way to do this, any ideas? For example, the following takes a screenshot that doesn't include the semi-transparent window:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
Text = "Opaque Window"
Dim win2 As N...
In the middle of attaching a Google Custom Search Engine onto my page,
I have a string which I would declare in C# as
String rxPattern = "<(?>\"[^\"]\"|'[^']'|[^'\">])*>";
How do I convert it to a string in VB?
I mean store the same value into the string variable rxPattern using VB/VB.NET?
...
I want to implement a menu similar to the one used in the inFlow Inventory application. I see that the mozbar.dll is referenced but i cant get it to work in my application, and it is probably beyond my skill level to implement. Does anyone have any suggestions for other controls that might replicate the look and feel of the menu used i...
Hi guys,
am new in crystal report,
here wana to add 2 datatables in the crstal report'
Private Sub btbPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btbPrint.Click
'
Dim ds As New DataSet1
Dim t As DataTable = GetInvoice(txtBillNo.Text)
Dim dt As DataTable = GetDCDetails(t.Rows(0).Item(...
Hi,
I have a small application that displays a listbox under the cursor position when the user uses a shortcut key.
When the user double clicks a selection from the listbox I want to insert that selected text at the curser position of that opened window.
Example: user has microsoft word open. He/she uses a shortcut key that displays a...
I'm looking to get the following code converted to working VB.NET code. I need to export data from a datagrid into the CSV format that the user can save off, and the code below from David in Dakota would work great, but it's in C#. Any help would be appreciated! This is for a Silverlight 4 site we're working on.
private void exportHi...
I have following sql which is show previous days records from table.
SELECT * FROM tblMeter WHERE
(Date >= DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0))
AND
(Date < DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0))
But how can I collect records with datetimepicker value in vb.net.
Any help will be appreciated.
Thanks
...
In VB.NET, how can I convert the following string into some kind of key/value type such as a Hashtable, Dictionary, etc?
"Name=Fred;Birthday=19-June-1906;ID=12345"
I want to extract Birthday or ID without having to split the string into an array.
EDIT: I'd prefer not to split the string into an array in case the format of the string ...
I have ASP.net 3.5 application (VB.NET) using SQLServer (2005) Session State management. We are receiving a serialization exception (below) when using a certain component of our application that saves a custom object to session. This custom object inherits from an abstract class that inherits from a framework component ConfigurationSecti...
I have been working on some code that prints a textbox that lists contact information. When I try to print it, it doesn't print out the tabs that I used to format the text. Here is my code:
Private Sub PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs) _
Handles prndoc.PrintPage
Dim fnt As Font = resultTextBox.Font
...
Working on a company using the .Net Framework 2 (vb6 and vb.net 2005) and a very rudimentary sourceforge setup, I'm kindof at a loss when I was tasked to "...find a suitable Open Source Unit Testing & Bug Tracking system..." for the team. Those were my superior's exact words.
I know about the Team Foundation Server's capabilities, but ...
I found using AndAlso/OrElse, all the time, VERY annoying. It reduces code readability, especially when conditioning get complicated.
Any suggestions?
...
VB .NET 4 WinForms application.
I have a (DevExpress) grid bound to an IEnumerable(Of MyClass).
Whenever a new row is added, the ID defaults to zero (0). On trying to SaveChanges, EntityFramework doesn't realise that being an identity field means it should ignore any contents on insert and just insert the other values. I can't specify n...
Hello all,
I am sorry for bothering you with my probably low level question.
I would like to develop a very very very simple application which will connect the MS SQL SERVER in my notebook and will be run at hand terminal-with windows mobile 6.
Here is the code which i used :
Dim strSQL As [String] = "SELECT COUNT(studentid) AS tot...
how to read selected text from pdf files in vb.net - visual basic language ?
...
I have a DataGridView with a TextBox column (DataGridViewTextBoxColumn). I already set the AutoCompleteDataSource to a list of string values. Now, the default behavior of the TextBox column is to ONLY show the AutoComplete ListBox when something is typed. Is there a way to show/drop that ListBox on the CellEnter event or as soon as a use...