|
i already figure out what im looking for. its by clipboard methods
thanks anyhow
|
|
|
|
|
Hi,
here is Sumit Agarwal
I have a problem when working in My VB6.0 project and opening a wword object and when setting that word objects find option then my Visaul Basic Project get's closed. Any one can help me.
Thanks in advance
|
|
|
|
|
A bit difficult without seeing your code to know what the problem is but i do know that a fresh install of Word will have problems used from VB if you are doing it in a terminal server session. There is a patch from MS to fix this.
Jon
|
|
|
|
|
i created an activex dll project "Project2" with class Class1. Created a function GetValues as below using visual basic 6.
Function GetValues(nValues() As Long) As Boolean
ReDim nValues(2)
nValues(0) = 1
nValues(1) = 2
nValues(2) = 3
GetVals = True
End Function
This function works great with the vb code
Private Sub Form_Load()
Dim nVals As New Project2.Class1
Dim bFun
Dim nlong() As Long
bFun = nVals.GetValues(nlong)
MsgBox nlong(0) & " " & nlong(1) & " " & nlong(2)
End Sub
Now i am trying to call the same function from an asp page with code as below.
<%
dim bFun
dim nVals
dim nLong()
set nVals=server.createobject("Project2.Class1")
nVals.getValues(nLong)
response.write nLong(0) & " "
response.write nLong(1) & " "
response.write nLong(2) & " "
%>
the browser barks with a type mismatch error "Microsoft VBScript runtime (0x800A000D)Type mismatch: 'getValues' /testdata.asp, line 10"
i am . can some one help me? thanks in advance.
srikanth
|
|
|
|
|
Greetings!
I want to implement a filmstip in my application. I'm thinking of using a TableLayoutPanel as a container with a PictureBox in each cell. Is this how one with more experience do it?
I've looked at TableLayoutPanel in the on-line help and searched for articles here - not much found.
What general steps or required objects are required to dynamically add rows to a tablelayoutpanel at run time?
This needs to be scrollable, show should I make the tablelayoutpanel scrollable or place the table in a scrollable panel?
Thanks,
Karen
Nooobie to OOP and VB.Net 2005
|
|
|
|
|
Plz tell me how to make owner drawn menu,listbox & combobox with vb6? plz tell details!
|
|
|
|
|
HOW TO PROVIDE DOUBLE CLICK OPTION FROM GRID CONTROL?
ANOTHER QUESTION IS
AFTER SAVING A RECORD, HOW TO REFRESH THE GRID AUTOMATICALLY?
|
|
|
|
|
for what u want to use dclick??
and answer to ur secon qustion is
after sving the record first call datasetname.clear() and then again call dataadapter.fill(datasetname,"tablename")
this will do your work
never stop from trying
|
|
|
|
|
first of all thanks for your reply.
i need to provide double click editing option from data grid control. it is for editing.
please suggest me.
|
|
|
|
|
In the code editor, locate the datagrid on the pulldown menu at the top left. Then locate DoubleClick on the pulldown menu to the right. This will create the exception block where you can place the edit code. If you simply double click on the datagrid, the exception block created is Navigate rather than DoubleClick.
|
|
|
|
|
I have an array of labels on a form. I want to track which one was clicked on (right click). Anyone know an easy way to do this?
|
|
|
|
|
Since you're referencing an array of labels I assume you're not using .NET. In that case, the MouseDown event for the control array would probably be eaisest:
Private Sub Label1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)<br />
If Button = vbRightButton Then<br />
MsgBox "Label = " & Label1(Index).Caption & " Index = " & Index<br />
End If<br />
End Sub
|
|
|
|
|
Thanks, but I am using .NET. It appears the compatability wizzard converted these, from the "VisualBasic.Compatability" class, guess I need to look at changing those as well.
Any quick suggestions as to how to go about doing this progaramatically? I need to load a bunch of labels on screen (representing slots) and allow the operator to select individual ones. The number and orientation depend on the system configuration at the time and can not be hard coded.
|
|
|
|
|
First off, the conversion wizard is the devil, just rewrite
The concept is very similar:
<br />
Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown, Label2.MouseDown<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MsgBox("Label = " & sender.Name)<br />
End If<br />
End Sub<br />
This assumes you have a static "maximum" number of labels that you can keep hidden unless needed and have all of them listed on the event handles.
If you need a variable number of labels that you can't predefine then you will need to create a new label control, and assign it to the event handler. I will leave that example to someone a bit more familiar with .NET than myself.
|
|
|
|
|
First off, the conversion wizard is the devil, just rewrite
Agreed, once you have the fundamentals down, I'd suggest a complete rewrite as well.
|
|
|
|
|
in vb.net when we create a new form the code lookes like
Public Class frmlogin
Inherits Inherits System.Windows.Forms.Form
but in vb.net 2005 it doesn't work can anyone tell how to do this .i have a clss that turn form to round shape and i want to inherits that form instend of windows.forms.form
never stop from trying
|
|
|
|
|
This is definitely Monday.
I have an Excel worksheet that I am trying to get the contents of a DataGrid into.
worksheet.Cells(2, 1) = StatusGrid.Column(1).Item(1)
It would be nice if it were that simple. I was thiking of casting the datagrid into a table, but for reasons that are too cosmic to go into here, that is not possible at this time.
So... the question is.. Using VB.Net (ASP), how in the world does one reference a Cell in a datagrid?
|
|
|
|
|
Close...
StatusGrid.Items(1).Cells(1).Text()
|
|
|
|
|
So far so good. That works on bound columns beautifully.
Some of the other columns are rendered as Template columns. How would you perform the same operation on a column as defined here:
<asp:templatecolumn headertext="Date Added">
<itemtemplate>
<asp:label id="lblDateAdded" runat="server" text="<%# DataBinder.EvalContainer, "DataItem.DateAdded") %>">
<edititemtemplate>
<asp:textbox id="txtDateAdded" runat="server" text="<%# DataBinder.Eval(Container, "DataItem.DateAdded") %>" width="100%">
Thanks again in advance for all of your help.
-Ray
|
|
|
|
|
Depends on whats in em..
If you have textbox's etc in them, you'll want to look at the controls collection of the cell, or use the FindControl method to just grab it.
|
|
|
|
|
That seems to be the problem:
//-- This works well: (just a bound column)
For i = 0 To StatusGrid.Items.Count - 1
worksheet.Cells(i + 2, 1) = StatusGrid.Items(i).Cells(1).Text()
Next
//-- but when I use: (Tries to get a Template Column)
For i = 0 To StatusGrid.Items.Count - 1
worksheet.Cells(i + 2, 2) = StatusGrid.Items(i).FindControl("lblDateAdded").ToString()
Next
...the appropriate cell text reads:
"System.Web.UI.WebControls.Label"
It doesn't seem to be finding the lblDateAdded control using the above method. Do I need to be casting it?
-- modified at 18:55 Monday 3rd October, 2005
|
|
|
|
|
I wonder if someone could help me.
Example....
I have 2 forms in a project. If I select say a button to hide Form1 and show Form2. There is a button on Form2 when selected will Close Form2 but show Form1.
What I have done is as follows....
Private Sub Form1Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.ActiveForm.Hide()
Dim myNewForm As New Form2
'Display the calculation form
myNewForm.ShowDialog()
Form1.ActiveForm.Show()
End Sub
Private Sub Form2Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.ActiveForm.Close()
End Sub
Form1 does not show and I get the following message....
An unhandled exception of type 'System.NullReferenceException' occurred in Testing.exe
Additional information: Object reference not set to an instance of an object.
Any ideas where I am going wrong.
Thanks in advance
|
|
|
|
|
Worked it out I think
Private Sub Form1Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim about As New Form2
Me.Hide()
about.ShowDialog()
Me.Show()
End Sub
|
|
|
|
|
I have a combobox(vb .net windows form application) in which I am trying to offer the user 5 selections, then based on those selections, if one is chosen I would like to offer two more selections, and so. This is similar to say having to chose a country then a state, then a city, etc. My problem is I have bound a dataview to the combobox to offer the initial 5 selections, but I cannot figure out how to proceed to offer the remaining 'nested' selections.
Not sure at all how to 'popup' the other selections after the 1st choice is made in the combobox.
Any suggestions are appreciated
-- modified at 11:06 Monday 3rd October, 2005
|
|
|
|
|
You can use the SelectedIndexChange event of combobox such that when a combobox changes its selection you update the other (nested) combobox... and so on.
e.g, if user selects a country.......update the states combo with particular state values.......and so on for the cities.......
Is there anything difficult....
_mubashir
|
|
|
|