RahulV 16 Junior Poster in Training

@ Comatose

Okay!
that does work.

but in ur example u had written

End

statement for Button2 and that ends the whole program, instead i want to just end the running sub-procedure or the loop.

You have any other idea on this?

RahulV 16 Junior Poster in Training

then doevents should work just fine.... somewhere when your form1 is doing processing... probably in some kind of do loop or while loop or for loop, simply stick a doevents.

for i = 0 to 1000000
     retval = i * i
     doevents
next i

Sorry it did not work for me.....
Pls can anyone help me with this.

can creating thread help with this?

RahulV 16 Junior Poster in Training

If it is a system call (such as shell, or wsh.run) and it is blocking (ie, the program is waiting for shell or wsh.run to finish the externally running program), you need a much more complicated method involving things like waitforsingleobject...

Im not running any other program or shell.
Its just that the Form1 is processing a long process. Like suppose counting to 1000crores or more.

RahulV 16 Junior Poster in Training

Hi, use

DoEvents function so that other process get chance. This function helps to disable your form.

Example

Dim bStop As Boolean

Private Sub cmdProcess_Click()
   Do While bStop <> True
      '
      '  Long Process
      '
      CurrentX = 0
      CurrentY = 0
      Cls
      Print Time
      DoEvents
   Loop
   bStop = False
End Sub

Private Sub cmdStop_Click()
   bStop = True
End Sub

Sorry this did not work i told u that, mu Form1 gets disabled, thats normal when there's some long process is taking place. So im not getting access to the cmdButton (to click).

RahulV 16 Junior Poster in Training

Also the problem is that my Form1 which runs the process goes like disabled (automatically), ..... thats because, .... u can imagine because its a long process.

so im not able access the controls on the Form1.


PLS help !!!

RahulV 16 Junior Poster in Training

hi,
i've created a Form1 which contains a long running process. But i want an feature that will help the user to stop the running process in between, when i click a Button or some other control.

How is it possible?

RahulV 16 Junior Poster in Training

How can one send the data in a Form's controls like textboxes, labels, comboboxes etc. to a Datareport?

Does anyone have a suggestion?

RahulV 16 Junior Poster in Training

Im also having a similar doubt!

im using Access.

RahulV 16 Junior Poster in Training

Thanks
that all sure did help !

RahulV 16 Junior Poster in Training

AppActivate("calculator") does not return an value!!!

FindWindow API Call. You might be able to use something like retval = appactivate("Calculator") , and then check the return value of retval for success or failure, but I'm not sure if appactivate returns a value... I know findwindows does.

Can u please explain wht did u mean by "FindWindow" ?

RahulV 16 Junior Poster in Training

You have to calculate the distance, and use form.move....in a module (normal code module, not class) add this:

Sub DoCenter(child As Form, parent As Form)
Dim mTop As Integer
Dim mLeft As Integer

If parent.WindowState <> vbNormal Then Exit Sub
mTop = ((parent.Height - child.Height) \ 2)
mLeft = ((parent.Width - child.Width) \ 2)
child.Move mLeft, mTop
End Sub

Then whenever you want to center the form, just call DoCenter mdiChild, mdiParent

Sorry my friend this did not work !!!
Any other ideas ?

RahulV 16 Junior Poster in Training

Thanks !

and im calling a windows calculator how to find out whether a calculator is already active?

RahulV 16 Junior Poster in Training

try to use some flag setting for loading and unloading of child forms and check the same during unload of the MDI form.

Can u suggest some other methods like, is there any class or methods to detect the active child form and external windows. Such as App class?

Pls help!!!

RahulV 16 Junior Poster in Training

Hi,
Im not able to center a child form of a parent MDIForm (MDIForm1) it shows up error message "Invalid property value" while setting the StartUpPosition property to 1-CenterOwner, or 2-CenterScreen, or 3-WindowsDefault of the child form.

How can I set all the StartUpPosition property of the child form?

Please help!

RahulV 16 Junior Poster in Training

try to use some flag setting for loading and unloading of child forms and check the same during unload of the MDI form.

OK,
I surely will try it out!

RahulV 16 Junior Poster in Training

Hi,
My parent MDI form (MDIForm1) has opens various child forms on their respective menu click events.
I want to know that :
1) How will I check if a particular child form is already open?
2) On closing the MDIForm1 if any of the child forms are open then it must popup a message box and wait until the user manually closes each and every child form before closing the parent MDIForm1. How should i do this?

RahulV 16 Junior Poster in Training

Thank you very much dear friend......!!
but I've an addition/suggestion to your idea:

File2Find = """somefile.txt"""

instead of ....

File2Find = "somefile.txt"

doing this change will help if the file name consists of spaces in between (i.e. if file name consists of multiple words). Like if file name is "some file.txt".

That sure did help!!!
Thank you for the help in coding explaining the code.

SOLVED!

Comatose commented: Absolutely Right. Double Quotes Is The Right Thing To Do. Great Call. +8
RahulV 16 Junior Poster in Training

I would do it something like this:

Dim File2Find As String
Dim FileList() As String
ReDim FileList(0)
Dim wsh
Set wsh = CreateObject("WScript.Shell")
File2Find = "somefile.txt"

Open "c:\quickrun.bat" For Output As #1
     Print #1, "@echo off"
     Print #1, "cd \"
     Print #1, "dir /a/s/b " & File2Find & " >c:\found.dat"
Close #1

wsh.run "c:\quickrun.bat", 0, 1

If Dir("c:\found.dat", vbNormal) = "" Then
     MsgBox "hmmm... something isn't right"
     Exit Sub
End If


Open "c:\found.dat" For Input As #1
     Do Until EOF(1)
        Line Input #1, chk
        If chk <> vbNullString And chk <> vbNewLine Then
            If UBound(FileList()) > 0 Then
                ReDim Preserve FileList(UBound(FileList()) + 1)
                FileList(UBound(FileList())) = chk
            Else
                FileList(0) = chk
            End If
        End If
     Loop
Close #1


If Dir("c:\quickrun.bat", vbNormal) <> "" Then Kill "c:\quickrun.bat"
If Dir("c:\found.dat", vbNormal) <> "" Then Kill "c:\found.dat"

For Each xFile In FileList()
    If xFile <> vbNullString Then
        MsgBox xFile
    End If
Next xFile

MsgBox "Done"

URGENT
Can anyone please explain this code????
OR
Can u provide me some other ideas????

RahulV 16 Junior Poster in Training

Hai,
I have a multi-line TextBox (Text1), whenever i click a button (cmdPrint) the contents of this Text1 should be printed out to a Printer selected using a Comon Dialog Box (cdlgPrint).

Can u help!
An explanation to ur codes will be highly appreciated.

Thanks.

RahulV 16 Junior Poster in Training

You cannot scroll by using the mouse wheel in the Microsoft Visual Basic 6.0 IDE.

CAUSE
This problem occurs because the Visual Basic 6.0 IDE does not have built-in support for scrolling by using the mouse wheel.

WORK AROUND:
To work around this problem, use one of the following methods:
Method 1
Download the VB6 Mouse Wheel.exe file that includes the add-in DLL and the code that is used to create the add-in DLL.

1. Download the VB6 Mouse Wheel.exe file. The following file is available for download from the Microsoft Download Center:
Collapse this imageExpand this image
Download
Download the VB6MouseWheel.EXE package now. (http://download.microsoft.com/download/e/f/b/efb39198-7c59-4ace-a5c4-8f0f88e00d34/vb6mousewheel.exe)

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 (http://support.microsoft.com/kb/119591/ ) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
2. Click Start, click Run, type regsvr32 <path>\VB6IDEMouseWheelAddin.dll, and then click OK.
3. Start Visual Basic 6.0.
4. Click Add-Ins, and then click Add-in Manager.
5. In the Add-in Manager list, click MouseWheel Fix.
6. Click to select the Loaded/Unloaded check box, and then click to select …

Comatose commented: Good Post +8
RahulV 16 Junior Poster in Training

A part from Comatose's above idea :

Open "c:\found.dat" For Input As #1
     Do Until EOF(1)
        Line Input #1, chk
        If chk <> vbNullString And chk <> vbNewLine Then
            If UBound(FileList()) > 0 Then
                ReDim Preserve FileList(UBound(FileList()) + 1)
                FileList(UBound(FileList())) = chk
            Else
                FileList(0) = chk
            End If
        End If
     Loop
Close #1


If Dir("c:\quickrun.bat", vbNormal) <> "" Then Kill "c:\quickrun.bat"
If Dir("c:\found.dat", vbNormal) <> "" Then Kill "c:\found.dat"

For Each xFile In FileList()
    If xFile <> vbNullString Then
        MsgBox xFile
    End If
Next xFile

MsgBox "Done"

Can u pls explain this part of ur program? It would be of very much help.

Thanks.

RahulV 16 Junior Poster in Training

What do you mean search a file? Are you trying to make a program that the user can type in a search text, and it will find the file name? or will it find that phrase/word /INSIDE/ the file?

Making it clearer --

Actually, the project should search for a file (name of the file is hard-coded) somewhere on the hard disk.
If found it should return a boolean value or something notifying that it has been found.

I hope i've made myself clear.
Please help.
Thank you.

RahulV 16 Junior Poster in Training

Hai,
Once again im here with a problem.
Can u help me write a program to search a file in the project folder.
I also want to use a progress bar to represent the search status.

Can anyone help!!!

Thank you!!!

RahulV 16 Junior Poster in Training

Thanks to all who helped me !!!

Thank you !!!

:)

RahulV 16 Junior Poster in Training

Hi,

Using ADO, Create Database at Runtime..
Check this thread:
http://www.daniweb.com/forums/thread118188.html

Regards
Veena

Thanks that was wonderfull.

But I also need help in deleting the same......

RahulV 16 Junior Poster in Training

Hello,
Im trying to create an application, where its upto the user to create and delete the database dynamically and at runtime. But i don't know how to make it. Can anyone please help??

Whenever i tried to contact u people for help u all have always helped, hope u will continue to help us.

Thank you !!!

RahulV 16 Junior Poster in Training

Ive created a .html page, but now i want that when a user tries to open that .html page he must be automatically directed to .asp page without showing the contents of the .html page.

How can i do that ???

Please help !!!

Thank you !!!

RahulV 16 Junior Poster in Training

Try creating a hidden field in your form with the name "tid" and assign it the value you wish it to hold and then set the action field of the form to only http://localhost/rentry.asp .

I did it a little bit earlier than your post and it worked!!
Any ways Thanks
It works!!!

RahulV 16 Junior Poster in Training

Hai,
ive created a SQL database, but now i want to place and use this on another PC.
Is it possible to write the database files to a CD or DVD and then copy it to another PC? If yes then please explain how.

Thank you

RahulV 16 Junior Poster in Training

---URGENT---

Hai,
I wrote a code :

<html>
<body>
<%response.write "<form action=http://localhost/rentry.asp?tid="& request("tid") &">"%>
				<textarea name="treply" rows="10" cols="100">Enter ur text here</textarea>
				<input type="Reset" name="subFThread" value="Reset">
				<input type="submit" name="subFThread" value="Post">
</form>
</body>
</html>

Here i wanted to send a piece of data (tid, that i extract from the earlier asp window using Request) value along with treply to the next asp file so that it can process that data. But when i click the submit button, it does not send that data to the next window.
Instead it sends this :

http://localhost/computer_workshop/tt/rentry.asp?treply=text+data+being+passed&subFThread=Post

via the address bar, whereas i wanted it to send

http://localhost/rentry.asp?tid=24&treply=text+data+being+passed&subFThread=Post

How to achieve this???
Please help me, Thanks in advance.

RahulV 16 Junior Poster in Training

HAI,
I'm creating a website for a computer forum (using VBScript, SQL server - back end). Im able to display the heading of the threads in a page & also im able to click and redirect to a proper .asp page but, can u tell me how can i show only the threads corresponding thread replies on the next page when the thread heading is clicked.
Ive created a database with user_details, replies and threads tables.
Exactly , i want to transfer the thread ID when i click on the thread heading link to thread replies page from the first page where it will be stored in a variable and then use it in the WHERE clause in the SQL statement to retrieve the corresponding thread replies only along with other details.

:?: :confused:

Pls help

RahulV 16 Junior Poster in Training

Why ??? nobody here ???? NO REPLIES !!!
OR Nobody knows the answers ???

:S :-/ :sad: :confused: :icon_cry: :icon_frown:

RahulV 16 Junior Poster in Training

Hai,

I'm creating a website for a computer forum (using VBScript, SQL server - back end). Im able to display the heading of the threads in a page & also im able to click and redirect to a proper .asp page but, can u tell me how can i show only the threads corresponding thread replies on the next page when the thread heading is clicked.
Ive created a database with user_details, replies and threads tables.
Exactly , i want to transfer the thread ID when i click on the thread heading link to thread replies page from the first page where it will be stored in a variable and then use it in the WHERE clause in the SQL statement to retrieve the corresponding thread replies only along with other details.

All the programming gurus please help..... :S

Thanks in advance !!!!

RahulV 16 Junior Poster in Training

--URGENT--

Ive written a code in VBScript in ASP where back end is SQL. Here I want to display all the records with the data of the selected field of the table "Users" but it displays only the first record repetitively for the total number of records in the table times.

Help with Code Tags
(Toggle Plain Text)

<html>
<body>

<%
dim con, rec, str, id, name, passwd
str="select * from users"

set con=createObject("ADODB.Connection")
con.Open "Provider=SQLOLEDB.1;Data Source=.;Initial Catalog=ComputerWorkshop","sa",""

set rec=CreateObject("ADODB.Recordset")
rec.Open str, con

id=rec("biID")
name=rec("vUserName")
passwd=rec("vPassword")

Response.write "biID : vUserName : vPassword "
Response.write "<hr>"

do until rec.EOF
Response.write id & " : " & name & " : " & passwd
response.write "<br>"
rec.MoveNext
loop

rec.close
con.close
%>

</body>
</html>

<html> <body> <% dim con, rec, str, id, name, passwd str="select * from users" set con=createObject("ADODB.Connection") con.Open "Provider=SQLOLEDB.1;Data Source=.;Initial Catalog=ComputerWorkshop","sa","" set rec=CreateObject("ADODB.Recordset") rec.Open str, con id=rec("biID") name=rec("vUserName") passwd=rec("vPassword") Response.write "biID : vUserName : vPassword " Response.write "<hr>" do until rec.EOF Response.write id & " : " & name & " : " & passwd response.write "<br>" rec.MoveNext loop rec.close con.close %> </body> </html>

Please help me to display all the records with the selected fields data of the table.
Thank you in advance.

RahulV 16 Junior Poster in Training

--URGENT--

Ive written a code in VBScript in ASP where back end is SQL. Here I want to display all the records with the data of the selected field of the table "Users" but it displays only the first record repetitively for the total number of records in the table times.

<html>
<body>

<%
dim con, rec, str, id, name, passwd
str="select * from users"

set con=createObject("ADODB.Connection")
con.Open "Provider=SQLOLEDB.1;Data Source=.;Initial Catalog=ComputerWorkshop","sa",""

set rec=CreateObject("ADODB.Recordset")
rec.Open str, con

id=rec("biID")
name=rec("vUserName")
passwd=rec("vPassword")

Response.write "biID : vUserName : vPassword "
Response.write "<hr>"

do until rec.EOF
Response.write id & " : " & name & " : " & passwd
response.write "<br>"
rec.MoveNext
loop

rec.close
con.close
%>

</body>
</html>

Please help me to display all the records with the selected fields data of the table.
Thank you in advance.

RahulV 16 Junior Poster in Training

--URGENT--
I have created a database in Access 2007 (*.accdb) format but im not able to connect it to VB6.0 project to access the data.
i know how to connect using Access 97 / 2000 (*.mdb) format but how to connect and use DML queries on a Access 2007 file with extention (*.accdb) ???
Please HELP!!!

If possible give some examples

Thank you in advance

RahulV 16 Junior Poster in Training

Then what am i supposed to do ???

RahulV 16 Junior Poster in Training

Typical services offered by portal sites include a directory of Web sites, a facility to search for other sites, news, weather information, e-mail, stock quotes, phone and map information, and sometimes a community forum. Excite is among the first portals to offer users the ability to create a site that is personalized for individual interests.

Hai, if i decide on creating a forum, how will the questions, suggestions, and answers be stored and displayed dynamically ??

RahulV 16 Junior Poster in Training

Hai, if i decide on creating a forum, how will the questions, suggestions, and answers be stored and displayed dynamically ??

RahulV 16 Junior Poster in Training

A well compiled online dictionary on a niche subject of your choice. It might be something regular dictionaries don't offer.

Thanks !!!

RahulV 16 Junior Poster in Training

online shopping
forums
blogs
online ticketing
student maintenece
shopping cart
portal
library system

Hai and thanks !!
I had some what the same sort of ideas, especially the one on forums.
But, you mentioned "portals" what exactly did u mean by that ???

RahulV 16 Junior Poster in Training

Hai,
I've to develop a dynamic web project in my college. I'm interested on doing something different but I've no idea on what topic to select.
Can you suggest me a good topic for the same.
Hoping for lots of good ideas.
Thank you all in advance !!!