|
Hi everyone, i'm trying to create a custom menu and i have done the menuitems paint but i have no idea how to paint the mainmenu bar cuz it has no events to override.
thanks
here's what i got:
Image
|
|
|
|
|
Hi,
if you haven't looked at this article it might help you out:
http://www.codeproject.com/cs/miscctrl/custommenu.asp[^]
Looks like what you want but just in c#. I am trying to convert myselft but I have problems with the eventhandler how to add those, maybe you know, let me know.
Cheers DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
thanks i haven't seen that article it really does what i want and seems to be really easy
do you want me to post when i get it working?
again, thanks
|
|
|
|
|
My project is Car Rental Project.
I hve some tables related to tbl-vehicle
they are tbl-make, tbl-model and tbl-size
make, model and size tables will hold ford, mustang and economy like wise
my question here is,....
QUESTION 1
do i hve to store all the avaliable make and model of cars in my database , so that the user can select them accordingly when
he add/buy a new car to the rental agency through vehicle transaction form (GUI).
size wont be a matter becos there are some sizes like economy , standard etc..
and also i hve a table called tbl-booking to keep track of car bookings...
i hve the following fields in that table...
bookingid---autonumber
bookstatuscode --- avaliable / booked
cusid --- customer id
vehreg --- vehicle registration
fromdate -- pick up
todate --- drop off
confirmationletter --- yes/no
paymentreceived -- yes/ no
This booking table shld be my transaction table.
QUESTION 2
here my question is do i hve to add something like payment type to customer table and do some billing transactions separately ...i dont know how to handle this...with the GUI...clear me..
i already finished developing the GUI for customer addition and updation. am now developing the GUI for Vehicle transaction.
|
|
|
|
|
This reeks of classwork...
Only you can answer these questions. They depend entirely on your requirements.
If you want the user to be able to select the make and model, then yes, they have to be in the database. Otherwise, the user will have to add them to the database using some other method so they can be selected at a later date.
As far as your second question, why would you put a payment type on a customer record? This would normally be in a payment or billing transaction table...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
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
|
|
|
|