|
How would I go about naming the Combobox control?
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
jose.hernandez@systems-programmer.com wrote:
How would I go about naming the Combobox control?
You don't name the individual combobox, you create an array and then reference them by the line number. My VB.NET is a little rusty but basically,
<br />
Dim controlArray(3) As ComboBox<br />
<br />
controlArray(0) = New ComboBox<br />
controlArray(1) = New ComboBox<br />
controlArray(2) = New ComboBox
Then
controlArray(LineNumber).Text = "Hello"
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Not sure that would work forr me. Here's what I'm trying to do:
I have a panel that goes across a form
In this panel I create a couple of combo boxes and some text boxes going across the panel.
Each time I create a line of these combo boxes and text boxes I use the same variable names
This works fine except I cant tell which line my user would like to delete because all of my variable names for the comboboxes and text boxes are the same.
So I chought if I could create a line counter and use it's contents in naming my variables for the comboboxes and text boxes that would help.
Is this possible in VB.Net?
Thanks
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
im assuming your going back in and using code to search for the proper controlls. in wich case just did you try changing the name property?
dim suffix as string
dim mybox as textbox = New textbox
suffix = 554
mybox.name = mybox.name & suffix
|
|
|
|
|
Thanks for the help.........
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
I want to read the content of a CD through VB.Net program.
If any one have an effective solution for this please send me that.
Thanks
Christy Rajan
|
|
|
|
|
What kind content are you talking about? So far, all you've said is "I want to read a CD." You haven't mentioned what you want to do with the data or what and how you want to read it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In my application i want to include an option for browse the CD.
If i insert the CD in the drive and click the CD Browse button from my application, the application should show all the content of the CD like windows Explorer. Also, it should filter the Document files and non document files seperate and show all the document files(name) in seperate window. Document files in the sense MS-Word, MS-Excel and PDF files.
This is my exact requirement
Sincerely,
S.Christy Rajan.
|
|
|
|
|
Filtering the file list? That's a bit more than just "browsing" the CD.
There's nothing like this in the .NET BCL. The closest match is the OpenFileDialog class. You'll have to come up with your own implementation, seemingly from scratch. You might want to look into creating your own dialog, inheriting from the FileDialog class[^], and overriding and implementing the functionality you need.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a Coin Collection Database that was written in Access and I am trying to put a VB.NET front-end on it. The application contains several tables and I have taken them to 3rd normal form. In specific I have 4 tables that I am trying to put put on 1 screen. The first table contains the Coin Denomination (ie. Half Cent, Large Cent, Small Cent, etc.) The next table is related via the DenominationID and is called "Types". It contains specific Types of coins within a denomination (ie. If Denomination = Small Cent, then Types would = Flying Eagle, Indian Head and Lincoln). Next I have a table called "SubTypes" which is related to the "Types" table via the TypeID field. For some (but not all) of the Types there may be a Subtype (ie. If Denomination = Half Cent and Type = Liberty Cap, then SubType would = Facing Left or Facing Right). The final table is called "MintedCoins". Once the user has selected the Denomination, Type and SubType I want to populate the remaining fields on the screen with the first record that matched all of the criteria. I am using ListBoxes for the first 3 tables and Textboxes with a navigation bar (that I created) to navigate between the records of the 3rd table. I have created a dataset that contains all of the tables and also contains the relationships. When I run the program the first record is populated correctly, but I don't know how to handle the changes when the user selects a new Denomination, Type or SubType. Can someone please help me. I can make some screen shots if that would help.
Thanks,
Bob
|
|
|
|
|
hello,
i have a utility (vb.et code) that i use it in web application to get the ip, i used this utility in a windows application, and when it get the IP it gives me error, is there any way to know the application type to return the IP depending on the application type, so i avoind making two versions of the utility?
Thanks in Advance
Mahmoud Manasrah
|
|
|
|
|
What utility? Is it a web service you've written? A library .DLL your including?
Get the IP of what? The client of the web application or the server?
You'll have to write two versions of the code anyway because the methods of determining the IP address of a client are completely different between a Windows Forms app and a Web application.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi again
its A library .DLL im including in a windows application project...
this dll was written for web application...and i want to use it for my windows application...
the problem was in getting the ip cause its different in windows and web...
so my question was there a way to check the application type
Thanks in Advance
Mahmoud Manasrah
|
|
|
|
|
You might be able to come up with something in the Assembly class. There is nothing that will come out and directly say the "This assembly is a web application", or "This assembly is a Windows Forms application", though. You'll have to divine the application type someone.
But! Think about this. Why would you want to have dead web code in your Windows Forms app? Why would you want to have dead Windows Forms code in your web app? You have to write two entirely different versions of your method for two entirely different environments, so why have them both in the same assembly? All you'll be doing is throwing dead weight into your code...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In a skin changing program , I need to get the handle of dialog.
However , there is only hInstance and hWnd handle in a form.
What should I do?
|
|
|
|
|
The handle of the dialog? That's it's window handle, which is it hWnd property in Windows Forms.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks I will try that Monday morning. I will let you know the results. Thanks again.
|
|
|
|
|
The application in question has a comboBox which is used to select a person's name. This then allows getting the person's username and password. Next, a button is clicked that captures a frame from a webcam, creates a badcode based on the username and password and then prints the image, barcode and name to a Dymo labelwriter.
When the button is configured to show the PrintPreviewDialog, the label displayed is exactly correct:
badgePreview.jpg
However, when the button is configured to actually print, the label is only partially printed:
badgeActual.jpg
This really has me stumped - please help. This zip file, sselBadge.zip has the entire VB file.
----
Gerry Roston
Pair of Docs Consulting
www.pairofdocs.net
|
|
|
|
|
I am currenly undertaking a pet project of making a telnet mud client and am hung up on some of the basic functionality.
I cant seem to find a way to keep the main display textbox (am using a rich textbox control) to stay scrolled to the last entry. the scrolltocaret() function works only when the rtb is focused and even when it is tends to be a bit flaky . plus i cant keep focusing the main display as the focus should be in the command line textbox almost all the time.
so i am in need of a command that will always keep the main textbox scrolled, preferably somthing i can toggle on and off so you can view past text without having it constatnly trying to scroll to the end.
in addition to scrolling im not sure how i should implement coloring. in the end the client must be able to pick words and phrases based on triggers and color them appropriatly. i had limited success with changing the color property as it was writing the recived string but it was clunky and slow.
and lastly i have had no success in creating an efficient scroll back buffer for the textbox. textboxes contain a maxLength property (default is 2,147,483,647 characters) but it seems that if i change it to lower and it fills up the program crashes. what i would like is to set a more practicle buffer size.
any suggestions and help on how to implement these things would be appreciated.
FYI im writing in VB .NET and using Visual studio 2003.
|
|
|
|
|
Sounds like you'd do well to create your own textbox control.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Dear Sirs,
I am trying to download a csv file from the internet using
the MSHTML model and can successfully obtain the data to a
HTMLDocument variable using the following.
Dim objMSHTML As New MSHTML.HTMLDocument
Dim objDocument As MSHTML.HTMLDocument
Set objDocument = objMSHTML.createDocumentFromUrl
(txtURL.Text, vbNullString)
where txtURL.Text
= "http://www.a_web_site.com/download/data.csv"
What I cannot do is extract the csv data from the
variable, as it does not appear to be associated with any
node / element etc.
I know the objDocument does contain the data as I can
check the size of the variable to which it returns a
largeish value
I am really quite lost with all this - I do not really
understand how all this works and have been trying to find
an online resource that explains it in lay terms, however
everything that I have located to date goes way over my
head!
Hoping someone can assist
Regards
Jack
|
|
|
|
|
Option Strict Off
Imports mshtml
Public Class Form1
Inherits System.Windows.Forms.Form
Public Function toHex(ByVal number As Integer) As String
Dim hexbyte As String
hexbyte = Hex(number).ToString()
If hexbyte.Length = 1 Then
hexbyte = "0" & hexbyte
End If
Return (hexbyte)
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim url As Object = "about:blank"
WebBrowser.Navigate2(url)
Application.DoEvents()
(CType(WebBrowser.Document, HTMLDocument)).designMode="on"
End Sub
Private Sub btnviewHTML_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
tbHTML.Text = _
(CType(WebBrowser.Document, HTMLDocument)).vody.innerHTML
End Sub
Private Sub btnPreview_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
(CType(WebBrowser.Document, HTMLDocument)).vody.innerHTML=tbHTML.text
End Sub
|
|
|
|
|
What sort of help do you want ? Comments on your coding style ? You expected that you wrote 3D space invaders, but you can't get the pixel shading to work ?
Maybe if you said both what you expected to see, and what is going wrong, someone will help you.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
At the beginning of each one of the parentheses. I get a syntax error. Why is this?
|
|
|
|
|
Because there's no parenthesis around the class as a whole ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|