|
Yes, I am sorry but I am new to all of this and the string thing just doesnt make since to me at all. I just thought that I might get some help to understand. I am taking an introduction to programming using Visual Basic 2005 and I am only in my 3rd week of the class. I did read the chapter, I just don't understand. Maybe I am trying to over think the process.
Thanks for all of your help,
Alexia
|
|
|
|
|
buzz5958 wrote: Maybe I am trying to over think the process.
Hey, it happens to all of us (well, those of us who will admit it). If you know that the area code is in a standard format such as (xxx) xxx-xxxx, you can always use the SubString method to pick out the area code. Once you have mastered working with strings, look at regular expressions as Christian said. They are really powerful and advanced
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Well, first of all how are phone numbers formatted where you are?
For example:
(020) 1234 5678
(0141) 123 4567
(01383) 123 456
Next what methods on the string class could you use to extract that area code? (Hint: you will be looking for something to find the position of certain characters and you will be looking for something to get a partial string from the original)
|
|
|
|
|
Hello all!
*VS2005 Datagrid
Here's what ive noticed on datagrid's vertical scrollbar behaviour,
1. The vertical scroll will not scroll between rows based on position of the scroll but instead based on rows. Moving the vertical scroll up/down will not matter much unless you have moved the scroll bar just enough so that the next/previous row can completely be seen.
Thus to programmatically change the vertical scrollbar's position, you can set as such;
<br />
dataGrid.FirstDisplayedScrollingRowIndex = x<br />
Now, i'm wondering why wouldnt the scrollbar be used to view something just like how any other scroll does where its based on scrollbar's position? And yes the weird thing is, the datagrid's horizontal scroll bar works normally.
Is there any way that I could change the datagrid's vertical scrollbar to display its content just as how the horizontal scroll would?
Thanks in advance!
Regards,
Jensen
|
|
|
|
|
Private Sub Print_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Print.Click
PrintDialog1.Document = PrintDocument1
PrintDialog1.PrinterSettings = PrintDocument1.PrinterSettings
PrintDialog1.AllowSomePages = True
If PrintDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
PrintDocument1.Print() 'this is the line where its showing the
error:uable to handle event.win32 exception
End If
PrintPreviewDialog1.Document = PrintDocument1
PrintPreviewDialog1.ShowDialog()
End Sub
what should i do.i m getting printer settings page but when i click print i am getting that error.plz mail me at niteshaga@gmail.com
|
|
|
|
|
You should not put your email address in a post, you'll open yourself up to spammers. If someone can help you, they'll tell you right here.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello all developers,
am developing small project using vb.net with sql server, that project was completed successfully also am created the exe it was working nice with oter system also, but now i want to create a webapllication out put for the same project? that is like to open it in IE in any other ssytems in the network. Is it possible? if Possible then How to do it? Please explain..............
Note: am create a vb.net Project, code begin is VB, Connection is ODBC using SQL Client
|
|
|
|
|
rrrriiizz wrote: but now i want to create a webapllication out put for the same project?
Create a new Web Forms project. The code would be exectued on your IIS server, not on the client. You're really just creating a website.
At least I'm assuming you're talking about writing a web-based application and not a web-based installer to install your Windows Forms application on the client machine.
-- modified at 9:24 Saturday 8th September, 2007
|
|
|
|
|
how to change the size of font of textbox in vb.net using code
|
|
|
|
|
Salaam Alaikom
you can change the font size by doing this code
let us say that your textbox is called "txtValue"
then u do this id you want the size be 20 for example
txtValue.Font=New Font(txtValue.Font.Name,20)
regards
Hadi Hassan
Lebanon,Beirut
hadi.84@hotmail.com
|
|
|
|
|
You can use the following sample codes also
Dim new_font As Font
new_font = New Font(TextBox1.Font.Size, 30)
TextBox1.Font = new_font
|
|
|
|
|
Load the document into Word, search for your field tags and replace each with a Word field.
I have no idea what the code to add the field would be since I don't do Office Interop in my work.
But that's how you would do it.
|
|
|
|
|
Thanks a lot
Thanks
Terry
|
|
|
|
|
Dave Kreskowiak wrote: search for your field tags and replace each with a Word field
I've seen it done before a few years ago, only if I could remember how it was done :->
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all!
I have a common text box on a form, now how do I make that textbox to be an instance of a subclass?
It has to inherit the subclass that i've wrote but i just dont know how to do that.
need help, Thanks.
Regards,
jensen
|
|
|
|
|
I don't understand what your'e doing. You can't make a TextBox be a subclass of your class. You can make your own class inherit from TextBxo though.
Public Class MyTextBox
Inherits TextBox
|
|
|
|
|
Well lets say i have a form with a panel in placed. Now, i would like to have that panel in that form to inherit a class.
Below is a part of something that i've managed to do. It seems okay, or at least it seemed.
<br />
Public Class theForm<br />
<br />
Private WithEvents new_panel As myPanel<br />
<br />
Private Sub theForm_Load() Handles MyBase.Load<br />
<br />
new_panel = New myPanel(panel1.Handle)<br />
<br />
End Sub<br />
<br />
End Class<br />
<br />
<br />
Public Class myPanel<br />
<br />
Public Sub New(ByVal pWindowHandle As IntPtr)<br />
MyBase.AssignHandle(pWindowHandle)<br />
End Sub<br />
<br />
End Class<br />
Can i inherit in such a way? Or is there a better way of doing this?
|
|
|
|
|
jensenx wrote: Public Class myPanel
Public Sub New(ByVal pWindowHandle As IntPtr)
MyBase.AssignHandle(pWindowHandle)
End Sub
End Class
You have no base class in the above. What do you expect the base class to be?
jensenx wrote: Can i inherit in such a way? Or is there a better way of doing this?
The code you show does not use inheritance, it uses composition.
By not,
Public Class MyPanel InheritsFrom Panel
' Do what you need to in the panel
End Class
In your form class you create a control of MyPanel rather than Panel .
|
|
|
|
|
jensenx wrote: new_panel = New myPanel(panel1.Handle)
That's not inheriting a class. That's just having your class use the window handle of another panel. That does NOT make your class inherit from another.
jensenx wrote: MyBase.AssignHandle(pWindowHandle)
Since your class doesn't inherit from anything (explicitly anyway). MyBase will actually just refer to the instance of your class, myNameSpace.myPanel.
|
|
|
|
|
Hi
I have one VPN Software installed on my machine. Now Either I am connected with VPN or not , No one from domain can browse my machine, I am hosting Development Server so while running the software who tries to connect SQL Server on my machine results into Error. If any one pings me then it times out. I can access any one on the network .
Is there any solution for this type of problem. As I am afraid if my software will be installed at any machine where VPN Exists then it will not work properly.
Regards
|
|
|
|
|
This is probably because the VPN software adds a level of security akin to a firewall that's blocking everything inbound to your machine.
And what does this have to do with VB.NET?
|
|
|
|
|
Yes I understand the security issue which is implemented with VPN.
Dave Kreskowiak wrote: And what does this have to do with VB.NET?
When we install any VB.net application with Client Server Architecture and it has to contact any machine where VPN is installed could result into an error. I thought may be there is any solution for this so that application could run smoothly. This could be any authentication code which could be added
Regards
|
|
|
|
|
hi all
i have a webbrowser control, and i m trying to store all information about the user.(the ids, passwords etc) when user first time use my application, second time when user opens my application all work has been done automatically ( all the things like open site, enter the id and password, go to the inbox, download attachment automatically.
for confidential things like passwords i can ask the user to enter, but i still trying to explore how can i send this information back to the site.
i tried to get the form which contain the textboxes that contain the id and password and the go button, but i m unable to get the values of those and enter my values in those textboxes.
i have found some articles on the same that use the code (but i think that's from vb6 )
With mybrowser.document<br />
.All.Item("login").Value = "myloginid"<br />
.All.Item("passwd").Value = "mypassword"<br />
.Forms(0).submit<br />
End With
i can find the form that contain the id and password fields with
If Me.WebBrowser1.Document.Forms(1).Name = "loginform" Then
does some one has any idea then please let me know.
thanks in advance
help everyone
|
|
|
|
|
Take a look at the DigiOz Post To Web Form DLL. It does exactly that (includes source code and a demo project). You can get it here:
http://www.digioz.com/dlls.php[^]
Scroll about half way down the page and you will see it.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
I have a small VB.Net 2005 project that started out with a form that a user would select different options and things would calculate based on the options. The options could be saved and retrieved to xml files and everything worked great. Then I got the bright idea to have multiple screens (all the same options). I built a custom tabpage and added my controls to them and got them to work as expected. On the tab page I set some properties and call a routing on my main form (using my.forms.main.MyRoutine) and that routine reads the properties just fine. Now the issue is if I run something from the form itself I can't figure out how to access anything on the tab pages. I want to be able to read things like text boxes and such. When I run a button on the tab page I can send the info back but since the tab pages are dynamically created and added to thhe tab control I can't seem to access them. How do I do this?
I.e. in simple terms I add a custom tabpage with 3 text boxes to a tab control on my main form. How can I access those text boxes from a command on the main form? How can I access text boxes on other tabs?
-Allan
|
|
|
|