|
The default VB projects normally create Sub Main(), kinda like void main() in C++. Well, just like in C++, there are other "versions" of the main function:
Sub Main(ByVal CmdArgs() As String)
Function Main() As Integer
Function Main(ByVal CmdArgs() As String) As Integer
Just replace the default with the one you need.
|
|
|
|
|
There's also the Command object. And, you can access it from anywhere in the program. It's a string containing what was passed on the command line after the executable's filename. It's up to you to parse it.
Try this...
MsgBox """" & Command & """" Then, compile it into an exe and run it from the command line passing whatever you want.
Jeremy Falcon
Imputek
<nobr>"The happy people are those who are producing something; the bored people are
those who are consuming much and producing nothing." - William Ralph Inge
|
|
|
|
|
hi
any1 have idea how too create Timeline
on the basisc of date
using VB.Net...or creating Graphs in Vb.net
|
|
|
|
|
i am having prb in Transfering Files/Folder over a network (LAN). i have to transfer my files from my server on the workstations of the lan .
FTP should be the choice / Winsock.
pls tell me abt it
Work Hard and Test your Luck
|
|
|
|
|
check out these three links .. i hope ya get wat ya want..
http://www.15seconds.com/issue/981203.htm
http://www.acky.net/vb/vbtcp/index2.sht
http://www.vb2themax.com/HtmlDoc.asp?Table=Articles&ID=520
|
|
|
|
|
Having a problem with the following code:
DoCmd.OpenReport "Print - IncompleteMemosbyTeamLeader", acViewPreview,, _
"RequestTo = 'Tod O'Dell'"
Only recognises the String as Tod O instead of Tod O'Dell. Can someone please suggest a way to overcome this. I'm not a VB coder. I'm unfamiliar with VB. I assume you could declare Tod O'Dell as a string as would in C++ and use the VariableName. e.g.
C++ Example
String VariableName = "Tod O'Dell";
Your help would be greatly appreciated
Nathan Browne
|
|
|
|
|
Hi,
In the criteria, put it in a variable and use Replace function to replace the single quote found with 2 single quotes. Please find an example below to use the same with SQL Server.
Dim sSql As String
Dim sName As String
sName = "O'Leary"
sName = Replace(sName, "'", "''")
sSql = "Select * from authors where au_lname = '" & sName & "'"
Debug.Print sSql
Try executing the output of the above SQL statement in Query Analyser under Pubs database...
Ravi Shankar S
Programmer Analyst
iSOFT R&D Pvt Ltd
Chennai, INDIA
Ph: 91-44-4414980 Extn 1103
|
|
|
|
|
Hi,
You can use the Replace function to replace a single quote with 2 single quotes...
Consider the following example:
sName = "Tod O'Dell"
sName = Replace(sName, "'", "''")
DoCmd.OpenReport "Print - IncompleteMemosbyTeamLeader", acViewPreview,, _
"RequestTo = '" & sName & "'"
Hope this helps you...
Ravi Shankar S
Programmer Analyst
iSOFT R&D Pvt Ltd
Chennai, INDIA
Ph: 91-44-4414980 Extn 1103
|
|
|
|
|
As Ravi_Shankar pointed out (but not so clearly) the problem is that databases use single quotes (or apostrophes; your pick) to delmit the boundries of a string.
In order to support the use of single quotes/apostrophes in a string the SQL specification says that a double-single quote/apostrophe '' is used (not " ).
So rather than the last line being
"RequestTo = 'Tod O'Dell'" you need to make it
"RequestTo = 'Tod O''Dell'" (note the use of the dobule-apostrophe)
Hope that is a bit clearer for you
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
hi!!
i want to retirieve the user information currently logged on to the system...
the inforamtion whihc i want to reitrieve is
group to which the user belongs
comlete name
this inforamtin is in actie directory so i have to get this from active directory..
would any1 guide me how to do this in vb.net
regards
|
|
|
|
|
Hi,
You can use the Environment Class to get the details... Please find the sample as follows:
MessageBox.Show("Machine Name: " & Environment.MachineName())
MessageBox.Show("Domain Name: " & Environment.UserDomainName())
MessageBox.Show("Logged on User Name: " & Environment.UserName())
Ravi Shankar S
Programmer Analyst
iSOFT R&D Pvt Ltd
Chennai, INDIA
Ph: 91-44-4414980 Extn 1103
|
|
|
|
|
thx for the reply but this environment class doesnot provide me the facility to know the group of currently logged on user.. which is the most important information about the user as far as i am concerned.. so plz hep me out..
|
|
|
|
|
Can anyboday port the code in the Using MSHTML Advanced Hosting Interfaces example to VB.Net? The example is under Home >> C# Programming >> COM Interop or http://www.codeproject.com/csharp/advhost.asp. I can't get it to work in VB.Net.
Thanks
|
|
|
|
|
I have written 1 app which creates new excel workbook and writes into it.But ,I was not able to do so with existing excel workbook.
How should I open existing excel sheet in vb6.0 ?
I want to write data into workbook having macros.
should I use MS excel driver ?
Thanks,
Amit
|
|
|
|
|
Hello,
Try the next code:
' Variables...
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
' Excel, Book and Sheet instantiation...
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(App.Path & "\Book1.xls")
Set xlSheet = xlBook.Worksheets(1)
With that code you can access to a existing sheet in a XLS file.
The DLL you have to use is 'Microsoft Excel XX Library' (in the references section of VB6).
Bye.
|
|
|
|
|
hey ...thanks for ur quick help !!!!
|
|
|
|
|
How do I get the path of the currently executing dll? Sample code, please.
Thanks.
|
|
|
|
|
In .NET: Assembly.GetAssembly().Location
|
|
|
|
|
this is really stupid, but how do I access one character from a string. in C++ it looks like:
stringvar[5]
when I try it in VB
stringvar(5)
it says that it expects and array. but I can't declare an array of characters which is what I need.
ICXC
NIKA
|
|
|
|
|
|
Hi..
I want to drag an image control and drop it outside my form..
and I want ot be notified when the drop occures .. how can I do it ?
|
|
|
|
|
Hi All,
I would like to know how Intellisense editors are developed. I am currently
trying to build one for SQL. I have a placed a text box control in VB form. When ever user types characters inside the text box, I am populating keywords in a combo box depending on the characters entered. How ever I have a difficulty in follwoing the cursor inside the text box. Let me know how I can get the x and Y co-ordinates of a cursor inside a text box
Thanks
bala
|
|
|
|
|
gbala wrote:
How ever I have a difficulty in follwoing the cursor inside the text box. Let me know how I can get the x and Y co-ordinates of a cursor inside a text box
Do you mean cursor or caret? The caret is the blinking beam you get when typing into the textbox. You'll have to use raw API for this, and here are the functions...
GetCursorPos()<br />
GetCaretPos()
Jeremy Falcon
Imputek
|
|
|
|
|
Hi Folks..
Im having a web form that has 2 select boxes.Now when one select box has a value chosen it must generate values for other select box.This can be accomplished by querying the dbase.Now to do this querying im using an ASP page.
1). My question is how do i run the ASP Page without it affecting the current window displaying my form??
2). Now my 2nd select box has to be refreshed for it to be populated with the values that the ASP Page generates.How can i refresh that control alone without touching the other contorls or rather refreshing the entire page..
Can someone give me links to articles regd this sort of stuff.I know im using a round about method..
Regards
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
Hi
You can use HTTPREQUEST Object to call the page which can return the data for the other Select box. Use this data to fill in the same.
Ravi Shankar S
Programmer Analyst
iSOFT R&D Pvt Ltd
Chennai, INDIA
Ph: 91-44-4414980 Extn 1103
|
|
|
|