|
Tj. wrote: Hey all again, i'm still doing that project
Don't assume we have any idea what you're talking about Especially if it is relevant to your question. I am completely clueless as to what project you're doing
Tj. wrote: But now i have a different problem.. Changing the menu colour...
Can you be more descriptive? Which menu, which color? A font color, a background color, a border color, a highlighted color...
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
i really need help or suggestion in my project proposal...
i have already a billing reports but the problem is that i don't know how to print it using visual basic.i dont know the code or the procedure to do it.
i look forward of your reply,thank you so much
|
|
|
|
|
Are you using VB.NET, or VB6 ? If you specify which one, and type the word 'print' as well, Google will tell you the answer.
Christian Graus - C++ MVP
|
|
|
|
|
Better you can use datareport or crystal reports for billing format.
|
|
|
|
|
hi!!!
thanks for that suggestion, but the problem is that i dont know the code or the procedure in printing the billing using datareport or crytal report.
any suggestions....thank you so much
|
|
|
|
|
Hi there....
I wrote a program under Visual basic to read pulses from a reed switch that i put it in my car, using parallel port.
I already put io.dll as mentioned in your site.
But when i tried it in my car the wiindow seem doesnt read it correctly.
I assume it was because it was windows dependence.
How do i make it less windows dependency?
in my program i simply write it like this:
Public Sub Timer3_Timer() * interval is 10
TerraGanti.Caption = PortIn(889)
End Sub
The program didnt catch up all the pulses correctly.
Please tell me how to fix it.
Thank u so much for helping me.
Best Regards,
Tegar Astarestu
|
|
|
|
|
vidante wrote: How do i make it less windows dependency?
I'm not sure what you mean. If you're using VB, you're dependant on Windows, no two ways about it.
Christian Graus - C++ MVP
|
|
|
|
|
I tried an commercial software for eletronic odometer, and it says that their software is less windows dependency, so it will read pulses from the reed switch on a wheel of the car correctly.
The software is run under windows. I think it was Visual C++.
What i am trying to do similar, counting pulses from a wheel, but it read the pulses as it wish, not as i wish....
You know, I've started a project, but I cant finish it.
You know how the feeling, right?
oh my....
|
|
|
|
|
vidante wrote: and it says that their software is less windows dependenc
Well, that's what we call 'marketing'
vidante wrote: What i am trying to do similar, counting pulses from a wheel, but it read the pulses as it wish, not as i wish....
As Dave said, if you're reading for pulses using a timed interval, you're not going to catch them all. Ideally, your hardware will cache the pules.
Christian Graus - C++ MVP
|
|
|
|
|
Well, part of your problem is that your polling the port. You're using a Timer that fires every 10 milliseconds and the PortIn function looks at the status of the port at that moment in time. If the switch is not making contact at that instant, it'll come back as not contacted. The port will not "buffer" the fact that, between polls, the contact was made and broken. In order to make sure the correct value is read, in your case, the switch must be held and making contact for at least 10ms (actually, even longer than that!), so that there is a wait for the next polling period.
The reason I say longer than 10ms is because your using a Form-based Timer, which is event driven. It fires an event approximately every 10ms, but that event can stay queued up in your applications message pump for much longer than 10ms, waiting for your code to get around to processing that event.
You'd be better off using one of the a thread-based timer and/or an A/D board for monitoring the switch. An A/D board would be a much better bet if your counting the number of times the switch is made and released on a per second basis, like counting RPM's of an axle...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for the information.
But, since i am new in programming, i need more "lecture" on this.
What is a thread-based timer? How do i do it? Could you give me an example for he code?
It simply read a pulses from wheel of the car.
What is an A/D board? Is it Analog/Digital board?
Is it easy to make? If not, where can i get it?
From your explanation, i think an A/D board would fit.
How do i write the code to my project?
Thanks so much for helping me.
Regards,
|
|
|
|
|
Oh God...<sigh>
vidante wrote: It simply read a pulses from wheel of the car.
The problem is that the pulse doesn't exist long enough for your code to see it!
This REALLY needs specialized hardware. A timer, ANY timer, is just NOT going to do it. This hardware needs to respond to the event of the reed switch being tripped, not polled for it.
vidante wrote: What is an A/D board? Is it Analog/Digital board?
Yep. A board and specialized hardware that can do a much better job of counting these pulses than a parallel port can ever possibly hope to do.
vidante wrote: How do i write the code to my project?
That depends ENTIRELY on the board and it's software interface. Without knowing anything about it, there's no point in discussing any code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have to columns in my database table. Called scheduleTime and ScheduleDate.
When they are displayed in the datagrid they come out like the following: "21/11/06 10:45"
They displayed the date and the time.
The way I have inserted in the date and time, is to use shortDateformat, and localTime. However, it still displays it like the above.
If I was displaying the output in text boxes then I could format before displaying them in a text. However, as the output will be in a datagrid and the datagrid is binded at runtime is there any way to format the date to be: 21/11/06, and the time to be: 10:50
The code I use to populate the datagrid is below.
<br />
ds = objCustomersSupportContracts.getCustomerSupportContracts(clientID)<br />
Me.grdSupportContracts.DataSource = ds.Tables(0)<br />
Many thanks in advance,
Steve
|
|
|
|
|
Are you placing the grdSupportContracts(datagrid) on the form in design view?
|
|
|
|
|
Hello AreJay,
Yes I have dragged and dropped the grid on the form.
Thanks,
Steve
|
|
|
|
|
Sorry, I was thinking of a DataGridView. Creating it in Design View or at Run-Time use your table adapter to customize your SQL to format the date for you. So, if you customize the SQL in the adapter this DataSet will mimic the output of the adapter and pass the format into you DataGrid.
Select convert(varchar, DateColumnName, 1) as [MyDate] from MyDBTable -- 11/21/06<br />
Select convert(varchar, DateColumnName, 101) as [MyDate] from MyDBTable -- 11/21/2006
Refernce for T-SQL Convert[^]
|
|
|
|
|
Thanks AreJay,
I will give that a try, thanks for the link.
Steve
|
|
|
|
|
in the aspx page a button and a text box is placed.
When i enter an integer in the textbox and press the button,then i should get the number of textboxes that i have entered in the textbox.
please help me out
tirumal
|
|
|
|
|
tirumal1231 wrote:
When i enter an integer in the textbox and press the button,then i should get the number of textboxes that i have entered in the textbox.
How have you entered textboxes into a textbox ? Or do you mean the text you enterd ? What do you mean by 'get' ? In just the code behind ? A message box ? A Label ?
This sounds like homework to me, it's certainly a trivial task. What have you done already ?
Christian Graus - C++ MVP
|
|
|
|
|
hello Christian Graus
when i enter the integer value in the textbox and click the button.i should get the number of textboxes that i entered in the textbox.
1)Initially i called a function called loadtextboxes, as follows :
Sub loadtextboxes(ByVal val As Integer)
For Each tb In val
TextBox(tb = New TextBox())
tb.ID = i
Next
End Sub
i don't know how we can produce textboxes dynamically by clicking the button.
This is not a homework.
It's for automating the project.So please kindly help me
thank you
tirumal
|
|
|
|
|
Oh, I see.
The Textboxes can be added to the controls collection on the page, but if you want to position them, you need some sort of PlaceHolder ( or similar control ) to contain them. Then you can just create textboxes with new, set their properties, and add them as child controls, to the Controls collection of the Placeholder.
Inserting them in a table, or adding some CSS would help you to lay them out nicely.
The other trick is, they need to be added to the page very early in the life cycle, if you want viewstate from those controls.
Sorry, I thought you wanted the page to report back the number, which would obvioulsy be a homework assignment
Christian Graus - C++ MVP
|
|
|
|
|
thank you christian graus,
for your valuable suggestion.I thought of placing them in a table and then...
now you suggested me placeholder.and the other thought is we can declare a textbox and add the code even for the design part as follows:
tb(i) = New TextBox()
tb(i).ID = "Tirumal" & i
tb(i).Width = Unit.Pixel(50)
tb(i).BorderWidth = Unit.Pixel(50)
Me.Controls.Add(tb(i))
ok.Anyway i will use the placeholder.
Thanks again.
tirumal
|
|
|
|
|
How do i use a Session in a XXXX.vb class (Not a XX.aspx class)?
|
|
|
|
|
You need to pass the Session object through to the middle tier, if you have no choice but to do that. Passing the value down makes more sense.
Christian Graus - C++ MVP
|
|
|
|
|
I am working with some National Wetlands Inventory data that has lots of codes specifying the details of that region. Since the codes are so complex there is an online source that will let you enter a code and then return what it means. However, there are hundreds of code combos so I want to be able to put a list together in excel or access and have a program go through the list and update the worksheet or table with the info from the website.
The website however does not pass the code in the address so I don't thinks it's a simple paste in the code to the address situation. I need to have the program enter the code in the correct textbox, submit the form, and then parse the results (returned in an html table).
Here's the catch I have done some vb, vba, and website development but I have never done something like this. Does anyone have a suggestion on how to do this? Or, sample code of a similar project?
I know that some websites really HATE this, but I am checking with the host before starting the project. I don't foresee any problems though as they put this together so that people could get this information.
- Justin
|
|
|
|