|
this is easy...u can get the cardid field from the database into a dataset...and check for the largest number...and then add 1 to it and set it as ur generated number in the text box...
subhrajyoti
|
|
|
|
|
is it not easier to use Access for that sort of things?
|
|
|
|
|
Hello everybody!
I should write a program to power on & power off a video projector..
I use the SerialPort Class in the .NET Framework to transmit the necessary codes via a serial cabel that is connected to that video projector - it works fine (power on & power off)..
But now I should develop a GUI program to do that..
In that GUI program I need to specify on what time the specific code will be transmitted to the projector - maybe also the days (Monday until Friday or so..)
It could look like:
Start Time: 08:00
End Time: 11:00
From: Monday until Friday
In the codeproject messageboard I have found the "task scheduler class library". With that library I could create two scheduled tasks in win2k to perform "power on" and "power off". In order to that I will have to create two console-based programs executed by the scheduled tasks..
(http://www.codeproject.com/csharp/TSNewLib.asp[^]
But is there a better concept to achieve my goals?
Is there any other possibility to implement a timer to control the video projector at any one time?
Thanks in advance for any suggestion!
(Sorry for my English, it is not my first language)
|
|
|
|
|
Generally there are three ways of doing this:
:: Use the scheduler.
:: Let the program run in the background and wait until the right time.
:: Develop a service, that runs in the background and waits until the right time.
The third one is basically creating your own scheduler, so it might be a bit over the top for your project. Whether you should use the first or the second method mostly depends on if you want to have a program running constantly on the computer or not.
yomam wrote: Sorry for my English, it is not my first language
(Nor is it mine.) Even if your use of the language is not perfect, I find it far better than that of many users here that actually do have english as their first language. They just don't make an effort to use it correctly.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much for your suggestions!
I think by using the task scheduler my requirements will be satisfied. Implementing my own scheduler would be a bit too much.. Therefore I will have to write some code to import all scheduled tasks with their settings and find the proper ones which are "responsible" for my video projector in order to make changes for power off and power on time..
|
|
|
|
|
i have developed an application using MS SQL, VB 6 usifn Seagate crystal reports. i want to create this application as a demo version, for this i need to go for putting the expiry date for the application. how can i do that ? or something to be done during pacakage and deployment ?
thanx a lot ..
furher
|
|
|
|
|
i have got an idea...try this...during the form load of ur main form...store the date of first run in a text file through file commands at an unknown location...e.g. windows/system32...
and then every time the user runs...the formload checks for thr file and reads the date and comapares with the currnt date...if it doesnt find the file then its the first run and u need to create the file...and u can set the date to any number of days after the first run date....
subhrajyoti
|
|
|
|
|
Hi Rikky,
Thanx for ur response.
I will surely try this.
But there is a small problem.
If suppose the file is renamed or deleted, then the demo version will be of no use.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
Hi Furher,
Iam also looking for the same code.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
Hi,
I would like to write a program that loads an image and scans each pixel in turn from left to right and from top to bottom. When the pixel is scanned I need to find out the color value e.g. #FF0000
I am not new to programming its just that I have not programmed using graphic functions before.
If anyone could possibly point me in the right direction I would appreciate it.
Many Thanks
Julian Mummery
www.IJude.com
|
|
|
|
|
when you load a image you can get its Image type which you cast into a Bitmap.
Then you have a GetPixel(x,y) method avalible.
Then you just loop trough the width and height of the image and you will get the pixel information (you will get a Color ).
But I must warn you that this is really slow (I had some spare tiem yesterday and I have written a small app that does just that).
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
how to write the automation code by using VB? it is same like do the pointer or any different ways? actually, i want to make an automation for converter step. the converter such as word to pdf converter. so that, i want to automate all the step in the converter. can you give the suggestion or the example..thank you
|
|
|
|
|
I have designed two forms, "compose page" and "read page", I designed one button "add" on the compose page, once it pressed, the requested things will be add in the "requested lists" field, at the same time, the record of that things in the stock(stored in a database) will be deducted by corresponding requesting number. Then press "send" to recipients. But this logic is abnormal, Normally, when the recipients receive the request email, he press "accept" on the "read page", and then stock record will be deducted. I dont know how to send out the "read page" to recipient by email. Please help me. Thank you.
|
|
|
|
|
i wanna ask how do i overwrite the contain inside the text file?
recently when i write it will continue my old information
strmw = OpenStreamWriter(filePath)
strmw.Write(vbCrLf)
'loop all the player status
For x = 1 To Val(NumPlayer.Text)
' write detail in the record
strmw.WriteLine(String.Format("Player:" & (x), Now))
strmw.WriteLine(String.Format(" Name: " & wpname(x).Text, Now))
strmw.WriteLine(String.Format("position:" & wPP(x).Text, Now))
strmw.WriteLine(String.Format(" MoveStep:" & wcounter(x).Text, Now))
Next
strmw.WriteLine(String.Format("whosturn: " & PTurn.Text, Now))
strmw.Close()
|
|
|
|
|
You can use the fileStream
* * *
Dim f As New FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write)<br />
Dim r As New StreamWriter(f)<br />
All the parameters with *'s above them can be changed to diffrent options such as reading or writing ect.
|
|
|
|
|
when i try to use this
Dim f As New FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write)
Dim r As New StreamWriter(f)
it said the filename not declared
how to use the *?
|
|
|
|
|
FileName is a string ... and is the file you are wanting to open/create/overwrite
so if the file and path is c:\bla.txt then
Dim f As New FileStream("c:\bla.txt", FileMode.Create, FileAccess.Write, FileShare.Write)
Dim r As New StreamWriter(f)
dont forget to close the streamwriter and filestream with FileStream.close and StreamWriter.close
|
|
|
|
|
the (f) having error
Error on : Array bounds cannot appear in type specifiers.
where or my streamwriter as i refer all not declare? wat happen?
---------
Dim f As New FileStream(Path.GetDirectoryName(Application.ExecutablePath) & "\save\testing.txt", FileMode.Create, FileAccess.Write, FileShare.Write)
Dim strmw As StreamWriter(f)
Dim wPP As Label() = ControlArrayUtils.getControlArray(Me, "PP")
Dim wpname As Label() = ControlArrayUtils.getControlArray(Me, "Pname")
Dim wcounter As Label() = ControlArrayUtils.getControlArray(Me, "counter")
Dim filePath As String = Path.GetDirectoryName(Application.ExecutablePath) & "\save\testing.txt"
Dim respond As MsgBoxResult
respond = MsgBox("Save game ???", MsgBoxStyle.Question + MsgBoxStyle.YesNo)
If respond = MsgBoxResult.Yes Then
strmw = OpenStreamWriter(filePath)
strmw.Write(vbCrLf)
'loop all the player status
strmw.WriteLine(String.Format("Number Of player:" & (NumPlayer.Text)))
For x = 1 To Val(NumPlayer.Text)
' write detail in the record
strmw.WriteLine(String.Format("Player:" & (x), Now))
strmw.WriteLine(String.Format(" Name: " & wpname(x).Text))
strmw.WriteLine(String.Format("position:" & wPP(x).Text))
strmw.WriteLine(String.Format(" MoveStep:" & wcounter(x).Text))
savegamesound()
Next
strmw.WriteLine(String.Format("whosturn: " & PTurn.Text))
strmw.Close()
|
|
|
|
|
It thinks that you are trying to create an array of stream writers:
Dim strmw As StreamWriter(f)
This should be:
Dim strmw As StreamWriter = New StreamWriter(f)
---
b { font-weight: normal; }
|
|
|
|
|
whn try to run the function, the record was written but when i try to run my whole system a few time but i didnt run the save function , when i check back the text file nothing inside...? wat happen with it?
|
|
|
|
|
What do you mean? What save function is it that you are not running? Why? What does it do?
---
b { font-weight: normal; }
|
|
|
|
|
dunno y my record was empty when i try to run my system a few time without saving... wat happen?
|
|
|
|
|
Dear Friends,
I have one simple sales and inventory control program. I would like to add in this project barcode system for some of the items. Can I enhance my system just adding this as a new future or else I have to do it as a separate project. Can u give me some hint how to use barcode system in the project. What is the logic for barcode system in VB6.
Please help me out in this technique.
Your quick response will be highly appreciated.
Thanks
Patel Murtuza
|
|
|
|
|
Hi murtaza h r u:
i have worked a lot at the barcode systems all u have o do is to download an barcode activex control from a site www.Fathsoft.com the add it aon ur project and do the same like give it a Daasource and Datafield property a get connected to the database and remember use the code 39 for barcodes.any problem just make a mail to me b there.
mani
|
|
|
|
|
Dear Zulnurain,
Thanks a lot for your quick response. I have downloaded the demo project for VB6 from the said website. But can you tell me how can I compare the item barcode with the one which I scanning at selling time so that I can take the salling and cost price of the item from the database. can u please explain with sample code.
or example I have one item name "camey soap" with barcode 1234567 how can i find the cost and sale price for this item from database while scanning the item.
Your quick response will be highly appriciated.
Thanks
Murtuza Patel
|
|
|
|