How do I paste into text box?
Hi
I want to transfer what ever text is in the clipboard into my rich text
box. How would I do it? Is it possible with a normal text box?
Thanks
Diarmuid Tag: test Tag: 503724
Select mic/wave/line in
Hi there, can any one give me some pointers on how to get a list of devices
on a sound card,
(IE. CD Audio/Line-in/Microphone/Wave) and then being able to Mute a device
on the Play Control or Select a device on the Record Control via a VB6
programme?
Thanks Bill Tag: test Tag: 503723
Scrolling text
G'day,
Is there anyway I can insert scrolling text into a vb program?
I'm using vb6.
I want the user to be able to insert his/her own text into a box, and
make it scroll, or blink. Can this be done, and how?
Thanks.
ps . I'm only just starting out in VB so as basic as possible please,
thanks. Tag: test Tag: 503715
Une petite question pour microsoft
Bonjour,
Si j'installe visual basic.net sur Windows Xp edition
familiale etant daonné que je ne pourrai pas dévelloper
d'application Web ASP.NET.
Est-il possible de résoudre se problème (sans changer de
système d'exploitation) en d'autre terme existe-il un
module, un logiciel, une mise à jour qui me permettrait
de dévelloper de telles application ?
André Tag: test Tag: 503713
Passing arguments to an executable
How do I pass arguments via the command line to a VB app
I wrote? More specifically what code is needed to receive
the arguments?
Thanks,
jeff Tag: test Tag: 503701
closing a form
vb.net
windows form app
I have 2 forms, the first form opens up and there is a button to open the
second form which works fine. I want the second form to have a button to
close the first form.
I tried everything nothing seems to work.. Does anyone know some could I
could use to do this.
Thanks Tag: test Tag: 503686
Getting all folder and sub-folder names
What is the best way to generate a list of all folders and
ALL sub-folders found in top level folders? Is there
a "built-in" VB feature that generates such a list or am I
going to have to generate the list recursively and
programatically. Tag: test Tag: 503675
Links in Excel workbooks
Hi
Does anybody know a way of 'cleaning' an Excel file, that
has got links 'stuck' in it?
i.e. some bug has been invoked whereby it keeps asking me
whether I want to update links to other workbooks, where
there are no links to other workbooks in the file. Tag: test Tag: 503670
print condensed fonts
i'm printing using the printer object i want to send escape commands to
activate condensed font. how can i do that??
thanks,
Luis Dominguez Tag: test Tag: 503669
Exit status of from VB exe
Hi,
I launch an application using Shell() call and wait untill the application
ends.
From the application I launched, I wish to return some exit status to
calling code. (ie return 1 if aborted by user, 0 if fail, 2 if sucessfully
completed )
The call would be something like
nRetVal = Shell(....)
if(nRetVal = 1) then
....
This is possible if the called application is written in VC++. However, in
my case the application has been written in VB.
Is there a way to somehow modify the VB application and make it return an
exit status?
thanks,
Ash Tag: test Tag: 503652
System Idle Detection
Hello all
Can you help I want and need a vbasic routine to detect if the system is
idle after learning from someone how to switch the monitor on & off I cant
switch the monitor on if it has gone into idle system timeout and as it
regaurly makes sure its off. it does cause problems if im in middle of
things
thanks in advance for any help....
email me if you like matthew.lancaster@btopenworld.com Tag: test Tag: 503644
Scrolling with mouse wheel
Is there a way ( probably will require win api ) to make any window scroll
by using the wheel on the mouse. Actually my client wants this capability
with the data report window and my application mshflexgrids. I'm using VB6
with Data Report that comes with VB.
thx Tag: test Tag: 503630
Tooltips control problem...
Hi all,
I'm using the tooltips control as described in the MSDN. I managed to show
tooltips when I set the mouse cursor on a control, but I can't seem to
manage to programmatically show the tooltip.
Anyone knows what TTM_ message I have to use??
Thanks,
Ivan Tag: test Tag: 503626
telent kind of screen
Can i read data from a telnet screen thorough a VB program.
the third party application is a windows application with a vt220 emulation
screen embedded in it. Data will be displayed on the screen. Now how can i
read that data through a program.
----------------------------------------------------
T Srinivasa Chowdari ,
Prosoft Systems,
505, Topaz Complex,
Punjagutta , Hyderabad,
500082, INDIA
(Office) +91-040-23404102 extn 35
98495 85140 (mobile)
Fax +91-040-23404990 Tag: test Tag: 503616
oNetwork Functions?
Hi,
Does anyone have a list of all the oNetwork. I.e.
oNetwork.AddWindowsPrinterConnection, oNetwork.SetDefaultPrinter etc
Is there a way to delete all current Windows printers? Maybe something like
oNetwork.DeleteWindowsPrinterConnection
Cheers
Ben Tag: test Tag: 503614
Making a project automatically execute
I have a project written by a developer.
It requires that I click on a button to make it run.
I want to start the executable and have it run without me clicking on the
"Run" button.
(Private Sub Command2_Click() sub is a commandbutton on a form)
What sort of commands should I look into to make the form run automatically?
JAD Tag: test Tag: 503610
Excel links
Hi
Does anybody know a way of 'cleaning' an Excel file, that
has got links 'stuck' in it?
i.e. some bug has been invoked whereby it keeps asking me
whether I want to update links to other workbooks, where
there are no links to other workbooks in the file. Tag: test Tag: 503605
vbEmpty error?
Hi,
I'm programming a logon script to map to a printer, I got this script out of
a windows 2000 scripting book so it should work. However I receive: - Error:
Object required: 'vbEmpty' Code: 800A01A8.
The book just says that its releasing the memory required for those
variables.
Option Explicit
Dim oNetwork, sPrintPath
Set oNetwork = CreateObject("WScript.Network")
sPrintPath = "\\PRINTSERVER-2K\ORG_FS-7000"
oNetwork.AddWindowsPrinterConnection sPrintPath
oNetwork.SetDefaultPrinter sPrintPath
Set oNetwork = vbEmpty
Set sPrintPath = vbEmpty
Anyone see anything wrong?
Cheers
Ben Tag: test Tag: 503600
Charting Software/control
Hi
Anyone know of some really good charting software/control that i can use
from vb6.0 ?
basically i want to be able to create the chart and then save the chart as a
gif or jpg and view it in a html page
TIA
Silk
--
"the world is not enough" Tag: test Tag: 503599
Passing a recordset as an input parameter
Hi,
I need to pass a record set as an input parameter to oracle stored procedure
from some VB code. Can someone tell me how to do that.
eg. I have some data on the excel sheet, imagine I am having 20 columns, so
to pass these 20 colmns as 20 parameters to the stored procedure it takes
some doing. Is there any way where in I can get these datas into one record
set and transfer these data into 'something' which I can pass as a parameter
to the procedure. The problem now I am facing is how will I get the data
from excel into something(like we do with variable usually) which I can pass
as a parameter to the procedure.
Please help !
- Gary - Tag: test Tag: 503590
API TrackPopupMenu + Form's root menu (GetMenu(myForm.hwnd))
Hi
I am trying to popup the Form's root menu (GetMenu(myForm.hwnd)) some place on the form. (In final version, it will be from the
System tray)
In two of the most simple (simplistic) versions which I wrote:
-OR (5) display is quite bizarre: a vertical bar without caption
-OR (4) 'ghosts' and ultimately a freeze.
I got a working solution #3, but if 4 or 5 only need a patch...
VB Attribute VB_Name = "Module_HyperMenus"
Option Explicit
Option Compare Text
'############################################################################################
Private Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function GetMenu Lib "user32" _
(ByVal hwnd As Long) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function GetMenuItemCount Lib "user32" _
(ByVal hMenu As Long) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function GetSubMenu Lib "user32" _
(ByVal hMenu As Long, _
ByVal nPos As Long) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function GetMenuString Lib "user32" _
Alias "GetMenuStringA" _
(ByVal hMenu As Long, _
ByVal wIDItem As Long, _
ByVal lpString As String, _
ByVal nMaxCount As Long, _
ByVal wFlag As Long) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function GetMenuItemID Lib "user32" _
(ByVal hMenu As Long, _
ByVal nPos As Long) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function AppendMenu Lib "user32" _
Alias "AppendMenuA" _
(ByVal hMenu As Long, _
ByVal wFlags As Long, _
ByVal wIDNewItem As Long, _
ByVal lpNewItem As Any) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function CreatePopupMenu Lib "user32" _
() As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Declare Function TrackPopupMenu Lib "user32" _
(ByVal hMenu As Long, _
ByVal wFlags As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nReserved As Long, _
ByVal hwnd As Long, _
ByVal lprc As Any) _
As Long
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
'Private Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As
Long, ByVal wIDNewItem As Long, ByVal lpString As Any) As Long
'Declare Function TrackPopupMenuEx Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal
hwnd As Long, ByVal lptpm As Any) As Long
'Private Const TPM_RECURSE As Long = &H1&
'############################################################################################
Private Const MF_BYPOSITION = &H400
Private Const MF_STRING = &H0&
Private Const MF_POPUP = &H10&
Private Const WM_NULL = &H0
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Const TPM_NONOTIFY = &H80&
Private Const TPM_RETURNCMD = &H100&
'############################################################################################
Public Sub Build_HyperMenu5(frmfrm As Form)
Dim MP As POINTAPI
Dim tMenuPOPx As Long 'Should always be returned as '1' because *not* TPM_RETURNCMD
Dim hMenu0 As Long 'handle to Menu 0
Dim myForm As Form
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set myForm = frmfrm
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GetCursorPos MP
hMenu0 = GetMenu(myForm.hwnd)
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'SetForegroundWindow myForm.hwnd
tMenuPOPx = TrackPopupMenu(hMenu0, TPM_NONOTIFY, MP.x, MP.y, 0&, myForm.hwnd, 0&)
'PostMessage myForm.hwnd, WM_NULL, 0, 0
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
End Sub
'############################################################################################
Public Sub Build_HyperMenu4(frmfrm As Form)
Dim MP As POINTAPI
Static hMenuPOP As Long 'handle to POPUP menu
Dim tMenuPOPx As Long 'Should always be returned as '1' because *not* TPM_RETURNCMD
Dim hMenu0 As Long 'handle to Menu 0
Dim myForm As Form
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set myForm = frmfrm
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GetCursorPos MP
hMenu0 = GetMenu(myForm.hwnd)
If (hMenuPOP = 0) Then
hMenuPOP = CreatePopupMenu()
AppendMenu hMenuPOP, MF_POPUP, hMenu0, vbNullChar
End If
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SetForegroundWindow myForm.hwnd
tMenuPOPx = TrackPopupMenu(hMenuPOP, TPM_NONOTIFY, MP.x, MP.y, 0&, myForm.hwnd, 0&)
PostMessage myForm.hwnd, WM_NULL, 0, 0
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'DestroyMenu hMenuPOP
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
End Sub
'############################################################################################ Tag: test Tag: 503588
Text File
Is there a way to extract a piece of text from a text file. I know how to
open a text file up and append data to it but I want to get data from it.
Like I have a delimiter like name1 and name2 and I want to pick up
everything in-between the two and sometimes the delimiter may even be on the
same line.
This is what I have for appending data I know if I want to read it I use
something else.
Also is there a way if a text file has an end of file marker (char26 I think
it is) in the middle of the file to ignore it or delete it?
Public ff As Integer
ff = FreeFile
Open "C:\lists\excep.txt" For Append As #ff
Print #ff, "Add this"
Close #ff
Thanks soooo much for any help!!!!
Rick Tag: test Tag: 503586
VB and Excel
Hi,
Is the VB engine used by Excel the same as the one used by VB, the IDE? I am
referring to all recent versions of Excel and VB. If not, what are the
differences? Is it possible to call back Excel from an automation object
that is multithreaded?
Any help would be greately appreciated.
Thanks,
A Tag: test Tag: 503580
timeGetTime and GetTickCount
What is the functional difference, if any, between these two API calls? I
looked them both up in API-Guide, and they appear to provide the same
information, namely the number of milliseconds since Windows was started.
Just curious.
Thanks for any information.
--
Dale Tag: test Tag: 503572
Object does not support this property
Run time error # 438 - Object does not support this
property. MS confirms a bug in vb6. kb article #258207
describes how to create this condition. It does not
provide a resolution. On error goto will NOT trap this
error. Program bombs. Anyone have a solution how to trap
this error. I ran win98 with no problem. Now running xp.
Same copy of vb6 but program will not run. Any
suggestions. Thanks John Tag: test Tag: 503571
datagrid row totals, non viewable rows
I have a datagrid which consist of 7 viewable rows but the SQL may return
100's of rows. I need to total the item quantities ( column(6) ) avaiable
for ALL rows returned. I am able to get a total with the loop below but it
fails as soom as the datagrid rows move out of view.
The loop only works with rows that are currently viewable and the range of
rows that are viewable is 0 - 6 and the loop never increases to 7 or greater
even though the new rows are displayed and the loop counts end at row 6,
and of course when the row number is the same (6) I get an error.
I do not know how to use book marks and I do not know if that is a good
direction to go. I need advice.
All suggestions are welcomed even the ones telling me how stupid I am ....
SMILE
Thanks
George Collins
Dim maxrow As Integer
Dim row As Integer
Dim TotalItem As Double
maxrow = Me.txtrsTirecount - 1
If maxrow > 7 Then
MsgBox "Please narrow your search for quantity count"
txtTotalItemCount = ""
Else
For row = 0 To maxrow
tireDataGrid.row = row
TotalItem = TotalItem + tireDataGrid.Columns(6).Text
txtTotalItemCount = TotalItem
Next
End If Tag: test Tag: 503565
UTF-8(desparately need help)
Can any one suggest me how to read utf-8 text file using
VB6 ? I am using ADODB.Stream but after reading it's
showing as ?????? in the string variable. Thanks in
advance. Tag: test Tag: 503558
How to Get binary files via HTTP with VB6?
I'm currently using the Microsoft Internet Transfer Control (INet) control
to retrieve small text files over the web.
Private Function ReadHTTPFile(URL) As String
Dim InetFrm As frmInet
Set InetFrm = New frmInet
ReadHTTPFile = InetFrm.InetControl.OpenURL(URL)
Set InetFrm = Nothing
End Function
This function loads a hidden form instance which hosts the INet control and
uses it to retrieve the file. This method is neatly encapsulated in one of
my utility classes so the mess is nicely hidden from external clients.
This is working nicely for small text files, but now I need to retrieve a
rather large binary file, 5 MEGS or so. This function doesn't do it for me.
I see CPU percent shoot up to 100% on this line:
ReadHTTPFile = InetFrm.InetControl.OpenURL(URL)
and the game's over...
My current workaround is to use ShellExecute to open the browser to the URL
of the file I'm attempting to retrieve. This begins the download process
which gets the job done, but it's not as seamless as I'd like. I'd like to
be able to retrieve this file without any user intervention. Any suggestions
will be very much appreciated.
Thanks!
- Joe Geretz - Tag: test Tag: 503550
Sizing a picture help needed
How do I size a picture to fit into a picture box and keep its aspect ratio?
The code I'm using sizes the picture box to the picture. Thanks!
Private Sub Command1_Click()
Open_Files.ShowOpen
Picture1.AutoSize = True
Picture1.Picture = LoadPicture(Open_Files.FileName)
End Sub
Chuck Tag: test Tag: 503545
Problem with PrinterProperties
I've been using the standard PrinterProperties call for years to display and
allow the user to set printer properties, without a problem. But now I'm
getting complaints that it doesn't work right, and see it doesn't for me
either. I think it may work different in XP than in previous versions.
Anyhow, when I execute the call, an abbreviated screen About tab, and
basically no information, appears, with the note:
Note: To change the default device settings (print mode, paper type, etc.),
select "Printing Preferences" rather than "Properties" when right-clicking
the Printer icon in the Printers folder.
Of course, I'm not right-clicking, but executing a version of the code
below, which MS and others recommend, and which had always worked for me
before. Is there another call I should be making to do this??
Private Sub Command1_Click()
Dim RetVal As Long, hPrinter As Long
Dim PD As PRINTER_DEFAULTS
PD.pDatatype = 0
' Note that you cannot request more rights than you have as a user
PD.pDesiredAccess = STANDARD_RIGHTS_REQUIRED Or PRINTER_ACCESS_USE
PD.pDevMode = 0
RetVal = OpenPrinter(Printer.DeviceName, hPrinter, PD)
If RetVal = 0 Then
MsgBox "OpenPrinter Failed!"
Else
RetVal = PrinterProperties(Me.hwnd, hPrinter)
RetVal = ClosePrinter(hPrinter)
End If
End Sub
--
Signet
~~~~~~~~~~~~~~~
signet7@bellsouth.net
"Every action results in an equal and opposite criticism." Tag: test Tag: 503532
Grid Control
Hi guys, what kind of grid control (MSFelxgrid or DataGrid
or..etc) has got a combo box built in and how can I do it
please. (I don't mean floating a combo box in a top of a
cell that I already know).
Thanks Guys. Tag: test Tag: 503531
What do I reference in VB to get As IHTMLElement
As in this example:
http://support.microsoft.com/default.aspx?scid=3Dkb;en-us;292485
Thanks.
--=20
George Hester
__________________________________ Tag: test Tag: 503530
Workaround for lack of Split() function in VB5?
Hi,
I currently have to work with a client on a VB5 application with some
code that was ported over from VB6. Many of the functions in the ported
code make use of the Split() function, which as you know did not exist
in VB5.
I have read the Microsoft Knowledge Base Article 188007 (HOWTO: Simulate
Visual Basic 6.0 String Functions in VB5) which provides an
implementation of VB6's Split() function.
However, I found the article was lacking an important aspect of the
conversion: VB6 allows functions to return Arrays, whereas VB5 does not.
The VB6 code uses the Split() function in this manner:
strURLpart = Split(wwwURL, "/")
root = strURLpart(1)
firstlevel = strURLpart(2)
...etc
Trying to run this code in VB5 returns (as expected) a "Compile Error:
Can't assign to Array."
My question is this: How can I get around the fact that VB5 does not
allow functions to return Arrays, specifically in combination with the
Split() function? I have been thinking over this for the past couple of
hours but haven't gotten anywhere.
Thanks for reading, I appreciate your time.
Regards,
George Tag: test Tag: 503522
Close Common Dialog from hookproc
I am trying to send a message to a FileOpen dialog, to tell it to close, as
suggested here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/CommonDialogBoxLibrary/CommonDialogBoxReference/CommonDialogBoxFunctions/OFNHookProc.asp
I am using :
Call PostMessage(GetParent(hwnd), WM_COMMAND, IDABORT, 0)
this didn't work either:
Call PostMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_CLOSE, 0)
hwnd is the handle to the child dialog (using the default template),
and GetParent(hwnd) is the handle to the dialog.
When I post the message, nothing happens.
FWIW, using (hwnd) closes the parent application : using
GetParent(GetParent(hwnd), (which correctly returns the hwnd of the parent
application) locks up the dialog and the parent application.
(I want this to work like the File|Get External Data|Import dialog in
MSAccess: I want to close the dialog when the ODBC file type is selected. I
am trapping the CFileDialog::OnTypeChange event)
Any suggestions?
(david) Tag: test Tag: 503512
How to view special folder in VB
What I want to do in VB6 is:
A button that will lead user to view a folder by explorer. I can use <Shell
"'Explorer c:\", vbNormalFocus> to view normal folders. But when getting to
the special folder like "My Computer", it's not working any more. The folder
I actually want to view is domain foler which all PCs on that domain will be
listed under it. How can I use VB to invoke explorer to get to that folder?
Thank you very much for your help. Tag: test Tag: 503495
Run-time Error 430/scrrun.dll dependency problem
The following code seems to generate a "Run-Time Error
430: Class does not support automation or does not support
expected interface."
I am using VB6sp5.
This error does not occur when I run the code in the IDE,
nor when I run a compiled version on the same machine as I
developed it on. However, when I distribute my program
(using Package and Deployment Wizard) this error occurs on
another machine.
Also, when I run PDW, I get an out-of-date dependency
warning for scrrun.dll. Is this related to the RTE 430?
How do I update the scrrun.dep? I downloaded and
installed scr56en.exe per Microsoft Knowledge Base
Article - 254166 "BUG: Distribution of Microsoft Scripting
Runtime Library Fails", but I still get the out-of-date
dependency warning when I run PDW.
*********CODE********
Option Explicit
Dim HelpFilename As String
Dim fso As New Scripting.FileSystemObject
Dim tso
Private Sub cmdClose_Click()
frmHelp.Hide
End Sub
Private Sub Form_Load()
Dim bytResult As Byte
HelpFilename = "Help.txt"
If Dir(HelpFilename) <> "" Then
Set tso = fso.OpenTextFile(HelpFilename, ForReading,
False)
txtHelp.Text = tso.ReadAll
tso.Close
Else
bytResult = MsgBox(HelpFilename & " not found.",
vbOKOnly, "File Not Found")
End If
End Sub Tag: test Tag: 503491
Strange database connection speed problem
I have built a database client package in VB6 to manage a remote database
for a web site, and am having some odd issues with transfer speed.
The site database was on a MySQL server to begin with. Everything worked
fine and fast. The site owner decided to switch hosts, and the new host
uses SQL Server databases. The MySQL content was copied over to the SQL
Server database.
The client I built was redirected to the SQL Server database. The databases
are identical in structure and content. However, though nothing in the
client changed except the connection string, the speed is now less than 10%
of the speed attained on the MySQL.
But, the web pages that use the database run faster from the SQL Server than
they did the MySQL, so the problem can't be the actual SQL Server.
If I connect to a SQL Server on my own local PC via Enterprise Manager,
speed is extremely slow! I can gather data faster from a remote database
than on my own box?! Speed is also very slow when I use a VB6-built client
to access the local SQL Server.
If I connect to the remote SQL Server via Access Data Project, speed is
fine.
What could be causing this? I can't fault my client software since it was
really fast on the remote MySQL; I can't fault the remote SQL Server both
since web pages and Access2000 can transfer fast.
The only thing I can think of is perhaps the drivers I am using in my client
software and my copy of Enterprise Manager 7?
Any other ideas? Especially on how to fix this? It takes over 3 minutes to
load records from the remote SQL Server right now. It took just a few
seconds when it was on MySQL.
Thanks.
Paul Tag: test Tag: 503486
Matching String/Regular Expression
Hi guys,
I had to solve a problem here, and I'm wondering if there might be a
solution using regular expressions.. here's the case:
I have a couple of strings and I need to remove all substrings within
the main string that have this pattern: "[STACK anything]" . The
pattern starts with "[STACK" and finishs with "]". The problem that I
found was that it was't just to look for the last "]" after "[STACK"
,as whithin the pattern I can have other ocurrences of "]". For
example: "[STACK 123[45][68]]".
Is there somehow in VB (either 6 or .net) to get the first and last
positions of the pattern without going N interactions??? Any solution?
Thanks,
Silvio Cesar Tag: test Tag: 503481
Using Logitech mouse scroll wheel in VB when split
I got a logitech mouse and installed the latest MouseWare (ver 9.78)
on my WinXP Pro machine. It seems that the scroll wheel will only work
for the bottom half of a VB window, when the window is Split. Does
anyone else experience this and know of a work around?
Thank you,
Chad Tag: test Tag: 503471
Sending E-mail from VB5 App from Normal (Non Administrative) Users
Hi
What code do I need to set up so that users can send E-mail from within
their logged on "secure" areas by the click of a button to a specified
E-Mail address. Perhaps with subject and body also completed? My code
works fine for administrators, but for users it fails in both Outlook and
Outlook Express.
TIA and
Kind regards,
David Tag: test Tag: 503456
Quick Question
Hi,
I have a program that uses ShellExecute() to open pdf files. It has worked
fine until the new acrobat reader 6.0 in which I get a memory error. Any
ideas why this is happening?
Thanks Tag: test Tag: 503450
No strech neither clip image
I have a big image in a form and i want
appeared as "zoom" that is showed
entire the image in the same small border
without strech. Tag: test Tag: 503444
VB 4.0 Pro Upgrade
We've fallen a bit behind in our VB version - currently running VB 4.0 Pro.
What should my upgrade path be? At minimum I need to be able to develop new
VB applications that can call com objects developed in VB 6.0, and upgrade
my current VB 4.0 applications. Tag: test Tag: 503441
writeline and recordsets
I am trying to build a comma delimited text file from a SQL record set. I
get the following results:
Case 1:
strValues = "rsReg(0)"
writeline (strValues)
Result:
The text file reflects "rsReg(0)" as the field value .
Case 2:
writeline (rsReg(0))
Result:
The text file reflects the fields value that I want.
Since I am building the list of values from an array and never know exactly
how many I will need...how can I use the writeline function output the field
values rather than the string itself?
Thank You,
Dan Tag: test Tag: 503427
WebBrowser Control - Detect the links
Hello Group,
I am using the Web Browser control and try to open the
links in my browser. The problem I face is, I am only able to open links
whose target is a new window as VB has a event -> browser_NewWindow2. How
do I detect/open links which open in the same window?
Thanks,
Chris. Tag: test Tag: 503426
Image in a form as zoom
How can set the image mode in a form,
to zoom (not clip) as in Access ?
(I have a big image and i want see all
the image and not a small part of it) Tag: test Tag: 503419
save textbox values
vb6.0
is there not some way to load or preset textbox values when program begins
and then allow changes to those initial values to be saved for next run
without the use of
files or the registry Tag: test Tag: 503418
Critical error hinders VB to create the executable
I am having problems when I try to compile a VB EXE
Project. After the compilation of the Project when Visual
Basic is writing the .exe occurs a critical error that
said VB IDE had to close and the .exe file isn't
generated. Tag: test Tag: 503416