|
you've probably sorted it now but a really simple way would be
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
Dim oCell As DataGridCell
oCell = DataGrid1.CurrentCell
Dim lRowNum As Long
lRowNum = oCell.RowNumber
With DataGrid1
.Select(lRowNum)
End With
End Sub
"If i was king cigarettes would be free."
|
|
|
|
|
ok im relativly new
but im making a program using the inputbox's
and the inputnox colors and font is differnt than the rest of the program
if you know what to do please help
Beaker Rules!
|
|
|
|
|
You could make your own input box.
Make 2 forms in a blank project
Drag a CommandButton onto Form1
and a TextBox onto form2
'FORM1 CODE
Public Function InputBox2() As String
Form2.Show vbModal
InputBox2 = Form2.Variable
End Function
Private Sub Command1_Click()
Command1.Caption = InputBox2()
End Sub
'FORM1 CODE
'FORM2 CODE
Public Variable As String
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Variable = Text1.Text
Unload Me
End If
End Sub
'FORM2 CODE
Pretty simple, from there u can add whatever u want
|
|
|
|
|
|
not sure if anyone still uses this, but I installed .NetFramework 1.0 sp1
(released, aug31,2004) and after that I was getting some javascript errors.
I have a user control inside a webform. basically have login.ascx inside login.aspx. the login.ascx contains the <form> tag.
<form id="Form1" runat="server">
before the sp1 the form would render like this...
<form name="_ctl7:Form1" method="post"
action="Login.aspx"
id="_ctl7_Form1">
after sp1 it was this...
<form name="__aspnetForm" method="post"
action="login.aspx"
id="__aspnetForm">
It is killing some of my javascript where I look for
"_ctl:Form1"!
any help would be greatly appreciated.
Ganesan Muthiah
email:ganerathu@hotmail.com
|
|
|
|
|
Your question would be better handled in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
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
|
|
|
|