|
Well,it seems my subject "Please help with my....." or maybe "i want a source code in vb.net that handle this...." break me down or make it a dishonest ask.
1. First of all,my project is almost finished and this functionality that i asked ,well not fail my project that is my doc. told me your project is fine and you do not need it badly.but when i alwayse do a job i do it better.and you know i am a student in SE. ,we focus on project documentation,analysis and design.we are not very good in programming.
2. as you know i will finish my studying stage after 3 months from now,and i have to practice about 6 months in any company that my university has a contract with it.
so i will get experience in time.and you know SE. is a practical work.
you know about Extreme programming method and its gouls and other SW devlopment approches. and one of some companies standards and qualities to get new developer in developing new project to get him learn form them......
finally, this is the last reply on this subject.my first reply i asked a source code (may too much asking)couse i am bad in express in Eng. i dont know how did you get it.
but my secod reply,i had explained my setuation and asked if you know a clue or abook to read about the subject.
becouse this is new for me and have not leard before.it is simple work for you but it is new to me.not i am lazy or i want other do my own work
so in this reply, i will ask nothing.
but let me ask you a question :
how do you learnd ? maybe someone have teach you(in sch. or university)
or maybe you had learned from book(auther teach you).
or why people vist this site ? maybe they want to learn!
even though i ask nothing.
thanks any way .
|
|
|
|
|
Hi,
I hope to get some advice on how best to proceed with the problem highlighted below:
I have written a windows application in VB .Net that connects to a commercial web service and retrieves data. There are a number of different calls that can be made to this web service depending upon the type of data to be retrieved.
The app can spawn many worker threads that can each make separate calls to the web service over a very short timespan.
I have not had any problems with api call limits until recently when the commercial organisation hosting the web servce has introduced financial penalties for exceeding a predefined api call limit over a moving window. For example if more than say 5 api calls are made over a 1 second window a charge will be levied on all subsequent calls made within that window above the 5 call limit.
What I would like to do therefore is introduce some sort of queuing system that all these threads are able to hook into that is able to check if the limit has been exceeded and if not allow the call through or block the call until the number of calls are below the limit for the moving window. The queued calls will be first-in-first-out.
What I really need to know though is how do I ensure that once a call is allowed through and data is retrieved from the web service how do I make sure that the correct data is returned to the correct thread given that the many different threads may be making the same call (but with different parameters and therefore returning a unique dataset)?
I hop this is clear and many thanks for your help in advance!
|
|
|
|
|
Seems a design issues rather than a coding problem.
Why not have a central counter/controller that only allows n calls to the web service to be active.
I presume a call to the web service is synchronous, exists till it gets and answer. Set up a command queue and pump in your requests into a central processing system with a cap on the number of threads it will spawn.
Surely you can have a thread identity that can be passed to the spawning process and return when the data is available.
As you can gather I do not use threading much so these are just ideas!
|
|
|
|
|
hi all
can anyone tell me how i can change the appearence of buttons in vb.net 2005 like round shaped.
thanks
rmshah
Developer
|
|
|
|
|
Create a custom control that inherits from button, then override its drawing event and do the drawing yourself.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Like Smithers-Jones said, create a custom control and override OnPaint() .
I just want to add. If you want to make the control handles mouse input in the round-shaped area of the control. Set the Region property to define the area you want to respond to input.
Eslam Afifi
|
|
|
|
|
Hi all, i am using visual studio 2008
Am having problems specifying the papersize to print my graphic to. The follwing isnt generating any errors but also isnt printing A3 on my printer (which is available) keeps defaulting to A4
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
PrintDocument1.PrinterSettings.PrinterName = "8500PS"<br />
<br />
Dim ps As New Printing.PaperKind<br />
ps = Printing.PaperKind.A3<br />
PrintDocument1.DefaultPageSettings.PaperSize.RawKind = ps<br />
<br />
PrintDocument1.Print()<br />
End Sub<br />
<br />
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage<br />
<br />
Dim g As Graphics = e.Graphics<br />
g.DrawImage(Image.FromFile("C:\1\Winter.png"), 5, 5)<br />
<br />
End Sub<br />
It is printing A4 every time?
Any help appreciated, thanks
|
|
|
|
|
try
DefaultPageSettings.PaperSize.Height = ??
DefaultPageSettings.PaperSize.Width = ??
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi, thanks for reply,
Using the above gave me
"PaperSize cannot be changed unless the Kind property is set to Custom"
Which led me to
PrintDocument1.DefaultPageSettings.PaperSize = New Printing.PaperSize("Custom", 1169, 1654)
Which worked but then led me to
<br />
'Dim ps As New Printing.PaperSize<br />
'ps.RawKind = Printing.PaperKind.A3<br />
'PrintDocument1.DefaultPageSettings.PaperSize = ps<br />
Which is suits my purposes just fine
Thanks for that
Regards
|
|
|
|
|
I am trying to put some info from the database and datatable into a data grid and I get an error on the phone number fields when trying to display the info in the dataGrid control.
Here is the error I get.
It says it can't store the info in the column. The type is Int 32, expecting Int32.
In the database in this column I am using a bigint in sql server express 2005.
Here is my code.
dt.Columns.Add(New DataColumn("Cell", GetType(Long)))
For Each row As DataRow In dtStud.Rows
dr(3) = row("stud_phone")
dt.Rows.Add(dr)
Next
'Dim dgView As New DataView(dt)
dgrStudList.DataSource = dt
Can anyone tell me why it expects int32 when I am using a Long for the data table column.
|
|
|
|
|
Where is dr created ? Are you sure that the row you're adding is the third row ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
here is my code.
Dim dt As New DataTable()
Dim dr As Data.DataRow
For Each row As DataRow In dtStud.Rows
dr = dt.NewRow()
dr(0) = row("stud_name")
dr(1) = row("stud_par_name")
dr(2) = row("stud_id")
' get student instruments
Call studentInstruments(Convert.ToInt32(row("stud_id")))
' create counter
Dim intCount As Integer = 1
For Each row2 As DataRow In dtStudInst.Rows
If intCount = 1 Then
strInst = Convert.ToString(row2("less_instrument"))
Else
strInst += ", " & Convert.ToString(row2("less_instrument"))
End If
Next
dr(3) = row("stud_phone")
dr(4) = row("stud_cell")
dr(5) = strInst
dt.Rows.Add(dr)
Next
|
|
|
|
|
Hi all:
Does anyone have an idea how I can create a button control that can be rotated n degrees? I need to be able to create a form using a number of controls that I can display in a curved manor. I need to know when a user has clicked one of the controls along the curve. The form would look like a racetrack with barriers side by side along the curve of the track. Each barrier would be a control.
Any help would be greatly appreciated,
Terry
|
|
|
|
|
Well, create a custom control (inheriting from button). Add a property to determine rotation and draw your control in its pain-event according to the given rotation.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
You'll have to create a custom control and handle the painting of the button yourself.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I have been working on this new project for a week now and have been doing a lot of research with little to show for it.
I was hoping someone would be able to help me.
I want to send a string from a wireless mobile device vb.net application to an vb.net application on a desktop on the same network. I can't find how to do this. ping works. Is there a statement equivalent to:
dim streamwriter as streamwriter("test.txt")
w.writeline("hello")
How do I write to the application on the desktop from the device. Do I have to create Sockets?
Can anyone help me get started with this? Articles? links? Code?
Thank you.
|
|
|
|
|
I am new to using CR but the support team have confirmed that it is possible to get values from controls in my application into a report by using a dataset. I have tried many ways to do this but without any success. I suspect it is because I do not know the basics.
Does anyone have a simple example of getting say a value entered into a textbox by a user and then presenting this information in the form of a report that they can print. I am certain that I can buld a bigger picture from an example.
Thanks in advance for any help you can provide
|
|
|
|
|
Hello,
VS 2008
I have created a C++ smart device DLL and added it to my project.
From my VB program I can call the functions successfully in the DLL. Using the code below
<br />
<DllImportAttribute("WIN32SmartDLL.dll")> _ <br />
Private Shared Function AddNumbers(ByVal a As Integer, ByVal b As Integer) As Integer <br />
End Function <br />
<br />
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) <br />
Dim answer As Integer = AddNumbers(25, 25) <br />
<br />
End Sub <br />
However, I need to be able to get the DLL to get information from the VB program.
Many thanks for any advice on this,
Steve
|
|
|
|
|
The way to get C++ to talk to VB is to make the VB dll a COM dll.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm using Lucene.Net to index a DB. Getting all the records is quickly done, but when i index them, the memory just keeps going up on my application. This is how the code looks:
Private writer As Lucene.Net.Index.IndexWriter
Private Sub InsertDBIndexData(ByVal sCPR As String)
Dim doc As New Document
Dim f1 As New Field("CPR", sCPR, Field.Store.YES, Field.Index.TOKENIZED)
doc.Add(f1)
writer.AddDocument(doc)
doc = Nothing
Return
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim odConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=....mdb...")
odConnection.Open()
writer = New Lucene.Net.Index.IndexWriter(DBIndexLocation, New StandardAnalyzer, True)
Dim odCommand As OleDbCommand = New OleDbCommand("select * from TPers", odConnection)
'Dim odReader As OleDbDataReader = odCommand.ExecuteReader
Dim odDataAdaptor As OleDbDataAdapter = New OleDbDataAdapter(odCommand)
Dim odDataSet As DataSet = New DataSet
odDataAdaptor.Fill(odDataSet, "TPers")
Dim odDataTable As DataTable = odDataSet.Tables("TPers")
For Each dr As DataRow In odDataTable.Rows
InsertDBIndexData(dr("cpr").ToString)
Next
writer.Optimize()
writer.Close()
odDataAdaptor.Dispose()
odConnection.Close()
End Sub
i've tried to use oledbdatareader instead of oledbdataadaptor, which seems to be alot faster when indexing, but it is still takes up ALL the memory. Opening and closing the Lucene writer doesn't help either.
I know i probably should be asking in some Lucene.Net forum, but i'm not sure if the problem lies in that code.
And i know i've asked a question pretty much similar to this. But this isn't the same
|
|
|
|
|
I have a large panel in which I would like to put 3 subpanels.
The 3 panels should be stacked.
I’d like the big panel to have a scrollbar at the bottom, allowing all 3 subpanels to move left and right together when the images are wider than the form.
I’d like a horizontal splitter between each of the three subpanels
If I dock the subpanels to the top, then the horizontal scrollbar at the bottom of the big panel doesn’t show.
But if I dock the subpanels to the left then I can’t put splitters between the 3 horizontal subpanels.
Anyone know what I’m missing?
Thanks
|
|
|
|
|
I don't know if this is what you're looking for, but you can use two SplitContainer controls to do this. Add one SplitContainer to your top-level Panel control, then add a second one to the right half of the SplitContainer you already dropped. Then you can drop you child Panel controls into each pane of those splitters and dock them to the parent containers.
|
|
|
|
|
But splitcontainers are too complicated. If you get more than three panels you can't keep track very well. It seems to me that panels should be able to do this.
This is what doesn't make sense to me. Is there an explanation?
1. A panel that is docked left shows a horizontal scroll bar when it is wider than the form.
2. But a panel that is docked top never shows a horizontal scrollbar, even when it is wider than the form?
3. And (this is the strangest), a panel that is docked left does not show a horizontal scrollbar if anotther panel is docked top inside of it.
I must be missing something here.
Thanks!
|
|
|
|
|
cstrader232 wrote: It seems to me that panels should be able to do this
It's not the panels job to do this. You need a container that manages this for the panels. The panels just know how to dock to their parent container - that's all.
cstrader232 wrote: But splitcontainers are too complicated.
How so?? There's a container on one side of the splitter and a container on the other side. What's the big deal that makes this so complicated?
cstrader232 wrote: 1. A panel that is docked left shows a horizontal scroll bar when it is wider than the form.
2. But a panel that is docked top never shows a horizontal scrollbar, even when it is wider than the form?
3. And (this is the strangest), a panel that is docked left does not show a horizontal scrollbar if anotther panel is docked top inside of it.
This is exactly why you dock the panels "Fill", not Top or Left. The container the panel is docked in should be managing the scroll bars, not the panels themselves.
|
|
|
|
|
Thanks... that's helpful, although I still think there must be a better solution than splitcontainers.
|
|
|
|