all groups > vb.net > april 2005 > threads for thursday april 21
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
ActiveX event handler signatures, how do they work?
Posted by Jeffrey Spoon at 4/21/2005 10:07:43 PM
Hello. According to MS the syntax for the LegendActivated event in the
MSChart control is:
Private Sub object_LegendSelected (mouseFlags As Integer, cancel As
Integer)
So, shouldn't:
Private Sub ReadingChart_LegendSelected(ByVal mouseflags As Integer,
ByVal cancel As Integer) Hand... more >>
Datagrid Header Text Alignment problem?
Posted by John Smith at 4/21/2005 9:52:33 PM
Hi all;
Putting "Due" into the column header of a datagrid.
Font is a proportional fort.
When the alignment is left, there is some space between the column separator
bar and the D in Due. When the alignment is center, Due is centered in the
header box. When the alignment is right, the e in ... more >>
Random not being so random
Posted by Jeff at 4/21/2005 8:40:36 PM
I was testing out some code to create a string of random characters.
The code inside of the Button1 Click event was along the lines of:
Dim i as Integer
Dim rGen as New Random()
Dim uniqueName as String
For i = 1 to 10
uniqueName = Chr(rGen.Next(65, 90)) & Chr(rGen.Next(65, 90)) &
C... more >>
Access Insert - Syntax Error for field "DATE" but not for "DATE1"
Posted by devprog at 4/21/2005 8:16:45 PM
objConn = New ADODB.Connection
objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath _
& ";Jet OLEDB:Database Password=" & dbPassword)
This cause error: (VB.NET. )
sqlString = "insert into table1 " _
& "(Date1,Time,Ext,Co) values " _
& "('04/04/05','06:02PM'... more >>
How to automate save as in SHDocVw?
Posted by Brett at 4/21/2005 7:45:14 PM
I'm trying to save a webpage in the IE object (SHDocVw) via save as "web
page complete". Using this code:
Me.IE_Inst.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVEAS,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, "C:\\Test Folder\\Some
Folder\\mypage.html", Nothing)
Everything works fine b... more >>
Best way to "cast" base class to specialized class
Posted by SA at 4/21/2005 6:51:14 PM
Hi all:
I have an object of a base class that needs to be cast to an object of a
specialized class.
What is the best way to do this? (I thought about creating a constructor in
the specialized class that takes an argument of the type of the base class
and then copy property values over, but ... more >>
VB 2005 Beta 2 Express won't install
Posted by vbmark at 4/21/2005 6:45:41 PM
I get the following message box:
Visual Basic 2005 Express Edition Beta 2- ENU Setup
===================================================
Setup has detected that previous versions of the following product(s) are
currently installed. Uninstall these applications before continuing with
... more >>
Moving pivot locations using Trigonometry
Posted by Carl Gilbert at 4/21/2005 5:33:48 PM
Hi
I have a math kinda problem where I'm trying to split some lines when two or
more lines connect two shapes. The reason I am doing this is to make it
clear that there are multiple lines connecting the two shapes.
http://www.blackwaterbadgers.co.uk/image1.bmp
Image 1 shows how if you ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Add custom methods to Strong DataSet
Posted by Steve Amey at 4/21/2005 4:20:21 PM
Hi all
I have created a strong DataSet using Visual Studio. I have been in to the
DataSet's vb file to have a look at the code and see if I can add things to
it. What I'm after is to create a new method on every DataTable in the
DataSet, this method will be called SelectToTable, as I have t... more >>
DragDrop
Posted by Robert S. Liles at 4/21/2005 4:09:06 PM
I am trying to drag a text file and drop it into a multiline text box. I
get DragEnter, DragOver, and DragLeave events, but I don't get a DragDrop
event. I have AllowDrop set to TRUE for the textbox, the form the text box
is on, and the parent form that opens the form the text box is on. I ... more >>
Framework Installation Directory
Posted by John Smith at 4/21/2005 4:01:14 PM
Is there any way to find the C:\WINNT\Microsoft.Net\Framework\v1.1.4322
installation directory programmatically vs. hard-coding it?
--
Thanx in Advance,
atr2000
... more >>
VB / VBNet
Posted by Jon at 4/21/2005 3:38:38 PM
I am trying to convert an application from VB to VB.Net. the application is
large (400 + Screens) and (175+ reports).
I am a visual learner meaning if I found examples how to do something in VB
and how to do the same thing in VB.NET
I would learn this much faster. Most of my issues have to de... more >>
FTP active mode
Posted by Ray at 4/21/2005 2:36:01 PM
Hi.
I've seen many samples to use FTP, but all are using FTP in "passive mode"
and i need to use it in "active mode".
Any example?
Thanks in advance,
Ray... more >>
OT: Theory of stack and heap allocation of variables
Posted by Chris Dunaway at 4/21/2005 2:32:37 PM
I have seen on these newsgroups many posts about value types and
reference types. And, generally speaking, value types are allocated on
the stack, and reference types on the heap.
My question is about the stack and heap itself. Is the stack really a
stack? is ia LIFO data structure? Does ea... more >>
C# Conversion help needed.
Posted by rob at 4/21/2005 2:12:32 PM
Would somebody be kind enough to convert this code to VB.Net for me?
private string GetRtfImage(Image _image) {
StringBuilder _rtf = null;
// Used to store the enhanced metafile
MemoryStream _stream = null;
// Used to create the metafile and draw the image
Graphics _grap... more >>
E-mail Problem [Could not access 'CDO.Message' object.]
Posted by Richard at 4/21/2005 1:47:47 PM
Hi Gurus,
From some systems we are not able to send e-mails. Error is:
Could not access 'CDO.Message' object.
Here's my simple code.
Dim MailMessage As New System.Web.Mail.MailMessage
MailMessage.Body = MailBody
MailMessage.Subject = MailSubject
MailMessage.F... more >>
What is the simplest way to link DLLs?
Posted by ZaX at 4/21/2005 1:39:41 PM
Good day folks,
I'm wondering what is the easiest way to link DLLs to a project with VB.NET.
I've been building an app here (framework 1.1). In my project, I added a few
references to files I've copied in my bin folder. The Copy Local property
for the DLLs is set to true.
Here, everything... more >>
find in solution
Posted by raulavi at 4/21/2005 1:33:03 PM
Hi:
I wonder is there is any bug on doing this.
I search a string using find in solution files nothing is done, until I
check display in find 2 ....Why?... more >>
just a little bit more descr
Posted by raulavi at 4/21/2005 1:27:03 PM
SQLhave you seen datawindow ?
They do something as what I am asking , they create an obj out of the SQL
SELECT command, and I beleive once we have the the dataAdapter loaded from
the SQL select command, maybe there is some quick class to create the table. ... more >>
Creating a new table
Posted by raulavi at 4/21/2005 12:09:01 PM
hi:
How do I create a table from an sql command?
I pass a select command "select col1,col2 from ......"
and I want to create a new table.
Is any class for this ?
Thanks
... more >>
Arithmetic operations with large numbers
Posted by Sam Fisher at 4/21/2005 11:31:49 AM
Hi,
I have a situation where I have to support a large number(not decimals),
something of the order of 20 to 30 digits in the database(sql server 2000)
I am not able to use LONG data type as it exceeds the limit, so I am
thinking of using the string value now. But do not know how to do the
a... more >>
Deployment
Posted by John Smith at 4/21/2005 11:23:37 AM
I am just learning about deployment (setup projects) in vb.net. Is there a
way to run an Executable during an Installation or at the end of an
installation?
I am trying to install a windows service through a deployment wizard just so
that I don't have to go through the trouble of running Inst... more >>
Creating dynamic forms from a varible name
Posted by salportaro NO[at]SPAM gmail.com at 4/21/2005 10:57:52 AM
Hello:
Here is the situation. VB.NET
I have several forms and I have a XML file that can start with a
particular for for debugging/layout reasons. This is a mdi project.
Normaly you would load a form as follows:
Dim frmT As frmTrans
frmT = New frmTrans
... more >>
Cast String to Byte (sqlsr2k tinyint)
Posted by dbuchanan at 4/21/2005 10:52:48 AM
How do I explicitly cast a string to Byte?
Here are my circumstances;
The string is from a textbox and could be empty.
The Byte is a tinyint in SQL Server 2000
I am using the AddRow method as shown below and get an
InvalidCastException.
"Cast from string "" to type integer is not valid"
M... more >>
Refreshing bound objects
Posted by Anthony Sox at 4/21/2005 10:36:37 AM
Can anyone help me with the following problem
I have an object that is bound to controls on a form. I want when the user
cancels an update action for the controls to refresh and show the initial
data which is still in the object bound to it after it has restored it data.
Anyone know how i ca... more >>
Binding to a listview
Posted by Anthony Sox at 4/21/2005 10:34:01 AM
anyone know how to bind a collection of objects to a listview as with the
datagrid or listbox control.
for example the listbox control binds to collection objects as follows.
lst.DataSource = Regions
lst.DisplayMember = "Country"
is there a way of doing the same with a listview.
Thank ... more >>
vb.net Outlook Cast Not Valid - Problems with items in Public Folder
Posted by Chris Thunell at 4/21/2005 9:48:52 AM
I am looping through a Public Folder in our Exchange 2003 server system and
i keep getting invalid cast exceptions although the Message Class is set
correctly for each item.
It works until i get to record 250 and then i start getting the cast
exception errors. Once i get one it continues u... more >>
DataSet Schema to MDB Table
Posted by PJSimon at 4/21/2005 9:44:13 AM
I can iterate through a DataSet row-by-row to fill an MDB table, but how do I
apply only the schema of the DataSet to the MDB table without inserting any
data?
Thanks for your help.... more >>
Serial port communications
Posted by ValK at 4/21/2005 9:43:56 AM
Hi!
Is that possible to scan multiple ports for incoming data with
Sax.Communications.Community library control)?
Let's say PC has 3 available ports(com1, com2, com3). Also there is three
scan guns plugged to those ports.
I want to have some kind of event that will fired up if data arrives t... more >>
Distributing EXE
Posted by digger27 at 4/21/2005 9:42:52 AM
I have created a small executable that I want to copy to a couple of other
computers. I have read in this group that the machine needs to have the .Net
Framework in order to run. The machine I created this EXE on has:
Framework 1.1
Framework 1.1 Hotfix (KB886903)
Framework 2.0 Beta
If I ... more >>
VB.NET won't run in debugger
Posted by claire at 4/21/2005 9:42:02 AM
I have a program that has suddenly stopped running in the debugger. It won't
even let me step into the main sub. I have run this same code successfully
in the debugger on a coworkers machine. I have tried reinstalling Visual
Studio. What happens when I press the debug button is that the wa... more >>
HOWTO? Iterate all legal values of an ENUM
Posted by Lee Gillie at 4/21/2005 9:37:28 AM
I see this was posted a long time ago, but it has since expired.
Given....
Public Enum Fruit
Apple
Banana
Cherry
Peach
Strawberry
Tomatoe
End Enum
I'd like to be do something of this flavor in VB.NET....
Dim frMyFruit as Fruit
For Each frMyFruit in Fruit
...
Next
Of... more >>
drawing on a picbox from a class
Posted by Kevin at 4/21/2005 9:14:41 AM
I have a form with a Picturebox on it. I also have a class that
contains data that I want to graph in the picture box. How do I pass
the PictureBox to a method of the class and have the method draw in the
picture box
in the form I have
Private B As New Box
Private Sub Button1_... more >>
Help passing and binding to a dataset please.
Posted by Darious Snell at 4/21/2005 8:39:21 AM
I am using windows forms and vb.net.
My problem is a little complex so please bear with me.
I have written an application that references a .com based API linked to an external
client application.
The API exposes client user interface objects. One of the objects is similar to a grid.
The ... more >>
Help me read/write to text file
Posted by Daniel Kaseman at 4/21/2005 8:32:33 AM
I want to make a program that has 3 textboxes for inputting: Name, ID,
Amount, and then when I click "Add Item" button, it adds it to a text file,
and shows up on the list box. When I close and reopen the program, the text
file should fill the listbox with the records.
How do I do this? Is... more >>
Good_morning_or_good_evening_depending_upon_your_location._I_want_to_ask_you_the_most_important_question_of_your_life._Your_joy_or_sorrow_for_all_eter
Posted by RonGrossi382731 NO[at]SPAM yahoo.com at 4/21/2005 8:19:35 AM
The reason some people don't know for sure
if they are going to Heaven when they die
is because they just don't know.
The good news is that you can know for
sure that you are going to Heaven which is
described in the Holy Bible as a beautiful
place with no death, sorrow, sickness or
pain.... more >>
grid implemenation issue
Posted by Sam at 4/21/2005 7:04:33 AM
Hi,
I have two grids bound to different datasets.
When a row of the first grid is selected, the dataset of the second
grid is updated regarding the data of the selected row.
It works fine. However when a new row is selected in the first grid
(that is a row that we are about to add by filling in... more >>
Outlook Task Snag
Posted by digger27 at 4/21/2005 6:28:01 AM
I am trying to progamatically create tasks in Outlook using VB.Net. I am
using the following code:
****
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
... more >>
hashtable issue
Posted by Sam at 4/21/2005 5:45:29 AM
Hi,
The following triggers this error :
Enumeration has either not started or has already finished.
(msg is a valid string)
CtrlStatus.Add(CInt(dtCtrl.Rows(iCntr).Item("FieldID")), msg)
Dim keys As IEnumerator = CtrlStatus.Keys.GetEnumerator()
Dim values As IEnumerator = CtrlStatus.Values... more >>
Retrying this post
Posted by brix_zx2 at 4/21/2005 5:33:02 AM
vb .net 2k3 app using an access db:
I want to be able to go through each record in db once and look at a certain
value in one column and then look at the values of the next column (only 5
possible values). Count each of the 5 values in column 2 that have the same
value of column 1.
If a... more >>
structures
Posted by Sam at 4/21/2005 4:57:55 AM
Hi,
I have a public structure defined in a global module.
I have a public function of a class that returns this structure:
Structure CtrlStatus
Public FieldID As Integer
Public Status As String
End Structure
Public Function ChkCtrlFields(ByVal dtCtrl As DataTable) ... more >>
issue with GetChanges(DataRowState.Modified)
Posted by Sam at 4/21/2005 3:27:14 AM
Hi,
Some people are going to say I drive them crazy again...but here we
go...
I have the following code :
BindingContext(m_dsFields.Tables(0)).EndCurrentEdit()
Dim dtModifiedData As DataTable =
dsFields.Tables(0).GetChanges(DataRowState.Modified)
It works only for the first row of my gr... more >>
what happens really when I declare a class in a class
Posted by Thomas.Kliche NO[at]SPAM web.de at 4/21/2005 1:34:44 AM
I tried the following:
Public Class ClassA
Public Class ClassB
Private myName As String
Private myBirthday As Date
Public Property Birthday() As Date
Get
Return myBirthday
End Get
Set(ByVal Value As Date)
myBirthday = Value
End Set
End Property
Public ... more >>
Defining variable names on the fly
Posted by Hamish Symington at 4/21/2005 1:31:53 AM
Hello,
I'm trying to re-code a site which I wrote in PHP into
ASP.NET using Visual Basic .NET.
Something PHP has which has proved invaluable is the
concept of variable variables. I haven't had any success
with working out how to do it and hoped someone might be
able to help.
What I ... more >>
How to List All Required Assemblies for an EXE
Posted by Charles Law at 4/21/2005 12:00:00 AM
I'm sorry to keep harping on about this one, but it is really quite
important for me to be able to list _all_ required assemblies in my Help
About box. Herfried kindly posted some code before that lists _loaded_
assemblies and their version, but I have one assembly that is not loaded
until t... more >>
Cant set focus to textbox
Posted by Tosch at 4/21/2005 12:00:00 AM
I have a usercontrol with a label, a textbox, a treeview, a grid and a
couple of checkboxes.
The usercontrol is hosted on a form together with a cancel and a
accept button. This form is used to search records in a database.
On several forms in my application I show (modal) this form to search... more >>
Public variable VS property ?
Posted by Agnes at 4/21/2005 12:00:00 AM
In a single form , I can delcare a public vairable or property.
So. What is the difference between it ?? which is better ??
Dim frmTest as myForm
frmTest.strPublicVariable = "ABC"
frmTest.strPropertyVarialbe = "ABC"
Sorry for my stupid question .
... more >>
Disposed Object
Posted by Peter W Johnson at 4/21/2005 12:00:00 AM
Hi Guys,
I have a small program that uses parent and child mdi windows.
The program loads with the parent window
click on the main menu to open a child window
On the child window click on a dropdownbox to select a name
click on a button in the same child window to open another child window ... more >>
DLLMain in assemblies?
Posted by Jozsef Bekes at 4/21/2005 12:00:00 AM
Hi All,
is there a mechanism just like DllMain in VC6, a function that gets called
whenever an assembly gets loaded?
Thank you for all answers.
Jozsi
... more >>
Searching multiple excel sheet using a vb.net app
Posted by Scott at 4/21/2005 12:00:00 AM
I want to search 5 or 6 very big excel spreadsheets looking for specific
data held in them. The search would be using clients surnames and maybe
postcodes to eventually find the correct person. Once this is done I wish
to either see there full details or have a display of what filename they ... more >>
array
Posted by Dirk Doler at 4/21/2005 12:00:00 AM
Hi, Is there a way of shuffling an array ?
Grtz,
Dirk
... more >>
Using CType to Cast to Variable Type
Posted by Charles Law at 4/21/2005 12:00:00 AM
I have the following lines
Dim t As Type = GetType(MyType)
Dim serialiser As New XmlSerializer(t)
I want to be able to do the following with a FileStream fs
Dim instance As MyType
instance = CType(serialiser.Deserialize(fs), MyType)
but replacing MyType with something more generic, f... more >>
Values do not appear when I mouse over them?
Posted by Brett at 4/21/2005 12:00:00 AM
I use to see variable values when I moused over them. One one machine, I do
not see them anymore. Also, when a problem is underlined in blue, I no
longer receive a hint when I mouse over it. Any idea where to change this
back so I see the hints?
Thanks,
Brett
... more >>
How to use the OCX mscomm under .NET? Need Certificate!
Posted by Eric at 4/21/2005 12:00:00 AM
Hi,
Is it possible to get the certificate in order to use the OCX mscomm under
VB.NET. This OCX was available under VB6 and was used for serial comm.
Thanks for help !
Eric
... more >>
VSDISCO
Posted by 101 at 4/21/2005 12:00:00 AM
Just starting to study .NET web services. I noticed that VS 2002
automatically creates a VSDISCO file when you create a web service, VS 2003
does not, also VS 2002 showed the WSDL and DISCO files without "Show All
Files" option in the Service Explorer, VS 2003 does not.
Just learning, so I ... more >>
About Application Config file
Posted by Ellis Yu at 4/21/2005 12:00:00 AM
Dear All,
I've an application running from the network server. The config file
includes some application setting and the connection string inside. If I
want the application to read the config file from client machine instead of
server one, how can I do it? Suppose I specify the config ... more >>
Printing fine lines
Posted by Tosch at 4/21/2005 12:00:00 AM
I have to print some rectangular graphics. When drawing lines I can't
seem to make them very fine. Even if I set the pen width to say .1 the
width of the line is the same as if the pen width is 1.
... more >>
Date-Time Photo Data
Posted by J French at 4/21/2005 12:00:00 AM
How can I retrieve the date and time that a photo was taken in code ?
Thanks.
--
jffrenchjr@earthlink.net
... more >>
|