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




OK! L'VE SEARCHED EVERYWHERE!!!! BUT I CANT DO THIS SIMPLE LITTLE THING!!!


Hi,

I need to show the Users Settings in windows 95/98/ME, that one with the user list in it thats in the control panel. Ive searched everywhere, but i just cant find out how to show it through vb Can ANYONE help me???




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
(simple) I Searched,I Read.
But I didn't conquer.

I want to be able to save entries and entries through vb6 into an access database.
e.g. : user enters text to search record (i have done that bit), vb6 displays data from database and now changes part of it (e.g. telephone number), and wants to save the changes to the database.

The book I have does it via 'cases' but I want to do it one by one and don't know how to set up the code.

I assume I do something like this:

VB Code:
Private Sub CmdSave_() Dim Rec As ADODB.RecordsetSet Rec = New ADODB.RecordsetDim strCn As String strCn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _"Data Source=E:corporatedatabasesoksodb2.mdb;" & _"Persist Security Info=False" .Add new


and then i kinda get lost can you help?

Can't Do A Simple Thing
Hi all,

I'm trying to write a simple function.
I want to call the function with a string, execute some commands then send back a true or false and I can't seem to do it.

I know it should be simple but if some one could give me a small example of how I would do this I would appreciate it.

Thanks in advance,

-NJDevils28

How Do I Do This Simple Thing
Hi I need to include a message, ie a standard microsoft message that confirms ive saved something, when ive pressed a save button to save some information stored in a form.

how do i do it? i remember there are standard microsoft message boxes - but for the life of me i cant remember where they're kept.

NEED HELP REALLY BAD! One Simple Thing
Hi I am writing something kindof like a really simple database program. I really need to know how to make a new text file. I already know how to do the command:
VB Code:
Open "C:Textexample.txt" for (Input/Output) as #1 'or what ever number  
. really could use this help, thank you very much for any help you can give.

Can't Get This Simple Thing Going...
Hi All,

I have a very simple problem. I'm creating a little app (MDI) with a main and a few child's. To keep it simple let's pretend there's only 1 child. On the main the user presses button 1, enters some info, a simple DBase is opened where the app searches for the info. When the requested info is found, the child opens and the info is displayed. Sounds simle, but here is my question:

I made the dbase search in the Form_load of the child. Works very fine, but when no hits are found, i want the app to display a message (something like "no hits are found") and then to close the child again. If i use the Unload me command, i keep getting an error saying "Object has been unloaded" because the activate event of the child is fired when all searching is finished and, hence, when no info is found, already unloaded.

Anyone has a solution ?????

Thanx and greetz,

Frans

Simple Telnet Thing
Hello,
How do I open a telnet session to xxx.xxx.xxx.xxx server and then get the information it is replying for instance username: , to which I should type my username.. etc?
Winsock?

A Simple Thing Im Trying To But Im Sure I Could Do It Easier...
hey in my programs i often have a bit of code like this:

if x is <=var1 then
do something
if x > var1 and x <= var1 + var2 then
do somethingelse
if x > var1 + var2 and x <= var1 + var2 + var3 then
do something different
end if

basically the code just keeps gettin bigger and bigger and it ends up like:

if x > var1 + var2 + var3...........+ var 50 + var51 and x <= varvar1 + var2 + var3...........+ var 50 + var51 + var52 then
do somethin

see how it gets absolutly huge. is there a better way to do this? something like i can just go

if x is inbetween var1 and var2 then
do somethin
if x is inbetween var2 and var3 then
do somethin else
end if

like that.

also the variables will be bits of data from an array so it wioll be like var(1), var(2)etc

Simple Treeview Thing
Hello,

I have a lill textfile as a database.
Currently i am reading the textfile into my application and i am using a listbox to catch the entry title of each database entry.

Here is how i do this:

Code:
Open sFile For Input As #1
numrecords = 1
frmMain.lstData.Clear
Do While Not EOF(1)
Input #1, Title(numrecords)
Input #1, Site(numrecords)
Input #1, User(numrecords)
Input #1, Email(numrecords)
Input #1, Note(numrecords)
Input #1, Cat(numrecords)
frmMain.lstData.AddItem Title(numrecords)
numrecords = numrecords + 1
Loop
numrecords = numrecords - 1
Close #1
currentrecord = 1

As you can see basic stuff.

Now i added a treeview to my program and list them up like this:


Code:
sintcount = sintcount + 1
Set node = frmMain.T1.Nodes.Add(Relative:="MyKey1", RelationShip:=4, _
Text:=Title(numrecords) & sintcount, Key:="Childnodehiddenkey" & sintcount, Image:="Closed")
node.ExpandedImage = "Open"

This works and i have all my titles instead of in a listbox in a treeview.
Now my problem: I added categories to my database, meaning each entry has an id of a category. Now i want to add the entry to the matching treeview node of my predone Treeview.

Here is my Treeview setup:

Code:
Public Sub SetUpTreeView()
Dim node As node
Dim sDat() As String
Dim strData As String
Static sintcount As Integer
Dim i As Integer

strData = "Category1;Category2;Category3;Category4;Category5;Category6;Category7"
sDat = Split(strData, ";")

With frmMain.T1
For i = 0 To UBound(sDat)
sintcount = sintcount + 1
Set node = .Nodes.Add(Key:="MyKey" & sintcount, Text:=sDat(i), Image:="Closed")
'.Nodes.Item("MyKey" & sintcount).Bold = True
node.ExpandedImage = "Open"
node.Sorted = True
Next i
End With
End Sub

Now i wonder how i can get a database entry with id "Category1" into its matching Treeview key.

Here is my try sofar:


Code:
For i = 1 To frmMain.T1.Nodes.Count
If InStr(1, frmMain.T1.Nodes(i), Cat(numrecords), vbTextCompare) > 0 Then
sintcount = sintcount + 1
Set node = frmMain.T1.Nodes.Add(Relative:="MyKey2", RelationShip:=4, _
Text:=Title(numrecords) & sintcount, Key:="Childnodehiddenkey" & sintcount, Image:="Closed")
node.ExpandedImage = "Open"

End If
Next i

It doesnt work cause i dont know how to catch the Relative of my database entry right...

Any ideas?

Thanks

Why Does This Simple Thing Not Work
I am at my wits end trying to figure out why this does not work. I am trying to select a section of text when clicking a button. If you have a text box with some words in it, something like "Good morning to you" and then add a command button and insert the following code:


VB Code:
Private Sub Command1_Click() Text1.SelStart = 5Text1.SelLength = 7 End Sub


it does not work, yet the same exact code in the Text box got focus it DOES select the text starting at position 5 and for the 7 characters.


VB Code:
Private Sub Text1_GotFocus() Text1.SelStart = 5Text1.SelLength = 7 End Sub


Any help would be appreciated.

Mickey

Very Weird Simple Thing
Hi people

What's wrong with this simple code?

VB Code:
Image1.Picture = App.Path & "Imagesfoto" & ftnmmr & ".jpg"

I get a type mismatch...
And the last & is highlighted blue.

Thanx

Should Be A Simple Counting Thing But...
ok I am missing something here this should just check to see that the correct option button has been checked off and add 1 to intscore (which is displayed in txtintscore) but it only adds 1 to txtintscore once....no matter how many questions are correct or when I decide to answer a correct question (so if i wait till the third question and then answer the correct option it adds 1 then)

I dunno?


Private Sub cmdnext_Click()

'score the first question

If Option1 = True And Txtanswer.Text = "a" Then
txtintscore.Text = intscore + 1
Else
If Option2 = True And Txtanswer.Text = "b" Then
txtintscore.Text = intscore + 1
Else
If Option3 = True And Txtanswer.Text = "c" Then
txtintscore.Text = intscore + 1
Else
If Option4 = True And Txtanswer.Text = "d" Then
txtintscore.Text = intscore + 1
Else
End If
End If
End If
End If
'set focus on question
Txtquestion.SetFocus
'move to next question
rsQuestions.MoveNext

'set all opt buttons to false
Option1 = False
Option2 = False
Option3 = False
Option4 = False

'if EOF then move to next form and unload this one
If rsQuestions.EOF = True Then
rsQuestions.Close
Unload Me
frmend.Visible = True

Else:
'get the focus off the opt buttons
Txtquestion.SetFocus
'populate next question
Txtquestion.Text = rsQuestions!question
Option1.Caption = rsQuestions!answera
Option2.Caption = rsQuestions!answerb
Option3.Caption = rsQuestions!answerc
Option4.Caption = rsQuestions!answerd
Txtanswer.Text = rsQuestions!correctanswer



'score next questions
If Option1 = True And Txtanswer.Text = "a" Then
intscore = intscore + 1
txtintscore.Text = intscore
Else
If Option2 = True And Txtanswer.Text = "b" Then
intscore = intscore + 1
txtintscore.Text = intscore
Else
If Option3 = True And Txtanswer.Text = "c" Then
intscore = intscore + 1
txtintscore.Text = intscore
Else
If Option4 = True And Txtanswer.Text = "d" Then
intscore = intscore + 1
txtintscore.Text = intscore
Else
End If
End If
End If
End If
End If

End Sub


Cujo

Simple Mouse Dragging Thing
I got an e-mail a few days ago from someone (who saw my site, who got my e-mail from here, who knows) asking me for a tutorial on using the mouse to select an area on the form. So, I whipped up a little thing. Normally, I wouldn't post this kind of thing here (as I don't totally see exactly how useful it is), but this guy was extremely happy I wrote this little thing. That makes me think it could be valueable to others here. So, attached is a few lines of code (not much, really) demonstrating simple mouse techniques. It's fairly well commented, so I hope it's of use to a few people.

Simple Thing Wont Work
VB Code:
Private Sub Form_Load()    Windowed = InStr(0, Command$, "-w", vbTextCompare)        If Windowed Then        BorderStyle = vbFixedSingle    End IfEnd Sub


windowed is a boolean

when i make a shortcut to the exe with -w behind the "<path>" and run it is still none bordered

Such A Thing As Fairly Simple Image Recognition?
Ok, I want to a select a section of my screen to constantly keep monitoring whats being displayed in that section. All I really need it to do is give me some sort of return when the section changes. Something like a webcam motion detector would work, if I could select a part of the screen instead of a webcam.

Would anyone know how I could do this pretty simply? I really need to get this software done asap.

Need Help (Hope Probably Some Thing Simple But Not Multi Threading!!!)it Is Possible
Ok I have a main app that use a activex dll to upgrade a flex grid with some data. My problem is that when I move the form around the screen the flex grid stop upgrading and kind to freeze until I release the form a quit moving it
this is Basically the code

VB Code:
Option Explicit'Reference to RS232.dllPublic WithEvents DF1Driver As RS_232.DriverPrivate Sub DF1Driver_DataChange(ByVal addreess As String, _                                 ByVal Value As Variant, _                                 ByVal TransactionTime As Long, _                                 ByVal Quality As String)    On Error GoTo DF1Driver_DataChange_Err    Select Case addreess        Case "N7:0"            MSHFlexGrid.TextMatrix(1, 1) = addreess            MSHFlexGrid.TextMatrix(1, 2) = Value            MSHFlexGrid.TextMatrix(1, 3) = Quality    End Select    trasntxt.Text = TransactionTime    Exit SubDF1Driver_DataChange_Err:    MsgBox Err.Description & vbCrLf & _            "in Project1.Form1.DF1Driver_DataChange " & "at line " & Erl    Resume NextEnd SubPrivate Sub Form_Load()    On Error GoTo Form_Load_Err    Set DF1Driver = New RS_232.Driver    'set plc    With DF1Driver        .ProcessorType = [PLC 5]        .DHNodeAddress = 1        .RemoteNodeAddress = 0        .CalcCheckSum = CRC        'set scan time        .UpgradeRate = 250        'set comm port        .Comm_CommPort = 1        .Comm_Settings = "19200,N,8,1"        'Number of elements to scan        .NumberOfElements = 1        '35        .DataReadBiteSize = [A Word]        'data to scan        '''N7:5        .FileNumber(1) = 7        .ElementNumber(1) = 0        .SubElementNumber(1) = 0        .FileType(1) = Intege_r        ''''''''''''''''''''''''''''''''    End With    With MSHFlexGrid        .Cols = 4        .ColAlignment(2) = flexAlignCenterCenter        .FillStyle = flexFillRepeat        .TextMatrix(0, 0) = " "        .TextMatrix(0, 1) = "Address"        .TextMatrix(0, 2) = "Value"        .TextMatrix(0, 3) = "Quality"        .ColAlignmentFixed(-1) = flexAlignCenterCenter        .ColWidth(0) = 300        .ColWidth(1) = 800        .ColWidth(2) = 1000        .ColWidth(3) = 800        .MSHFlexGrid.Rows = 12        .Height = 12 * (.RowHeight(1) + 5)    End With    Exit SubForm_Load_Err:    MsgBox Err.Description & vbCrLf & "in Project1.Form1.Form_Load " & _            "at line " & Erl    Resume NextEnd SubPrivate Sub Form_Unload(Cancel As Integer)    On Error GoTo Form_Unload_Err    Set DF1Driver = Nothing    Set Form1 = Nothing    Exit SubForm_Unload_Err:    MsgBox Err.Description & vbCrLf & "in Project1.Form1.Form_Unload " & _            "at line " & Erl    Resume NextEnd Sub

Any help would be appreciated
Hidroilio Pérez

*Resolved* Simple Thing [Form2.Show 1]
Hello Guys,

I have a main form and it will be calling other forms.

sub forms will not be waiting for the user input and are designed to show the status of task and when it gets completed it will unload me will be called.

Problem is, once the sub form is executed and unloaded I am getting error in main form "Object was Unloaded".

Main form code goes like this


VB Code:
Private Sub Command1_Click()    Form2.Show 1    Form3.Show 1'i.e. when the form2 is closed i will be calling form3'Similarly other formsEnd Sub


sub form code goes like this


VB Code:
Private Sub Form_Load()    Call DoThat    Call DoThis    Unload MeEnd Sub



Ok, I am able to understand the error and moved the form load code to a timer event. Now it works fine.

Now the question is is there a better way ???

Thanks.

A Simple User Interface Type Thing
hi again

hehe im a little stuck again, im not sure whats wrong with the code i tried but maybe some kind person will help me out again

i have 3 text boxes, the first 2 i'd like users to enter two sets of numbers ie : text box 1 = 20
                         text box 2 = 10
in the 3rd box i want to show the sum of txtbox1 + txtbox2 / 2

im assuming i'd use a command button to show the answer

i've tried this as a code but it failed

Private Sub Command1_Click()
Text3.display = Text1 + Text2 / 2
End Sub

am i right in saying that code is too basic?

any help would be cool

rei

Need Help (Hope Probably Some Thing Simple But Not Multi Threading!!!)
Ok I have a main app that use a activex dll to upgrade a flex grid with some data. My problem is that when I move the form around the screen the flex grid stop upgrading and kind to freeze until I release the form a quit moving it
this is Basically the code

Code:Option Explicit
'Reference to RS232.dll
Public WithEvents DF1Driver As RS_232.Driver
Private Sub DF1Driver_DataChange(ByVal addreess As String, _
                                 ByVal Value As Variant, _
                                 ByVal TransactionTime As Long, _
                                 ByVal Quality As String)
    On Error GoTo DF1Driver_DataChange_Err
    Select Case addreess
        Case "N7:0"
            MSHFlexGrid.TextMatrix(1, 1) = addreess
            MSHFlexGrid.TextMatrix(1, 2) = Value
            MSHFlexGrid.TextMatrix(1, 3) = Quality
    End Select
    trasntxt.Text = TransactionTime
    Exit Sub
DF1Driver_DataChange_Err:
    MsgBox Err.Description & vbCrLf & _
            "in Project1.Form1.DF1Driver_DataChange " & "at line " & Erl
    Resume Next
End Sub
Private Sub Form_Load()
    On Error GoTo Form_Load_Err
    Set DF1Driver = New RS_232.Driver
    'set plc
    With DF1Driver
        .ProcessorType = [PLC 5]
        .DHNodeAddress = 1
        .RemoteNodeAddress = 0
        .CalcCheckSum = CRC
        'set scan time
        .UpgradeRate = 250
        'set comm port
        .Comm_CommPort = 1
        .Comm_Settings = "19200,N,8,1"
        'Number of elements to scan
        .NumberOfElements = 1
        '35
        .DataReadBiteSize = [A Word]
        'data to scan
        '''N7:5
        .FileNumber(1) = 7
        .ElementNumber(1) = 0
        .SubElementNumber(1) = 0
        .FileType(1) = Intege_r
        ''''''''''''''''''''''''''''''''
    End With
    With MSHFlexGrid
        .Cols = 4
        .ColAlignment(2) = flexAlignCenterCenter
        .FillStyle = flexFillRepeat
        .TextMatrix(0, 0) = " "
        .TextMatrix(0, 1) = "Address"
        .TextMatrix(0, 2) = "Value"
        .TextMatrix(0, 3) = "Quality"
        .ColAlignmentFixed(-1) = flexAlignCenterCenter
        .ColWidth(0) = 300
        .ColWidth(1) = 800
        .ColWidth(2) = 1000
        .ColWidth(3) = 800
        .MSHFlexGrid.Rows = 12
        .Height = 12 * (.RowHeight(1) + 5)
    End With
    Exit Sub
Form_Load_Err:
    MsgBox Err.Description & vbCrLf & "in Project1.Form1.Form_Load " & _
            "at line " & Erl
    Resume Next
End Sub
Private Sub Form_Unload(Cancel As Integer)
    On Error GoTo Form_Unload_Err
    Set DF1Driver = Nothing
    Set Form1 = Nothing
    Exit Sub
Form_Unload_Err:
    MsgBox Err.Description & vbCrLf & "in Project1.Form1.Form_Unload " & _
            "at line " & Erl
    Resume Next
End Sub

Any help would be appreciated
Hidroilio Pérez

Any Such Thing As A "simple" Web Server Written In VB?
I am looking to start a project built around very simplistic web
services.

It would be so great if there was already a VB project available
which acts as a simple web SERVER.

This program would run on a machine WITHOUT IIS or apache
installed.

Am I just totally naiive, or does this sound like it should have
been created long ago?

Plan B: If no such thing exists, is there any way to make a simple
web server out of VB?

Thanks!

Dave

P.S. - I am NOT talking about a server side script or CGI program,
but an actual server listening for http requests.

Heck, I'll even take a pre-compiled active-x object!

Hey..need Help With "simple" Winsock Thing..
I have made this app that will be able to connect
both Locally and over Network(Internet)

EG: if you run two instances of it on your computer, then the 1st instance will connect to the 2th instance..

But here comes my problem...
When you start the 2th instance of my pro (lets call it: SR)

It automatically detects that the 1st SR is listening on the port(257 which I use)
But then when you try to press the CONNECT button in the 2th
SR it gives an error: "Adress Already In Use"

Can anyone download and try...to find the error..
And ps: I have tried both RemotePort and LocalPort..

Please Download and Try,,so you can tell me whats wrong!

Thanks In Advance Folks...

Simple Question Solved, One More Thing Please. Solved
I am using VBA in Excel.

I want to save the excel sheet as a .txt file delimited by a pipe and overwrite it without that pop-up you get with that warning that you are overwriting an existing file.

Any quick help would make my day!





Edited by - jonnie on 10/6/2003 4:58:13 PM

Systray ? (yes I Searched)
All the code I have found for minimizing to systemtray uses the minimize button(which i think is this: Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single), well what if i want to use an image? ... Private Sub imgPoop_Click(Button As Integer, Shift As Integer, X As Single, Y As Single) doesnt work...didnt think it would...but you might see what im saying, anyone know?

Get Searched List
Hi,
How can I get reacently searched list from Internet Explorer by VB 6.0?

Thanks for advance.

Save A BitBlt To BMP...yes, I've Searched!
Alright...no, wait...alright...no, wait...ack.

*Here is what I want to do:

BitBlt a portion of a bitmap to a picturebox.
Save the contents of that picturebox to a bmp file.

*Here is what I have done:

Load the bitmap to a picturebox. Select a region of the bitmap with a shape and BitBlt that selected portion to another picturebox. [picMat > picSelected] This has been successful.

I then attempted to use the SavePicture function to save the contents of picSelected as a bitmap.

*The result:

A bitmap of the correct proportions on my hard drive that has nothing on it (just a white field).

===

I have also tried double-buffering. That didn't work either and it was far more effort and overhead than I needed. The purpose of this is an attempt to code my own Tileset CREATOR - I want to assemble my own tilesets for use in my RPG.

Again, SavePicture does NOT work the way I want it to - it just creates a white bitmap! (How irritating...)

I've also played with the AutoRedraw and forced form/picturebox refreshes and those simply cleared the blitted image - so I know that won't work.

===

Anyway. I've enclosed a zipped file that shows what I've attempted to do. Any help would be much appreciated!

Thanks!

Regular Expressions (Yes, I Have Searched :P)
Hi guys,

After an hour of fiddling with a regular expression I've determined that they're completely above me. I can get it to almost work, but it chokes on one thing.

What I need is for a string to be parsed like so:


Code:
Optional
- letter
- number
- space (" ")
-- (as many as wanted)
Required
- space (" ")
- Left brace ( { )
- (as above optional, letter, number, space)
- Right brace ( } )
- Nothing after that last right brace
I got it to work - except for when I would put a space (" ") between the braces, RegExp.Test would return False

What I was using:


Code:
Pattern = "w* {[w]*}"
String = "b5 fe3b 23rtv {boo}"
That works. It comes up as True. But if I change the String to


Code:
String = "b5 fe3b 23rtv {boo yaa}"
It chokes .

I'm probably missing something really simple here, so any help is appreciated (or entirely better ways of doing the pattern, hint hint )

Cheers


EDIT!: I kind of stuffed that up - what can go at the start should be "anything", and same with what is in the braces. I think that's where my Pattern fails me - it's too specific

Another Context Menu Help. I Searched :P
Well i searched for over 15 minutes to look for a piece of code that will add to the menu in IE.

so when people right click, they see a menu, and tthey just click it.

all I want from it is the URL for now.

can someone post a piece of code and such.

Note: i still have trouble understanding registry and stuff, so you'll need to bare with me while i ask questions which might seem stupid

Login Form (Please Help I've Searched A Lot)
Okay, I've been reading through to forums and I found stuff here that was close (I think).. I'm really new to VB but I'm learning

Anyways, I have about 500 users that I need to log into this client side software. When they hit the 'Login' button I need it to contact the server which has the database (Access) and check their username/password against what is stored there. The database name is Customer.mdb and the server ip is 192.168.1.1

If someone could just help me get past the login I think I can figure out the rest.. Thanks!

Bah Searched Everywhere Couldn't Find It
ok i'm gonna try to get this code to work:


Code:
Public Function SetComboBoxValue(ByVal doc As IHTMLDocument3, Form As Integer, Name As String, Name2 As String)
'**** This one bases it's selection on the Value of the - <option value =
'value'> - Tag.
Dim q, i

For q = 0 To doc.Forms(Form).length - 1
If (doc.Forms(Form)(q).Name = Name) Then
For i = 0 To doc.Forms(Form)(q).length - 1
If doc.Forms(Form)(q).Options(i).Value = Name2 Then
doc.Forms(Form)(q).Options(i).Selected = True
Exit For
End If
Next i
End If
Next q
End Function

ok my question is...do i change q to the value to the VALUE of the drop down...like in html aboved the option=2 oe 1...or do i change it to the NAME of the field...bah i'm lost

Can HTML Files Be Searched From VB?
Hi,

I have no idea if this is possible, but hopefully it is because my boss wants this done.

My project contains 2 access DB's, and displays a bunch of linked HTML pages.

The databases and the HTML pages all related to each other in some way and have to be connected. The 2 db's also contain some of the same people names.

Here's my problem,

I have a name that is displayed in a label. This person has a related HTML page containing information on the Ship they traveled on. When a command button is clicked, I want the correct HTML page corresponding to the name in the label to be displayed on a separate form in a web browser.

I want to use the name in the label to search an Access table for the matching name so I can retrieve the name of the ship the person traveled on. When the ship name is found, I then want to use the ship name to search the HTML pages to find the correct ship that matches the person.

All HTML pages are named after respective ship, so if I had a ship called 'Riverside' the HTML page would be called Riverside.html
Ship and Person first and last names are all in respective fields.

My question is, is it possible to take the name in the label, search an access table to find the matching name and ship name, and then, once the ship name has been found, use the ship name in a search to display the appropriate HTML page in a web browser?

So, if the name in the label is John Doe and he traveled on the Riverside, when I click the button 'Ships' the HTML page for Riverside would open in a web browser on a separate form.

Hope this is clear. I kinda confused myself writing this, so if its not clear let me know.

Cheers,

Highlight Searched Character
Any ideas as to how to highlight a substring within a text field. I am searching for this substring and wish to draw attention to where it is in the text box - just like the MS Find dialog box does.

Searched For Word Help, Need To Just Convert...
I looked around for help on saving documents in word and that, but nothign I find seems to help (and agian I don't have my MSDN CD). So basically what i want to do is just open a word document and read it in a line at a time, but I dont understand how to do that using the .Range. So I thought I Could open the document and then saveAs a text file and use the regular OPEN statements and that from VB on the txt file...but I cannot figure out how to saveAs txt. In the .SaveAs it says [FileName], [FileType] what is it i supply for a file type to just save it as a ascii text file? (Perferablly one that saves the proper line feeds, eol carriage return etc..

any help here would be greatly appreciated...

Thanks,
Shane

Background Image On Form (have Searched :)
Sorry i know this question has been answered and i have tried to use the code in the replies but when i try compile i just get invalid outside procedure errors. I'm using visual basic 6, i have a single form and i want a the background to be an image of my choice. Please can someone give me a simple explanation of how this is done before i go crazy.

Thanks
daveB

Changing MSN Nick Problem (Yes, I Already Searched)
Hey,
I'm trying to make an app to change my MSN Nick every 60 seconds to a random qoute, I can do that, but if the qoute has a comma (,), it gets cut off.

IE: If the qoute is "You must look into people, as well as at them. - Lord Chesterfield", when it tried to make that my nick it changes it to "You must look into people", instead of the full thing. Is there some way to escape commas and special characters?


Code:
Private MSN As New MsgrObject
Private List() As String

Private Sub Form_Load()

Open "C:qlist.txt" For Input As #1

'Loop Through Each Line
Do While Not EOF(1)

'Add the line to Array
ReDim Preserve List(X)
Input #1, List(X)

'Increment X + 1
X = X + 1
Loop

'Close the File
Close #1
Form1.Visible = False

End Sub

Private Sub Timer1_Timer()
If MSN.LocalState <> MSTATE_OFFLINE Then
Randomize
txtNewNickName.Text = "Justin - " & List(Int((UBound(List) * Rnd) + 1))
MSN.Services.PrimaryService.FriendlyName = txtNewNickName.Text
End If
End Sub

Thanks,
Justin Sampson

Volume Mute - Have Searched But Found Nothing
Hey,

I have searched but didn't find anything useful.

I am using the mixer API's and i would like to know which setting i need do changed and what i need to change it too, to mute one of the specified controls.

Thanks very much in advance

Chris Colden

Displaying A Searched Record In Access
First of all thanks heaps for your help in the past and hopefully on this occasion.
I am playing around with a search function in my Access 97 database. I have coded appropriateley to find a record (via creating an ActiveX data object record set and navigated it and search it for the corresponding record the user enters into a text box.) Now I want to fill the form out with the record Ive found. But because the forms remains active the form has to correspond to a record I cant just fill in the individual text boxes etc. I have played around with the GotoRecord but that doesnt seem to be what Im looking for.
PLEASE HELP!!!

I've Tried Everything And Searched Google! List1.InnerText?
I am trying to put the contents of List1 in Text1....


VB Code:
Text1.Text = List1.innerText 'Doesnt work Text1.Text = List1.Text  'Doesnt work either  


I don't want to have to add line be line to text1... I dont think its necessary.

Any thoughts?

Chat Application - Searched The Web, No Luck
I openned a thread like a month ago about creating a chat app. Some People suggested searching the web. I did that and i have found nothing that has helped me. So now i come back here to start from scrach!

Here is what i want to do:

-The User Opens the program.
-Program connects to the server
-User enters email and password
-Program sends info to server
-Server checks the database and authenticats the email/password
-Server sends list of buddies to the Program and puts in list box
-User can chat will multiple Users at once, in diffrent forms

Kind of like AIM/MSN.

I think the first thing i need to do is connect to the server for the login stuff. Then i will post from there.

The Database is MySQL, i am writing in VB 5.0. I have some Database and Winsock background.

Thanks for all who help!

Winsock Control Array, I Have Searched
I have searched through the forums but can't figure this out. I looked on MSDN for Winsock control Arrays. This is what they have :


VB Code:
Private Sub Form_Load()   intMax = 0   sckServer(0).LocalPort = 1001   sckServer(0).ListenEnd Sub Private Sub sckServer_ConnectionRequest _(Index As Integer, ByVal requestID As Long)   If Index = 0 Then      intMax = intMax + 1      Load sckServer(intMax)      sckServer(intMax).LocalPort = 0      sckServer(intMax).Accept requestID      Load txtData(intMax)   End IfEnd Sub


I want to have the clients connect to the server, the server verifies username and password, then sends to the client if its valid or not. I just dont understand how I am supposed to know which one to send the information back to. Will it be as simple and the first one is sckServer(0) the second sckServer(1) and so on, then when I send data I just fill in the number?

Ok Searched! Easy Text File One!
I have:
How can i get it to add the string name onto a new line of the text file!
At the moment it overwrites the previous data!

Dim stryes As String
stryes = MsgBox("Are You sure you want to archive this directory " & Dir1.Path, vbYesNo, "Archive")
If stryes = vbYes Then

Dim FilePath As String
Dim name As String
name = Dir1.Path
FilePath = "F:Filingarchives.txt"

Open FilePath For Output As #1

Print #1, name

Close #1
List1.Refresh
Else
Exit Sub
End If

How To Connect In A Cell Searched Characters
Hi, you helped me to answer in some questions before.
Now, I need to help me again.

1. I post the following 3 codes, for the last one need some help.
2. I found this one site (www.entisoft.com/estools/StringSearches.HTML),
that would be very usefull if i had more details about the refeering codes.
Does know anybody some code examples to try to learn?
3. I have tried with this code but worked only in a textbox asigned , not in
a userform, whatis wrong?
====================================================
1.
Searching a word in a sentence , the following code works good:

Private Sub CommandButton1_Click()
Dim strfind As String
Dim myrange As String
Dim newrange As Range
strfind = "CodeGuru"
myrange = Range("c2")
Set newrange = Range("f2")
If InStr(myrange, strfind) Then
newrange.Value = True
newrange.Select
End If
End Sub

---------------------------------------------------------------------------
' The second code searches a chart in a word and its also OK:


Private Sub CommandButton2_Click()

Dim strtext As String
strtext = "thank you"
'Find the position of "k" in the string
Text2 = InStr(1, "thank you", "k")
End Sub

------------------------------------------------------------------------------


The third one puts me in trouble...and i need some help.
According the above examples pls help me for the next code, refeering to "how to find the first chart ("o") in order to appear in my textbox and next in the same text box to appear the second chart. I mean, if my word is "cooperative" , the textbox iwant to appear "2,3 " when i press the button two times.
How can i apply in excel like the above 2 codes? Mean , using ranges .
(Why do I have to put in my code the debug command? is it necessary?)

Private Sub CommandButton3_Click()
Dim strtext As String
strtext = "cooperative"
'Find the first "o" in the string.
Text3 = InStr(1, "cooperative", "o")
Debug.Print lFirst
'Find the second "o" in the string.
Debug.Print InStr(lFirst + 1, "cooperative", "o")

End Sub

----------------------------------------------------------------------

3.
When I open the form in vb, command button click() procedure, and write the following code:

Sub Command1_Click ()

Dim strText As String
strText = "Hello World!"
Print strText

End Sub

but it is not works, nothing appears in the form.
What is wrong?appears "Run- time error 438" : Object doesn't support this property or method Maybe i have to assign something to the user form Private sub?
==================================================


Thanks in advance for your help

Showing Searched Results In Html Page
hi,

I am trying to make a cd based web application. I want to add search facility so that clients can search the records from the access database. But i don't know whether i can show the searched results in webpage or any similar editor like grid or any object. Any of your suggestions are appreciate.

Thanks
ghale

Printing Basics, Yes I've Searched. (Listview Related)
I have been messing with the printer a bit, and Wanted to be able to print all of the columns in a listview (report view).
There is going to be the posibility of many different columns.

How do I keep the printer on the same line, at the same position, so that I can print the next column in that row?

I was thinking of just combining all the information in one row into 1 string.

How do I add the tab(30) to the string? Is there a better way to space the information, and keep the printout on the same row?


VB Code:
Dim MyString as StringMyString="Some Text" & SomeStringVariable & Tab(30) 'doesn't workPrinter.Print MyString


I know there is a Tab Character.

Can I do something like this.


VB Code:
For Inc=1 to MyListView.ColumnHeaders.Count step 1     Printer.Print MyListView.ColumnHeaders(Inc).Text     'Somehow stay on same line, just tab over. then loop through againNext Inc 'Then print out my information same way for the items in the columns?  

Mschart - Newbie Help. Searched For Hours Today :(
Hi,

I'm trying to use mschart to plot a line graph. I've searched on here, and other places, and I've managed to find the code to do just that. However, I can't find out how to do the following:

1) On the X-axis, I want the points to plot right from the 0,0 point. For some reason, the points plot similar to a bar chart and don't seem to 'align left'. Can anyone help?

2) Is it also possible to have multiple y-axis?

Primarily, it's number 1 that's making my brain feel like it's melting and coming out of my ears!

Thank you for any help

File Association (Have Searched But Nothing Will Work....until Now!) *RESOLVED*
Hello, I have made a program that will open .NFO files. I have also associated the .nfo file extention to my program. I can tell I have because when I double click the .nfo file it will open my program. But, when it opens my textbox is empty. I have tried the various file association codes on this forum, along with manually adding it in windows explorer. I have even tried adding the %1 at the end as said in various posts. I have no problem making notepad open when i double click 'new' extentions that I assigned to notepad. Is there any code I can add to the form_load to possibly check if the program was opened by a file, and if so hyave it display it?

Searched The Forums- No Help Found. Inet Progress
This has been asked plaenty of times b4 i know!

How do i track the progress of a ftp file download using Inet1?

I have staus messages already but a prog bar makes it look a lot better!

I have the max file size which is easy but can i get the path of where it's downloading to and constantly check the filesize of the downloading file?

Favorites Menu And History Thing And Favorites Thing At Teh Side Like In Ie
how would i make a favorites menu and then like the search favorites and history thing at the side like i.e
how would i make all 3 of them things for my web browser idea and scripts welcom the menu is for a top menu wher my file menu and stuff is

Zlib.dll DeflateInit2 Function - Sample Code In VB6 Searched
can someone give me a sample code calling the 'deflateInit2' function of the
zlib.dll for MS VisualBasic 6 ?

Thank you for response
Wolfgang Schwarz

String Function To Return Number Of Searched Strings
I am writing a utility to go with my software which does importing and such. Anyway cut a long story short, I would like to know if there is a Visual Basic function which will return the number of search strings you assign it, it finds in another string

Example:

String A = "123, ABC, DEF, 456"

This function would return the integer value 3 if I asked it to search for the comma charecter ' , ' in String A because there are three comma charecters in String A.

Any Help Greatly Apperiated

Text File Problem (Searched But Couldn&#039;t Find)
I have looked back over past threads but can't seem to find a solution to my problem.

I understand how to write into text files and how to read out of them, my problem is being able to amend a particular line.

Is there a way to pull out a line change it and put it back into the same line.

i.e.

In text file have

Line1
Line2
Line3
Line4

I want to be able to change maybe line2 to Fred so that the text file after the changes would read

Line1
Fred
Line3
Line4

I hope you understand what it is that I am trying to do.

Cheers for any help
Steve

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