|
First, ask yourself why you want to do this.
If you need to maintain a disperate group of variable values by name then perhaps you should use a dictionary, i.e.
Dim myVariables As New Dictionary(Of String, Object)()
myVariables.Add("myVarName", 2)
...
Dim i As Integer = DirectCast(myVariables("myVarName"), Integer)
If you really need to maintain class level fields then you'll have to use reflection to access the values dynamically, and you'll need a reference to the encapsulating class.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Hi there,
i have a little issue with form deactivation:
i use 3 forms: background form (form1), image form (form2) and list form (form3). i want to hide these forms when the background form (form1) gets deactivated but not when it gets deactivated by the other 2 forms.
that's how i start my application:
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
form2.show(Me)<br />
form3.show(Me)<br />
End Sub<br />
can anyone tell me a solution?
Thanks a lot.
|
|
|
|
|
your going to have to use a form manager(make your own) where you make calls into it via the activate/deactivate events of each form. then depending on who activate/deactivated show and hide form2 and 3...
hope this helps
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
How do I set the caret position in a textbox?
|
|
|
|
|
textbox.selectionstart/textbox.selectionlength
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi ..
Im looking for work out a way i can do math calculations in reportviewer. i've had a bit of a play and google somewhat but i think ill need someone to really tell it to me straight.
basically im looking to say do math caculation between to fields that the reportviewer generates.
so basically
col1 col2 col3 [calc amouts]<--- these column needs to calc all
10 5 15
20 10 45
30 15 90
i want col3 to continually do sums for each row without resetting
its previous amount.
hope this is clear some what..
thanks
Regards
Robbo
|
|
|
|
|
hi there..
i assume that u know how to use formula field.
so i'l gonna solve your problem as:
use a variable which stores the value of the previous row result and then add this variable to the sum of the current row result.
i hope you got it..!
J A Nasir K
|
|
|
|
|
Hi All,
I working on developing a windows application, i want to give user the permission to compress a specific directory and i want to knw how do we achieve it.
Note: I want to compress a Directory\Folder.
Thanks and regards,
Ashwin.
|
|
|
|
|
A quick google search for " vb.net compression" provides a range of pages dealing with that subject, some of them even with code examples.
278.000 results for vb.net compression. (0,08 seconds).
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi,
I´d like to save a file in an oracle database over oledb. The code was allready running for sql only. But it has also to work with oracle. So i changed my connection from sql to oledb. But since that it don´t work with booth. Something is wrong with the parameter @data in booth cases. Has anybody an idea?
Private Function SQL_Save_this_PDF(ByVal selection As String, ByVal where As String) As Boolean
Dim oledbConn As OleDbConnection
If Not CcPdfViewer1.pdffile = "" Then
Dim id As String = ""
Dim bindata As Byte()
Dim strm As IO.Stream
Dim filename As String = CcPdfViewer1.pdffile
strm = New IO.FileStream(filename, IO.FileMode.Open, IO.FileAccess.Read)
ReDim bindata(strm.Length - 1)
strm.Read(bindata, 0, strm.Length)
strm.Close()
filename = My.Computer.FileSystem.GetName(filename)
If dbms = "oracle" Then
oledbConn = New OleDbConnection("Provider= OraOLEDB.Oracle; Data Source=" + server + "; User ID=" + database_user + "; Password=" + database_pwd + ";")
Else
'mssql
oledbConn = New OleDbConnection("Provider= sqloledb; Data Source=" + server + ";Initial Catalog=" + database + "; User ID=" + database_user + "; Password=" + database_pwd + ";")
End If
Try
oledbConn.Open()
Static save_pdf As OleDbCommand
save_pdf = New OleDbCommand("Insert into dateien (id,name,data) values ('" + id + "','" + filename + "',@data)", oledbConn)
save_pdf.Parameters.Add("@data", OleDbType.LongVarBinary)
save_pdf.Parameters("@data").Value = bindata
save_pdf.ExecuteNonQuery()
Thanks, Daniel
Catch e As OleDbException
MsgBox(e.Message)
oledbConn.Close()
Return False
End Try
bindata = Nothing
End If
Return True
End Function
|
|
|
|
|
Found it. Just change the parameter @data in the oledbcommand to "?".
|
|
|
|
|
Hi all,
Now i am working with a checkedlistbox. Can i sort the checked items in a checkedlistbox. In other words , I want to display the checked items in the top of the checkedlistbox. Any suggestions would be appreciated
Thanks
Sebastian
|
|
|
|
|
Sounds like you'll have to load the checked items into a list, then the unchecked items into another list, then clear the checkedlistbox, then add items to it first from the checked items list, and then the unchecked items list.
|
|
|
|
|
|
Is it possible to merge two RTf files into one...
Please post any reference links or sample code...
Jats
|
|
|
|
|
You are really annoying. You asked a question like this just a few hours ago.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
My Mott Community College instructor accomplished this by having a richtextbox on a form->copy the RTF information->strip the header inforamtion->concat to another richtextbox.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Thanks for the information,
Could you provide any sample code for the same...
Jats
|
|
|
|
|
how will i get the cursor position in the textbox..?
J A Nasir K
modified on Monday, April 28, 2008 8:40 AM
|
|
|
|
|
Hi,
If you are looking for Mouse position in the textbox then you can do it by
TextBox1.MousePosition
Howerver, if you are for the text cursor which is called caret, then you may try the control's 'SelectionStart'.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">Jamal Abdul Nasir wrote:</div>how will i get the cursor position in the textbox..? </blockquote>
By reading the documentation and writing a little bit of code, as always.
You might be interested in TextBox.SelectionStart
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi every body
i have a treeview control in windows mobile application which load it's data from a database ,
i want when the user select a node automaticlly clear the other loaded nodes , so how can do that ??
Thanks ,
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
-- > How will i package a software in a way it detects the prerequisites(e.g; sqlserver, dotNet framework, crystal reports etc...) for the software and install them in a single click after detecting them?
J A Nasir K
|
|
|
|
|
If you use VS 2005, you can use ClickOnce deployement.
Here[^] is a code project article that discusses it.
Here [^]is an MSDN article that discussees it.
Google [^]will yield other articles you use to research.
If you do not have VS2005 or better, you will want to research visual studio setup and deployment[^] projects.
|
|
|
|
|
Hi,
I have added an outlook plugin project.Everything works fine.
Whenever I receive a mail an Incoming mail event needs to be fired and hence I do my processing further.
This works fine when the outlook is opened.But when my outlook is closed and if I receive the mails in the mean time, again when I open the outlook the "Incoming mail event" is not fired for all the new mail messages. What could be the problem?
How Should I handle this ?
Any Suggestions would be helpful.
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|