|
There is no need to import API functions to work with the registry, just use the ones built in to VB.NET.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how?
please Write an example
|
|
|
|
|
What is it with you people.
Go google, have a go yourself first.....then when you get stuck come back with a specific question and show us what you have tried.
Yes, i 1 voted you.
|
|
|
|
|
Hello
How can I get a export in the Registry
And what import it
In Vb.net
Any method
|
|
|
|
|
hi
to check
IfMy.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software", "TRIRMRER", Nothing) IsNothingThen
end if
to set
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\XYZ", "TRIRMRER", Format(Now, "yyyy/MM/dd HH:mm:ss"))
and to create a key
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\XYZ", "TRIRMRER", Format(Now, "yyyy/MM/dd HH:mm:ss"))
|
|
|
|
|
I m desinging webbot which Logins on faceBook site select Friends List and Have to delete contacts
I m having problem while delete List cause DeleteList is not a button in webpage and i dont know how to access and capture its even using webbrowser control plz help
|
|
|
|
|
Maybe you should be looking first at any FB API's to see if they have the suitable messages you can use directly.
|
|
|
|
|
I am currently trying to create a Web Design program, freeware, for use to help with the aid of web design. I want it to be sorta like... "Web-Design-Toy" by ACME, only with more features. I have practically everything that I want to be in the application ready. I just need to know how to get it so when the user types into the textbox, it prints out the website view in the web browser control, as to be a "Live View". I currently have no idea how to do that, other than the textbox saving as a certain ".html" document every single time something is typed in, and then the web browser refreshes that document when it is done saving, and right now I don't think that's possible to code using just Visual Basic 2008 Express Edition. Anybody have any ideas of how to code that with Visual Basic 2008 Express Edition!?! Please and Thank-You!!! If you know of the exact coding I am looking for, please post it, or send it to me somehow. Thank-You!
|
|
|
|
|
How about myWebBrowser.DocumentText=myTextBox.Text ?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hey thanks for the help, but I tried the code and the tool tip said, what I believed to be exactly the right code I was looking for, but, nothing from the textbox was printing out in the webbrowser... I need some help please. I was also thinking about trying to figure out how to get rid of the "ContextMenu" of IE when u right click in the webbrowser control. Any ideas on the code to complete my project?!? All help is appreciated, thanks!!
|
|
|
|
|
Hi,
for myWebBrowser.DocumentText=someString; to work properly, the someString must contain a valid HTML page, e.g. it must begin with a HTML tag, contain a HEAD section and a BODY section, etc.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
This is what is what I'm gonna have the textbox start with every single time the program is run, a basic and simple webpage that can easilly be edited.
<html><br />
<head><br />
<title>YOURTITLEGOESHERE</title><br />
<style type="text/css"><br />
a {color:red};<br />
<br />
a.hover {color:blue};<br />
<br />
a.visit {color:purple};<br />
<br />
body {background-color:white};<br />
<br />
font {color:black};<br />
<br />
</style><br />
</head><br />
<body><br />
THIS IS WHERE YOUR CONTENT GOES!<br />
</body><br />
</html>
|
|
|
|
|
OK, now if all of that is inside someString then the assignment to DocumentText should cause the WB to render it.
Doesn't it work for you? If so, my wildest guess is you have instantiated your form more than once, and are looking at one of them, and changing the other one (a typical beginners mistake).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Okay here is the code that I am using for the main form... The one we're talking about.
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim SecondFrom As New Form2
SecondFrom.Show()
WebBrowser1.DocumentText = TextBox1.Text
End Sub
End Class
|
|
|
|
|
Aha. I can see at least two potential problems here.
1. For WebBrowser1 to be visible on Form2, it must be added somehow to the Forms Control collection. Maybe you used Visual Designer to add the WebBrowser, and all is fine as the Form2 constructor takes care of it; and maybe WebBrowser1 is just a variable somewhere, never added to the Form.
2. the statement WebBrowser1.DocumentText = TextBox1.Text sits inside a Form's Load handler; when does it run? at load time, which is only once, and before the user had an opportunity to enter anything into the TextBox. So all that got copied from TextBox to WebBrowser is the initial content, which is an empty string by default (however you could have added something in there using Visual Designer).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Well, Form2 is the form, in which I was gonna have 8 textboxes allow the user to choose a color, and get the "Hex" code for it, the 6 figure code used in css, so they can easily edit the sytle of their web page; I also need help with printing out the "Hex code" I can't get it. It would be like:
TextBox1.Text = ColorDialog1.Color."CODE TO GET HEX" But, that's for a different time. What I need most is for when the Text is entered into the web page in the textbox on Form1, that the web browser control picks it up and shows it in live view. From what it seems we have all we're looking for, we just need it to move the code to where it will work... Maybe "TextBox1_TextChanged"? Thanks for all your help btw.
|
|
|
|
|
yes, the TextChanged event would work, however it might hamper the GUI as it would fire on every keystroke; when the web page becomes complex, rendering it might take 100 msec or more and slow down the GUI. If it becomes a nuissance, you might introduce a Windows.Forms.Timer with an Interval of say 300 msec; the Timer should get started or restarted in the TextChanged event, and its Tick handler would stop the timer and copy the text from TB to WB.
The Color.ToArgb() method turns a color into a 32-bit integer; and Int32.ToString("X8") turns a 32-bit integer into an 8-digit hex string.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
THANK YOU so much, The Form1 Works as expected now! w00t w00t!! Thank-You for all your help. And I don't think I will use a timer, because it isn't planned for huge projects. Just a starter program. If it does become like you said though, I will then implant a timer in it. Thanks. Also thanks for the help with Form2 too!!
|
|
|
|
|
How would I code the "Int32.ToString("X8")"... This is what I have so far...
If TextBox1.Text = "" Then
Button1.Text = "Choose Color"
TextBox1.Text = ColorDialog1.Color.ToArgb.ToString
TextBox1.BackColor = ColorDialog1.Color
ElseIf TextBox2.Text = "" Then
Button1.Text = "Choose Another"
TextBox2.Text = ColorDialog1.Color.ToArgb.ToString
TextBox2.BackColor = ColorDialog1.Color
ElseIf TextBox3.Text = "" Then
TextBox3.Text = ColorDialog1.Color.ToArgb.ToString
TextBox3.BackColor = ColorDialog1.Color
ElseIf TextBox4.Text = "" Then
TextBox4.Text = ColorDialog1.Color.ToArgb.ToString
TextBox4.BackColor = ColorDialog1.Color
ElseIf TextBox5.Text = "" Then
TextBox5.Text = ColorDialog1.Color.ToArgb.ToString
TextBox5.BackColor = ColorDialog1.Color
ElseIf TextBox6.Text = "" Then
TextBox6.Text = ColorDialog1.Color.ToArgb.ToString
TextBox6.BackColor = ColorDialog1.Color
ElseIf TextBox7.Text = "" Then
TextBox7.Text = ColorDialog1.Color.ToArgb.ToString
TextBox7.BackColor = ColorDialog1.Color
ElseIf TextBox8.Text = "" Then
TextBox8.Text = ColorDialog1.Color.ToArgb.ToString
TextBox8.BackColor = ColorDialog1.Color
ElseIf TextBox9.Text = "" Then
TextBox9.Text = ColorDialog1.Color.ToArgb.ToString
TextBox9.BackColor = ColorDialog1.Color
ElseIf TextBox10.Text = "" Then
TextBox10.Text = ColorDialog1.Color.ToArgb.ToString
TextBox10.BackColor = ColorDialog1.Color
Else
TextBox1.Text = ""
TextBox1.BackColor = Color.White
TextBox2.Text = ""
TextBox2.BackColor = Color.White
TextBox3.Text = ""
TextBox3.BackColor = Color.White
TextBox4.Text = ""
TextBox4.BackColor = Color.White
TextBox5.Text = ""
TextBox5.BackColor = Color.White
TextBox6.Text = ""
TextBox6.BackColor = Color.White
TextBox7.Text = ""
TextBox7.BackColor = Color.White
TextBox8.Text = ""
TextBox8.BackColor = Color.White
TextBox9.Text = ""
TextBox9.BackColor = Color.White
TextBox10.Text = ""
TextBox10.BackColor = Color.White
TextBox1.Text = ColorDialog1.Color.ToArgb.ToString
TextBox1.BackColor = ColorDialog1.Color
End If
10 textboxes for use with 10 colors... And if they choose another, it would reset the textboxes to default state, then post the new color in the first textbox. Please help me finish, Thank-You!!
|
|
|
|
|
Can I removе repeating series space in string and to stay only one space
|
|
|
|
|
Hi,
one way to do it is by having a loop that:
1. takes the length of the string
2. replaces two spaces by one
3. takes the length of the new string
4. loops to (1) if the length has changed
If large sequences of spaces occur, you can also replace a larger number of them in one shot (insert this between steps 1 and 2).
Alternatively, you could use Regex to replace multiple spaces by one space.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Yes this work. thank You very much
|
|
|
|
|
The easiest way to do this is to call string.Replace(" ", " ") until you can't find a double space in the string, which you could check in a while loop
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If someone has experienced please help with the following:
I need to save path to image using nini (http://nini.sourceforge.net)
So everything works except the path from OpenFileDialog
The code is:
Imports System.Diagnostics
Imports Nini.Config
Imports System.IO
Public Class CompanySetup
' Inherits System.Windows.Forms.Form
Public Shared fileBanner As String
Private sourc As IniConfigSource
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
With bannerFile
.CheckFileExists = True
.ShowReadOnly = False
.Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
.FilterIndex = 2
If .ShowDialog = DialogResult.OK Then
bannerBox.Image = Image.FromFile(.FileName)
fileBanner = bannerFile.FileName.ToString
End If
End With
End Sub
sourc.Configs("General").Set("Imgpic", strimg)
sourc.Configs("General").Set("CoName", txtCoName.Text)
sourc.Configs("General").Set("Imgpic", fileBanner)
sourc.Configs("General").Set("Addr", txtAddr.Text)
sourc.Configs("General").Set("Phone", txtPhone.Text)
sourc.Configs("General").Set("Fax", txtFax.Text)
sourc.Configs("General").Set("Email", txtEmail.Text)
sourc.Configs("General").Set("Vat", txtVat.Text)
sourc.Configs("General").Set("Btm1", txtBtm1.Text)
sourc.Configs("General").Set("Btm2", txtBtm2.Text)
sourc.Configs("General").Set("Btm3", txtBtm3.Text)
sourc.Configs("General").Set("Btm4", txtBtm4.Text)
sourc.Save()
Private Sub CompanySetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Load the configuration source file
sourc = New IniConfigSource("dvinv.ini")
'sourc.CaseSensitive = False
' Set the config to the Logging section of the INI file.
Dim config As IConfig
config = sourc.Configs("General")
' Load up some normal configuration values
txtCoName.Text = config.Get("CoName")
fileBanner = config.Get("Imgpic")
' MsgBox(config.Get("Imgpic"))
Try
bannerBox.Image = Image.FromFile(fileBanner)
Catch ex As Exception
End Try
txtAddr.Text = config.Get("Addr")
txtPhone.Text = config.Get("Phone")
txtFax.Text = config.Get("Fax")
txtEmail.Text = config.Get("Email")
txtVat.Text = config.Get("Vat")
txtBtm1.Text = config.Get("Btm1")
txtBtm2.Text = config.Get("Btm2")
txtBtm3.Text = config.Get("Btm3")
txtBtm4.Text = config.Get("Btm4")
End Sub
No key value Imgpic changes in .ini file!
Please help.
|
|
|
|
|
I got a test register source code from other friend
but I want to change register check fuction disable
How to change return value ?
I have changed some ... plz help to finish .
garnett
modified on Monday, November 16, 2009 9:49 AM
|
|
|
|