|
Hey someone answered. lol I posted this in a couple of different forums and this is the only one that's answered me. Yes all I'm trying to do is save a url link from my browser. That's it! I've tried just saving a text file with the url extension but again I must be doing something wrong cause I can't seem to get it to write on the file. Can you help me out with this too?
|
|
|
|
|
Well, in the code that you posted, you didn't open any file and write anything to it. The RichTextBox won't do anything for you and you're using it's methods incorrectly.
You're looking for something most like this:
If SaveFileDialog.ShowDialog = DialogResult.OK Then
Dim fs As Stream = SaveFileDialog.OpenFile()
If Not (fs Is Nothing) Then
fs.WriteLine("[InternetShortcut]")
fs.WriteLine(String.Format("URL={0}", URLAddress))
fs.Close()
End If
End If
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
When I put the code in there it tells me that "WriteLine" is not part of System.IO.Stream???
|
|
|
|
|
Too damn sleepy last night. A little simpler:
If SaveFileDialog.ShowDialog = DialogResult.OK Then
Dim sw As New StreamWriter(SaveFileDialog.FileName)
sw.WriteLine("[InternetShortcut]")
sw.WriteLine(String.Format("URL={0}", URLAddress))
sw.Close()
End If
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Thank you very much, it works just fine now. Now that I can add to favorites, the next step is to open them in my WebBrowser.
Thanks for your help
|
|
|
|
|
Start it in a browser on your form or just launch the thing like someone double-clicked the shortcut on the desktop?
If it's to launch the shortcut like double-clicking it, then all you have to use is use the Process class.
Dim newProcess As New Process("filename.url")
newProcess.Start()
If it's a browser on your form, then all you have to do is call the browser's .Navigate() method, passing in the full path to the *.URL file.
WebBrowser1.Navigate("filename.url")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HI Dave,
Yeah I want to open the url link in my browser on my form. The Code you wrote is what I was thinking of putting. Glad to see I'm thinking in the right direction.
One thing though that I noticed as I was testing the first code you helped me on was that the names of some pages have these "<, >, *, |, :, \, /, &, %, ", ., #, ?" type characters and therefore the expected error comes up that the page name is not valid for saving. Now if you remember I'm taking the Variable URLName = WebBrowser.LocationURL string and using that as the SaveFileDialog.FileName. Could you dirrect me in the right track in order to check if the URLName variable has any of those characters and change them to a usable character like maybe the "-" or "_" characters before it is used in the SAveFileDialog box as the FileName?
-- modified at 23:39 Friday 10th February, 2006
|
|
|
|
|
|
Perhaps if you write the question in the text instead of in the subject, you will have room enough to describe the problem so that anyone can help you.
---
b { font-weight: normal; }
|
|
|
|
|
I'm trying to create a wizard with a tabstrip control. but I want to use command buttons to move next previous etc...
<br />
Private Sub isBtnPrevious_Click()<br />
TabsWizard.Value = TabsWizard.Value - 1<br />
End Sub <br />
doesn't move the tabs rather it errors out "Method or data member not found" with the ".value" highlighted
any help would be greatly appreciated
|
|
|
|
|
You can use this
Private Sub isBtnPrevious_Click()<br />
On Error Resume Next<br />
TabsWizard.Tabs(TabsWizard.SelectedItem.Index - 1).Selected = True<br />
End Sub
chatura
|
|
|
|
|
Okay! Create two buttons on the form for (next and previouss) and place your tab control on to form also (I assume that it is Tabcontrol1 with n tab pages). You should have a global variable which will track the index number with increments or decreaments... Here is the part of an example...
Public TABINDEX as Int32 = 0
'Next button
Private sub Button1_Click(Sender, e) handles button1_click
TabIndex +=1
if Tabindex > Tabcontrol1.tabpages.count Then
TabIndex = TabControl1.tabPages.count
end if
TabControl1.SelectedIndex = TabIndex
End Sub
Do the opposite thing for the deacrement and use
Private Sub Button2_Click(Sender, e) handles Button2_Click
'Previous button
TabIndex -=1
if TabIndex < 0 Then
tabindex = 0
end if
TabControl1.SelectedIndes = TabIndex
end sub
|
|
|
|
|
Hi guys,
I want to built a program to recieve e-mails.
From Outlook Express I "connect" to mail.uth.gr (pop3) with password and username, so I download my e-mails.
So, suggest me some links in Web that I can take knowledge to make this project.
There is a .com Referecne Outlook Library 10.0, It's necessary for this prog?
Thanx in advance..
-- modified at 20:13 Wednesday 8th February, 2006
|
|
|
|
|
Working on a project and i want to use flash to spice up the user interface. However I dont' know how to set a Flash button to work with the VB form. If anyone can help me out or point me to a good ref on how to bind flash to VB events please let me know,
|
|
|
|
|
This is an example.
Flash MX
Create a button.
Select “Window” menu. Select “Development Panel --> Actions”
In the code editor, type this
on (release) {
fscommand ("Button1");
}
Save the movie. (“Untitled-1.fla”)
Select “Control” menu and Select “Test Movie”
Flash will create (“Untitled-1.swf”)
Exit from Flash.
VB.Net
Right click on the tool box. Select “Add/Remove Items…”. Select “COM Components”
Select “Shockwave Flash Object”. Click OK
Draw it on the form
Name it “SF1”
Right click on “SF1” and select “Properties”
Type the path to “Untitled-1.swf” in the “Movie URL” textbox.
Click OK
Double Click on SF1 ( go to Code Editor )
Select “FS Command” from Procedure List Box
Type this
Private Sub SF1_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects.DShockwaveFlashEvents_FSCommandEvent) Handles SF1.FSCommand
If e.command = "Button1" Then
MsgBox("it works")
End If
End Sub
Run the program
Click on Button1
chatura
|
|
|
|
|
what can i SAY
thist has got to be one of the coolest code I've learned for the last 10 months
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
Thank you!
chatura
|
|
|
|
|
Hi all,
I've made an application in VB6 that uses a datagrid and adodc to show data from an MSAccess database. In the computer where I've developed the application there's no problem but when I install the application in another computer where VB6 is not installed the datagrid fails when tries to show the data.
I've included in the installation program (made with Inno Setup) MSADODC.OCX and MSDATGRD.OCX that I thought were enough to use the datagrid and the adodc components properly. I've always ensured that these components have been registered.
Is there any other component to install that I'm missing?
I've used the dependency walker to check all the libraries needed but all seems ok ...
thansk in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
-- modified at 18:26 Wednesday 8th February, 2006
|
|
|
|
|
Hello,
Well, I have a PictureBox and this control contained an image.
For example the PictureBox has 200 x 300.
Well the image size is 800 x 600.
Is possible that move the image in the picturebox,
for example the coord(0,0) of the picture box show the coord(100,100) of the image.
I want to drag and drop and move the image on the picturebox, so the picturebox is like a window only I can see an area 200 x 300 of the image.
Thank you, sorry meaby a I can't explained for my bad english.
See you
gangeles
|
|
|
|
|
If I understand..
Try to save a new image file from the first picture 800x600, with size 200x300 with the field of first picture that you want. It's very easy with bitmap..select all..move..remake picture size..and save it! Now try again to import the new image in PictureBox 200x300!
-- modified at 19:01 Wednesday 8th February, 2006
|
|
|
|
|
This is actually pretty easy. Load the image into the PictueBox at full size (800x600), then put the PictureBox in a Panel control. Make sure the Panels AutoScroll property is set to true.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
aBsolutely! that is exactly what i have in mind
simple yet effective move from the machine
Marvin N. Guerrero
- Taje Kage_bunshinNunJutsU
|
|
|
|
|
Well Folks,
Finally I founded that I need.
The ImagXpress Pegasus control 7.0 have all the things I need.
http://pegasusimaging.com/imagxpress.htm
This demo have an example:
C:\Program Files\Pegasus Imaging\ImagXpress\V7.0\Samples\ActiveX-COM\VB6\ViewingTools
CU and Thanx
gangeles
|
|
|
|
|
Hi,
I have several dropdownlist controls in a data repeater. How do I setup each dropdownlist's selectedindex when I bind the repeater?
Thanks!
|
|
|
|
|
Okay, I solved the problem.
Could be like this:
dim op as dropdownlist = ctype(repeater.item(i).findcontrol( _
"dropdownlistid"), dropdownlist)
op.selectedindex = 1
|
|
|
|