|
|
Hi
Is there a way of converting the path written in 32 bit way to 16-bit in VB?
e.g. i want to convert c:\my documents\try\usinggrids to
c:\mydocu~1\try\usingg~1
please do let me know if there is a way
thanks
Mohith
be the change that you want to see in the world
|
|
|
|
|
Check out the GetShortPathName() API.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
|
|
|
|
|
Hello !!!
I would like to combine a Flash 5 animation to VB 6.0 software as a button. i.e. when the mouse is on the button the anination is start to move, otherwise, there is a button with a static graghic.
Thank you very much !! I hope you can help me.
Ahuva.
|
|
|
|
|
Hi Ladiez & Gentz,
this is an example out of my Learn Scripting In 2 Hours Book (Yeah Right)
it opens excel and then creates a new workbook and changes some of the cell properties and enters some info
but what i want is to open excel and then OPEN a workbook - anyone got any idea on how to
thanks in advance
Alex T
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
L_Welcome_MsgBox_Message_Text = "This script will display Windows Scripting Host properties in Excel"
L_Welcome_MsgBox_Title_Text = "Windows Scripting Host & Excel"
'Excel Sample
Dim objXL
Set objXL = WScript.CreateObject("Excel.Application")
objXL.Visible = True
objXL.Workbooks.Add
objXL.Columns(1).ColumnWidth = 20
objXL.Columns(2).ColumnWidth = 30
objXL.Columns(3).ColumnWidth = 40
objXL.Cells(1, 1).Value = "Property Name"
objXL.Cells(1, 2).Value = "Value"
objXL.Cells(1, 3).Value = "Description"
objXL.Range("A1:C1").Select
objXL.Selection.Font.Bold = True
objXL.Selection.Interior.ColorIndex = 1
objXL.Selection.Interior.Pattern = 1 'xlSolid
objXL.Selection.Font.ColorIndex = 2
objXL.Columns("B:B").Select
objXL.Selection.HorizontalAlignment = &hFFFFEFDD 'xlLeft
Dim intIndex
intIndex = 2
Sub Show(strName, strValue, strDesc)
objXL.Cells(intIndex, 1).Value = strName
objXL.Cells(intIndex, 2).Value = strValue
objXL.Cells(intIndex, 3).Value = strDesc
intIndex = intIndex + 1
objXL.Cells(intIndex, 1).Select
End Sub
'Show WScript Properties
Call Show("Name", WScript.Name, "Application Friendly Name")
Call Show("Version", WScript.Version, "Application Version")
Call Show("FullName", WScript.FullName, "Application Context: Fully Qualified Name")
Call Show("Path", WScript.Path, "Application Context: Path Only")
Call Show("Interactive", WScript.Interactive, "State Of Interactive Mode")
'Show Command line Arguments
Dim colArgs
Set colArgs = WScript.Arguments
Call Show("Arguments.Count", colArgs.Count, "Number of command line arguments")
For i = 0 To colArgs.Count - 1
objXL.Cells(intIndex, 1).Value = "Arguments(" & i & ")"
objXL.Cells(intIndex, 2).Value = ColArgs(i)
intIndex = intIndex + 1
objXL.Cells(intIndex, 1).Select
Next
'Welcome
Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Text, vbOkCancel + vbInformation, L_WelcomeTitleText)
If intDoIt = vbCancel Then
WScript.Quit
End If
End Sub
|
|
|
|
|
Hi all
how to create a reusable control program for web database. Please give me
some example for the reusable controls.
Regards
Nancy
Nancy
|
|
|
|
|
Hi,
I have connected a database to a DataGrid in VB6, but I need to do 2 things with it.
1, I want to sort the database alphabetically by a certain field, before it is displayed in the DataGrid.
I have tried using some SQL but it doesnt like it. Does anyone know how to do this, or if there is a specific 'Reference' or 'Component' which needs adding?
I can add, amend and delete records from the database, I just cant sort it!
Here is code I am using to connect to the database and table:
Dim strQ As String
strQ = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & App.Path & "\lottery.mdb"
cnControls.Open strQ
rsControls.Open "syndicate1", cnControls, adOpenKeyset, adLockOptimistic
Set grdControls.DataSource = rsControls
2, The second problem I have, is with the display of the DataGrid in VB. The database table is automatically read into the DataGrid, and I want to customize the width of the 'fields' of the DataGrid.
Does anyone know how to do this?
At present, some columns are too narrow or wide for the data being displayed. Because of this, some field names arent fully visible.
Any help will be greatly appreciated,
Many Thanks, Matt
|
|
|
|
|
question 1)
You can use the sort method of the rs object. SQl should work as well.
rsControls.sort= "lname DESC, fname ASC"
or
rsControls.Open "select * from syndicate1 order by syndicate1.lname ASC", cnControls, adOpenKeyset, adLockOptimistic
question 2)
I belive you are looking for the datagrid.defcolwidth property.
|
|
|
|
|
I want to know how to process a Word document using VBA.Can you tell me where are the information?thank you!
Besides VBA,which tools can do the same work,SQL?C++builder?
If you can find information about this,please tell me.
For i know little English,I hope you can tell me the particular web sites.Thank you very much!
huang chun shen
|
|
|
|
|
I want to know how to process a Word document using VBA.Can you tell me where are the information?thank you!
Besides VBA,which tools can do the same work,SQL?powerbuilder?
If you can find information about this,please tell me.
For i know little English,I hope you can tell me the particular web sites.Thank you very much!
|
|
|
|
|
Can I Create Excel files using ADO's As we do for mdb files.
Thanks in advance
Sudhakar
|
|
|
|
|
You can if you install (and use) the ODBC driver for Excel. You will need to set the ConnectionString property (i think) appropriately. Look in help for ConnectionString there is probably an example.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hi!
i'm in a bit of a time crunch, so the sooner someone can answer this the better...
i'm trying to script an uninstall for an application (the uninstaller is run via application). i can get the message box prompt confirming the uninstall to pop up, but i can't seem to be able to send keys to it. Unfortunately, there is no silent uninstall or force yes.
Here's my code snippet:
wsh.Run sUninstallCmd
wsh.AppActivate "Confirm Uninstall"
WshShell.SendKeys "{ENTER}", True
Confirm Uninstall is the header for the message box (and the text displayed when i alt+tab)
Any help is appreciated... obviously this is not doing the trick.
|
|
|
|
|
Hi All,
Can anyone tell me why I'm getting a "type mismatch" in the following code:
Thanks in advance...'
******************************
Dim strgate
set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select IPAddress, DefaultIPGateway from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
for each IPConfig in IPConfigSet
strgate = IPConfig.DefaultIPGateway(0)
next
WScript.Echo strgate(0)
|
|
|
|
|
I want to load image in Menu and ButtonMenu .Can you help me? Thanks
|
|
|
|
|
Hi All...
I need to catch the message that is sent to the printer when a user presses print on any app. What API's should i use.
What i want to do is catch a print request to a printer log the user name and password and then print a report sometime in the future...
Anyone have any ideas...
Shot in advance...
budgie
-+= TTFN =+-
|
|
|
|
|
You can do this, but I do not think that you will be able to do it in VB. And if you can do it, it will be a lot of work.
You will need to use C++ or some other language that allows you to access pointers. If you are still interested let me know.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Just written a family tree prog in VB, never done this before, can anybody tell me or point me in the direction of a link/site regarding how to print out the data that will be incorporated in my program! THANK YOU!!!!
|
|
|
|
|
Probably the best place to look is on the MSDN CDs that came with VB. There are lots of Books and Techinical Articles on there, and there will surely be something about printing.
Basically, you need to "draw" what you want onto the Printer object.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
I need some English information about this ,please tell me the particular web sites,thank you!!
huang chun shen
|
|
|
|
|
Why not write a simple program to analyse your Word document,store the information of each columns into variables,create a loop,and then let your program execute INSERT sql statments automaticly.
God blessing me...
|
|
|
|
|
Hello,
Is there any way to get to know who all are currently logged on to the system?
Regards,
~A
|
|
|
|
|
Try the GetUserName API call:
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (lpBuffer As Byte, nSize As Long) As Long
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Sorry,
This will give the currently logged user.
Suppose I am the admin, then I wanted the list of all the users that are logged on to my the domain.
I didnt want "who am i" equival but a "who" equival of unix.
Thanx and Regards,
~A.
|
|
|
|
|