all groups > vb.net > december 2004
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 31
writing a text file in vb.net
Posted by poldoj at 12/31/2004 11:30:55 PM
Hi all, I am trying to write the content of a variable to a text file. I am
currently switching from VB 6 code to VB.NET. Here is the code in my vb 6
applications (this code works)
------------------------
....
....
FileName$ = CommonDialog1.FileName
For i = 0 To List1.ListCount - 1
variab... more >>
Can files deleted by System.IO.File.Delete method be restored?
Posted by Raymond Du at 12/31/2004 10:30:20 PM
Hi,
I am working on a VB.Net window application, the application use
System.IO.File.Delete method to delete files, can those deleted files be
restored?
TIA
... more >>
Dim question
Posted by Jm at 12/31/2004 10:08:16 PM
Hi all
Is it possible to use DIM with an existing variable. By this i mean for
example: (Im just guessing on the syntax)
Dim MyNum as Int
MyNum = 5
Dim Lst(MyNum) as Listview
Thanks
... more >>
Web crawler
Posted by Tim Gaunt at 12/31/2004 8:24:15 PM
Hi,
Firstly, happy new year to you all.
I'm just wondering if anyone is able to help me develop a small crawler
to extract information from a directory (ie www.kellysearch.co.uk), this
is just for a personal project to expand my .NET knowledge but I don't
seem to be getting anywhere fast... more >>
Multiple List Views ?
Posted by Jm at 12/31/2004 7:11:32 PM
Hi All
Is there a way to have multiple list views created during program runtime in
code, which can have objects added, removed and later on the listview itself
be removed, whilst keeping the previous listview(s) hidden or disabled under
the original ?
Thanks
... more >>
TextChanged Asp.net question
Posted by barry at 12/31/2004 6:51:54 PM
The code below works fine for one textbox (hit enter key) but adding another
textbox and including the handle for it will not change either textbox
without switching the focus to say a button. Do not understand the concept
why it works for one but not two boxes.
Private Sub TextBox1_TextChanged(... more >>
MdiChild
Posted by David A. Osborn at 12/31/2004 6:24:01 PM
Is there an easy way to lock and MdiChild to the left side of its parent?
... more >>
Hmm, What happened to Left ?
Posted by Jm at 12/31/2004 6:10:16 PM
Hi all
I feel stupid for asking this, but i just went to use the left() function
from vb6 only to find it doesnt do what it used to under .NET. Im assuming
theres something else now im meant to do when i want to say for example
Dim Str as string
Str = "1234"
msgbox left(str,2)
Thanks
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
InvalidCastException
Posted by some guy at 12/31/2004 5:05:05 PM
Hi,
I've got a class called Client that inherits from TcpClient. I've also got a
TcpListener set up, which then tries to convert the TcpClient received from
AcceptTcpClient to my Client class, eg:
Dim NewClient as Client = CType(Server.AcceptTcpClient, Client)
I've also tried with Direc... more >>
VB.NET POP code
Posted by Brett at 12/31/2004 12:16:06 PM
begin 666 Class1.vb
M[[N_#0H-"DEM<&]R=',@4WES=&5M+DYE="Y3;V-K971S#0H-"E!U8FQI8R!#
M;&%S<R!0;W S36%I; T*#0H@(" @26YH97)I=',@4WES=&5M+DYE="Y3;V-K
M971S+E1C<$-L:65N= T*#0H-"@T*#0H-"B @("!0=6)L:6,@0VQA<W,@4&]P
M,T5X8V5P=&EO;@T*#0H@(" @(" @($EN:&5R:71S(%-Y<W1E;2Y!<'!L:6-A
M=&EO;D5X8V5P=&EO;@T*#0... more >>
can u fix this ...............
Posted by Supra at 12/31/2004 11:33:37 AM
at runtime i got error right away. so i am getting closer...just 1
errors in bolds. when i do step over i found same error in bold below
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an ... more >>
Favorites
Posted by Tom McL. at 12/31/2004 11:16:53 AM
I have a new computer which came with sp2 and
framework 1.1.
I have noticed that my favorites that contain links to
visual basic.net subjects that were saved under
the earlier version framework no longer work. Upon investigating
I found that the help files in the following directory:
C:\Docu... more >>
One Project / Multiple Executibles
Posted by Raterus at 12/31/2004 10:14:07 AM
Hi,
I create many tiny vb.net console applications that I call from the =
command prompt in sql server. Usually these are very tiny, and involve =
just one method (I'm doing things that a stored procedure can't do). =
The only way I know how to do this is to create a VS Project for each =
e... more >>
Detecting if Shift is pressed when Toolbar button is clicked
Posted by Kejpa at 12/31/2004 10:10:39 AM
Hi!
How can I detect if Shift (and/or Ctrl and/or Alt) is pressed in the click
event of a ToolBar button?
TIA
/Kejpa
... more >>
i don't understand this.............
Posted by Supra at 12/31/2004 9:07:08 AM
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object.
at... more >>
How to get a part/copy of an imagebox
Posted by jr at 12/31/2004 8:38:16 AM
Hi,
I need to place a part from an existing image into an other image control.
How can I do this.
ex
image is 300X300 picels
split it into 3X3
and I need the middle rectangle
Jan
... more >>
Process cannot access the file because it is being used by another process
Posted by Jim at 12/31/2004 8:01:41 AM
Hey all, if anyone can help with this I would appreciate it. I'm
loading an XML file and modifying one of the nodes. Once I modify the
node, I call the .Save method on the XML document object and I keep
getting the message below:
The process cannot access the file "C:\Documents and
Settings... more >>
VB.NET vs CFMX tick count distribution?
Posted by Brett at 12/31/2004 6:25:52 AM
I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The CFMX
code is distributed in the range 356 - 950 and one outlier at 135... more >>
API Function
Posted by martin huber at 12/31/2004 1:15:38 AM
Hello,
I'm searching for an API-Function to find files. I would
like to find files with a keyword. It's like a search how
it is in Windows explorer. Right mouse-click above a
folder -> Search -> Searching in file also.
For example I would like to find all files which contains
the strin... more >>
Converting a textfile to XML
Posted by helmut36 NO[at]SPAM gmx.at at 12/30/2004 11:39:02 PM
I have a output-file from the program listdlls and i want to conert it
to XML. I am new in dotnet and i need some help.... more >>
update data row
Posted by gigi at 12/30/2004 11:32:18 PM
i want to update one of data.
i have use this method to save my data.
'Decleare the file stream as fs
Dim fs As FileStream = New FileStream(filename, _
FileMode.OpenOrCreate, FileAccess.Read)
Dim rawData() As Byte = New Byte(fs.Length) {}
fs.Read(rawData, 0... more >>
Searching for timestamp in string
Posted by Brian Mitchell at 12/30/2004 11:15:24 PM
Is there an easy way to pull a date/time stamp from a string? The DateTime
stamp is located in different parts of each string and the DateTime stamp
could be in different formats (mm/dd/yy or dd/mm/yyyy, or hh:mm:ss
dd/mm...etc.)
Any ideas would be appreciated,
Thanks!!
... more >>
Modify the SMTP Setting in Outlook 2003
Posted by Jack at 12/30/2004 10:49:36 PM
Hello,
I need to change the SMTP address in Outlook 2003 using VB.net.
Thanks for any help,
Jack
... more >>
StreamWriter Class Question...
Posted by Anthony Nystrom at 12/30/2004 8:33:01 PM
I am trying to pass a text stream from streamwriter class to a richtextbox,
or textbox doesn't matter which one. I have the file write version working
fine such as:
x.streamwriter = System.IO.File.CreateText("C:\text.txt")
Anyway to write to a textbox or rtf rather than file... ?
Than... more >>
Namespace variable
Posted by dotNETnews at 12/30/2004 6:51:54 PM
Little confused...
When I declare a namespace variable in module I can use it anywhere in the
project. That's clear.
I read a book in which the author said that namespace variables can be
declared in a class outside of any subs or functions... below " Windows Form
Designer generated code... more >>
Maximizing Form in vb.net
Posted by sympatico at 12/30/2004 6:47:29 PM
Why can't the form be maximized in visual basic .net by double clicking the
title bar like it can in visual basic 6.0? When i double click the title bar
of a form in a vb .net project, it just goes to the code.
Thanks.
... more >>
Q: "Type Expected"
Posted by Geoff Jones at 12/30/2004 5:39:48 PM
Hi
I'm trying to use a class that I've written in a form. Unfortunately, when I
write something like:
Public x As New myClass
I get the compile time error: "Type Expected". Indeed, the "squiggly" blue
line does appear under myClass so I half expeced it. However, I had written
Imports... more >>
Sorting an array
Posted by John Conklin at 12/30/2004 4:16:49 PM
Hello all,
I am trying to help a fellow working with a VB6.NET project and am having
trouble.
The exercise wants us to read some words in English, German and French into
an array from a text file, which I got working fine.
But now it wants us to sort the array by the English words, and ... more >>
C# to VB.NET Conversion
Posted by Matthew Hood at 12/30/2004 3:37:47 PM
I'm playing around with converting some C# code to VB.NET as a learning
exercise and I'm running into a little confussion for my lack of
understanding some C# syntax.
The C# code is:
public const int LOCSIG = 'P' | ('K' << 8) | (3 <<16) | (4 << 24)
Can anybody explain to me what this is d... more >>
Properties or parameters : what's best performing?
Posted by Perre Van Wilrijk at 12/30/2004 3:31:30 PM
Hi there,
When I started using VB6, I used to write classes with properties and
functions as following ...
Private lngf1 As Long
Private strf2 As String
Public Property Get f1() As Long
f1 = lngf1
End Property
Public Property Let f1(ByVal vnewvalue As Long)
lngf1 = vnewvalue... more >>
Play Sound of Embedded Resource
Posted by S Shulman at 12/30/2004 3:03:26 PM
Hi
I am lookin for a code sample of playind WAV file tha was attached to a
project as a resource
Thank you in advance,
Shmuel
... more >>
How best to close sqlclient.connection?
Posted by Paul W at 12/30/2004 2:53:42 PM
Hi - in an asp.net application, how should I close out a
sqlclient.connection?
What combination and order of
Conn.close
conn.dispose
conn=nothing
Should I use? Specifically, is the .dispose required? Thanks,
Paul.
... more >>
INSERT ERROR
Posted by INSERT ERROR at 12/30/2004 2:47:04 PM
I am trying to INSERT record in MYSQL database, but each time the code tries
to execute the command: MySQL_cmdGLAccount.ExecuteNonQuery(), it reports an
error with the message
"COLUMN COUNT DOESN'T MATCH VALUE COUNT AT ROW 1"
Am using MYSQL CONNECTOR FOR NET VERY 1.0.3 as my provider. Am wonde... more >>
MySQL Insert Error
Posted by INSERT ERROR at 12/30/2004 2:41:02 PM
I am trying to INSERT record in MYSQL database, but each time the code tries
to execute the command: MySQL_cmdGLAccount.ExecuteNonQuery(), it reports an
error with the message
"COLUMN COUNT DOESN'T MATCH VALUE COUNT AT ROW 1"
Am using MYSQL CONNECTOR FOR NET VERY 1.0.3 as my provider. Am wonde... more >>
reference path of dll
Posted by Han Sen at 12/30/2004 2:29:43 PM
I have a dll that is used from word.
I'd like to have an xml file with some config settings.
This xml file I'd like to place in the same folder as the dll.
How do I read the path of the dll form the dll so I can find the xml
file?
Han... more >>
Compress MSAccess DB from VB?
Posted by John Howard at 12/30/2004 2:21:02 PM
Can I compress my MSAccess database from a VB.net program? If so, how?
Simple terms and/or example, please.
TIA,
John
... more >>
Datagrid sorting
Posted by Nikolay Petrov at 12/30/2004 2:17:38 PM
Is it possible to sort datagrid from code and how?
Tnx in advance
... more >>
how to code a user defined loop to run a progress bar as a separate thread
Posted by Viet at 12/30/2004 2:06:52 PM
I am trying to code a program that inputs a number (the max value) for a
progress bar which will execute as a separate thread. I know how to create a
progress bar as a separate thread but I am having difficulty trying to
create the user defined loop for the progress bar. Any help is appreciated!
... more >>
Attaching the .net debugger to process
Posted by DaveF at 12/30/2004 2:06:50 PM
Any Ideas?
Attaching the .net debugger to process '[3668] winformhello.exe' on machine
'PC50781' failed. Error code 0x80040001.
--
Dave
... more >>
Can't get design view for form?
Posted by Brett at 12/30/2004 1:33:58 PM
I have a form with a Form1_Load() Subprocedure and no other code. For some
reason, the design view does not come up. If I add a new form, the design
view does come up. The form does appear when I execute the EXE. The design
view for this form use to come up but I'm not sure when it stopped ... more >>
Q: Updating a smooth progress control
Posted by Geoff Jones at 12/30/2004 12:23:54 PM
Hi
I have been using a smooth progress control using the following link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;323088#2
It works well, however I can't seem to get it to update properly.
For example, I created a test application which had the smooth progress form
and t... more >>
Exiting an Application from a class Library
Posted by Juan Pedro Gonzalez at 12/30/2004 12:04:31 PM
Helo,
My question is how can I exit an application from a class Library...
I've got a class library wich I use to load and save user setting for my
application, some of this settings are mandatory, therefore if the setting
is not present the application should exit. I know I could throw an
... more >>
Open a text file and replace text help
Posted by Jim at 12/30/2004 12:04:11 PM
Below is my code, I'm opening an xml file and I have a chat name node
within it. By default the node has a value of "mypc" for which I'm
replacing and putting in a new value. I don't know if this is the best
approach but I'm trying it. I can open the stream fine and replace the
text. But whe... more >>
Downloading mail through VB.NET?
Posted by Brett at 12/30/2004 11:46:20 AM
I'd like any references to code that demonstrates how to download email
messages from a mail server strictly through VB.NET. I'd also like to split
each message into seperate components such as:
- header
- return path
- to
- from
- subject
- folder it was downloaded from
- body (multi ... more >>
CDO.Message.DataSource.Open() in .NET
Posted by Zoury at 12/30/2004 11:31:55 AM
Hi folks! :O)
I need to take a email from a given mailbox and forward it to another
mailbox.
The code we had in VB 6 looked like this one :
'***
Dim objMsg As Object
Dim objFwd As Object
' get the mail we need to forward
Set objMsg = CreateObject("CDO.Message")
objMsg.DataSource.Open ... more >>
windows services
Posted by alvis at 12/30/2004 10:11:03 AM
Hi,
i created this killer windows service, well it works :-)
any way now the people that will be using it want to use parameters
when starting the service, and have default parameter if the service is
started automaticly. could you please tell me how to find an article that
explains how to ac... more >>
How can I change listview gridlines color???
Posted by AstronusX at 12/30/2004 10:04:50 AM
How can I change listview gridlines color???
... more >>
is my code accrurate....
Posted by Supra at 12/30/2004 9:22:54 AM
i had usercontrol name doColor, then i added function procedure called
doColor. then i added module and called from method doColor into
module. the problem is i had to traced error:...
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Addi... more >>
Convert to VB question
Posted by Jon at 12/30/2004 8:13:10 AM
I need help converting the following to vb from c#
base.Load +=new EventHandler(CommonPage_Load);
I've tried a couple of things, but none is working. I think the closest I
came is:
MyBase.Load += New EventHandler(AddressOf PageAuth_Load)
Anyone care to show me the correct way? Thanks
... more >>
Working with word object (S.O.S)
Posted by Eran AMiel at 12/30/2004 8:13:06 AM
Hi
I Am working with word object in vb.net and i need to know two thing
1. what is the rows number in the current page ?
2. in what row am i ?
--
Thank For The Help
Eran... more >>
|