|
Dim iFlag As Integer
Private Sub Command1_Click()
If Len(Text1) <> 0 Then
iFlag = iFlag + 1
MsgBox Mid(Text1.Text, iFlag, 1)
End If
End Sub
The name is Sandeep
|
|
|
|
|
is there any way to calculate that MS-Access is installed on the mcchine or not ?
|
|
|
|
|
Use the following function :-
Public Shared Function GetAssociatedProgram(ByVal Filename As String) As String<br />
Dim sFileComponents() As String = Split(Filename, ".")<br />
Dim sFileExtension As String = sFileComponents(UBound(sFileComponents))<br />
Dim objExtReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.ClassesRoot<br />
Dim objAppReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.ClassesRoot<br />
Dim sExtValue As String<br />
<br />
Try<br />
If sFileExtension.Substring(0, 1) <> "." Then sFileExtension = "." & sFileExtension<br />
objExtReg = objExtReg.OpenSubKey(sFileExtension.Trim)<br />
sExtValue = CType(objExtReg.GetValue(""), String)<br />
objAppReg = objAppReg.OpenSubKey(sExtValue & "\shell\open\command")<br />
Dim SplitArray() As String = Split(CType(objAppReg.GetValue(Nothing), String), """")<br />
If SplitArray(0).Trim.Length > 0 Then<br />
Return SplitArray(0).Replace("%1", "")<br />
Else<br />
Return SplitArray(1).Replace("%1", "")<br />
End If<br />
Catch ex As Exception<br />
Return ""<br />
End Try<br />
End Function
Then call it with :-
Dim app as stting = GetAssociatedProgram("my.mdb")
then check the stored value of app
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi all,
Please let me know what is win32 api call equivalent to "Marshal.PtrToStringAnsi". I want to use this api call in VB 6.
Thanks in Advance,
AR Reddy
|
|
|
|
|
[DllImport("kernel32.dll", EntryPoint="RtlMoveMemory", CharSet=CharSet.Ansi)]
internal static extern void CopyMemoryAnsi(StringBuilder pdst, IntPtr psrc, IntPtr sizetcb);
thats the C# interop signature of the api call.
|
|
|
|
|
Hi,
I have used CopyMemoryAnsi, but I am getting "Overflow" error. Actually I need to copy the content from memory pointer to a string. Here is my call
Public Declare Sub CopyMemoryAnsi Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Call CopyMemory(SName, iPointer, LOF(iPointer))
Please let me know what could be the reason for "overflow" error.
Thnaks in advance,
AR Reddy
|
|
|
|
|
Not a clue sorry ... I'm a C# developer I just patrol around here incase theres any generic .net framework answers I can give.
|
|
|
|
|
hello frnds,
can any one tell me how can i programatically insert a command button to word 2003 ???
if any one have code then please give me....
Thankx in Advance,Best regardsm
-Koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
Hi,
Is there any possible code to get Website IP address? Please help me.
Socheat
................
|
|
|
|
|
|
Dim oEntry As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry("http://www.codeproject.com")<br />
Dim sIPAddress As String = CType(oEntry.AddressList.GetValue(0), System.Net.IPAddress).ToString
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hello!
First off I'm using Microsoft Visual Basic 2005 Express Edition. And I'm a newbie.
I've been trying to find a way to read a text file from a friends server and save it into a string. This file will only contain the numbers 0-100.
I searched the many forums I use but I'm either blind or not searching for the right thing. Any help would be appreciated.
Thanks
|
|
|
|
|
What kind of server?
If it's a Windows server exposing a share, then you can use something like this:
Dim x as String = my.Computer.FileSystem.ReadAllText("UNC path to file")
This, of course, assumes you have a working knowledge of Windows Networking.
|
|
|
|
|
I think hes just using a personal server on window xp, so like apache. I don't know to much about windows networking but I can do some googling.
Pretty much all he gave me was this 'www.hisdomain.com/filename.txt'
|
|
|
|
|
You have to KNOW, not guess, what kind of server this is. Without knowing, you're just guessing and wasting your time.
Apache is a web server.
|
|
|
|
|
Alright I will contact him. I'm about 90% sure hes using a windows server.
Is there any other way of doing this besides UNC? Just in case.
Thank you for your time by the way, sorry for me being a newb.
|
|
|
|
|
He could run a webservice that you can call to get the files contents.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
JimmyTG wrote: Is there any other way of doing this besides UNC? Just in case.
That's the problem. There's LOTS of different ways of doing this, all of which depend on the type of server he's running, be it Windows Networking, HTTP server, FTP server, TFTP server, web service, ...
|
|
|
|
|
Alright I got a hold of him. Hes running Windows XP Home, with some program called wamp. He says it's Apache, mysql, and php put together. Hes not a genius on networking either so hes not really sure what kind of sever that would be.
|
|
|
|
|
So I copy my vb.net solution from one computer to another. On the new one I get:
The project includes a password-encrypted key for signing, and I'm supposed to enter it.
I swear I never gave any such thing...
How can I find out what it is?
Thanks
|
|
|
|
|
Open up your project and double-click on My Project in the Solution Explorer. Click on the Signing tab. What's enabled (checked) ??
|
|
|
|
|
OK, I had sign the click-once manifests checked. Problem seems to go away if I uncheck that.
Is there a good source for vb.net deployment issues? I'm having a lot of trouble with this part.
Thanks!
|
|
|
|
|
cstrader232 wrote: Is there a good source for vb.net deployment issues? I'm having a lot of trouble with this part.
Nope. It's pretty much spread out all over the web. Run into a problem, then Google it.
|
|
|
|
|
I have a combo box, it is populated from excel (sheet 1, column A for reference sake). In sheet 1, column B is a flag set for items that must be reported immediately. Once a value is selected from the combo box it is stored in a text field on a form. I now need to find out if the value stored has the flag set in its column B.
If this is possible please let me know.
Thanks,
Dan
|
|
|
|
|
Combobox has Text & Value Properties.
Bind ColumnA to Text property, and ColumnB to Value property.
Ex:
<br />
Combo1.DataSource=ds;<br />
Combo1.DataTextField="ColumnA";<br />
Combo1.DataValueField="ColumnB";<br />
...........<br />
...........
Then, use the SelectedText and SelectedValue properties of the combobox.
Hope that helps you.
Regards,
Arun Kumar.A
|
|
|
|