How can I get VB.net to work out that i have pressed +-*/ in Keydown events?
At the moment i am using a Select Case:
Select Case e.Key
'Numpad Numbers Keydown Events'
Case Key.NumPad0
Display.Append("0")
txtAnswer.Text = Display.ToString
Case Key.NumPad1
...
Late binding is not allowed and that's how we want it.
Depending on whether our program is running on a LAN or the Internet, we need to dim an object as one of two types.
We use an if...then statement to ascertain whether or not we are running on a LAN or the Internet.
When we declare our object inside the if...then statement, we have ...
I have a mdicontainer form that summons forms. My problem is when the a user clicks again the menu for that form, it also make another instance of it.
What I did is declare a public class with a public variable on it ex: Boolean isFormOneOpen = false. Then every time formOne opens, it checks first the global variable I declared a while...
I wrote a serializer (to Byte Array) for dictionaries that have a string key, but an object of some sort as its value.
I've never implemented a generic type in a function or used a delegate before, so I'm a bit concerned about this being significantly slower than writing a serialization function for a specific type of Dictionary (Dictio...
I'm writing in the hope that you will help me. Today I'm going to develop a mail application using vb.net, for this I wrote the code given below.
This code throws the exception ("SMTP Exception")
Public Function SendAnEmail(ByVal MsgBody As String)
Try
Dim MsgFrom As String = "[email protected]"
Dim MsgTo As Str...
D is a dictionary whose entry values are of Type T
What I'm attempting to do is have a delegate like "Serializer" below that I can invoke on an instance of T, such as "Entry.Value" below.
Please see the "return Entry..." line below for my wishful thinking.
Is this possible?
If so, is it a bad idea?
Public Delegate Function Serializ...
Hai Friends
I am Developing a application in that i am returning the ipaddress for the patricular system and save it in the database.but when check the database it is showing the server ip address but i want get the particular ip address who is running that application.
So far i have used this coding:
Public Function GetIPAddress(...
I have been using LINQ with ASP.NET to build some quick and simple maintenance forms using detailsview component. However it gets more difficult when you have to insert/maintain foreign keys. I managed to make to work following ScotGu's tutorial with a dropdownlist or textboxes and a second LINQ data component to display meaningful infor...
What I want to do is use one PC to test an application on another on the same 19.2.168.X.X
I would like to make it seem like SOAP requests are coming from a variety of different PCs, just to make the applciations log file easier to read and I have been told that virtual IP Addresses are the way to go. So, how do I defien a range and th...
Hello,
this is more a theoretical question i asked myself.
I remembered that BinarySearch of an ordered List(Collection in general) is faster than finding Rows with Datatable.Rows.Find or DataTable.FindByPK with a primary key value.
Hence i fill a Datatable from Database in a shared constructor and immediately after that a List(of Int3...
I have to convert a set of C# classes (class library) to SQL tables to be used by SQL Server, so that the data can be stored in a database and manipulated through the database.
The problem is that the number of these classes is big (more than 1000 classes), and it would take a long time to setup manually such a database schema (tables,...
Hello,
I am using .NET 3.5. I am creating a simple class and wants to make sure that the class after processing should not be null or should not be a new too..
So if we can just Test it like that
Dim objClass as new Class()
' do some processing with the class '
' and then.. check that if this object returned is not empty '
If (objCl...
In .net (c# or vb) expressions, how would you implement SQL's handy IN() functionality?
i.e. value in (1, 2, 4, 7)
rather than:
value = 1 or value = 2 or value = 4 or value = 7
There are obviously many ways, I'm looking for the most clean and simple!
...
The subject sais it all:
Is there any way to change the "+" icons that appear in front of nodes that have children? I'd rather have these fancy Win7 triangles ">" and "v" without having to buy 3rd party treeview classes.
...
Hi, i wrote a custom attribute and got the following Color property that I want the user to be able to indicate the color property in the attribute on a class:
Private _ColumnColor As System.Drawing.Color
Public Property ColumnColor() As System.Drawing.Color
Get
Return _ColumnColor
End Get
Set...
Creating ToolTip for Sub String of RichTextbox.
for example I used this text in RichTextbox:
'this is a sample text'
when user hover on 'sample', a tooltip show you have selected 'sample riched'.
...
Hello all.
I'm a newbie to threading, trying to learn it as I go. Please don't make any assumptions and try to explain threading concepts and rules that might seem obvious.
I have a Module (Static class) as follows:
Module Main
Private ReadOnly _dbConn As SqlClient.SqlConnection
Public ReadOnly Property DBConn() As SqlClient.SqlConne...
i have a string which is a paragraph written on the aspx side. So its goes like this.
The new student, {student_name} has the following grades -
Maths - {math_grade}
Science - {Science_grade}
...
and so on.
I need to get values from database, and replace {student_name} with "Joe Smith", {Math_grade} wth A or B+ etc.
how can i do this?...
So yes I'm very new to creating my own custom events. I can do the basics when I put controls on a form but this one is a little more complex. I have an application that reads in a .TSV and populates a form with controls based on the number of objects it "reads." So for instance: I have a file that contains 10 people objects and my code ...
I'm working on my first T4 code generation tool to add some Stored Procedure helper code to my project. I've created custom types (e.g. StoredProcedure and StoredProcedureParameter to help with my code generation and have included the assembly and namespace references in my code:
<#@ template debug="false" hostspecific="false" language...