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




Convert Html Source Code To Vb Code


I would like to be able to enter html source code into a text box and then when I push a button I want that code to be modified to vb code.
An example would be:
HTML code:
<html>
<body>
Hello World<br>
<a href="http://www.nba.com">NBA</a><br>
</body>
</html>

VB code:
strHTML = "<html>" _
& vbCrLf & "<body>" _
& vbCrLf & "Hello World<br>" _
& vbCrLf & "<a href="& Chr(34) & "http://www.nba.com" & Chr(34) & ">NBA</a><br>" _
& vbCrLf & "</body>" _
& vbCrLf & "</html>"

I think I can use the replace function to replace all " with Chr(34) but my main issue is getting & vbCrLf & " at the beginning of each line. Does anyone know a way to cycle through each line of a text file and append data at the front of the line? How about append to the rear (end of line)?

Thanks for any advice/help in advance.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Convert DLL Into Vb6 Source Code
Hi,


I missed my visual basic 6 source code . but i have DLL file of the source code.

Help me.. how do you convert DLL into source code. is it possible in vb6?


I have vb decomplier lite software. but it wont convert source code format.

Regards

selva

How To Convert Vb Dll To Vb Source Code
any one know how to convert vb dll file into vb source code.
becs i have ond dll file ,but there is no source code for that ..so i need to convert this .dll file into .vbp (source code)
..mannemv

How To Convert Vb Dll To Vb Source Code
any one know how to convert vb dll file into vb source code.
becs i have ond dll file ,but there is no source code for that ..so i need to convert this .dll file into .vbp (source code)
..mannemv

Convert Source Code To PDF!
Hi all,

I now its not exactly a vb6 question but maybe one of you can help me out on this one!

I'm trying to find a tool that given a VB6 project will convert all my source code into pdf files. This makes it easier for me to deliver code!


Any help would be immensly appreciated!

Thansk
Nick

Convert Exe Back To Source Code
hai,
Is it possible to convert exe back to source code.I know there are decompilers that will give back the exact form design.Is it possible to use this forms and do some changes in the form and again deploy as exe.

thanks in advance

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.?

HTML Source Code
Hi Guys, here is a challenge for you's.

How do you get the html code of a web site? and how do you get google's source code?

I having started coding yet, but if any on code tell me how to get this code it would be appreciated!

Many thanks
Mathy

Getting HTML Source Code
VB Code:
Form1.txtHTML = Form1.WebBrowser1.document.body.innerHTML


currently i have a web browser in which i need to get the souce code for the page i am viewing, previously i was using the above code with the ie control, but i have swapped this control for the firefox activex control due to other issues. This now causes an error of

"Automation Error
Library not registered"

i have to get the code from this browser window as using a different control takes me to the home page of the site (need to be logged in to view this page)

Getting Html Source Code
how can i get the souce code of an html document without using the microsoft file transfer control

Getting HTML Source Code
What's the easiest way to get the source code from a website (ex: the source code from www.abc.com/whatever.html). Thanks in advance! Later,

-zer0 flaw

Getting Source Code Out Of A HTML Doc
Anyone know how to do this. I want to open various webpage source code and put that html code in a richtextbox. Thanks for the help!

Getting Html Source Code ?
hi!
im trying to get the html source code of a webpage in a string variable. I tried to use the iNet control which worked *almost* fine with one url, but with another url it says "type mismatch" on this line:
strWebPage = iNet.OpenUrl(<url>)
where <url> = "http://webfin.infinit.com/cgi-bin/naq.cgi?cmd=getCotes&symlist=dlsc&country=usa"
any ideas on this one or alternatives?
thanks

Getting &lt;Title&gt; Out Of HTML Source Code
Hello

Kind of new to VBA and need some tips on how to get what is in between <Title>....</Title> tags in a text file containing HTML source code into column 3. The VBA code searches through many folders and subfolders finding any file that is .html and reading it. I tried parsing but can't seem to get it to work. Any ideas? Here is the code that I have (that doesn't work)

Sub CheckTextFilesForHREFs()
MsgBox "Press OK to begin report"
Dim WholeLine As String
Dim myPath As String
Dim workfile As String
Dim myR As Long

myPath = "C:Exelon"
workfile = Dir(myPath & "*.html")
'sLine = WholeLine

Set fs = Application.FileSearch
With fs
.LookIn = "C:Exelon"
.Filename = ".html"
.SearchSubFolders = True
'.FileType = mosFileTypeAllFiles
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
ParseURL .FoundFiles(i)
ParseTitle .FoundFiles(i)
ParseLink .FoundFiles(i)
Next i

Else
MsgBox "There were no files found."
End If
End With

Sub ParseTitle(strFile As String)
Dim strTxt As String, lngTxt As Long, i As Long, oMatches
Dim ws As Worksheet, j As Long, k As Long, m As Long, oMatches2
Dim reg, oMatches3, reg2
i = FreeFile
'strFile = "c:UsersRichardDocumentsHtmltest.html"
lngTxt = FileLen(strFile)
strTxt = Space(lngTxt)
Open strFile For Binary Access Read As #i
Get #i, , strTxt
Close #i
Debug.Print strTxt
With CreateObject("vbscript.regexp")
.Global = True
.ignorecase = True
.Pattern = vbCrLf & ".*?title.*?(?=" & vbCrLf & ")"
If .test(strTxt) Then
Set oMatches = .Execute(strTxt)
For i = 0 To oMatches.Count - 1
Set reg = CreateObject("vbscript.regexp")
With reg
.Global = True
.ignorecase = True
.Pattern = "<title>""(.*?)"""
k = Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
Cells(k, 1).Value = strFile
If .test(oMatches(i)) Then
Set oMatches2 = .Execute(oMatches(i))
For j = 0 To oMatches2.Count - 1
Cells(k, j + 3) = .Replace(oMatches2(j), "$1")
Next j
End If
End With
Next i
End If
End With
End Sub

Get The Html Source Code In A SSL Page
hello
Im trying to get the html source code of a frame in a website wich is a secure page, i tried using a WebBrowser control, something like : Webbrowser1.Document.frames.listframe.Document.body.innerHTML
but i get an "access denied" error, i think it is because the innerHTML is not available in secure pages,
Any ideas how can i get that? i need the html source code just like the "view source" feature of the browser would do, wish is available for secure webpages.
thanks in advance

How 2 Search Thru Html Source Code???
I am writing a program in VB. This program opens then manipulates an IE browser window.
I need code to do the following:

I need for the program to search the source code of the page the browsers on (I guess it's InnerHTML) and look for an 'input' based on it's 'name'. Then the program needs to be able to store/save its 'value' to a 'variable'. So I can call up this 'variable' at anytime later.

The page the browser will be on is a big involved 'order form' and within the order form are 'input's, 'name's and their 'value's.....
I need to be able to search these inputs based on it's name and when it finds the name I want, I want the program to 'remember' the value of this one input. This will allow me to do stuff later with this 'value'.


Does that make sense? Any info I can provide to help, just let me know....



- Craig

Scrmable HTML Source Code Using VB
Hi,

I know that I can simply use some Javascript to scrambly my Html source code before I load it to my server.

But is there any VB source code that can scramble HTML just so I can see how VB does it...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

Random ID Value In Code/HTML Source
Hello,

What I'm trying to do is use the random generated ID value I find from the innerHTML source in a webbrowser control during runtime and then use that for the main code to use for property value like
strSrch = strFindBetween(Text1.Text, "id=", " ")
theid = strSrch
strStatus = webbrowser1.Document.theid.GetVariable("loggedin") and so on..I can't do this of course but is there a way I can use accomplish this task? Is there some sort of scripting I could use that would allow this?

Thanks

Jake

Retrieving HTML Source Code
ok i'm trying to download the HTML source code to a hdata.txt file. maybe it's something wrong with my coding but it's not download all the HTML coding it's stops half way through. if you compare what is on the source code at www.nemexis.com to what is actually downloaded to the hdata.txt file you'll see that it stops saving. why is it doing that?


VB Code:
Private Sub Command3_Click() Dim aHTML As String     aHTML = Inet1.OpenURL("http://www.nemexis.com")       Text1.Text = aHTML 'Should show all html coding        Open "c:hdata.txt" For Append As #1               Print #1, aHTML        Close #1  End Sub

Load HTML Source Code
I have a webbrowser that displays a website (url written in a text box) when a display button is clicked. Once the whole of this page is downloaded and displayed I want a text box to show the source code of this page (ie. like when you go view->source in i.e and the source code appears in Notepad). How do you do that?

Scrmable HTML Source Code Using VB
Hi,

I know that I can simply use some Javascript to scrambly my Html source code before I load it to my server.

But is there any VB source code that can scramble HTML just so I can see how VB does it...

Thanks

Odd Question Concerning VB And HTML Source Code
This might belong on another forum, but since I'm a newbie, I'll place it here.

We have an internal company website that lists a large number of documents on it. I've already made an executable that will populate an access database with the documents on the site by first saving the source code as a .txt file and then searching the file for the appropriate string sequences. Is it possible to search the source code directly from the site, thus skipping an intervening independent step?

-Katros

Convert VB Code To HTML
I've been writing more tutorials, and would like to be able to just copy some VB code snippets into a TextBox, and generate W3 valid HTML that can be easily pasted into an HTML file.

I've seen pretty much all of the VB2HTML codes out there on www.pscode.com and other sites, but mine is a little different.

I want to use pure CSS for the styling. I will enter the CSS code myself, but the output of the generator needs to be like:

Input:

vb Code:
Option Explicit Dim Something As StringMsgBox "Hello, world!"


Output:

HTML Code:
<div class="vbCode">
<span class="keyword">Option Explicit</span><br /><br />
<span class="keyword">Dim </span>Something <span class="keyword">As </span> String<br />
MsgBox <span class="string">&quot;Hello, world!&quot;</span><br />
</div>


Now, I'm not asking someone to write this for me, but for some reason I'm having a hard time with it. Can someone write some pseudo/logic-code or something that I can base my code off of?

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.

Replacing Links In A Html Source Code
hi ..
i wrote a small program to get the source of any given url ...
i used the inet and a rich textbox to view the code in ..that should not be a problem ..

what iam for:is the a way to get all the images and link inside this page to be viewed/work proba?
i mean sometimes in a web page the html will see like this
img src="folder/img.gif ....so when u get this source ,the image won´t display correctley ,cause the image is not found ..
how can i avoide this ?!or is there´s a way to replace those links !?

thanks a lot for ur help ..

Importing HTML Source Code Into A String
Hello all,

first off, I am trying to capture the HTML source code of a website to store it into a string, with VB6. I have absolutely no idea how to capture the code behind the page(s) i want, but i know how to accomplish everthing else i am making this program for.

I need to know the reference i need to use and some ideas on how to code it.

Thank you all.

Source Code For Advanced HTML Editor
Full Source Code For Advanced HTML Editor v1.2:
Features:
Edit multiple files at a time,
Preview in the built-in browser,
Complete help for all html tags,
Insert tags from the help panel,
Dialog boxes for all html tags,
No need to manually code every tag.

Advanced features of visual basic are used in this project. The source code is fully commented and easy to understand.

The source is free to use in your projects.

To download the source code for the project follow the links below..

Download The Full Source Code

Download Source Code: Mirror

Resolved: Read Source Code From Html
Hi All, pls kindly help me to solve this mystery.

I got 2 html files from same site, yet the format (in source code) is not same.

for example,

sample 1:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
.......
<META content="text/html; charset=utf-8" http-equiv=Content-Type ;>
<META content="MSHTML 5.00.3502.5390"
name=GENERATOR></HEAD>.......
<TD><B>Scheduling Agreement </B></TD>
<TD>: 61100299290007</TD></TR>
<TR>
<TD><B>Date </B></TD>
<TD>: 07-OCT-2003</TD></TR>
<TR>
<TD><B>PO </B></TD>
<TD>: 6110029929</TD></TR>
<TR>
<TD><B>Last Sched. Agreement </B></TD>
<TD>: 61100299290006</TD></TR></TBODY></TABLE><BR><B>Buyer

sample 2:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML><HEAD><TITLE>TMMPLANT</TITLE><meta http-equiv="content-type" content="text/html"; charset="UTF-8">.........
/HEAD><BODY style="font-family: arial;font-size: 12px">........
TR><TR><TD><B>Scheduling Agreement </B></TD><TD> : 61100137750001</TD></TR>
<TR><TD><B>Date </B></TD><TD> : 07-OCT-2003</TD></TR>
<TR><TD><B>PO </B></TD><TD> : 6110013775</TD></TR></TABLE>

Date tooks 2 lines in sample 1 but only took 1 line in sample 2. Pls kindly advise why this happened and how to solve as I need to read the content into database.

Thanks

WebBrowser Control: Get HTML Source Code ?
I have a hidden WebBrowser control that I have navigated to a particular page.
Now I would like to grab the html source of that page in question.

But I can't figure out how to actually access the relevant properties of the control...

Any thoughts ?

Read Source Code Of Html File
How can i get source code of a HTML file using VB.
Thnx
Retesh

Gettin Source Code Of HTML Page
OK some gonna say we post lot of code over that but just try to get the Source code of an absolute URL: http://profiles.yahoo.com/leroi_salim15
U'LL c that impossible to get the source of that page.
If someone get the solution please PLEEEEEEEEEEZE tell me about it.
by the way i've downloaded all codes related in FAQ and Zip...... no way till urs may be.

BEST REGARDS

Store Html Source Code With Webbrowser Without Inet
Hi all,

I'm trying to figure out how to use the webbroswer control to store the html source code of a page without using inet. The problem with using inet is I get a forbidden error when trying to access the page. Have used webbroswer to view entire pages but not sure how to just get it to return the raw html.

thx

HTML Code If View Source Doesn't Show It
I am trying to save the HTML code from the current website in order to save it and parse it later. I chose the webbrowser option and used my own VB browser and it worked with some webpages but not with the one I need. When I run the application I only obtain the source code of the main site. If I click on view source in the Internet Explorer, i see that code not the real one of the current website.
In fact even the address box of the internet explorer remain the same surfing in that site. I can only access to the source code going to the temporary internet files, but I don't know how to read them either.
Any help please?
Thanks in advance.

Is It Possible To See The Source Code Of Html Throught Web-browser Control?
is it? if not how is the easiest way of downloading the .htm file?

Form1 TO Html What Source Code EXPERTISE NEEDED
I Need Help

How do you link a form to a html
i know how to link in it in dhtml
hyperlink.>>>etc



i want to link a html to form or exe to html

Please HELP

Construct A Query Based On Html Source Code
I want to parse the html source of a web form page and automatically construct a query for submission. For example I have the below html code which refers to a web form. My target is automatically parse the html page, extract the useful information (number of fields, fields name – type –values-default value) and construct the default Query A. Then I am going to send this query directly to the web server referenced by the base action url. This kind of submission has the same effect as that of a user clicking the search button without selecting or typing anything on the Web form (assume that assigning the default values to each field-element).

I have used this code but I am facing some problems.
Dim htDoc As MSHTML.HTMLDocument
Dim hcCol As MSHTML.IHTMLElementCollection
Dim hiEle As MSHTML.HTMLInputElement
Set htDoc = WebBrowser1.Document
Set hcCol = htDoc.getElementsByTagName("input")
For Each hiEle In hcCol
' ===[Check 'hiEle.name', 'hiEle.type' enter value from datasource]===
Next
Set hcCol = Nothing
Set htDoc = Nothing

PROBLEMS
1)How could I extract only the form html code from the whole html source code of the web page?
2)How could I find that some elements are selected by default? For example (see the html code), is possible to recognise that the field InputType is predefined selected and has the default value All.
3)How could I extract the action url, which is indispensable for the request method.

So far I didn’t manage to work out these problems. Also if someone knows a better way to implements this (construct the query based on the html source) will be a great help for me.


<form name="searchform" action="/isrch/index.jhtml" method="GET">
<input type="hidden" name="c" value="remotecontrols">
<select name="InputType" style="width: 150px;">
<option value="All" selected>Any
<option value="button">Hard Button
<option value="screen">Touchscreen </select>
<select name="InputManufacturer" style="width: 150px;">
<option value="" selected>Any
<option value="denon">Denon
<option value="general electric">General Electric
<option value="zenith">Zenith </select>
<input type="text" name="InputModel" size="16" value="">
<input type="text" name="InputKeyword" size="16" value="">
</form>

Query A:
http://www.mysimon.com/isrch/index.jhtml? c=remotecontrols&v=1&InputType=All&InputManufacturer=& InputModel=&InputKeyword=

Thanks for reading .

Retrieving HTML Source Code With Internet Transfe
I am trying to get to the source code of a website via the INet control,

Text1.Text = Inet1.OpenURL("http://www.mywebsite.com")

The HTML appears in the Text1 textbox, but stops at 4083 characters (roughly 4K). Any idea why the HTML text is being truncated?

Construct A Query Based On Html Source Code
I want to parse the html source of a web form page and automatically construct a query for submission. For example I have the below html code which refers to a web form. My target is automatically parse the html page, extract the useful information (number of fields, fields name – type –values-default value) and construct the default Query A. Then I am going to send this query directly to the web server referenced by the base action url. This kind of submission has the same effect as that of a user clicking the search button without selecting or typing anything on the Web form (assume that assigning the default values to each field-element).

I have used this code but I am facing some problems.
Dim htDoc As MSHTML.HTMLDocument
Dim hcCol As MSHTML.IHTMLElementCollection
Dim hiEle As MSHTML.HTMLInputElement
Set htDoc = WebBrowser1.Document
Set hcCol = htDoc.getElementsByTagName("input")
For Each hiEle In hcCol
' ===[Check 'hiEle.name', 'hiEle.type' enter value from datasource]===
Next
Set hcCol = Nothing
Set htDoc = Nothing

PROBLEMS
1)How could I extract only the form html code from the whole html source code of the web page?
2)How could I find that some elements are selected by default? For example (see the html code), is possible to recognise that the field InputType is predefined selected and has the default value All.
3)How could I extract the action url, which is indispensable for the request method.

So far I didn’t manage to work out these problems. Also if someone knows a better way to implements this (construct the query based on the html source) will be a great help for me.
  

<form name="searchform" action="/isrch/index.jhtml" method="GET">
<input type="hidden" name="c" value="remotecontrols">
<select name="InputType" style="width: 150px;">
                      <option value="All" selected>Any
                      <option value="button">Hard Button
                      <option value="screen">Touchscreen </select>
<select name="InputManufacturer" style="width: 150px;">
                      <option value="" selected>Any
                      <option value="denon">Denon
                       <option value="general electric">General Electric
                       <option value="zenith">Zenith </select>
<input type="text" name="InputModel" size="16" value="">
<input type="text" name="InputKeyword" size="16" value="">
</form>

Query A:
http://www.mysimon.com/isrch/index.jhtml? c=remotecontrols&v=1&InputType=All&InputManufacturer=& InputModel=&InputKeyword=

Thanks for reading .

Get Html Code Without Webbrowser And Convert It To Htmldocument
Hi,
I'm using webbrowser to enter many webpages (i'm looking for certain information), but the problem is that I don't want to download all images and I don't want to run javascripts. All I want is pure html.
First question:
How can I get pure html code?

When I have html code how I can find a certain anchor. Using webbrowser I used html.document.getoutertext. Searching through the html code using object document was great.
I found on this forum some examples of downloading html code, but it was always converted to string. I can't figure out how to convert it to htmldocument object. Any ideas?

To sum up:
I would be grateful if someone could tell me how to get html code of a page (without downloading all images and executing java scripts) and how to easily find tags, anchors, links,etc. on this document.

Locate Html Within The Webbrowser Control-source Code Preservation
Hi there ! I am using the webbrowser control as a WYSIWYG web page editor. But i also have a code view-textbox which is the source the webbrowser document.

What i want to do is that whenever i add something i.e. a link in using the webbrowser control i want to know at which point of the textbox document html will it be inserted.
And vice versa.

thanks

Passing Html Source Code To Webbrowser Control At Runtime ?
I need help in passing html source code to webbrowser control at runtime. I have complete code in 'text1' textbox. I was using:

WebBrowser2.Document.body.innerHTML = Text1.Text

Problem is that this only changes body of page and data from <head> is not shown, references to external .js and .css are lost.
I need help in passing complete html code to webbrowser from textbox.

Is it possible to dinamicly create content of <head> section of page ?
Is it possible to dinamicly create javacript, to be used in <body> later ?
Any other ideas ?

thanx

Webbrowser Control To Open HTML Source Code Stored In A String Variable
Take the following html page:


HTML Code:
<html>

<head>
<title>New Page 1</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body>
<script language="JavaScript">
function newwindow()
{
var win;

win=window.open("http://www.yahoo.com","","width=100,height=100,resizable=no,scrollbars=no,location=no,directorie s=no,status=no,menubar=no,toolbar=no");

}
</script>


<p><a href="javascript:newwindow()" class>test</a></p>
</body>
</html>
In order to use Webbrower1.Navigate it needs to navigate to a URL or file. Since the URL or HTML file will be different each time in my application I don't want to be forced to generate a file or upload a web page. Instead, my thought was to generate the HTML source code (like above example) and save it to a string variable and then use Webbrowser.Navigate to bring up whatever is in that string variable.

I know there's a way to create a hyperlink in a label but I want the link to open a popup window.

Source Code For Pulse Code Modulation
<html><div style='background-color:'><DIV class=RTE>Hi</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>I am in need of code for Analog to Digital Technique - (Pulse Code Modulation), any 1 help me, i will be very much grateful </DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Bye </DIV>
<DIV class=RTE>Adnan </DIV></div><br clear=all><hr>The new <a href="http://g.msn.com/8HMBEN/2737??PS=">MSN 8:</a> smart spam protection and 2 months FREE* </html>

Convert This Vbscript Code To Vb 2005 Code
Is it possible to convert this code to visual basic 2005 code?

'Script to enable the Manual Proxy Server Configuration in Internet Explorer Options.
'Possible requirement of admin privileges when running this script
'The entry adds the value only to the current user - HKEY_CURRENT_USER.
'In order to add all the users, we have to enumerate throuh all the SIDS.

Dim WSHShell,RegLocation ,RegValue, NewValue
Set WSHShell = WScript.CreateObject("WScript.Shell")

' to modify the below registry location you must either use regedit or some other programmatic
' method to insert a binary array
RegLocation = "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsConnectionsDefaultConnectionSettings"
binRegValue = WSHShell.RegRead(RegLocation)
'To uncheck "Automatically detect settings" and to check "Use a proxy server..." you need
' this first section of the binary array: 3c,00,00,00,fe,00,00,00,03
binString="hex:3c,00,00,00,fe,00,00,00,03"
For i=9 to ubound(binRegValue)
binString=binString & "," & hex(binRegValue(i))
Next
'WScript.Echo binString
RegBinWrite RegLocation, binstring

WScript.Quit

' Write REG_BINARY array
sub RegBinWrite(keyName,value)
ptr=instrRev(keyName,"")
key="[" & left(keyName,ptr) & "]"
val=chr(34) & right(keyName,len(keyName)-ptr) & chr(34)
valString=val & "=" & value

Set fso=CreateObject("Scripting.FileSystemObject")
Set file=fso.CreateTextFile("temp.reg",true)
file.WriteLine("REGEDIT4")
file.WriteLine(key)
file.WriteLine(valString)
file.close

Set Shell=CreateObject("Wscript.Shell")
Shell.Run "regedit /s temp.reg",1,true
Set Shell=nothing

fso.DeleteFile "temp.reg"
Set fso=nothing
end sub


Thanks,

Mike

How To Convert Binary Code To Ascii Code
Does anyone know how to convert binary file to text file

External Source Of Source Code For A Program Preferences.
hi,

is it possible to already-compiled program to access a uncompiled source code, from an external source and perform its source code as a compiled program?

and also, is it possible to assign e.g.,:
Private Const DeleteFile = 1 from an external source, where program doesn't have the above assignment and that assignment is written in set.ini.

thanx.

Convert Foxpro Code To VB Code - Help
Dear members,

I have a code in Visual Foxpro as follows;

PUBLIC FLAGPATROL
FLAGPATROL = 0
PUBLIC COUNTER
COUNTER = 0
PUBLIC NPORTNO
NPORTNO = THISFORM.COMBO1.VALUE
PUBLIC DWMAXCOUNT
DWMAXCOUNT = 5000
PUBLIC READVIDEXDATA
READVIDEXDATA = .F.
PUBLIC WNUM
WNUM = 0
PUBLIC BEGINNUM
SELECT MAIN
BEGINNUM = RECCOUNT()
DIMENSION PDWIBUTTONNUMBER(DWMAXCOUNT)
PDWIBUTTONNUMBER = SPACE(4*DWMAXCOUNT)
DIMENSION PDWTIME(DWMAXCOUNT)
PDWTIME = SPACE(4*DWMAXCOUNT)
DECLARE INTEGER GetAllInfo IN SomeDll.dll INTEGER @, STRING @, STRING @, INTEGER, INTEGER
FLAGPORT = GETALLINFO(@WNUM, @PDWIBUTTONNUMBER, @PDWTIME, DWMAXCOUNT, NPORTNO)
----------

How to convert it in Visual Basic? I tried to create a function in a module like this:


Declare function GetAllInfo Lib "SomeDll.dll" (ByVal Wnum as Integer,ByVal PdwIButtonNumber as String,ByVal PdwTime as String,ByVal MaxData As Integer, nPort as Integer) as Integer

When I call that function from the program :

data = GetAllInfo( num,button,time,200,1)

The VB alert An Illegal Operation, and then closed.

Note: I used that function to retrieve data from device via RS-232, original software used Visual Foxpro and SomeDll.dll

Thanks for help...

Nal

Converting CommonDialog1.ShowColor Color Code To Html Color Code?
Hi all . i am using this code to select a code and output its color code into a textbox. I want to use this color code to code some html data. But i found out that they do not represent each other. in another word the code number in vb and html are not the same. could any one help me do this conversion so i be able to use the generated color code in html.Thanks



VB Code:
Private Sub Command1_Click()[b]CommonDialog1.ShowColor[/b]    'Text1.BackColor = CommonDialog1.Color    Text1.Text = CommonDialog1.Color    Picture1.BackColor = CommonDialog1.Color        Text3.Text = Text1.Text End Sub

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