|
Thank you so much for your help - i tried the AddItem method (which does make sense) but it returned the error "Method or data item not found"....is there anything else i could try??!!
|
|
|
|
|
I'm not sure but I think the error message says that it couldn't find RS.Fields("Description"). When you write your select statement you use Product.Description, maybe that have something to do with it.
Try this, not so nice, but it works
RS.Fields(0) 'Description
If you had recieved more info you should write
RS.Fields(1) 'Name
RS.Fields(2) 'Street
//Keder
|
|
|
|
|
Hello
Can someone explaine,simple, how I should work with IShellPropSheetExt, IShellExtInit. I have a reference to a .tlb file that contents IShellPropSheetExt and IShellExtInit.
I'm trying to add a tab in "Active Directory Users And Computer". All info I have found is for C++ but I'm using VB6.
//Keder
|
|
|
|
|
If I try to insert the ms flexgrid (and other ms activeX) in visual studio .NET i promts that I dont have a run time licence. I have the professional edition, and I can insert it in Visual Studio 6. Somebody know how to fix this problem?
|
|
|
|
|
we want to move to n-tier using .NET.
Our Current Env:-NT/SQLServer/VB6 -ClientServer App
Planend New Env:-NT/Oracle/VB.NET or C#
here is what we are planning :-
vb client->.net components (developed in VB.NET/C#) ->Oracle
if somebody can advice on the following..
1.Should we host the components in COM+ as it gives advantages like object pooling and dbconnection pooling, but at the same time is it really beneficial?
Are the advantages really worth?
Our thin client downloads lot of data upfront and then it becomes very user intensive app.
2.what should be the medium to communicate from client to components?
a.remoting with http/tcp
b.can we try to use webservices.
thanks in advance
|
|
|
|
|
Did this easily in VC++, now I'm trying to learn VBasic 6.0...
ClassA
ClassB - includes pointer to an ordered list of ClassA's
ClassC - inherits from ClassB, includes pointer to one ordered list of both
ClassA's and ClassB's
All classes created and destroyed dynamically, multiple instances
On form:
Custom ListBoxA - with pointer to list of ClassA's whose member variable
"name" determines items in ListBox
Custom ListboxB - same as above, but ClassB's
Custom ListBoxC - same, but both ClassA and ClassB as items
the problem:
Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??)
VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types.
Is this the kind of thing I would use a Collection class for?
One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this??
Thank you to anyone who has read this far and who responds.
Tym!
|
|
|
|
|
bad news man, VB6 doesn't support pointers as far as I know. I have read an article somewhere in CP that uses API to get pointers in VB6 but I can't seem to find it again.
On the list reordering, when an item is clicked in the listbox, you can refer to it by:
List1.ListIndex 'this gets the zero based index of the list item OR
List1.List(List1.ListIndex) ' this gets the string value of the selected list
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Dim strCompany As String
strCompany = txtCompany.Text
Dim findSQL As String
findSQL = "Select * " & _
" from Client " & _
" Where name like '" & strCompany & " '%"
the above is a SQL statement and i wish to populate a datagrid (either on the same page or a different one) with the results of the statement. How do i do this? Thank you!
|
|
|
|
|
Is this question regarding VB6 or VB.net ? They way to populate the datagrid are quite different for for vb6 and .net
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
sorry for lack of detail,and thank you for your time! its vb6, as it stands my code is:
Dim strCompany As String
Dim strLikeCompany As String
strCompany = txtCompany.Text
strLikeCompany = strCompany & "*"
Dim findSQL As String
findSQL = " Select ClientCode, Company, ContactName " & _
" from Client " & _
" Where Company LIKE '" & strLikeCompany & "'"
Set RS = Conn.Execute(findSQL)
Adodc2.RecordSource = findSQL
MsgBox ("Showing Results")
Me.Adodc2.Refresh
Me.DataGrid1.Refresh
but it displays the error "no recordset specified, command text was not set for command object." on loading and it fails to populate grid.
|
|
|
|
|
|
I want to declare the DTE.How to declare this one.If i use DTE directly,it is saying reference to non-shared member require the object reference or i have to import any class.
colAddins = DTE.AddIns()
cmds = DTE.Commands
cmdobj = cmds.Item("File.NewFile")
|
|
|
|
|
I want to write a Windows app in VB.NET which can be excuted by command like with parameters (Example: C:\abc.exe -id:[myvalue]). How to do? And how can use those parameters' value in my app? Thx a lot!
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
|
Hello,
I'm using VB.NET and i have created an MDI application using 2 forms, called masterform and childform. when i got to the point where i had many instances of childform i thought that it would be necessary to have an option of closing all MDI child windows at once, but i don't even know where to begin. any help would be greatly appreciated.
|
|
|
|
|
Have you ever used the pure Windows API? There's a function called EnumChildWindows() that will help you out. I found a VB example online to help you get started...
http://www.syix.com/wpsjr1/EnumChildWindows.zip[^]
Jeremy Falcon
Imputek
<nobr>Excrement escapes everyone - even elders.
|
|
|
|
|
I got .NET Enterprise Architect Edition installed in my machine.
Every time I try load a new project the application closes down without giving any error message but that project is somehow saved in the project list. Then when I re-start the .NET and open one of the saved projects and try to add a new windows form, again the application closes down.
I tried repairing the .NET but same thing kept on happening.
I tried re installing .NET but same thing kept happening.
I didn't try reinstalling the OS and then installing .NET.
I'm having a Intel P4 with 256 Ram running Windows 2000 professional edition.
Why is this problem pertaining?
kind rgds
|
|
|
|
|
I has terrible problems with the IDE but did two thing and it's been ok since.
1.Defragged and consolidation my drive
2.Put Service Pack 3 on.
Don't know if it will help but you can give it a go.
|
|
|
|
|
I tried by installing the service pack 2 but still the problem is there.
Is there any others solutions? Pls help.
Thanks.
A.Aluthwala
|
|
|
|
|
<br />
...<br />
intDy = Int(lngCs / 86400) ' lngCS = 404090, intDy = 4<br />
lngCs = lngCs - (intDy * 86400) ' no overflow, lngCs = 58490<br />
intHr = Int(lngCs / 3600) ' intHr = 16<br />
lngCs = lngCs - (intHr * 3600) ' overflow here, WTF?!?<br />
...<br />
How come the VB runtime can process int * 86400 but when it tries to multiply int * 3600 it gets an overflow? Is this just completely insane, or am I missing something?
"You only disagree because you're a moron. If you were a man of intelligence you would see that I'm obviously right." - The General Consensus
|
|
|
|
|
86400 is treated as a Long while 3600 is treated as an Integer
In the first case, the temporary is stored in a Long. The temporary result of the second one is stored in an Integer causing an overflow.
Try:
lngCs = lngCs - (intHr * CLng(3600))
|
|
|
|
|
Yeah. I guess. It was easier just to change the intHr to a Long though.
"You only disagree because you're a moron. If you were a man of intelligence you would see that I'm obviously right." - The General Consensus
|
|
|
|
|
I tried the following code below which is given in msdn.
But i am not getting any button on the toolbar.
Can anyone tell why.
applicationObject = CType(application, EnvDTE.DTE)
addInInstance = CType(addInInst, EnvDTE.AddIn)
If connectMode = Extensibility.ext_ConnectMode.ext_cm_UISetup Then
Dim objAddIn As AddIn = CType(addInInst, AddIn)
Dim CommandObj As Command
' When run, the Add-in wizard prepared the registry for the Add-in.
' At a later time, the Add-in or its commands may become unavailable for reasons such as:
' 1) You moved this project to a computer other than which is was originally created on.
' 2) You chose 'Yes' when presented with a message asking if you wish to remove the Add-in.
' 3) You add new commands or modify commands already defined.
' You will need to re-register the Add-in by building the MyAddin1Setup project,
' right-clicking the project in the Solution Explorer, and then choosing install.
' Alternatively, you could execute the ReCreateCommands.reg file the Add-in Wizard generated in
' the project directory, or run 'devenv /setup' from a command prompt.
Try
Dim cmds As Commands
Dim cmdobj As Command
Dim customin, customout As Object
Dim cmdbarobj As CommandBar
Dim colAddins As AddIns
' Set references.
Dim DTE As EnvDTE.DTEClass
colAddins = DTE.AddIns()
cmds = DTE.Commands
cmdobj = cmds.Item("File.NewFile")
' Create a toolbar and add the File.NewFile command to it.
cmdbarobj = cmds.AddCommandBar("Mycmdbar", vsCommandBarType.vsCommandBarTypeToolbar)
MsgBox("Commandbar name: " & cmdbarobj.Name)
cmdobj = cmds.AddNamedCommand(colAddins.Item(1), "mycommand", "mycommand", "tooltip for mycommand", True)
|
|
|
|
|
Hi,
Please I need help.
I created a form that allows me searching customers by name. after display customers list in datagrid, i want allow user to select one customer by pressing key.
for grid setup, i tried the following code :
'Configuration de la grille
Private Sub DataGridSetup()
Dim ts As New DataGridTableStyle()
Dim cs As New DataGridTextBoxColumn()
AddHandler cs.TextBox.KeyPress, AddressOf CellKeyPress
DataGrid1.ContextMenu = ContextMenu1
DataGrid1.CaptionText = "Résultat"
ts.MappingName = "mycli"
cs.MappingName = "c_cli"
cs.HeaderText = "Code"
cs.Alignment = HorizontalAlignment.Center
ts.GridColumnStyles.Add(cs)
cs = New DataGridTextBoxColumn()
cs.MappingName = "N_cli"
cs.HeaderText = "Nom/Raison sociale"
ts.GridColumnStyles.Add(cs)
DataGrid1.TableStyles.Clear()
DataGrid1.TableStyles.Add(ts)
End Sub
and i added handler to datagridtextboxcolumn, for detecting the keypress events as follows :
'Ajout d'un évènement aux cellules
Public Sub CellKeyPress(ByVal Sender As Object, ByVal e As KeyPressEventArgs)
Dim dt As DataTable = ds.Tables("mycli")
Dim p As Integer
CodeClient = Space(11)
If e.KeyChar = Chr(13) Then
p = Me.BindingContext(ds, "mycli").Position
CodeClient = dt.Rows(p)("c_cli")
Me.Close()
End If
End Sub
So after writing this code, i can select one customer only after pressing SHIFT+RETURN.
please can you explain me way i must first press
SHIFT.
Thank you very match.
* *
*
* *
|
|
|
|
|
intibnin wrote:
please can you explain me way i must first press
SHIFT.
I think this something to do with the KeyPress event, but I can't remember what
Anyway, you can bypass all this by just using the KeyDown instead of the KeyPress event, then use KeyCode instead of the KeyChar. It should work then
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|