|
There is a great example of printing Word Documents to a Fax Device or other specific printer on www.gotdotnet.com. The site is currently down or I would provide you with a direct link.
When it is available again just search for SendMSWordDocumentViaFaxExample.
|
|
|
|
|
How do I create "excel" sheet in MDI (child) window?
|
|
|
|
|
hey,
i'm looking for a good vb or java programmer to code a program which i'm designing the GUI for. Preferably someone in the metro toronto area, and who has experience in designing programs for business. There will be pay involved (you won't be rich but you won't be hungry either) and you'll get to work on a product that will be commercially released.
if you're interested email me at rego.clothiers@sympatico.ca
Paul Rego
p.s. if you are interested, please email me directly coz i may or may not have time to come back here to check the response... I ended up at this site though another link, so I wouldn't normally post a message here.
|
|
|
|
|
I have made several attempts at overriding the backcolor property for a tabcontrol and have gotten no where. Does anyone have any suggestions
|
|
|
|
|
I need to send XML data to a site and receive the processed info.
Can any one suggest me how to go about it ?
Thanks in advance.
VIPUL BHATT
|
|
|
|
|
Try using the M$ XML parser (latest verision is 4.0 I think). If you d/l from M$, comes with both VB and C++ tutorials.
|
|
|
|
|
can anybody tell me how to get value of a textbox of form1.vb into textbox of form2.vb in Vb.net.
ex :
I have two forms form1.vb and form2.vb
both are having one textbox each
then i put some value into textbox of form1.vb
and then I load form2.vb and into that loading event I added
Form2_load()
form2.textbox1.text = form1.textbox1.text
end sub
plz tell me how to do that.
--waiting for a quick reply
Aakash
|
|
|
|
|
drmzunlimited,
Keep in mind there are many ways to do this. When I did this I created two forms, a textbox on each and a button on form1 to invoke this action, the click event of the button looks like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As String
Dim b As Form2
b = New Form2()
a = Me.TextBox1.Text.ToString
b.TextBox1.Text = a.ToString
b.Show()
End Sub
Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
|
|
|
|
|
Ok, I have searched and searched everywhere and can find nothing. I am trying to implement my own Collection Classes. However, no matter what I try, I cannot get the "For..Each..Next" syntax to work. Evertime it tries to access it (For Each User in UsersCollection), it gives me an 'System.InvalidCastException' error.
Aside from creating Strongly Typed Collection Classes, does anyone know how this can be implemented?
|
|
|
|
|
Tim McCurdy wrote:
it tries to access it (For Each User in UsersCollection), it gives me an 'System.InvalidCastException' error.
Does your class implement IEnumerable Interface? What is wrong with using an ArrayList object?
Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
|
|
|
|
|
Hello again,
C has a function called 'strpbrk,' which stands for string point break. The function takes two arguments. First arg is the string I want to search. The second arg is a string of characters that I want to check for. If any of the characters contained in the second string are in the first string the function returns a pointer to the element in the array where the character was located.
Basically, if none of the characters in the second set are found in the first set, the function returns NULL (or zero, if you will).
Does VB have a function that performs this same operation?
my func:
[source]
' forgive my C-speak
if strpbrk( "HELP ME, PLEASE!", " SXPT" )
//character ' ' found (space)
// do something
printf("Characters found in set!");
else
//characters in second set NOT found in first set
// do something else
printf("Characters NOT found in set!");
[/source]
or
Do I have to use an array and scroll through the entire array to accomplish this?
Thanks in advance,
Like2Byte
|
|
|
|
|
|
Thanks,
here's what I did.
dim c as string
dim s as string
dim i as long
s = "really long string really long string really long string..."
for i = 1 to len(s)
c = mid$(s, i, 1)
select case asc(c)
case 1 to 127
' do stuff
end case
next
|
|
|
|
|
If you're using VB.NET, you can use the IndexOfAny method of the String :
C#:
string s1 = "HELP ME, PLEASE!";
string s2 = " SXPT";
int i = s1.IndexOfAny(s2.ToCharArray());
if (i == -1)
Console.WriteLine("Characters not found!");
else
Console.WriteLine("Characters found at position {0}", i);
VB.NET:
Dim s1 As String = "HELP ME, PLEASE!"
Dim s2 As String = " SXPT"
Dim i As Integer = s1.IndexOfAny(s2.ToCharArray())
If i = -1 Then
Console.WriteLine("Characters not found!")
Else
Console.WriteLine("Characters found at position {0}", i)
End If
In VB6, you would have to fake it:
Dim s1 As String : s1 = "HELP ME, PLEASE!"
Dim s2 As String : s2 = " SXPT"
Dim i As Integer
Dim index As Integer
Dim found As Boolean : found = False
For i = 1 To Len(s2)
index = InStr(1, s1, Mid(s2, i, 1)
If index > 0 Then
found = True
Exit For
End If
Next
If Not found Then
Debug.Print "Characters not found!"
Else
Debug.Print "Characters found at position " & index
End If
|
|
|
|
|
I'm not sure if I made myself clear last time so i'll try to be more succint.
Is it possible to copy a control along with it's code on a excel spreadsheet so that you end up with two or more controls utilising the same code as a foundation, but having different identifiers and operating on different data? Would this require the creation of a macro within visual basic to make a copy of the code within the development environment or is there another way?
Pls help!
|
|
|
|
|
Chris Hooper wrote:
Is it possible to copy a control along with it's code on a excel spreadsheet so that you end up with two or more controls utilising the same code as a foundation, but having different identifiers and operating on different data?
No
Chris Hooper wrote:
Would this require the creation of a macro within visual basic to make a copy of the code within the development environment
Yes
Succint questions, succint answers
My latest articles:
XOR tricks for RAID data protection
Win32 process suspend/resume tool
|
|
|
|
|
Are you *sure* about this. Take a quick look at this post on a different board relating to a similar problem. It appears to me that the same code is being used to access multiple controls independently....
http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=2&MsgID=120530&Setting=A9999F0001
|
|
|
|
|
Alright yeah i see your point. Well instead of copying the controls can i simply add them sequentially and do something similar to what the dude is doing with the buttons in the post i have mentioned *phew* ?
|
|
|
|
|
Any has any idea ahy this is crashing on me giving error in the exception "Syntex error in inser into statement" Thank you
The code it:
Try
Dim objCon As OleDbConnection
objCon = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =C:\Projects\PDFMerge_Ali\PDF_Merger\pdMerge.mdb;;Persist Security Info=False")
objCon.Open()
'Create an instant of the Adapter
Dim daQueue As New OleDbDataAdapter("Select * From Queue", objCon)
daQueue.MissingSchemaAction = MissingSchemaAction.AddWithKey
Dim dsPubs As New DataSet("Pubs")
daQueue.Fill(dsPubs, "Queue")
MsgBox("data loaded")
' Create a new instance of a DataTable.
Dim tblQueue As DataTable
tblQueue = dsPubs.Tables("Queue")
Dim drCurrent As DataRow
' Obtain a new DataRow object from the DataTable.
drCurrent = tblQueue.NewRow()
' Set the DataRow field values as necessary.
drCurrent("ProfileName") = "test"
drCurrent("ProfileDes") = "test"
drCurrent("FileType") = "test"
drCurrent("Merge") = "yes"
drCurrent("Match") = "test"
drCurrent("Printer") = "test"
drCurrent("StartOnLoad") = "yes"
drCurrent("PrintFiles") = "test"
drCurrent("IncomingDir") = "test"
drCurrent("MergeDir") = "test"
drCurrent("TemDir") = "test"
drCurrent("PrintDir") = "test"
drCurrent("FailDir") = "test"
'Pass that new object into the Add method of the DataTable.Rows collection.
tblQueue.Rows.Add(drCurrent)
MsgBox("Add was successful.")
Dim objCommandBuilder As New OleDbCommandBuilder(daQueue)
daQueue.Update(dsPubs, "Queue")
objCon.Close()
MsgBox("Data Updated")
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Zulfikar Ali
|
|
|
|
|
Kindly check datatypes and data & also if the length of the data does not exceed the maximum length.
VIPUL BHATT
|
|
|
|
|
Thank you for your response. I had one yes/no field and i was passing string into it. Solved the problem and thank you again.
Zulfikar Ali
|
|
|
|
|
Does anyone know of a good tool for adding comments into VB .Net? C# I know will produce the XML comments and we are wondering if there is anything out there like that for VB .Net? Also, we may be interested in a Macro to add comment headers to our methods for the developers to fill in. Does anyone know of any good macros out there that are available?
Thanks,
JS
|
|
|
|
|
JS,
I had a similar problem and wrote a VS addin to try and address this. It can be found at http://ncomment.sourceforge.net/[^]
It is still in Beta, my apologies if you find any bugs in it. Let me know what you think. I am also working on a macro to add comment blocks to the top of functions.
Ben.
|
|
|
|
|
Hi,
Thanks for looking.
I'm trying to determine how to change the background color of a textbox when the focus is given to a textbox.
Changing the color is easy. How do I determine who has the focus so I can change the color?
Can someone help me?
Thanks.
|
|
|
|
|
Opps, sorry. Stealing bandwidth here.
Here's what I found...
Double click in the control.
Delete the function the IDE creates.
Select the "GotFocus" command in the right hand drophand list box in the IDE.
A new function will appear.
Type in:
ctrlName.BackColor = {{valid color code}}
Thanks anyway.
|
|
|
|