Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Please Give Me Complete Source Code For Searching In Text File In Described Criteria


i have many paragraphs with different strings in text file, i am going to search the value of textbox in text file.

the text file looks like this

<B>Don Man</B><BR>
,SUMIT,TORONT,PENSIL,COMDEX,PERU,BANG
office 14, street18, hangten villa, toronto.
Advisor, Engineer
Phone: +92 (51)123-8784521<BR>
Fax: +92 (51)123-8784521<BR>



how do i print the following string

SUMIT
TORONT
PENSIL
COMDEX
PERU

if the value "office 14" OR the other value as like "8784521" OR "advisor engineer" OR "Don Man" is entered in the text box.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Match Text Box Value In Text File (complete Code Please)
i have text file like this

<B>john bredman</B><BR>
,SUMIT,TORONT,PENSIL,COMDEX,PERU,BANG
Phone: +92 (51)123-8784521<BR>
Fax: +92 (51)123-8784521<BR>
Email: <A href="mailto:ABC@hotmail.com"></A>

when i wirite in text box "john bredman" then it should search in text file and ignore "<B>,</B>,<BR>" and message appear that "string is found".

OR

if i write string "COMDEX" in text box and i press button to search in text file, if string is found in text file then message should appear that "string is found"

How Search Complete Value Of Text Box In Text File (some Code Please)
hi

some body please give me some code stuff for, when i enter a string value in text box then this value should be searched "as a whole word" in text file. or i clear this question that, when i enter in text box then all of the text box value should be match in text file.


thanks

To Give UI &amp; Backend Without Source Code To Users..??
hi,
i hv done my project with database in access.nw i need to give it to my friends. so i need to know hw to give them only the UI & backend database without source code...? i.e. to give only the exe file. if exe is given, the path of the access file varies from system to sytem. so give me some useful guidelines.

Give Some Code For Search String In Text File But Print Second Line Values, Delimiter
i have many paragraphs in text file like this

<B>Don Man</B><BR>
,SUMIT,TORONT,PENSIL,COMDEX,PERU,BANG
office 14, street18, hangten villa, toronto.
Advisor, Engineer
Phone: +92 (51)123-8784521<BR>
Fax: +92 (51)123-8784521<BR>

it is sure that i have to print second line values with "," delimiters in all cases, but the value of text box on which i will perform search could be any string in text file, i mean the text box value could be "street18" OR "Engineer" OR "office 14"
but prin values should be like this in all cases.

SUMIT
TORONT
PENSIL
COMDEX
PERU

Complete Word Searching In File
i have text file that contains strings like this

"A big cat hunted a big animal"

i would like to give ant character in textbox as like i want to write "hunted"
first of all i will write h then u then n then so on till the last character d is reached.
when string is completed without space then it should give message

remember:= this is a 1 mb file i cannot use if or switch statement

Searching For A File In Complete System
Hello,

I would like to know how can search for a particular file through out the m/c...i.e all the drives and all the folders and subfolders.

Thanks in Advance

Source Code In Text File...please Help...
Is it possible to make a text file where i put some source code. Then let vb read the file and execute the source code? I hope you understand what i try to say lol. Then if that work encrypt the text and give it an other extension so that nobody can read that source. Is somthing like a update and external scripts.

Searching For A String In A Web Site's Source Code
Hi all,

I have a webbrowser controller in my project I'm looking for two things:

1) a way to read it's source code and copy it into a text box.
2) a way to search the source code for a certain string (though I could prolly figure this one by myself if you'd help me with the first one )

thanks in advance guys

How To Give Common Code For All The Text Boxes
hi! I am new to vb6
I have 10 text boxes in my form(form1).
For each text box, If the user presses enter then it must go to the next text box. I dont want to write OnKeypress function for each text box. Is there any solution or only an single set of function which will work for all the text boxes. i.e if the user presses enter in any text box then it must goto the next text box. PLZ HELP

i also the same problem with GotFocus( I have to change the backcolor of the textbox to yellow when gotfocus)

Searching For A Directory Vs Searching A Text File For The Same Thing!
After working on a piece of code for a while, and actually getting it to work, I was asked to do it a different way.

Originally, I had a login box set up to search for a user's username and password that was stored in a text file. The problem with this was that I didn't know how to get it to search ALL of the entries, not just a set 1 to 10 like I was using in my code. To see the full program code, click here.

Now my group members want me to do it so that it searches for the directory instead of the text file for the same information. The directory name is the username, and in the directory, they'd like (theoretically speaking) to have the user's username and pass stored in a pwd file or a txt file.

I'm trying to argue that searching a text file's easier (partly because I believe it is, and also because I've already done it), but they're arguing that searching the directory's easier because then, the program could just store the directory in a global module, so when it comes to other aspects of the program itself, it'd be easier to do.

I'm willing to give the 'searching for the directory' route a try, but I can't seem to find anything that pertains to this, WITHOUT using api (I've searched the forum, and all I found was recursive search for stuff thats already in a directory, or stuff that has to do with api).

Any help would be greatly appreciated.

Want A Complete API Text File....help
I use API many times and i need to know all the constants
and their values in order to use them.

There are lots of constants and API's which are not listed in API
Viewer. Therefore i have to refer to some book or i have to find the values of the constants on the net.

Is there any way out for this?


.....(May be a complete API.txt file listing most of the API's and constants?)

If somebody have it, and ready to share, i will be very thankful to him/her.

Thanks guys.

Give Me A Code Example. I Will Give You A Big Gold Medals &lt;:-)
Dose anyone try the SmartMenuXp control?
how to use right-click to popup an XP menu on our VB6
I have tried it but there must be some mistake somewhere.
oh sleep badly!!!

Can U Please Help Me With The Complete Code For Copying Datagrid Data On To An Excel File
can u please help me with the complete code for copying datagrid data on to an excel file ...?

Input Not Getting Complete Text File
I am using an Input statement to retrieve a text file (actually a PDB file from my Palm saved on syncing the device). I wish to parse it in my vb app. I am only getting the first 15 chars. up to a hex A6 character. Any thoughts on how I can retrieve the whole file. Thanks Bruce

Multiple Criteria Searching
good day!

i'm only a beginner and i just want to ask what is the fastest and easiest way to search for a record that supports multiple criteria.. is it dao, ado, etc? i use msaccess..

what method to use and how will i be able to use it in outputting the results?

i really need your help.. thanks in advance..

To Give Link To A Text File
Hi,
In HTML we use :
<a href="http://www.vbforums.com">click to go to VB forums.com</a>
to give link to any pages/sites..

How is it in VB? How do I link any ..say a "text file" on my computer?

Thanks

How Do I Give A File A Name From A Text Field In Vba
the subject is not exactly the question, i know how to do that, but what i really want to do is suggest a file name, when they hit the save as button. My file name is a combination of fields from some Text forms in Word (Text12,7 and 8)

here is my code so far

Quote:Sub gsave()


Dim gsave As String

gsave = ActiveDocument.FormFields("Text12").Result & "_" & ActiveDocument.FormFields("Text7").Result & "_" & ActiveDocument.FormFields("Text8").Result & ".doc"

    
    
    ActiveDocument.SaveAs gsave
    
End Sub
this code does the job fine, but it doesnt give them an option of where to save it, it automatically saves it where the original template or document is located.
how can i display the "save as" dialog with my suggested name in the File name box, i have also tried this using the file summary dialog box function but it doesnt do the job well



Edited by - dosh49 on 3/28/2006 6:04:40 AM

Searching Access DB Using Multiple Criteria
Hi all, the saga continues.

I'm creating a search form and I want the user to be able to select multiple criteria.

Now, I'm able to search successfully (well sort of see below) if i limit the query to one field. However if want to run it with 2 or more fields and I leave one of the textboxes blank if comes back with a missing operator error: var2 = ""

So how do I structure the query to ignore a field if it is empty and include it in the search if it has data in it?


Also if svar is a numerocal value then it runs fine, but if it is a text value then I get a : No value given for one or more required parameters error.

The code I am using is:

Dim rs As New ADODB.Recordset
Dim sql As String
Dim svar1 As String

svar1 = var1.text

sql = "SELECT * FROM table1 WHERE var1 = " & svar1 & ""

rs.Open sql, sConn, adOpenKeyset, adLockOptimistic, adCmdText

rs.MoveFirst

Set MSH.DataSource = rs

MSH.Refresh

rs.Close

Set rs = Nothing

Searching With Upper Case Criteria
how do you make sure that if user types in the record search and the record was all in uppercase taht this wont give back no results.


e.g if i had a record in the database that is love and the user typed in LOVE how do you make sure that the database know its the same record????


here is my code in search
======
Private Sub cmdSearch_Click()
Dim search As String, found As Boolean

Call Load
'this calls the module load and opens the database
search = InputBox("Enter Customer Registration:")
'When the search command is initated a input box will be displayed in control by search

If search = "" Then
' If nothing is inputed in the inputbox a message will be displayed to type something
MsgBox "Please type something first.", , "Error Go Back"

Else
'the code for searching goes here, up to running the Select query
QryStr = "select * from customer where customer_rego = '" & search & "'"
Set Mainrst = indb.OpenRecordset(QryStr)

If Mainrst.BOF Then
'If the record is Before the beginning of file it will tell teh user that the Registration does not exist.
MsgBox "Search returned no results!", , "Error Go Back"
Else
Let txtR.Text = Mainrst!Customer_Rego
Let txtLName.Text = Mainrst!Customer_LName
Let txtName.Text = Mainrst!Customer_Fname
Let txtadd.Text = Mainrst!Customer_Address
Let txtS.Text = Mainrst!Customer_Suburb
Let txtP.Text = Mainrst!Customer_Pcode
Let txthp.Text = Mainrst!Customer_HPhone
Let txtmp.Text = Mainrst!Customer_Mphone
Let txtM.Text = Mainrst!Customer_Model
Let txty.Text = Mainrst!Customer_Make
Let txtd.Text = Mainrst!Des
Mainrst.Close
Set Mainrst = Nothing
End If
End If
End Sub
========
thanks

Searching Database Based On 3 Different Criteria
I have a form that has 3 possible search criteria.
ItemID
Category
Description

The user can enter one or all three to search on.  It needs to find the closest match.

The SQL statement I am runnning looks like this.
CODEIf Me.txtSearchCategory = "" Then
    Me.txtSearchCategory = "*"
end If
If Me.txtSearchDesc = "" Then
    Me.txtSearchDesc = "*"
End If
If Me.txtSearchItemID = "" Then
    Me.txtSearchItemID = "*"
End If
strSQL = "itemid like '" & Me.txtSearchItemID & "' and " & _
         "category like '" & Me.txtSearchCategory & "' and " & _
         "description like '" & Me.txtSearchDesc & "'"
frmInfoItems.dataInfoItem.Recordset.FindFirst strSQL

Help Please, Reading &amp; Searching For Text For Either Text Or Website Course Code
I have tried a number of the differents thing, but i am having no luck. I have search the forum, found a few things that are simliar. As i am new to VB6 i am still learn/ finding out thing.

Any help or pointers would be great.

what i am try to do is find the external IP of my router. I plan to use the website http://whatismyip.com. In the source code this is two lines that content the IP address.

<TITLE>Your ip is 82.41.163.254 WhatIsMyIP.com</TITLE>

and

<h1>Your IP is 82.41.163.254 <br></h1>

Would it be best to download the whole page into a text then search it or search it directly from the website.

I know how to open text file, but i no idea how to search for text. As the IP address changes i guess i need to read the line or something then split it.

Any help would be great thanks

Copying A Complete Text File 1 Line At A Time
I'm working on a program that will need to load an entire text file into a mainframe application one line at a time. The text file is 77 characters wide and the mainframe system is 80 characters wide, so it will fit without any issues, I'm just trying to figure out the best way to code it to be uploaded. The mainframe system will only accept one line at a time, so the end result needs to be:


VB Code:
Sess0.Screen.Sendkeys(line1 + "<enter>")Sess0.Screen.Sendkeys(line2 + "<enter>")Sess0.Screen.Sendkeys(line3 + "<enter>")Sess0.Screen.Sendkeys(line4 + "<enter>")'etc. etc. etc.  


The issue is that each text file will be between 200 & 300 total lines but never the same amount. Is there a way I can set an array up to loop & define as many objects as it needs for each file on a case by case basis? Instead of initially defining it as line(300) or something like that I mean?

Need Code For Searching A Text Box
I have created a simple database to store computer inventory data along w/the users they are assigned to. Access 2003. I need code to not only search the users last name, but also computer name, which include numbers and letters. Any help would be greatly appreciated. Also, I am real new to vb, so the simpler the better.
thanks

Text1.text = Source Code?
how would I output source code to a text box.

The program is a msgbox creator. You type in a message the title of it and the type of msgbox and then click create and it shows the messagebox. But I want a textbox to show the source code of the message box.

example: Souce code(lable) = MsgBox "this is a messagebox", vbExclamation, "blah" (textbox)

Help Getting Text From Webpage Source Code
Ok, I got a small project I am working on. I figured this might be easier but I was wrong. I want to have a program like the desktop weather, the one that puts the current temp in the tray. I have an icon and want to show the weather when you mouse over it. I figured I would get the information from weather.com. I look at the source code and I need to get the information of...

<B CLASS=obsTempTextA>60&deg;F</B>
<B CLASS=obsTextA>Feels Like<BR>60&deg;F</B>
<TD colspan="2" VALIGN="MIDDLE" ALIGN="LEFT" STYLE="font-family:arial,verdana;font-size:10px;color:#0B2C58;padding:0px 0px 5px 0px;">Updated Nov 14 03:25 p.m. ET</TD>

I need to grab those 3 parts of the source code. I figure I can split and stuff the rest to get the lines of...

60&deg;F
Feels Like
60&deg;F
Updated Nov 14 03:25 p.m. ET

I just dont know how to get those lines from the source code. Since it always changes whats written on the code. Does anyone know how to get those lines? or where I can read up on it? Thank you.

Searching For Files Based On Multiple Criteria [ALMOST RESOLVED]
Is there a way to search for files based on modified/accessed date, etc? It would be nice to imitate what Windows search can do (i.e. search for "a*c.*cs*")

Problems Getting Html Source Code Into A Text Box
Hi, I am relatively new to Visual Basic programming. I am writing a program that searches through the source code of a webpage looking for certain information. I know how to perform the search. However, I need help to figuring out how to load the source code into a text box. I have searched this site and other forums. I am using Internet Explorer as an object, and have tried to use the document, container, etc. properties. Any help would be highly appreciated.

Saving Source Code As Plain Text
How can I save the vb source code in plain text format? I see where I can print it, but I only need to save it. My code is on several different forms, so I don't think I can just select all and copy then paste into notepad.

Any Source Code Of Any Kind Of Text Box Control
Hi folks,

Can you help me find the source code of any of the following:

1. The default VB6 Text Box Control, Richt Text box or any text box
2. Source code of a text box written by any person

Thaks a lot

Getting Source Using WebBrowser Control (without Downloading Complete Page)
hi there... its my First post on this forum so a warm Hello to all

my problem:
i am trying to get a Web-Page's source using


Code:
dim WbSource As String

For i = 1 To WebBrowser1.Document.All.length
WbSource = websource & WebBrowser1.Document.All.Item(1).innerhtml
Next i


but i have to use WebBrowser1_DocumentComplete method. (i can get the source only on documents completion). But Image files (embeded on those pages) are slowing the procedure down...
is there any way to get the source without downloading those images?

Respects and thanks in advance
rahat

Searching To Something Of The Past Years? Please Give Your Reaction!
Dear VB users,

This morning I was searching to something.
The results where only of the year 2001!!

How can I search to something what was asked for 3 years ago???????????????

It should make the forum more powerfull if this was possible!

Nice regards,

Michelle.

Source Code Of EXE File
Is there a way of retreiving the original source code of an executable program of VB 6.0?

Source Code From An Exe File
Someone knows a programm able to extract the source code from an exe file??

VB 6 Exe File To Source Code
I've got a VB exe file and I want to know the souce codes of it. How can i track the codes when I only have the exe file? Can anyone help me pls? I'd really appreciate this. Thanks.

Source Code Of .exe File
I have created a project of maintianing reocrd of employee with salary too. I have created its .exe file and copied in cd but i forget to copy source code in cd. 2 days before my system was formatted and i have lost source code. how can i get back source code from my .exe file.


Thanks in advance.

*.lnk File In This Source Code
Option Explicit
Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
If Data.GetFormat(vbCFFiles) Then
For i = 1 To Data.Files.Count
Print Data.Files(i)
'=================================================================================
'Please tell me when the icon is a shortcut (*.lnk) how to know what file the icon link to. Thank You.
'=================================================================================
Next
End If
End Sub

Single Line Text Highlight / Revised Source Code
Hi,

I need to create a single line highlight in a RTF text box and it needs to be the width of the text box. The viewer is monitoring scrolling text and highlighting the text only is not satisfactory because the variation in text length causes the viewer to loose focus.

Servo



Edited by - ServoWizard on 8/24/2004 9:02:00 PM

Attempt #1 To Implement Matt Curland's Singleton [Resolved + New Complete Source]
All,

I've tried to implement the Singleton project - discussed in Matt Curland's "Advanced Visual Basic 6". He supplies a sample project called TimeServer which implements the ROTHook lightweight Object.

Of course his code works fine. But when I tried to create a StateServer based on his Client and Server projects, I get a slightly broken scenario.

As seen from this figure (the 4 Clients are on the left, the Server is on the right):
http://www.vbforums.com/attachment.p...postid=1821655

The first client I load is never in sync with either the server or with the rest of the clients. However every other Client loaded after the 1st (2nd, 3rd, 4th, etc) works correctly and as expected.

You will need to own a copy of the book to run my projects, so if you do, here they are:
http://www.vbforums.com/attachment.p...postid=1821658

I've included both the Client EXE and the ActiveX EXE Server.

It's as if the 1st Client is getting it's own instance of "a" server, but not the one that's running. However, when the 1st client gets loaded, the server does get loaded.

Source Code From The Executable File
Hello,

Can someone know, how to get the source code from the executable file.

we lost all the visual basic source code, when we installed windows 2000.

we have now only the executable file.

now we have to modify one of our screens, since we don't have the source code, only the executable file.


is there any way, I can get the source code from the
executable file.

please give some suggestions.

Thanks

Get HTML Source Code Without A OCX File
Hi

I need to get the source code of a html page on a webserver therefore I'm using the Inet component.
My problem ist, that I should create a small .exe file, which I can run on a computer without to install a ocx file first.

Is there a way to get the html source code without the inet component? If not, is there a way to bind this OCX to my exe file?

Thanks
Mike

File Compression App Source Code
Enclosed is the source code to a file compression application I've written.
A full description can be found here
This application uses the zlib dll

If you have any queries or comments, just let me know

File Compression App Source Code
Attached is the source code to an application called "GreenEye" that splits up and compresses larger files into smaller chunks.

A full description is in the commented source code, and also available herehere

If you have any queries or comments, just let me know!

How To Convert Dll File Into Vb Source Code
i have one dll ,i need to convert that dll in to vb source.
any one know how to solve this problem.?

SOURCE CODE ONLY (saveload Ini File)
can some one please give me a couple of source codes where you save your settings on to a *.*ini file and load it back whenever you want. the source-code posted on this reply didnt help me at all.. it froze !

LAST INI POST

Can We View Source Code From .exe File Of Vb6
Hi
How can we open an .exe or cab files or setup files made in vb6
to make modifications .
I need complete details.
Thanks in advance

Extracting Source Code From .ocx File.
How can I get the source code from a .ocx file. Thanks.

Intex Hex File Source Code
Hi,

I am looking for source code (freeware) in Visual Basic to decode an text file in Intel Hex format.

Please let me know if you know.

Thanks,

BJ

Accessing Help File From Vb6 Source Code
I have a .chm file. Accessing it with F1 from my vb6 project works great, but how can I access it from the source code. I read something about an function called 'HtmlHelp', but I doesn't work.

thanx for your help,
ds

What Different From Running From Source Code And Execute File???
I experienced problem that I don't understand or know why

If I run my program from VB appl. (start-> run). Results are coming OK. For example, after query to count record from a dba, it gives right number

Also from same program but after I generated into .exe file and run from it, the result of same above query give nothing and give no error or warning??

Could s/o explain???
Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved