|
harieshkumar.n wrote: iam shaking my head for about a weak to do tyhis
And I thought, Perl != HeavyMetal .Rentacoder is what you need.
|
|
|
|
|
hi,i am trying to design a property grid that consisits of multiple drop downs of user defined and move those values selected to a variable in back end vb.net code and perform some matha matical calculations.
But i am not able to create multiple dropdowns in single group can any one help?
My main problem is i am creating multiple drop downs using class for each dropdown.i created one drop down but i can not able to create multiple.
Getting error called base class have multiple definetions. code i am trying for drope down is:
Imports System.ComponentModel
Public Class MotoList1 : Inherits System.ComponentModel.StringConverter
'''
'''
Private _Title As String
Private _Show As Boolean
Private _Number As Short
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute(""), _
DesignOnly(False), _
DescriptionAttribute("Enter Title for the application")> _
Public Property Title() As String
Get
Return _Title
End Get
Set(ByVal Value As String)
_Title = Value
End Set
End Property
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute("True"), _
DesignOnly(False), _
DescriptionAttribute("Show option")> _
Public Property Show() As Boolean
Get
Return _Show
End Get
Set(ByVal Value As Boolean)
_Show = Value
End Set
End Property
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute("0"), _
DesignOnly(False), _
DescriptionAttribute("Enter a number")> _
Public Property Number() As Short
Get
Return _Number
End Get
Set(ByVal Value As Short)
_Number = Value
End Set
End Property
Dim _Motor1in As String() = New String() {"400", "500"}
Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
Return New StandardValuesCollection(_Motor1in)
End Function
'''
Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return True
End Function
'''
Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return True
End Function
'''
End Class
here while am trying to create another drop down --GetStandardValues-- i got error as function can not be over ride
that is the my problem
|
|
|
|
|
You've posted a whole lot of crap here, I'm not even going to wade through it.
bhargava2409 wrote: i got error as function can not be over ride
Sounds like your problem is a lack of programming knowledge in general. It's hard to say in all of this if it's clear why you get this error, but it's obvious you're doing something wrong, on a very basic level.
bhargava2409 wrote: Getting error called base class have multiple definetions
A .NET class can only have on base class. Again, it's hard to see what you're doing based on what you posted, but you posted a lot of boiler plate stuff. Perhaps if you distill this down to the code that matters and post the actual error message. If you can't work out what code relates to the message, that's another indicator that you're out of your depth.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Yesturday you asked me to post the whole detailes of the question with program in detailed then i posted this one to u.
|
|
|
|
|
Your code looks fairly standard as far as property grids go.
My suggestion:
Create a new project with a property grid that contains just one combobox setting. Get that to work and then expand the other settings from there. Start small and get a working grid, then go crazy.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Your problem is important to you, it does not matter to most of us. Therefore you have to make it easy for us to help you.
Use <pre> tags around your code, so that it can be formatted properly, you know, with indentation and so on. Only post the parts that are obviously connected to the problem. Post the exact error message, if there is one and indicate which line causes the error.
The easiest way to format your code is to move the cursor to a blank line in the 'reply text box' and click the 'code block' widget (look below the reply box), this will put the <pre> tags in place for you. Then copy your code in your editor and paste it between the tags, all the formatting will be preserved.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
There's no need to repost the same question over and over. In fact, yesterday's still shows on the first page (w/ 50 items displayed).
If there's no replies, then we probably don't know or the question was completely clear, in which fact, you should reply to add info to the orig post. Not repost the same info again in a new thread.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
thanks every one for u r replays.I got solution for that.
|
|
|
|
|
hi all
i am working on a multi threaded app
now in app, 5 or more threads have to write thousands of lines in a text file simultanously
i know this kills the cpu but no prob there
i have the lines to be written in an static array (I think static makes the process faster.is it true?)
my code:
For co% = 0 To (strarray.length - 1)
writer.WriteLine(strarray(co))
Next
where writer is StreamWriter
i do the flush close etc
my prob is that all files are not being written
if array has 25000 elements then
sometimes only 10000 or sometimes 15000 are written
should i try a timer instead of loop?
if not kindly suggest someother means.
TheMrProgrammer
|
|
|
|
|
TheMrProgrammer wrote: i know this kills the cpu but no prob there
No, it kills the file if multiple threads try to write to it.
TheMrProgrammer wrote: (I think static makes the process faster.is it true?)
No. Seems like you have no idea what you're doing.
TheMrProgrammer wrote: sometimes only 10000 or sometimes 15000 are written
Because your different threads are going to clash. Try using one thread, given that your array is static, the data is always the same, so having 5 threads trying to write the same file, is kind of retarded, right ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
LOL - so blunt.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
sorry
i forgot to mention that all the threads write to separate files.
now suggest some means
TheMrProgrammer
|
|
|
|
|
Your data source is static. I presume your problem is still that you have threads writing files as the data is being filled. Overall, it sounds insane to me.
If you're saying that some of the data in the middle does not get written, then I assume this means that your problem is still one of concurrency. Why do you have 5 threads all writing at once ? do they write to the same HDD ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
hi christian
my program is a file searching utility
i have made a class SEARCHER which goes to all directories and gets the
files that match the search string.
i wanted to index all files present in HDD
so i made an array of SEARCHER with size = all drives and call it using *.* as search string. all members are called in a separate thread so as to do all
drives at once
i have added a list box which displays the found files.
then i iterate through all items of listbox writing them one by one
I have dropped the static arrays
but the prob persists. if total items are 25000
then only top 15000 or 10000 are being written
Christian Graus wrote: you have threads writing files as the data is being filled
no when the list box is filled then only the writing starts
Christian Graus wrote: do they write to the same HDD ?
yes they write to the same HDD
Christian Graus wrote: Why do you have 5 threads all writing at once ?
to write more in less time.The no of threads depend on the number of drives that are ready.
i also tried running a single thread.
in it also, only some files of top are being written.
TheMrProgrammer
|
|
|
|
|
Hi,
you failed to clearly tell us what you are doing. Writing data, any data, to different files, using one thread per file, can be done correctly, which does not mean it always makes sense. If you want detailed help, show us some code (in PRE tags!) for two of those threads and files.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
hi Luc
please read my reply to Christian
TheMrProgrammer
|
|
|
|
|
Hi,
you didn't show any code, at least you explained a bit.
"so i made an array of SEARCHER with size = all drives and call it using *.* as search string" is ambiguous; at best you have a double risk:
1. the number of files returned by GetFiles/GetDirectories could be huge, you may run out of memory
2. you may encounter "access denied" problems on special folders such as "System Volume Information".
Both of these would show up if you were using try-catrch blocks showing all available exception information, i.e. using Exception.ToString(); qnd everything would vanish silently if you are just swallowing exceptions.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
thamks for your suggestions Luc
but my problem is that out of 25000 files in the
list box only top 15000 or 10000 are being written
i tried putting the contents of the list box in a string variable
but without success
For x = 0 to listbox1.Items.Count-1
strVar &= listbox1.Items(x).ToString
Next
my.comp.filesystem.writealltext(filepath,strVar)
but instead "#ERROR 488# is written
TheMrProgrammer
|
|
|
|
|
TheMrProgrammer wrote: For x = 0 to listbox1.Items.Count-1
strVar &= listbox1.Items(x).ToString
Next
for counts of many tenthousands, this is non-seense: the final result would probably be a string with a length exceeding one million characters, however building it also creates tenthousands of intermediate strings of growing length, so your code is bound to be extremely slow, and may well run out of memory.
furthermore, there was no need whatsoever to concatenate everything, since File class also has a WriteAllLines() method, which takes an array of strings.
finally, if you do not absolutely need to hold lots of data in memory, then don't. Just write the text lines as you get them. I know you are failing here so far, due to reasons unknown to all of us as you still haven't shown us real code. Lacking that, I will not continue this thread.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hi everybody
I must declare some constants on VB.NET based on some C code that I have, like this.
#define ABCDE_FGH 0x00008603L
How could I do this on VB.NET? I get an error doing this:
Public const ABCDE_FGH = 0x00008603L
Public const ABCDE_FGH 0x00008603L
And I'm afraid to use this:
Public const ABCDE_FGH = "0x00008603L", because although I don't get an error, it would be only text...
Does somebody know something about this?
Thanks everybody
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|
|
garfield185 wrote: Public const ABCDE_FGH = 0x00008603L
Did you read the error ? What does it say ?
You don't have a type, just access modifiers. Try public const int, and if that doesn't work ( I dunno if VB supports 0x for hex ), try converting it to a decimal number in calculator and put that.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
hi
visual basic does not support ox00008603L
try with:
Public Const ABCDE_FGH As Integer = &H00008603L
or
Public Const ABCDE_FGH As Long = &H00008603L
|
|
|
|
|
Perfect.
Thanks both of you!
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|
|
i m making a project over bank management on vb.net but can't figure out where to start from
|
|
|
|
|
Click on file, then choose new, then choose project. From there, read the details of your homework, talk to your teacher if you are lost, and ask us if you have a specific question.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|