|
Does any have an example of programming the FindText method off the PDDoc object of the Adobe Acrobat ActiveX component model?
|
|
|
|
|
hello
i want to extract a last recieved number from a mobile SIM using TAPI in VB.NET please help me as soon as possible
thanx
ps provide the answer with complete code plz
|
|
|
|
|
AsadNeutron wrote:
provide the answer with complete code plz
We don't get paid to write code for other people. Try it yourself and if you have problems, you can ask specific questions about the problem your having. We help those who help themselves.
You can start by reading SIM Programming with the .NET Compact Framework[^]. This explains how to use the SIM Manager API, which is part of the TAPI API. There is no TAPI support built into the .NET Framework, so you'll have to write your own wrapper classes, or search the web for a publicly available wrapper.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi!
I would like to know what's the best way to accomplish sync. in an arraylist when using multiple threads.
I' m using "synclock Coll.SyncRoot" and then "End synclock" (duh). Is this method rather "strong" for it blocks other threads that also use this? And what about if i use the synchronized method and the IsSynchronized property, is this approach better than the last case?
Another question is i read in the help doc. that " Hashtable can safely support one writer and multiple readers concurrently". Won't the write affect enumerations done by the readers?
Thanks in advance.
|
|
|
|
|
carlos_rocha wrote:
I' m using "synclock Coll.SyncRoot" and then "End synclock" (duh). Is this method rather "strong" for it blocks other threads that also use this?
It's supposed to block other threads. That's the whole point behind synchronized access.
carlos_rocha wrote:
that " Hashtable can safely support one writer and multiple readers concurrently". Won't the write affect enumerations done by the readers?
If you keep reading the doc's, you'll see that enumeration is intrinsically not a thread-safe operation. This is because the collection can be modified while the eneration is taking place, and hence, can corrupt the enumeration process. If your going to enumerate the collection, lock it on SyncRoot first, preventing all other threads from doing anything, including writes, with the collection, though, I think you can figure out the pitfalls of doing this...
If you want a synchronized collection that supports one writer and multiple readers simultaneously, use the .Synchronized() method to return a thread synchronized wrapper around your Hashtable and use this version of your Hashtable for all accesses.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
Thanks for your reply.The thing is that i have several threads but only two of them are acessing the arraylist, which contains info on the "working" threads.One of these two is like a monitor thread that checks every once in a while for exited threads and then removes an item from the arraylist.At the same time the other main thread in also reading the list and as new threads are created another node is added in the arraylist.So, only these two threads manipulate the arraylist.What's best? Use syncLock or .synchronized() ?
Thanks in advance.
|
|
|
|
|
It really doesn't matter, based on the requirements you just gave. If that's all you're doing and one of those threads is just a lazy garbage collector, then there will be no performance issues with using either method. If it were up to me, I'd probably use the .Synchronized() method just to save myself from writing my own synchronization management code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK.Thanks.I've been reading the help and i came upon the readerwriterLock Class.It says that it's suitable for various reads and infrequent writes, instead of blocking the code for the other thread, they both could acess the hash Table(or arrayList)...Any comments?Please...
Thanks in advance.
Never say never
|
|
|
|
|
Hi, I'm stuck with an Access (XP) DB.
In the .mdb I have two tables, I load them in a dataset (with the same tables) and I work with the data. Up to here, everything is fine. To save back data in the DB I use a code I got from MSDN. Two different, but very similar, codes for each table. With one it works, not with the other!
Here's the code:
Dim conn As New OleDb.OleDbConnection
Dim SelectCMD As OleDb.OleDbCommand
Dim CustomCB As OleDb.OleDbCommandBuilder
Dim DBAdapter As New OleDb.OleDbDataAdapter
DB.AcceptChanges()
conn.ConnectionString = String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data source=", cfgDBDirectory, "\x.mdb")
Try
conn.Open()
SelectCMD = New OleDb.OleDbCommand("SELECT * FROM Coordinate", conn)
SelectCMD.CommandTimeout = 30
DBAdapter.SelectCommand = SelectCMD
CustomCB = New OleDb.OleDbCommandBuilder(DBAdapter)
DBAdapter.Update(DB.Coordinate)
Catch ex As Exception
MessageBox.Show(String.Concat("Errore nell'accesso alla base dati archivio:", ex.ToString), "RFGPRII", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
The exception I got report a problem with the INSERT function. With the other table, code equal but table names, everything works!
Thanks for the help
Briga
|
|
|
|
|
What is the EXACT exception message? Without it, there's nothing we can do to help you. My first GUESS would be that there was a problem with a duplicate primary key, but of course, I'm only guessing...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well things are weird.
I also added an XML just for text. So I load the DB with .readxml and before using the Update methos I also save it to an XML file with WriteXML. In the beginning I got problem with XML in reading (not in saving) due to invalid values. I changed every field as nillable and now it works (XML).
The Update method doesn't generate any exception anymore but the .mdb is empty.
The new code is:
DB.AcceptChanges()
DB.WriteXml("c:\RF.XML") ' *** salvataggio XML
conn.ConnectionString = String.Concat("Provider=Microsoft.Jet.OLEDB.4.0;Data source=", cfgDBDirectory, "\rfgprii.mdb")
Try
conn.Open()
SelectCMD = New OleDb.OleDbCommand("SELECT * FROM Coordinate", conn)
SelectCMD.CommandTimeout = 30
DBAdapter.SelectCommand = SelectCMD
CustomCB = New OleDb.OleDbCommandBuilder(DBAdapter)
DBAdapter.Update(DB.Coordinate)
Catch ex As Exception
MessageBox.Show(String.Concat("Errore nell'accesso alla base dati archivio:", ex.ToString), "RFGPRII", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Now I also put a rem in front of the .writexml just to see if that instruction was affecting the Update. Still it generates no exception but the .mdb is empty.
So to recap the exception was due to the nillable parameter (although there were no null values) and it's gone. The problem now is that the Update method does not work. The DB is empty. Any clues?
Thanks for the reply
Briga
|
|
|
|
|
can someone help me how to make my form like a MODAL DIALOG in VB.net application?
|
|
|
|
|
Refer System.Windows.Forms.Form Class ShowDialog Method
|
|
|
|
|
Any like named as Form1
Dim f as New Form1
f.Heights
...
....
....
f.ShowDialog()
set its diff properties n call ShowDialog() to show it Modally
|
|
|
|
|
Your reply has come to me by mistake, Please reply to BSRK.
|
|
|
|
|
hi could any one help me---> i want to make a RTF file and insert a text in it and some icons that will be as a hypird threading when u click on it it will be opened and seen it can be image or word document or .... help me plz
Thanks alot
Metal Man
|
|
|
|
|
The easiest way is to assign the formatted text and image in a RichTextBox and get the RichTextFormat string using Rtf property.
Other way is to prepare rtf string as par RTF specification, the specification is available on msdn.
|
|
|
|
|
Hi, I have a table call tblTest in access with the following record.
PersonalID PersonalName Sex
001 Bopha Female
002 Chantha Male
I want to load these two record in a listview in VB.Net. Can anyone give me a sample code to load these two record in listview????
Note: I use vb.net.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I got it, I found the information from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I'm searching for a VB.net example of a rubber-band rectangle or select rectangle using pinvoke ROP2 codes. I know about ControlPaint.DrawReversableFrame but im working in the .Net Compact Framework and that isn't in the compact framework. Also drawing to a bitmap and erasing it is inefficient for what im doing.
I know an example is around here somewhere I just can't seem to find it.
I had this all figured out a year ago in a project I shelved only now I can't find that project or all the code samples I produced.
|
|
|
|
|
Passing events between forms
Situation:
I have:
- a parent form with a toolbar with a button on it print (IsMidiContainer=true)
- a child form within tis parent form
- on this child form i place a usercontrol (with a tabbcontrol)
Problem
i want when i change to another tab in the tabbcontrol raising an event to the parent form where i can disable the button print when the user is on a tab where he can not print
I can pass a event to a child form from a usercontrol but how can i pass this event to the parent form ??
(Public WithEvents childform as form, i cant find the event that i made)
Somebody has a solution?? thx
Greetz
plukje
|
|
|
|
|
Hi!
What i do is, after creating a new child form provide a handler in the main form:
AddHandler newWindow.funcXXX, AddressOf funcHandler
In the child form you have to declare an event and use raiseevent event2Use(parameters).
|
|
|
|
|
Is it possible to Insert Table(with rows n cols) in RTF Control.
if any One Know plz guide me
|
|
|
|
|
RTF Control, what is the namespace of this class?
By the way, RTF Specification does not say anything regarding Tables.
Please note that the rtf document should ideally be opened in WordPad, in which table is not supported.
|
|
|
|