|
I have 2 forms Form1 and Form2
In form1 I have 105 small textboxes that are being filled through listbox
This is the code used in Form2:
Click event
Dim fi As New Form1
TextBox1.Text = TextBox1.Text & _
"cast(case when Vert1 = " & fi.TextBox23.Text & " then '1' else '0' end as int)+" & vbCrLf & _
"cast(case when Vert2 = " & fi.TextBox24.Text & " then '1' else '0' end as int)+" & vbCrLf & _
"cast(case when Vert3 = " & fi.TextBox25.Text & " then '1' else '0' end as int)+" & vbCrLf & _
"cast(case when Vert4 = " & fi.TextBox26.Text & " then '1' else '0' end as int)+" & vbCrLf & _
"cast(case when Vert5 = " & fi.TextBox27.Text & " then '1' else '0' end as int)+" & vbCrLf & _
"cast(case when Vert6 = " & fi.TextBox28.Text & " then '1' else '0' end as int)+" & vbCrLf &_
"" & "" & ""
In textbox1 no value is writen for textbox23 to textbox28 of form1
Can sone one help?
modified on Tuesday, July 7, 2009 7:36 AM
|
|
|
|
|
Dobrobit wrote: Can sone one help?
Yes, give up, change majors now, development doesn't seem your cup of tea.
only two letters away from being an asset
|
|
|
|
|
105 text boxes on a single form?!?! There are so many things wrong with this it's silly.
First, your control names suck. Calling them "TextBoxn" means nothing but a headache. I would NOT want to come in to maintain your code.
For each click event, you're adding the contents of the TextBox1 to itself, thus doubling its content every time you click a button.
You didn't mention any kind of a problem you're having, so it's pretty much impossible to tell you what you did wrong, other than the horrible design choices.
|
|
|
|
|
105 textboxes is nothing in my program.The aproprate number is7x 30 = 210 textboxes
I have solved the problem myself through split methodes
Thanks
|
|
|
|
|
fi.TextBox23-28 are on a form that was just instantiated. Unless there is something in the default constructor of Form1 that changes this, they will be empty by default.
|
|
|
|
|
In .Net, we know multithreading, but is it possible to do multi-processing, if I really need, like in C/C++ env?
Or multi-appdomain is the alternative in .Net?
Thanks,
|
|
|
|
|
Not sure what you mean, here. Your use of the word "multi-processing" is ambiguous.
True multi-processing requires more than one processing unit. With kernel-level threads, which .NET has, you can have multiple threads run on multiple processors.
If you're asking can .NET spawn new processes (like fork()), then, yes, it can do that, too.
Finally, AppDomains offer a lighter-weight, dedicated memory in-process process.
Does that answer your question?
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks.
Basically, just same as you said like fork() in Unix, the new created process will run in its own process container and truly isolated from the parent process, so failure in this process won't bring down others. whether it's supported in the kernel mode or the user mode, is not the concern yet.
As you said, "it can do that", can you direct me to some info of how to do it?
Thanks.
|
|
|
|
|
Just look up the System.Diagnostics.Process class.
|
|
|
|
|
Here you go: a link to the Process[^] class.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks you and Dave Kreskowiak, but looks like that this System.Diagnostics.Process class just provides access to local and remote processes and enables you to start and stop local system processes, not let us create a new process and let us run our code in it. Or I might get something wrong, could you give me a small example?
|
|
|
|
|
If you're looking for the C# equivalent to
<font color="green">
if(fork()) {
<font color="green">
} else {
<font color="green">
} then I have to disappoint you by reporting that the .NET runtime supports no such system-like call.
However, I would challenge the decision to do this by saying, "Hey, that's provedural code out the yin-yang and, since we're ostensibly using an object-oriented framework, then we should seek object-oriented solutions."
Just my 0.02 USD.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Don't know if this is intellisense per se, but when calling a function from within the same class you can type "(" or "," and that tooltip box pops up with the parameter list. Is there anyway to get summary info to display in there?
Example:
The tooltip might show " int MyFunction(int,int) ".
I guess I'm looking to see something like " int MyFunction(int MaxValue,int MinValue) ".
Thanks.
|
|
|
|
|
Hi,
that would need structured comments; here is a C# example:
void logUnformatted(int logLevel, string s) {...}
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.
|
|
|
|
|
Thanks,
But I've been trying that in C++ with no luck. According to some posts it looks like this only 'works' in C#. Anyone know if this is still true? I'm using VS 2008, hard to believe the ability is not there.
Even as is, the xml tags show up in intellisense and nothing has changed in the tooltip.
|
|
|
|
|
Hi,
it works for me in C# and IIRC also in VB.NET
Don't know about managed C++, I suggest you look it up in the documentation.
BTW: there was a recent lounge discussion stating VS2010 did not yet offer Intellisense AT ALL for managed C++ ...
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.
|
|
|
|
|
In vs2008, when u place the cursor over the function's call, it just shows up.
|
|
|
|
|
I'm about to convert an old MFC app that I wrote a long time ago that lets me manage my browser cookies. I was using the WinInet APIs and was wondering if MS has written an interop wrapper for the DLL. No luck so far on MSDN or searching here at CP. It's no big deal to write my own interop wrapper class, but I don't want to reinvent the wheel if it's already been done.
QRZ? de WAØTTN
|
|
|
|
|
Hi guys, Ive got a complex problem that I could really use some help / opinions on.
Iam in the process of extending the webservice class to add some additional functionality that I require.
I have a requirement where I need to write ALOT of public webservices for various things in my application. Natively the webservices return xml which is great for the public side of the interface but I would also like them to have the ability to return something other then xml - say html or CSV.
So I have written some XSLT that will run against the XML output of the webservice and transform it into whatever I require. The problem is I want to be able to switch the output of the webservice form xml to my xslt output by changing the request type for say "text/CustomXSLT". I would like to do this so I dont have to implement 2 methods for each webmethod just to cover my requirement.
To do this I have implemented a method attribute that marks a webmethod also as an xslt method:
[
XSLTMethod ("CaseSearch_HTML_Table.xslt" , typeof (SearchCases))]
I have taken the lead from this code project article (see link below) and implemented a very similar system where by I can intercept the method call and manually invoke the method with reflection and put out the correct response.
Extending an existing ASP.NET Web Service to support JSON[^]
However I have hit a road block. All the input parameters in the request.form collection are strings. To make my extension class generic I will need to either write some kind of generic type marshaller to go from string to value or do something else totally horrid.
Iam so close to getting something working here which has alot of value to me but this could be a show stopper. Iam very new to reflection in .net so iam hoping there is alot i dont understand. I was trying to get the .net source so I can see how the standard webservice class handles this kind of type marshalling and see if there is anything i can reuse but the link to the source on the MS site is down
Thanks in Advance for any help
Mike
|
|
|
|
|
which date should i assign, which safe from user changes
modified on Monday, July 6, 2009 8:26 AM
|
|
|
|
|
vishal lele wrote: Hi I want to use the bios date in my application
They BIOS date? Why would that be any different from DateTime.Now ?
|
|
|
|
|
Additional answer based on your modification:
vishal lele wrote: becase sytem date will may be change by user so it will extend expiry period of application
Changing the system date by the user will update the bios date!
DateTime.Now gets the date from the BIOS.
|
|
|
|
|
You could save the "current" date (on installation) and ask (over the internet) for the current date and time. There's a time-server @ time.windows.com
I are troll
|
|
|
|
|
I have a simple C# exe. It internally has some calls to custom interop. I dont have any problem in executing it manually by either double clicking the exe or thru command prompt, everything works as expected. But the moment i launch it using windows scheduled task it always fails.
Is this a know problem with interop calls, when an executable runs thru scheduled task? it fails at the point where i make a method call on the interop object. BTW i am using W2K.
Any suggestion/solution?
Thanks in advance....
Hariharan.T
|
|
|
|
|
Hariharan.T wrote: Is this a know problem with interop calls, when an executable runs thru scheduled task?
What is the difference between you running it and a scheduled task running it?
Hariharan.T wrote: Any suggestion/solution?
Most likely when you run it, it will be running in the security context of you as a logged in user. When the scheduled task runs it it will most likely be running in the context of what ever the task scheduler is running as, which will be SYSTEM (on Windows 2000)
|
|
|
|