|
I wrote a small program in vb.net that calls an external process.
I wanted to share this application between 40 users so I putted the content of the dir DEBUG (visual studio express 2008) into a shared folder and I used caspol to make it Trusted.
What I call in my app is an exe of a platform (PEBL) [http://pebl.sourceforge.net/battery.html] and I use it to execute some proprietary (PEBL) files.
What is STRANGE is this:
-if I share the same application on a shared dir and each client click on it executing the software I am not able to launch the external software for more than a single pc at time.
- IF I use a different publish for my vb.net application (that is, for K users, K different local(or remote) copies of my application, I am able to execute the same process contemporaneously
WHY THIS?
What I see is that if I use a single application shared on a common path [ for clear advantages of centralization] (example: just what you see in "debug" ] on a shared dir the process called does not allow for another client to execute the same external program. IS IT CORRECT? why should I use 40 different copies of my sw with 40 people?
IS IT CORRECT to share the same apps simply coping what includerd in debug?
|
|
|
|
|
HI Nico can you go through my code and see if you can help me on this
|
|
|
|
|
Hi
I've create a check box array, want to display a message box - moment the user clicks the 3rd check box
Private Sub step19() ' Action Item PGR
Dim conns1 As New ADODB.Connection
Dim rss1 As New ADODB.Recordset
Dim idexs1 As Integer
Dim sss1 As String
''On Error GoTo errorHandler
conns1.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=" & App.Path & "\EPMTDB.mdb;" & _
"Uid=;Pwd=;"
Set rss1 = New ADODB.Recordset
rss1.CursorType = adOpenKeyset
rss1.LockType = adLockPessimistic
rss1.Open "select * from StepSI", conns1
idexs1 = 0
For i = 0 To 2
Check(i).Visible = True
Next
For i = 0 To 2
Check(i).Caption = rss1!APGR
rss1.MoveNext
Next
' here I need the code, when the user click on 2nd check box gets the message box
For i = 3 To 9
Check(i).Visible = False
Next
rss1.Close
conns1.Close
End Sub
modified on Wednesday, May 27, 2009 8:09 PM
|
|
|
|
|
Where is this sub being called from? It would appear that it's just setting some values for your checkboxes, it's not handling the on click event of any checkbox.
You would need something like
private sub chkbox2_click (ByVal sender As Object, ByVal e As System.EventArgs) Handles chkbox2.Click
msgbox "you clicked checkbox 2"
end sub
|
|
|
|
|
Thanks
This does work, however in my program, there ate multiple conditions,
let me explain you in this way:
i have a list box that has 5 categories
1. if you select the first category, you get 5 check box and the message needs to be displayed ONCE the user clicks on the 3rd check box
2. if the user selects the second category, you get 10 check boxes and the message needs to be appeared , ONCE the uset checks the 7th check box with the different message
i tried the prevous code, ever time the 2nd checkbox is checked it is trowing the message
Please help.
|
|
|
|
|
hi there,
I am in a little trouble here. I have a database with employee names details etc.. and I also have a child sub table for their absence. what I want my program to do:
I have a list box that loads full employee names and selects the record
once I click on it I want it to display the info from a child sub table according to the name selected.
I already know how to write to the child sub table but do not know how to display it.
any help would be appreciated.
the code I have written so far fills up the list box with all absence disregarding individual record.
this is what I've written to insert the record into the child sub table. What I want is to display all the things that I add into the list box. some man suggested to have a look at "master-detail" on google but unfortunately the code is too complicated to be able to study it in short time. I need it ASAP as I cannot start doing another piece once this is sorted.
thanks to all people who help
Holidays = txtholiday(0).Text
Sickness = txtSickness(0).Text
Off = txtOff(0).Text
Holidays1 = txtholiday(1).Text
Sickness1 = txtSickness(1).Text
Off1 = txtOff(1).Text
AbsenceID = txtid(0).Text
intDay = cboDays.Text
conConnection.Open
With cmdCommand
.ActiveConnection = conConnection
.CommandText = "SELECT * FROM tblmain WHERE fullname = '" & fullname & "';"
.CommandType = adCmdText
End With
With rstRecordSet
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open cmdCommand
End With
With cmdCommand
.ActiveConnection = conConnection
.CommandText = "INSERT into tblAbsence (AbsenceID, Holidays, Sickness, Off, Holidays1, Sickness1, Off1, DaysTaken) Values ('" & AbsenceID & "', '" & Holidays & "', '" & Sickness & "', '" & Off & "', '" & Holidays1 & "', '" & Sickness1 & "', '" & Off1 & "', '" & intDay & "')"
.CommandType = adCmdText
.Execute
End With
|
|
|
|
|
Hello Friends,
I like to accept a string and convert the case of the characters using vb .net
eg Input String : aBcDE
Output String : AbCde
depanding on the user selection
Thanks In Advance
Praveen
modified on Wednesday, May 27, 2009 5:17 PM
|
|
|
|
|
OP before modficiation
<blockquote class="FQ"><div class="FQA">Member 4514218 wrote:</div> Hello Friends,
I like to accept a string and convert the case of the characters using vb .net
eg Input String : aBcDE
Output String : ABCDE
Output String : abcde
depanding on the user selection
Thanks In Advance
Praveen </blockquote>
My Response
Check out the <code>String.ToUpper()</code> and <code>String.ToLower()</code> methods, you can use <code>Radioboxes</code> for the selection,
and read your class book before bringing homework here.
The OP first asked how to make a string either all upper or all lower case based off user selection, which is why the above post exists here. Don't want you guys thinking I posted random garble
See post below for response to *current* thread.
modified on Wednesday, May 27, 2009 5:39 PM
|
|
|
|
|
EliottA wrote: Don't want you guys thinking I posted random garble
Nah. Just making up random questions now?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: Just making up random questions now?
Those are the only ones I know the answer to
|
|
|
|
|
Keep up the good work.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
So you just want to flip each case?
Way to change the requirements after I answer your other post.
It usually goes against me to do someone's homework for them, and after I posted my other reply I initially had regret, going against my common practice.
This time I stick to it, go read your book or you will fail your course.
|
|
|
|
|
Easy. Convert to ASCII, XOR all letters with 0x20, convert back to Unicode.
Now what should happen with some specials, such as the trademark and registered signs?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Need to be able to specify a month, date, and year for a db record and use the data later to produce results based on monthly/yearly production. New to programming, have read a bit about date functions and I see a couple different ways I could go about this. Was wondering if anyone wants to steer me to the easiest, or most efficient method of going about designing the logic.
Example
Loan office has loans working, or closed. Want to be able to generate monthly/yearly projected and closed figures.
What is the best way for me to work with the dates involved?
Thanks in advance for the advice.
|
|
|
|
|
I'd store the date information in the database as Dates. You can generate reports between any two dates you want.
Or are you asking how to get the date information from the user?? Perhaps the DatePicker control in the ToolBox?
Your question is pretty vague so it's difficult to come up with a proper answer.
|
|
|
|
|
Very vague, I understand and apologize. My only concern with simply storing the info as date in the db is that I want the program to upon loading, select certain records, say for the current month or current year, and perform some basic mathematical calculations etc. So with my extremely limited programming knowledge, I guess I am not sure how I could go about pulling say 3 of 10 records based on the current month I am in or current year etc. Does that help or only make only more vague =]
|
|
|
|
|
It barely helps, but you're just retrieve records for the current month quite easily. Code the SQL query to retrieve records between two dates. You first generate a date using the current month and year, just adding the 1st of the month to create something like 5/1/2009. Your second date would be todays date. Then use those as the bounds for the query and retrieve youre records. You can even do some of the math in the query if need be.
But, if you're new to programming, I would seriously pickup a beginners book on VB.NET before going forward with this project. The .NET Framework is pretty huge and there's a lot to learn that can make it much easier to code your app instead of guessing at things.
|
|
|
|
|
Hi all
in VFP, When I begin to work with a project, I create control that is a subclass of it is baseclass, then I code what I want to this subclass, then I drag it and put it on the form. and I use this subclass in all my forms later on.
Now to make that in vb.net I found the UserControl is the closet control to do what I want.
Q1: Is UserControl is the right direction to achieve what I want?
I have did some tests on UserControl and I have these questions
1- Why it gives warning in 'Me.Version = "1.0"
2- Why it gives warning and my vb crashes and could not be restarted unless I close all vb IDE's in Version = value
3- Should I assign a new variable (m_version) for each property I want to add? Cannot I work directly with property?
4- When I drag the control to my form, I notice that the control (Textbox) (width and height) are not expanded to take the the Length and Height of the Usercontrol. Should I handle that manually?
5- I have included many code in the Get, so I would like to know what is the best I should use.
Public Class UserControl1 ' I add Textbox
Dim m_Version
Property Version()
Get
'Version = "1.0" ' Worked Fine
'Me.Version = "1.0" ' Warning 3 Property 'Version' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.
'Return "1.0" ' Worked Fine
Return m_Version ' Worked Fine
End Get
Set(ByVal value)
m_Version = value ' Works Fine
'Version = value ' Warning 3 Expression recursively calls the containing property 'Version'.
End Set
End Property
End Class
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Case sensativity, Version is a property and you're using it as a variable, so Version = value wouldn't work, I'm assuming your Version property is referencing m_Version, a private variable that the property Version reflects on.
Samir Ibrahim wrote: 'Me.Version = "1.0" ' Warning 3 Property 'Version' doesn't return a value on all code paths.
will not work, nor should it, you should use
Return m_Version
which is your private variable
Consider the property Version as an interface to your m_Version variable, you do not change the Property but merely what the Property reflects.
|
|
|
|
|
Thank you. Appreciated your answer.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Samir Ibrahim wrote: 1- Why it gives warning in 'Me.Version = "1.0"
Because the Get part of the property must return a value to the caller and your code apparently doesn't do that. Since a Version property should never be set by a caller, your code should read, as a ReadOnly property:
Public Class MyControl
Private Const m_Version As String = "1.0"
Public ReadOnly Property Version() As String
Get
Return m_Version
End Get
End Property
End Class
Seriously, pick up a beginners book on VB.NET. The problem you're having has nothing to do with subclassing or anything of the sort. You're missing a basic understanding of how Properties work.
|
|
|
|
|
You know something?
It became hard for someone to ask simple question and he got an answer without the person who answer the question show his arrogance and he know to much and he reads a lot of books and all should do as he did.
well, I have something to say to you, I am not a beginner, I know classing and subclassing more than you can imagine. 6 month of learning vb.net and i finished my first sql server vb.net application and my company work on it now.
Search for "imdb dll" or "imdb.dll" in google, it is a dll based on class i create it.
I was in top contributor in many vfp forums, and i am giving help in vb.net forums as well.
It seem the person should be as***le and super arrogance in order to get some respect.
-if Return Version is wrong then this is bu***hit design
-If Every Property should be replaced by a variable, that is bu***hit design
-If creating a UserControl and put some coding in it, and then drag this Usercontrol to a form and the code written in the UserControl design being executed in the form, well if that is not subclassing I wonder what it is.
Dave Kreskowiak wrote: pick up a beginners book on VB.NET
I will follow your advice and get a beginner vb.net book plus a milk biberon
I had enough of asking help in here.
Thanks.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Samir Ibrahim wrote: You know something?
It became hard for someone to ask simple question and he got an answer without the person who answer the question show his arrogance and he know to much and he reads a lot of books and all should do as he did.
well, I have something to say to you, I am not a beginner, I know classing and subclassing more than you can imagine. 6 month of learning vb.net and i finished my first sql server vb.net application and my company work on it now.
Search for "imdb dll" or "imdb.dll" in google, it is a dll based on class i create it.
I was in top contributor in many vfp forums, and i am giving help in vb.net forums as well.
It seem the person should be as***le and super arrogance in order to get some respect.
Excuse me, but where was I "super arrogant"?? I'm not out here try to grab respect. I'm out here trying to help people WHO WANT IT. IMHO, it's your response here that is "super arrogant".
I pointed out that you don't have a basic understanding of how Properties work, which is beginner-level knowledge. If you can't accept that, I'll just throw you on my blacklist of people I'll never help again.
Samir Ibrahim wrote: -if Return Version is wrong then this is bu***hit design
Excuse me, but you wrote that code, not me. If you want to say that VB.NET's syntactic requirements are bullshit, go back to writing VFP code...
Samir Ibrahim wrote: -If Every Property should be replaced by a variable, that is bu***hit design
I never said that. Every property has to support either a Gettor, a Settor, or both. Either/Both of which much be backed by a constant, a variable, or some other storage, to make the property usefull. If you understood the basics of Properties, you never would have said what you did.
Samir Ibrahim wrote: -If creating a UserControl and put some coding in it, and then drag this Usercontrol to a form and the code written in the UserControl design being executed in the form, well if that is not subclassing I wonder what it is.
I never said that wasn't subclassing. I said the problem you have in your code HAS NOTHING TO DO WITH SUBCLASSING.
Samir Ibrahim wrote: I will follow your advice and get a beginner vb.net book plus a milk biberon
I had enough of asking help in here.
Fine, I'll throw you on the blacklist then. I'm not the one being super arrogant.
|
|
|
|
|
Dave Kreskowiak wrote: I'm not out here try to grab respect
Maybe/Maybe not. But you got mine.
Dave Kreskowiak wrote: I pointed out that you don't have a basic understanding of how Properties work
I know how property work and should work. I just HATE how property work in vb.net
Dave Kreskowiak wrote: Samir Ibrahim wrote:
-if Return Version is wrong then this is bu***hit design
Excuse me, but you wrote that code
Yes I write that code in my app and it gives error which is not logical error in my understanding of how PEM's should work in a class. I did not say you write that neither you mention it. That was an expression of my thought.
Dave Kreskowiak wrote: I said the problem you have in your code HAS NOTHING TO DO WITH SUBCLASSING.
What/Where is my problem in my code?
Did you notice the remark ' I put in front of the lines? did you notice the remark I put after the ' "works fine" or "gives warning", I managed to make the property work before I ask this question. I read and search google and reading in 3 books and when I sleep and I dream That I am searching google.
All I was asking is "Why it is giving warning"
It's hard to threw 15 years of "any Language" experience behind your back and start learning new language from scratch.
In my stupid mind, when you are working in class and you code Me.Version or just Version , LOGICALLY they both should point to the same property. Yes I find that not logical and has no reason to give error.
Eventually, You was right. I DON'T UNDERSTAND HOW PROPERTY WORK IN VB.NET
The capital letter is for emphasizing not shouting.
Dave Kreskowiak wrote: Excuse me, but where was I "super arrogant"??
I had one point to fix about "as***le and super arrogance"
I did not mean to say that about you, I am saying that about the Post Owner PO. although after reading my post it seems like it is towards you.
Sorry for that, A thought in mind translated in wrong way. please accept my apology.
In short, 15 years programming experience, I cannot accept "read beginner book" as an answer, but I can accept "Vb.net Work Like that either you like or no"
I am feeling nervous and upset from my self not from you.
Sorry.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Samir Ibrahim wrote: It's hard to threw 15 years of "any Language" experience behind your back and start learning new language from scratch
Okay Doofus, explain why, if your elite skills are so good, you are asking why writing a function (forget that it's a property for the moment) without returning a value causes a compiler warning that there is no value returned?
Let's go back to OO school:
Getter methods are used to RETURN a value without changing anything.
Setter methods are used to CHANGE a value without returning anything.
Which bit do you not understand? This is NOT VB.Net nor M$, it's first principles.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|