all groups > vb.net > june 2006 > threads for monday june 12
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Final Post of the day
Posted by Miro at 6/12/2006 11:34:35 PM
Im trying to store data as I would in some old language.
Old Example
//Create an array that holds 3 different variable types
TempArray := { { "Hello", 1, False }, { "Goodbye", 123, True } }
( basically array 1 is a char, 2 is a number, and 3 is a bool )
So
TempArray[ 1, 1 ] == Hello
Tem... more >>
Refer to sheet2 - even when named
Posted by Masa Ito at 6/12/2006 10:49:55 PM
I am using OLEDB in vb.net, and processing Excel files where I need to
refer to a specific sheet number. I don't know the name of the sheet. I
have tried:
SELECT * FROM [Sheet2$]
SELECT * FROM [Sheet2]
....
Sheet2 has a 'name' - but I don't know it. I am using a standard
connection st... more >>
Tokenizing
Posted by Craig Buchanan at 6/12/2006 10:39:26 PM
I'm trying to extract the key/value pairs string like this:
[Status]
CurrTime = 1200
LastPlayQUpdate = 400
CurrVolume = -10
[End Status]
My first instinct is to use a regular expression to match values before and
after the '=', but there probably is a more efficient method.
Can anyone... more >>
Setting the Title property in a Windows File ...
Posted by scott at 6/12/2006 10:00:50 PM
I hope I am just missing something easy, and that someone can point me in
the right direction, but I cannot seem to find out how to change the title
property of any random file using VB.NET.
For example, in Notepad, with a saved text file, one can right click on the
file and go to prope... more >>
Emulating keyboard strokes in vb.net
Posted by Paulers at 6/12/2006 9:11:35 PM
Hello,
I need to emulate keyboard strokes from a console application. The
console application monitors a textfile and when something is matched
in a text file I need the matched string outputted to the keyboard as
if someone was typing on the keyboard. can someone help me locate the
correct v... more >>
A Question About Regular Expressions and Capture
Posted by eBob.com at 6/12/2006 8:57:46 PM
I am using regular expressions and a particular feature called "capture" (I
think) to suck some information out of some html. I could have never come
up with this myself but Balena has an example which is very similar to this.
The guts of the program is ...
Dim i As Integer
Dim rgx As Reg... more >>
Cheap or free code profiler?
Posted by Smokey Grindle at 6/12/2006 8:55:31 PM
I need a program that can show me how much time lines took to execute... a
profiler type tool. (for .NET 2.0) anyone know of any good free or cheap
ones? thanks!
btw does anyone use NUnit for regression testing? if so how do you like it?
any free alternatives out there that are better? than... more >>
Function Vs. Sub Procedure
Posted by Miro at 6/12/2006 8:52:37 PM
Maybe this is just some bad habits picked up...
But why not write everything in VB as a Function ?
-If required later on you can always pass back a value.
-You can pass in variables as required
We always wrote everything in functions and tried to stay clear of
procedures.
Why make a S... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Handling DBNull from databases
Posted by Charlie Brown at 6/12/2006 8:47:12 PM
When checking for NULL values from a database, normally I would use
If Not row("NetSales") Is DBNull.Value Then
NetSales = row("NetSales")
End If
However, if I use a typed dataset then I can't check for NULL the same
way
If Not row.NetSales Is DBNull.Value Then
Net... more >>
VB.NET equivalent to "classic" VB "DoEvents"
Posted by pcnerd at 6/12/2006 8:08:01 PM
I have VB.NET 2005 Express Edition. Is there a VB.NET equivalent to the
"classic" VB's DoEvents? I searched the VB.NET Help & had no luck. In
"classic" VB, DoEvents was used in code that might lock up the PC. Thank you.
David... more >>
Loopin trough colors
Posted by Nedim at 6/12/2006 7:00:01 PM
first let me say sorry if this is in the wrong place, i'm pretty new to
programming and to be honest i am a bit intimidated by these forums.
now that i've got that out of the way, i was bored and decided to make a
small text application in Visual Basic 2005,
i have one list box, one label... more >>
Marshal Structure containing arrays to function in DLL
Posted by David Fort at 6/12/2006 2:28:02 PM
Hi,
I'm upgrading a VB6 app to VB.net and I'm having a problem with a call to a
function provided in a DLL.
The function takes the address of a structure which it will fill in with
values.
I get an error:
----------------
An unhandled exception of type 'System.NullReferenceException'... more >>
OOP object instance assignment in sub new()
Posted by syssyx NO[at]SPAM gmail.com at 6/12/2006 1:43:22 PM
I have a "CurrentUser" object in session that I want to access from
each page of a vb.net website. I can successfully access everything if
I include the following at the start of each pageload:
Dim objCurrentUser As WebsiteClass.CurrentUser =
Session("CurrentUser")
If objCurrentUser Is Not... more >>
Application unhandled exception event question
Posted by Bob at 6/12/2006 1:23:52 PM
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple
app and found that it was easier to implement unhandled exception management
tah it was in Vs2003 (vb.net) You can, if you want to, prevent your app from
terminating on an unhandled exception, and for me this is importa... more >>
Is there a Function and Function Argument generic self-reference?
Posted by Maxwell_Smart NO[at]SPAM ThePentagon.com at 6/12/2006 1:17:05 PM
Is there a way for a function to refer to itself generically? I'd like
to use such a thing (should it exist) for convenience and consistency,
not functionality.
For example:
Function Common(Some_String as String) As String
...
End Function
Function Go() As String
Dim Some_String = N... more >>
VB.NET: RasDial + CallBacks + throwing events = frozen UI?
Posted by bhc at 6/12/2006 12:38:32 PM
all-
up until just recently, i was fairly sure i'd implemented a RasDial
class in VB.NET complete with a callback to get updated status. from
this wrapper, when i throw an event back to the calling program, i can
console.writeline the state successfully. but as soon as i replace
that line w... more >>
ExitWindowsEx function not working.
Posted by cj at 6/12/2006 11:40:30 AM
Using VB2003 on Windows XP Pro
Why doesn't this work?
Public Class Form1
Inherits System.Windows.Forms.Form
Private Declare Auto Function ExitWindowsEx Lib "user32.dll" (ByVal
uFlags As Int32, ByVal dwreserved As Int32) As Int32
Private Sub Button3_Click(ByVal sender As... more >>
Scanning Option Group (VB 6 Option Button Control Array)
Posted by Michael D. Ober at 6/12/2006 11:03:36 AM
In VB 6, you can create control arrays for your option groups and scan with
the following code
dim opt as OptionButton
for each opt in OptionGroup
' Do something
next opt
I know VB 2005 doesn't have control arrays, so my question is how do I do
the equivalent in VB 2005?
Thanks,
... more >>
Passing an array of to a Sub
Posted by BobRoyAce at 6/12/2006 9:25:51 AM
I currently have code similar to the following in a few places in my
application:
cmd.Connection = New
SqlClient.SqlConnection(My.Settings.CERMITSConnectionString)
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "usp_Users_Insert"
cmd.Parameters.AddRan... more >>
String, not Boolean
Posted by Elena at 6/12/2006 8:06:02 AM
I have a piece of code that's acting funny. The variable is set as a string,
not a Boolean. The variable could be: Yes, No, Unk or INC. yet, if it's one
of the last two, it throws an error because it believes it's a Boolean. Is
there anyway to get around this? Code is below.
Thanks in ... more >>
minimize button click event?
Posted by Brad Melendy at 6/12/2006 7:53:07 AM
Hello,
I'm looking for an onclick event for the minimize button but can't seem to
find it within the form properties. I'd like to add code to hide my form
when it is minimized and suspect there is an onclick event I can use if only
I knew its name? Thanks for any help.
.....Brad
... more >>
Treading for console applications in VB.NET
Posted by fdmaxey at 6/12/2006 7:49:48 AM
I have used threading in Windows applications successfully. I am trying
to write a console application using synchronized threads, as I don't
need any display or operator interface.
However, when I call Monitor.Wait on any thread created, an exception is
thrown with the following description:... more >>
Auto-Updates using MSI
Posted by reshugoyal NO[at]SPAM gmail.com at 6/12/2006 6:52:55 AM
Hi,
I need to implement Auto Updates in my application wherein I will be
installing the application using msi.
First time I will be installing it through CD.( Directly running the
MSI file) Next time any of my clients run the application and if newer
version is available(which has to be speci... more >>
interop: FindWindow is to Caption as ?? is to Text
Posted by gabe at 6/12/2006 6:27:02 AM
The lpWindowName parameter in FindWindow gives me the ability to search for
what would be the caption of a dialog (if these were .Net messageboxes).
How would I get what would be the text of that dialog? (again if these were
..Net messageboxes)
Is it possible (or more possible) if we assum... more >>
vb2005 parameterized tableadapter wont save to access database
Posted by eduardoben NO[at]SPAM gmail.com at 6/12/2006 5:07:19 AM
I use a tableadapter with the sql string = select * fom table where
field=?
I load the desired record in a form and populate textboxes
but after i modify them when i use tableadapter.update it wont save
the changes to the database
i get the error "There is no valid update command"
any ideas?
... more >>
Best book/article/tutorial on Exception Handling in multi tier Windows App
Posted by maciek NO[at]SPAM kolobrzeg.com.pl at 6/12/2006 2:05:15 AM
Hi,
I was wondering if anyone could suggest me a book/article/tutorial on
Exception Handling in multi tier Windows Apps. What are the best
practices/ways to implement EH in multi tier enviroment. I read some MS
Best Practices articles on MSDN. It helped a little, but considering
how unexperie... more >>
Migrating Vb 3.0 Application to VB 6.0/.Net
Posted by lalit100 NO[at]SPAM gmail.com at 6/12/2006 1:18:49 AM
Hi
I want to convert few VB3.0 applicatios to VB 6.0 or .Net.
What is the way to do it and what all thing i should keep in mind while
doing this migration...
Please help
Thanks a lot in advance
Lalit
... more >>
Control.BackColor Transparency, Control.BackColor = Color.Transparent
Posted by ray well at 6/12/2006 12:00:00 AM
in my app i need to make a RichTextbox control transparent.
i need it to be a like a pane of glass lying on a sheet of paper, where u
can see everything on the sheet of paper not covered by text written on the
glass pane. i need to be able to see the control or form that is underneath
the Rich... more >>
Change the rowspan, columnspan property of a button control in a TableLayoutPanel at runtime
Posted by steve at 6/12/2006 12:00:00 AM
Hi All
I need to change the rowspan, columnspan properties of a control when they
are within a TableLayoutPanel (VB.net 2005)
At runtime the property is not available, but is at design time
Any ideas
Regards
Steve
... more >>
|