|
to the losers
Yo, Dave & Richard
U both suck that proposition
So why you are tryin'
To askin' the question
your turn mf's
|
|
|
|
|
I don't know who who are, or who you think you are, or what impression you are trying to make, but I would just like to offer the following advice;
Your method of answer, language capabilities, and presentation style will quickly alienate you within the community. The CodeProject is a community of professionals and hobbyists with a wide range of skills and all anyone here is trying to do is help each other.
Your style may work well and be accepted on other forums, but is not generally accepted on the this site (except maybe in the Back Room and SoapBox forums).
All that will happen is people will just start to ignore you, and then what assistance will be available to you?
Time to drop the teenager attitude and grow up, or it will be a future of 'extra fries' for you.
That is all I am going to say on the subject.......
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
And you have said nothing.
I ask concrete question. And you the professional start flame.
There's no right answer from you.
Is it professional to said everithing except the coverage of the topic?
Ask yourself, is your answers useful for me and maybe future "explorers" and hobbyists?
Count the flood answers! The problem remains unresolved.
So why you start answer the question you can't resolve?
And leave your reprimands to your kids if any.
|
|
|
|
|
The VB6 textbox doesn't expose any kind of methods for getting at the ContextMenu. You'll have to use Win32 functions to get at it and modify it. Warning! Not for the faint of heart or noobie of VB.
Example[^]
Keep in mind that Microsoft hasn't supported VB6 in years and the communities on the 'Net that are supporting questions like this are disappearing fast. I would highly suggest abandoning VB6 development and moving to VB.NET.
BTW: If you used VB.NET, this question would likely never have come up because it exposes what's needed to do what you want without poking around in Win32.
|
|
|
|
|
Oh, realy? Thank you, at least you are not trying to attaint me.
Can you post your realization of 'get at it and modify it'. I'm interesting only the point there you are getting handle of the context menu.
[with doubt ] You are not dglienna, right?
|
|
|
|
|
I don't have an example.
I abandoned all VB6 developement 9 years ago when I got my hands on the .NET 1.0 Beta.
P$YCH0 wrote: You are not dglienna, right?
Nope.
|
|
|
|
|
|
For your future reference, using bold inside a code block, does not show up very well. It would be better to do something like:
Public Sub New(ByVal lineIn As String)
parent = Trim(lineIn.Substring(0, colStarts(1)))
enfant = Trim(lineIn.Substring(colStarts(1), colStarts(2) - colStarts(1)))
des_F = Trim(lineIn.Substring(colStarts(2), colStarts(3) - colStarts(2)))
des_AD_F = Trim(lineIn.Substring(colStarts(3), colStarts(4) - colStarts(3)))
des_A = Trim(lineIn.Substring(colStarts(4), colStarts(5) - colStarts(4)))
des_AD_A = Trim(lineIn.Substring(colStarts(5), colStarts(6) - colStarts(5)))
draw_iss = Trim(lineIn.Substring(colStarts(6), colStarts(7) - colStarts(6)))
dnf = Trim(lineIn.Substring(colStarts(7), colStarts(8) - colStarts(7)))
baloon = Trim(lineIn.Substring(colStarts(8), colStarts(9) - colStarts(8)))
util_qte = Trim(lineIn.Substring(colStarts(9), lineIn.Length - colStarts(9)))
lastRowNum += 1
rowNumber = lastRowNum
SetDigitsAndSuffix(parent, parDigits, parSuffix)
SetDigitsAndSuffix(enfant, enfDigits, enfSuffix)
End Sub
Also, without knowing the values of colStarts() and lineIn it is very difficult to offer a sensible suggestion.
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.”
|
|
|
|
|
Hi Vijay
My guess is that the input file is not the format you expect i.e. does not have the header line with the fields that are expected.
If I'm right the colStarts() array won't be set up correctly - that might mean changing the function that creates the array.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
Hello David,
Hope you remember me.
The application produces thiss error message for only few input files. and more over, the input file is formatted to a desired format, so that the comparision between the 2 files are done easily.
The columns of the 2 files compared are the same.
|
|
|
|
|
Vijay
If you send me a copy of the files I'll have a look and see if I can spot what's wrong.
A copy of the class that is being used might also be useful - not sure I've got one from last year.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
Thanks for your reply.
Will send you the copy of the files.
|
|
|
|
|
What are the values of lineIn , colStarts(3) and colStarts(4) when the error occurs?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
|
Brilliant, and what does that tell us?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
so you get an exception at a specific line, and the message tells you startIndex and length don't fit the string you're working on. The ONLY logical next step is to have a look at the length of the string, and the values of startIndex and length.
startIndex and startIndex+length both must be in the range [0, stringLength] for obvious reasons. Go check it. And fix it. Don't tell me it works most of the time, I don't care. It has to work every time.
|
|
|
|
|
Hello,everyone! I have a question about operating XML file. I need to open a XML file which was a template when the application run, after I've input in TextboxA, the XML file could be saved as a new file in one folder. Then open the saved file again and other Textboxes' text will be written in its elements. (In text_changed event). My question is : I know how to open and save a XML file, but after I save it ,if I want to write new text in it , I need to load the file again?
When I write all text in XML, it would need open--write--save and repeat much times ?I think it is so fool……
So,could you give me some suggestions or help? Maybe I should use thread? But there are so much controls
Thanks !
|
|
|
|
|
No once you open the XML file original, load it into an in memory object, make all the changes, and write out to file, keep making more changes to the internal memory object, and write out the changes when you want to persist to file.
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
Hi, Dave! Thanks for you rely. But I didn't get it……Could you take an example for me?
Thanks a lot!
|
|
|
|
|
hi,
what is the ms access equivalent code of this.
'written in visual basic.net
Private Sub btnCommon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommon.Click, _
btnOK.Click,btnRegister.Click, btnDataTransfer.Click, btnClose.Click
Dim button As Button
button = CType(sender, Button)
'code here
End Sub
Note: there is no Handles in ms access.
i have a small program in access and lots of buttons. i want to hide one button and call all buttons. i dont want to have event in all buttons. that is why i need a code that can call all button. just like above.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
AFAIK there's no typecasting in VBA (or VB6 and before).
Sorry
I don't like my signature at all
|
|
|
|
|
trying to remember those days
but shouldn't you look at control arrays instead?
Control Array example
Other links from Google
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
IIRC you can't use control arrays in Access VBA - they were confined to VB6.
Vaguely recollect a project where we had to do something similar but can't recall it exactly (was about 1999/2000 ).
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
How do you get the SaveAs dialogue box to appear in VB.Net. With VB6 was it was the commondialog.
What I want is the SaveAs box to appear and I enter the filename and able to put it into a location.
|
|
|
|
|
Try to use the SaveFileDialog object.
|
|
|
|