|
I am trying to get a url with MSXML2.ServerXMLHTTP but turkish chacters in the url making problem that they seem as '?' how could I solve this problem.
Here is the my code....
<%<br />
Response.Buffer = true<br />
<br />
Dim objXMLHTTP, xml, text<br />
<br />
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")<br />
<br />
xml.Open "GET", "http://www.bektekeri.com/include/articles/article14.php", false<br />
xml.setRequestHeader "Content-Type", "xml/text"<br />
xml.setRequestHeader "characterset","windows-1254"<br />
xml.setOption(0) = 1524<br />
xml.Send<br />
<br />
text = xml.responsetext<br />
response.Write text<br />
<br />
Set xml = Nothing<br />
<br />
%>
karanba
|
|
|
|
|
Your question would probably be better handled in the XML Forum[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok im new to vbscript so i need a bit of help with linking to sub/function thats on a VB6 form from VBScript
i.e.
Sub Hey(Name)
If len(name) < 15 then
addq(name)
end if
End Sub
Thats basic,
Addq being the sub i want to link to in VB6
And Hey being called like thus
Private Sub Command1_Click()
sc.AddCode Text1.Text
Username = "QWRQWRQWRQWR"
sc.Run "Hey", Username
End Sub
Text1.Text containing that VBScript above.
Thanks for the help
|
|
|
|
|
I don't believe you can using the method that you are for running the script. The script engine has no method of retrieving the reference to the running Form object in VB6 and passing that reference to the script.
I could be wrong though...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
I don't believe you can using the method that you are for running the script. The script engine has no method of retrieving the reference to the running Form object in VB6 and passing that reference to the script.
I could be wrong though...
I believe you are wrong becasue i've seen it working using a method some what like that...
So there must be a way to do it
|
|
|
|
|
how can i populate values in a datagrid row by selecting the value in the combo box which is in the same datagrid.
for example if we have products table i should be able to select the first column which is the list of product names, by selecting the productnames i should be able to view it's price.
i am using vb.net
please help me
thank u
srikanth
|
|
|
|
|
hi,
I want to handle the event which is raised when data is copied to the clipboard. How can i solve it?
Thank you.
|
|
|
|
|
There is no such "event" generated. At least not is the sense your thinking about. In order to get notifications about changes in the clipboard, you'll have to register your windows with the clipboard viewer chain and then override WndProc in your form in order to receive the WM_DRAWCLIPBOARD message. This message is sent to all the registered clipboard viewer windows to notify them of a change on the clipboard.
Docs on the SetClipboardViewer[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello all
i want to add items in a listview under a particular column. i have multiple columns and on the click of a button i want to add item under a particular column. is it possible?
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
From your description, the ListView isn't really the control for this. On the click of any of your "edit" buttons, you'll have to add a new item to the ListView, then add all the subitems to that, making up the entire line of data. Positioning the cursor will be the hard part. I think you'll end up simulating a mouse click on the correct part of the grid.
A better alternative to this would be to use the DataGrid control instead. Then, you don't have to use any buttons to add a record and position the cursor for input in the appropriate field.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes,
Private Sub Form_Load()
'// set the colums/view
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, , "Column1"
ListView1.ColumnHeaders.Add 2, , "Column2"
'// add main item + sub item
With ListView1.ListItems.Add(1, "test", "test1")
.ListSubItems.Add 1, "test", "test2"
End With
'// this is to update using index
With ListView1.ListItems.Item(1)
.ListSubItems.Item(1).Text = "updated test3!"
End With
'// this is to update by searching for the key
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems.Item(i).Key = "test" Then
ListView1.ListItems.Item(i).ListSubItems.Item(i).Text = "updated again!"
ListView1.ListItems.Item(i).Text = "updated main item"
End If
Next i
'// this is a way to update by searching for the text.
Dim itemnumber As Integer
itemnumber = ListView1.FindItem("updated main item").Index
ListView1.ListItems.Item(itemnumber).ListSubItems.Item(itemnumber).Text = "updated again...."
End Sub
Try that,
there are other ways but that should do u
|
|
|
|
|
Hello All,
I'm facing some problem in calling the dll file that generated by visual c++.
Who know how to call this file that generate in visual c++ by using visual basic?
The example in visual c++ is like below:-
extern "C" {
_declspec(dllimport) BOOL OutL (float p1, float p2, float A, float B, float *D, float *F);
};
Thanks........
|
|
|
|
|
hi,
I get a serious problem. When I select all data in a DataGrid binding with a DataTable, then press Ctrl-C, an exception is thrown.
Below is exactly what I got.
************** Exception Text **************
System.IndexOutOfRangeException: No value at index 3.<br />
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)<br />
at System.Windows.Forms.DataGridColumnStyle.GetColumnValueAtRow(CurrencyManager source, Int32 rowNum)<br />
at System.Windows.Forms.DataGrid.ProcessDialogKey(Keys keyData)<br />
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)<br />
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)<br />
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)<br />
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
How could I catch that exception and solve my problem?
Thank you very much.
|
|
|
|
|
I load and show a form from the opening form of the application. We will call the startup form form a and the form that is called, form b. So a calls show form b. When form b wants to close, but not end the program, what needs to be called? Is it unload, is it deactivate? How do I get the form to close in such a way that the form a can access whatever has changed within form b?
Thanks again,
The VB NOOB
-----------------
http://www.zachcalvert.com
|
|
|
|
|
You need to remember a reference to formA in formB and in Form_Unload you can call some methods by using this reference. Good method for implementing this is some kind of control, which is placed on all forms of your app.
|
|
|
|
|
hi,
I set up a dummy project, two buttons on form A and a button and a text box on form B,
load form A press button 1, form B is shown, fill some text in the text box
press the button on form B, form B is hidden.
Then Press other button on form A to show msgbox of text in box on form B.
Lovely Jubbly
Form A code:
Private Sub Command1_Click()
Load Form2
Form2.Show
End Sub
Private Sub Command2_Click()
MsgBox Form2.txtMsg.Text
End Sub
Form B Code:
Private Sub Command1_Click()
Form2.Hide
End Sub
"If i was king cigarettes would be free."
|
|
|
|
|
What about having two forms A (in MDI App) with different data? Which one will be called?
|
|
|
|
|
First off, I have found some articles on the MSDN website that have pointed me in the right direction but don't have all the answers. Also, I am using Visual Basic 6.0.
I need to be able to access a file and do a couple of things with it:
1) I need to find out if it exists and if not, then create it. I found
System.IO.File.Exists("c:\ExistingFileName")
but I get an error. I believe this error is due to the fact that I have not told the compiler I am using the system namespace. How do you signal the compiler you are using the System namespace in Basic?
In C it would be using System.IO.File, but I have no clue in Basic.
2) What is the command to create a sequential file in Basic and what variable will I have access to?
3) How do I add to it/ close it when I am done?
Thank you,
Zach Calvert
-----------------
http://www.zachcalvert.com
|
|
|
|
|
here a sample
http://www.andreavb.com/forum/news/viewtopic.php?TopicID=1485
|
|
|
|
|
it doesn't use the system namespace. I am using this for a school project and I must use the system namespace. Also, it only reports error codes. I need to be able to check to see if it exists, not catch errors.
-----------------
http://www.zachcalvert.com
|
|
|
|
|
The System.IO namespace contains the File class. This class contains the shared .Exists method you use to check to see if the filename exists, prefferable using the FULL PATH to the file. .Exists isn't documented to throw any exceptions. It just returns True or False .
In a normal installation of Visual Studio .NET or Visual Basic.NET, the System namespace is automatically imported into your project. You don't have to use the Imports System statement at the top of your code because it's already done behind the scenes. You DO, on the other hand, have to put in the Imports System.IO yourself, again, at the top of your code.
Imports System.IO
Public Class Form1
.
.
.
Private Sub WhatEver()
' You don't nedd to specify the System.IO namespace prefix because you
' already Imported it at the top of your code.
If File.Exists("C:\myTestFile.txt") Then
.
.
.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm using VB 6.0, and it doesn't let me do Imports System.IO
What do I do now?
-----------------
http://www.zachcalvert.com
|
|
|
|
|
OK. Then throw out EVERYTHING about namespaces and System , System.IO , File.Exists ... EVERYTHING. VB.NET is a VERY different language from VB6 and none of this stuff applies to VB6.
Now, you'll have to use the FileSystemObject to see if the specified file exists. This will return either True or False , it doesn't throw any errors.
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists("C:\myTestFile.txt") Then
.
. ' The file exists...
.
Else
.
. ' The file doesn't exist...
.
End If
To open a text file for sequential write, you'll use the Open statement (docs here[^]):
Open "C:\myTestFile.txt" For Output As #1
Print #1, "This is line 1"
Print #1, "This is line 2..."
Print #1, "This is line 3..."
Close #1
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi VB Gurus,
I have a Command line application in Visual Basic(it is a simple VB program without any form having a 'Sub Main'). Can anybody tell me how to return an integer from this application to the calling program.
Thanks in advance,
Jobby
|
|
|
|
|
VB6 and below doesn't support returning an exit code to the calling process (a.k.a. setting the ERRORLEVEL). But, it can be done using the ExitProcess API. You can find the simple code and example here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|