|
Yeah....ok. And why are you replying to a 4 year old message??
|
|
|
|
|
Is it possible to sort a record in crystal report using Formula Fields? Example: I want to sort my List of Depositors base on there Balance... Wherein Balance = Sum({Deposit} - Sum{Withdrawal}... ?
|
|
|
|
|
Create a new Group based on the formula.
Tom Garth
Developer
R. L. Nelson and Associates, Inc., Virginia
|
|
|
|
|
Does any one know how to create a drop-down menu on a LinkLabel?
I want to create a LinkLabel called 'Language', once a user clicks on 'Language' further links will show i.e France, English, Spain ect. The user then select the language type.
Ian Wells
irwells@hotmail.com
I'm useing Visual Studio.net 2005 - Visual Basic
|
|
|
|
|
Hi Ian,
Assuming that you are talking about a windows form and not a web page, the answer is: you can't. The LinkLabel is simply not the correct control for this.
However, despair not. There are ways (from easy to difficult):
1. Instead use the ComboBox control which is pretty much the windows forms version of the drop down menu as found on web pages. (the pragmatic solution)
2. create a little form and populate it with buttons or labels or something, with the language alternatives you want. Make it look the way you want and make it appear right under your LinkLabel when you click it. (i.e. fake it)
3. Make a custom control that looks and acts the way you want. Best would probably be again to inherit the ComboBox control, and change its appearance. This solution is basically the same as number 1. except that it is a lot more work. (the stubborn solution)
Good luck with it,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi Johan,
I've taken your advice and created a combobox instead.
Many Thanks
Ian
|
|
|
|
|
Hi.
I have this code:
for i as integer=0 to array.lenght-1 <br />
if array(i)=value1 then<br />
var=true<br />
end if<br />
if var=true then<br />
....<br />
next
I need to set the value1 on the first position of the array and the first position of the array must be set on the last position of the array.
I don't have any idea.
thanks
|
|
|
|
|
WhiteGirl23 wrote: I need to set the value1 on the first position of the array and the first position of the array must be set on the last position of the array.
In that order? If you do it in that order then value1 will be set on the first and last positions of the array.
Try this:
array(array.Length - 1) = array(0)
array(0) = value1
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
no.isn't good.
I want to keep all the values of the array.
In array(array.length-1)=must keep the first position of the vector before I make array(0)=value1.
|
|
|
|
|
Please always paste the actual code, in case a typo changes the context of something.
How do you mean ? You want to swap the first and last items ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
example: I have a string :123#123.123#(local)
I split this string:
array()=string.split("#")
I'm looking for a value on this array.I take (local)
I found the position of this value:array((2).
I want to move array(2) on the first position of the array,but I don't want to loose elements of the array,and the last position of the array must be=123.
Something like this:
string=(local)#123.123#12 3
Thanks.
|
|
|
|
|
So you want to *swap* the elements.
So you do this:
dim o as object = array(0)
array(0) = array(array.Length = 1)
array(array.Length - 1) = o
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hai
I have inherited datagridview control as custom control and added one textbox control on it. I have added some code in textbox keypress(or keyup,keydown).
The problem is
When i press enter key the event doesn't raises but other keys works.
what is the broblem here? pls explain
Thanks
|
|
|
|
|
Dear every one,
hope you will be in good a health.
dears, i want to know clear scienaro of Classes and inheritence. i have books and material on classes and inheritence but unable to understand clear scene.
please clear me by examples that ..
What is a class
What is a subclass
what is inheritence
what is class functions
what is architecture of a class
why we use classes
how we use classes
is it a good practice to use a class
where classes exists
what are namespaces
mean i want to know every thing round the class that can clear my mind and enable me to speak about these topics in a meeting
thanks
|
|
|
|
|
Googling^
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
You've asked for a book. Why not instead go out and buy one ? If you can't understand the books you have, I don't see how us writing a new one in a forum reply will help. Try working through the books and asking a specific question. Surely you get the basic concept. If you have the materials, and you don't know what a class is, or what inheritance is, then I really don't know how anyone can help you.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Hi,
I need to make a custom search function in webbrowser control. I found the following post somewhere:
WebBrowser1.Navigate("c:\readme.htm")
Dim htmldom As mshtml.IHTMLDocument2 = CType(WebBrowser1.Document.DomDocument, mshtml.IHTMLDocument2)
htmldom.execCommand("SelectAll", False, Nothing)
htmldom.execCommand("Copy", False, Nothing)
Dim str As String = Clipboard.GetText
Dim range1 As mshtml.IHTMLTxtRange = CType(htmldom.selection.createRange(), mshtml.IHTMLTxtRange)
range1.findText("microsoft", 0, 0)// 0,0 means the first hit, 1,1 second hit like this.....
range1.select()
The problem is that it doesnt seem to select all occurances in the page, e.g. if I search the wikipedia page on Stalin for "stalin", it will move between two instances of the word on the page and not go to the rest. I have replaced the two 0s in the findtext method with a variable counter initially set to zero. Anyone have an idea as to what the problem could be?
Thanks!
Ahmad
|
|
|
|
|
Ahmad Zaidi wrote: range1.findText("microsoft", 0, 0)// 0,0 means the first hit, 1,1 second hit like this.....
comment is completely wrong
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ahmad Zaidi wrote: range1.findText("microsoft", 0, 0)// 0,0 means the first hit, 1,1 second hit like this.....
Actually, that's not what those two parameters mean. You still have to provide the string to search for, but the first number is the number of characters into the range to start the search. The second number is a flag specifying:
2 Match whole words only.
4 Match case.
So, your line of code actually means "search for 'microsoft', starting at the beginning of the range, the search term can be inside other words, and can match any change of case.
I'd start by looking at how you're getting the range of text to search and if you're getting everything you expect.
|
|
|
|
|
Hi Dave,
Thanks alot for the reply. Here is the code I am using:
Public Function findString(ByVal wordToFind As String, ByVal myIndex As Integer) As Integer
Dim htmldom As MSHTML.IHTMLDocument2 = CType(wBrowser.Document.DomDocument, MSHTML.IHTMLDocument2)
htmldom.execCommand("SelectAll", False, Nothing)
htmldom.execCommand("Copy", False, Nothing)
Dim range1 As MSHTML.IHTMLTxtRange = CType(htmldom.selection.createRange(), MSHTML.IHTMLTxtRange)
frmSearch.Hide()
Me.Activate()
range1.findText(wordToFind, myIndex, 0)
range1.select()
range1.collapse()
myIndex += 1
Return myIndex
End Function
myIndex is the counter which as you can see is incremented each time the funciton is called. I was thinking the same thing that you mentioned, that maybe I am not getting the whole page searched, but cant figure out how to do that. Any ideas?
Thanks,
Ahmad
|
|
|
|
|
Ahmad Zaidi wrote: Dim htmldom As MSHTML.IHTMLDocument2 = CType(wBrowser.Document.DomDocument, MSHTML.IHTMLDocument2)
.
.
.
Dim range1 As MSHTML.IHTMLTxtRange = CType(htmldom.selection.createRange(), MSHTML.IHTMLTxtRange)
So what's the text look like that's being returned by this code? I'm willing to bet it's not what you think.
|
|
|
|
|
Say if an addon is already installed , and i use a webbrowser component from either ieframe.dll or shdocvw.dll . Will the plugins work when the app is executed,or do i have to write some code to integrate the plugin?If I have to,whats the code?
|
|
|
|
|
I dont' know for sure, but you'd probably have to write the code to implement IE's entire plugin interface. Don't ask me how to do it. From the little I've researched into this, it's a LOT of work.
|
|
|
|