|
To expand on the other posters answer... When you create the checkboxs in your code, set the Tag property of each CheckBox to the number you want. You can then look at that property in the ClickHandler code to figure out which one was clicked.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I have some strings which I want to replace them with single quotes so that I can use them as arguments that are passed to a sql query.
Example, string variable Name:
"Peter John"
Should be replaced with single quotes
'Peter John'
so name should contain only 'Peter John'
Is there any possible way to do this.
I have tried doing the following:
name.replace(34, 39) 'unicode characters, did seem to work.
name.replace(" "" ","'") 'Not work either
I have been told to use the escape characters:
name.replace('\"','\'')' Syntax error expression expected
Many thanks for any help,
Steve
|
|
|
|
|
please tell us why u intend to do this
|
|
|
|
|
steve_rm wrote: I have been told to use the escape characters:
name.replace('\"','\'')' Syntax error expression expected
As you asked in the C# forum, you got C# code. You can't use escape sequences in VB.
---
b { font-weight: normal; }
|
|
|
|
|
Not totaly sure I understand your request, but if the value of 'name' variable contains the double quote, name.replace("""","'") should work.
Phil
|
|
|
|
|
hi,
Any one have an idea about making activation software.
Thanks,
|
|
|
|
|
Could you be more specific?
|
|
|
|
|
Hi,
I want to make a software for trail use of 30 days or 15 days etc.
Please give me an idea.
Thanks,
|
|
|
|
|
They way I would do it is, after you install your program, store the date that your program was installed for the first time, and use DateTime function to add the days since ran. Then, if your program has been installed for 30 days, set a Boolean value that locks the interface (or however you want to discontinue access to your program).
|
|
|
|
|
Where would you store the values?
Usual user settings locations would be easy enough to find eg: isolated storage.
A key in the registry? You could create an algorithm for generating a key in the registry and just store the date with no other identifying informaiton. And then just leave the key there until a full version was installed.
|
|
|
|
|
Leah_Garrett wrote: Where would you store the values?
In the program. Every time it starts up, it checks to see if it has been 30 days since it's been installed.
|
|
|
|
|
MatrixCoder wrote: In the program.
You mean as part of the binary? Have you got code samples or references?
|
|
|
|
|
Hi,
I have already tries this but there is one loose point.
If a user not changed his system date and runs our software at the same date in which date it installed, No way to increase run days.
Think about it and give me any more idea about this.
Thanks for your reply.
|
|
|
|
|
Dear Friends,
I have faced Big Problem in my Project Boecoz of Performance Issue,
in my application some forms have lot of controls that kind of forms takes too much time to open and process time.
"SO HOW TO IMPROVE THE PERFORMANCE IM MY APPLICATION"
Thanks and Regards
Ravi.G
-- modified at 9:46 Tuesday 5th December, 2006
Ravikumar
[Coimbatore]
|
|
|
|
|
I think you've answered your own question there - use fewer controls on a form & create more forms.
|
|
|
|
|
Yes it s true, bocoz i have used lot of tab pages, but thats is client requirements so i want some other solution,
Thanks
Ravi.G
Ravikumar
[Coimbatore]
|
|
|
|
|
Ravi kumar G wrote: but thats is client requirements
Putting hundreds of controls on a form takes forever to create and initialize them all. The TabControl is one of the most grossly overused and abused controls in the ToolBox.
This is where you work WITH the client to work out these issues. Either they put up with the pathetic performance of creating all these controls or they work with you to reorganize the form so it's a balance between what they "think" they wanted and what is acceptable perfromance.
The TabControl is great for bloating the code in a form as to make it nearly totally unsupportable when it breaks or you have to add more stuff to the form.
Save you and your customer the pain later on and solve these problems now by limiting your use of the TabControl.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
make a new form of your instance at the strting class and change its visible to false.
do this for all forms and whenever u want to view each form ,use form.show method and for closing wrtie form.hide and make a sub to update context of controls when it is going to be shown.
|
|
|
|
|
Thanks, I think this will be helpful for me can u pls give some exmaple........
Ravikumar
[Coimbatore]
|
|
|
|
|
Hi,
how i can make a software a trail use for 30 days or 15 days etc.
if any one have an idea please reply me.
Thanks,
|
|
|
|
|
When the application starts check the date of when the C:\Program Files\Your Application\ was created or better yet use Registry to store an installation date that is encrypted. Only your application will be able to de-crypt the install date.
|
|
|
|
|
Hello,
SQL Server 2005, VS 2005
I have a checked list box. The user will select a combination of staff members from the checked list box. This will display these staff members and their tasks that they have to do. Also I have a additional 4 check boxes on the form, where the user can select the prority to be shown. i.e from the checked list box, check staff members 1, 5, 8, 12. and display the prority as high. There 4 prority check boxes (low, normal, urgent, and very urgent)
All are dislayed in a datagrid on the form.
Currently there a 15 staff member that will be in the checked list box, but this could grow as more stafff members are added.
My problem is Writing a select query for each of the possible combinations of staff members and the prority.
I could end up writing many many select queries for each combination.
Is there a simple way to write a select query for this type of situation?
Many thanks in advance,
Steve
|
|
|
|
|
You could read through the selection in the list box and build a comma delimtered string to use as a part of your query.
Something like this, where details is a list of fields you want to get back:
SELECT details
FROM StaffTable
WHERE StaffID IN (1, 5, 8, 12)
|
|
|
|
|
Thanks for your help,
That is the way i am trying to do it.
Steve
|
|
|
|
|
Hello,
I’ve developed ATL Control using VC++ 2003 to use it as GUI component for different programming environments. It works fine with .NET and Borland builder, but when I try to use it with VB6 or VC++6 I got ‘Permission denied’ error. It happened when I call ::GetClientRect(m_hWnd, &ClientRect) function, where m_hWnd is a private member of this control (handle of control’s window). What’s wrong? How to fix it?
Regards,
Leonid
|
|
|
|