I have the following code:
XAML code for Window1.xaml and the VB.Net code for Window1.xaml.vb.
The error I get is the following:
"Cannot create instance of 'Window1' defined in assembly 'ServiceControl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in marku...
Hi,
In the company I work for we have a desktop application developed in .NET that we like to open up some parts for other software developers.
I see it like some kind of public methods that other software can access. Is there any standard approach, best practices or other experience of this?
I guess you could do this with Win32 calls...
I'm building a simple udp lan chat application in vb.net and I'm wondering how I should split my packets. Each sent packet should have like an id, a username and ip address from where it's coming and maybe also a command part for like join or leave to update my userlist and a text message. I'd like to know what is the easiest way to put...
I have an third part dll that have a function that returns a string.
When I call the function I got for example "123456" back. At least it seams like that, but when i do mystring.length it does not return any length. If I set the text property of a label it shows "123456".
When I have the string I got from the dll I send it to a webserv...
I am totally new to Microsoft Visual Basic 2008 and the programming language itself. My problem is that I was following a tutorial on how to make a browser. The browser works in debug mode, and I clicked build under build at the top. At the bottom it says build succeeded, but I have no idea where the program was actually saved to. I ...
I have the following c# linq query:
var duplicatedSSN =
from p in persons
group p by p.SSN into g
where g.Count() > 1
select g.Key;
Can anyone help me convert this to a vb.net linq query?
Many Thanks!
...
Guys, WPF project is not accepting this property definition when starting a thread. Anybody knows the equivalent of the following in WPF?
Control.CheckForIllegalCrossThreadCalls = False
Thanks in advance!
...
I have a form that has 3 text boxes for 3 input values, along with a list box for output. I need the user to be able to input 3 different numbers and click a button to find the average. I'm not really sure how to do/approach this. Any help is greatly appreciated.
Still Stuck....
Private Sub btnAverage_Click(ByVal sender As System.Objec...
Trying to get the user to put 3 numbers in 3 text boxes and get the average.
Private Sub btnAverage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAverage.Click
Dim a As Integer = CInt(txtone.Text)
Dim b As Integer = CInt(txtTwo.Text)
Dim c As Integer = CInt(txtThree.Text)
Dim average As In...
Hi,
(VB.NET, .NET 3.5)
I wrote the following function to read some text from txt file. It was working fine but now it's not. It keeps giving me this error message
"IOException was unhandled" and
" The process cannot access the file 'F:\kh_matt\ch1.txt' because it is being used by another process."
The ch1.txt is not even opened or...
Caan somone advise the best approach to what i'm trying to acheive (linq to sql, returning list of data to show in a grid/list etc etc)... Its complaining about anonymous type conversion, and from what i'm reading, thats not elegant way of doing it.
Public Function GetHistory(ByVal historyId As Integer) As List(Of ?????????)
Using...
Branching off from this link it seems that Request.ServerVariables("SCRIPT_NAME") doesn't return anything. I've just set up a simple loop to see if anything comes out at all but with no luck. Any ideas?
For Each s As String In Request.ServerVariables
Label1.Text += s
Next
ServerVariables brings back a list of Strings in key->valu...
I need to set the default property of a dotNet Control used by an VB6 Application.
<ComClass(myControl.ClassId, myControl.InterfaceId, myControl.EventsId)> _
<DefaultProperty("NewProperty")> _
Public Class myControl
Public Const ClassId As String = "86252de2-ca87-4468-adbe-ad7c47747759"
Public Const InterfaceId As String = "c1c...
What unusual, unexpected consequences have occurred in terms of performance, memory, etc when switching from running your .NET applications under the 64 bit JIT vs. the 32 bit JIT? I'm interested in the good, but more interested in the surprisingly bad issues people have run into.
I am in the process of writing a new .NET application w...
I'm just curious why class/property attributes in VB.NET have a weird optional syntax such as:
<TestAttr("a", "abc", Optional1:="foo", Optional2:=3)>
VB.NET allows you to set optional parameters like this to avoid order restrictions (which is lovely) but in this case it's forcing you to that.
For example this is not possible:
<TestA...
Is there a way to turn option strict off for just a single line of code?
I'm doing some maintenance work and I need to "cheat" in just one place and I don't want to lower the standard for the entire file.
...
A stored procedure returns data about a user record including a nullable datetime column for their last login date. Which one is the better choice in dealing with the possibility for NULL values when trying to assign a .Net date variable?
Try
_LastLogin = CDate(DT.Rows(0)("LastLogin"))
Catch ex As InvalidCastException
...
I have the following code that adds a background worker into a VB.net WPF project:
Imports System
Imports System.ComponentModel
Imports System.ComponentModel.BackgroundWorker
Imports System.IO
Imports System.Threading
Imports System.Net
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Win...
Hi,
I'm broadcasting a simple message to ..*.255 (changing to 255 the last part of my ip) and i'm trying to listen to it. the code returns no error but i'm not receiving anything. In wireshark I can see the broacast is sent correctly, but with a different port each time (I don't know if that's a big deal). Here's some parts of my code.
...
What's the easiest way to run a periodic task in the background in VB?
For example: Update a label every second with the current time, while still allowing the form to be available.
...