|
ADY007 wrote: But if i have more than 1 '|' what can i do!??
With all due respect to you: RTFM[^]. The answer to this question and more are contained therein.
...Steve
|
|
|
|
|
Dim s As String = "Eins|Zwei|Drei|Vier|Fuenf"
Dim items() As String = s.Split("|")
Console.WriteLine(items(0)) ' Writes "Eins"
Console.WriteLine(items(1)) ' Writes "Zwei"
Console.WriteLine(items(2)) ' Writes "Drei"
Console.WriteLine(items(3)) ' Writes "Vier"
Console.WriteLine(items(4)) ' Writes "Fuenf"
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I am attempting to create a windows component that acts as a "drop point" for drag and drop operations. I would like to be able to drop a label (or any other component that can return a string) onto this new control. The dragdrop subroutine should then create a new label and add it to the form. Since this operation can be performed multiple times, I cannot explicitly dim new labels because I cannot name them programmatically. For instance:
Dim lbl as New label<br />
lbl.location = New Point(10, 10)<br />
...<br />
me.controls.add(lbl)
will add a label to the form, but you cannot create dim statements on the fly. Perhaps I am totally off base on how to create this control. Could someone spare a little advice or some sample code that can explain how to create multiple instances of the same control type programmatically?
Thanks!
|
|
|
|
|
When your drop target event handler gets invoked, you could run the following code.
Dim l As Label = New Label
l.Text = tb.Text
' l.Left = Where you need to place it
' l.Top = Where you need to place it
Me.Controls.Add(l)
Me.Invalidate()
Me.Update()
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I want to fetch records from foxpro table throgh VB command object
I am using odbc connection for connecting to the foxpro table.
so i write a qry and assign it to the command object and then took the records in recordset.
ID NAME ADDRESS doc_tyep
===============
1 FRED 1234 Main St 37
2 TOM ABCD Whatever 37
5 JIM Homeless 38
9 John Jail 37
10 ryan home 37
Now, if I set the record source to select * from clients where doc_type = '37' It will return
ID NAME ADDRESS
===============
5 JIM Homeless
9 John Jail
but if i execute the same qry in foxpro table (that means opening it in Visual foxpro) ,it returns
1 FRED 1234 Main St 37
2 TOM ABCD Whatever 37
9 John Jail 37
10 ryan home 37
|
|
|
|
|
Dear Madhuri
"select * from clients where doc_type = '37'".
in the query u have written doc_type
but in table design attribute name is doc_tyep
write query as
select * from clients where doc_tyep = '37' also check for the data type.
if this topic solve ur porblem mail me at trickyuk001@rediffmail.com
********************All The Best**********MADHURI***************
Thanks n Regards
Uttam Kumar
be the best...
|
|
|
|
|
Is there a script to capture the data from uptime and add it as an event to applicaton/system log.
r1nuts
|
|
|
|
|
|
Thanks for reply however this merly throws up a number of server stats it wont drop it int event log
r1nuts
|
|
|
|
|
|
Hi this is santosh. i am writing code to access records from multiple tables created in oracle databaseinto VB.
I gave the connection string, i gave record set.it is working to retrieve data from one table , but when i was trying to retrieve data from mutiple tables by joining , its not working.
please help me in writing a select statement to join multiple tables in VB.
Bye
santosh
santosh
|
|
|
|
|
My guess is that your join statements are the problem, double check them.
|
|
|
|
|
i wrote the join statement but its still showing run-time error. i think my sytanx for join is wrong. so can u please give me the syntax to join tables and retrieve records from the database.
thanks and regards,
santosh.
|
|
|
|
|
I have a VB6 application that is running on a Windows 2000 Server using Terminal Services which are being managed by Citrix MetaFrame XP. Also running is ScrewDrivers v3 (A.K.A. Simplify Printing) from triCerat to manage the client printers.
I am using a third party custom ActiveX control called VSPrinter, which is part of VSView from ComponentOne, to provide print preview and printer control.
When I trigger a print from the print preview, I am presented with the standard Windows PrintDialog.
The problem is that the available printer list is populated with ALL printers available to Terminal Services, not just the printers for this client.
The ComponentOne support was useless, and their forums are littered with problems regarding usage under Citrix. Their standard reply is that one should check their forums for help. The common theme on the forum is that their product has not been tested in a Citrix environment.
Has anyone else used this control and observed this problem?
Or has anyone else found a print preview control that works in this environment?
|
|
|
|
|
i want to open a prefilled mail message.
the parameters are:
- to
- subject
- an attachment file
on my workstation the next code works fine:
Public Class SendFile
Private oApp As Object
Private oNameSpace As Object
Private olMailItem As Integer = 0
Private olByValue As Integer = 1
Public Sub New(ByVal AttachmentName As String)
'Return a reference to the MAPI layer
oApp = CreateObject("Outlook.Application")
oNameSpace = oApp.GetNamespace("MAPI")
'login with the currently user
oNameSpace.Logon(Nothing, Nothing, True, True)
OpenMessage(AttachmentName)
End Sub
Private Sub OpenMessage(ByVal AttachmentName As String)
Dim oMailItem As Object = oApp.CreateItem(olMailItem)
Dim oAttachments = oMailItem.Attachments
oAttachments.Add(AttachmentName, olByValue)
'open mailformular
oMailItem.Display()
End Sub
End Class
but on a citrix metaframe system (Windows 2000 Server installed) it fails with
-- ActiveX component can't create object
what's wrong about it?
stephan
|
|
|
|
|
Possible Outlook is not installed on that machine or you are referencing a different version on your machine (and subsequently in code) than what is installed on the citrix box?
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
My UserControl, I'm developing, have to get a custom constructor, with a parameter (StyleEnum) to getting a default-Style. This value is editable as the Style-Property in the PropertyGrid (Within the constructor I set the Style-Property too). The Style-Property will be not serialised (because it's value will be get in the constructor). I added a converter for my Control to generate the correct InstanceDescriptor. The code-generation works fine, but while testing I had a problem I can't solve:
I added my control to a form, changes the Style-Property to a other value and looked at the code. All is fine, the new value is be given to the constructor. Then I closed the form and the form-code and reopened the form. The Style-Property in code is still the old, but the Style-Property in the PropertyGrid is resseted to the initial value of the control. It looks like, the control is loaded with the standard constuctor without an parameters. How I can solve that problem, how I can tell the IDE to use the custom constructor with property?
-- modified at 8:41 Wednesday 7th December, 2005
|
|
|
|
|
The IDE is crap in this regard.
Your best bet, and I always do this, is make the default constructor private if you don't want it to be used.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for that good idea, I will try it and (if I found this thread) will tell you if it works.
|
|
|
|
|
Hi,
I need to print a windows form which has labels, text boxes ets on it. I do not want to display the windows form on screen as its being printed. Is there a way to do this.
Thanks
John
|
|
|
|
|
hi in my application i wanna store and retrieve images using sql server. i am using vb6 as my language. if anybody can help me please help.....
Roy Joseph
|
|
|
|
|
Generally the way to do this is to store image in a file, then you will only store the path to the image in SQL Server.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Tahnk you . But i want to store image not image path. in .Net e can use memory stream buffer to do this things. but in VB6........ what ? if u know plz reply.
Roy Joseph
|
|
|
|
|
In KB 149040 Microsoft reports a bug, but gives only a way to reproduce the error, but not a way to solve it. VB6.0 gives this error 3020 when I use
..............Recordset.Edit
..............Recordset.Delete
..............Recordset.Update
Error 3020 is meant to be given when you use Update without an AddNew or an Edit method.
Does anyone know how I can avoid this error, because VB6.0 does not delete the record because of this error.
|
|
|
|
|
Have your tried updating to a newer MDAC on your machine? MDAC Downloads[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|