
hobbes2103
Avatar/Signature-
Posts
43 -
Joined
-
Last visited
hobbes2103's Achievements
Newbie (1/14)
0
Reputation
-
Well, once the control is disabled, i cannot set the font anymore... I've pasted your code and the textbox stays desperately gray... It seems that once the control is disabled you cannot change its properties... Heeelp!
-
When i click on Button1, TextBox1.Enabled = False, which naturally makes the text in TextBox1 appear in light grey, which is not very easy to read. Is there a way that you can change the font once that the enabled property is set on False? (I don't want to use the ReadOnly property) Thank you! :)
-
Hi! In my form i have a panel with the autoscroll property set on true. When the I move the mouse on it, the focus gets on my panel and i can make the vertical scrollbar move up ans down with the mousewheel. Now i would like to be able to move the scrollbar up and down using the up and down keys of the key pad. In fact i don't know how to control the position of the vertical scrollbar of the panel with the code... Help is needed urgently...! :eek: Thank you!
-
Hey! I have a form which is quite big, so i have the autoscroll property set on true. This form has many textboxes and the last textbox (Result) , the sum of all the contents of these textboxes, is what the user wants to see. Now, to see Result, which is at the bottom of the form, the user will need to use the vertical scrollbar. Is there a way that the textbox Result stays at the bottom of the screen (and not of the form) whatever the scrollbar position is, so that the user can see it whenever scrolling? (Result wouldn't be stuck at the bottom of the form but would stay visible at the bottom of the screen while scrolling) I hope I'm clear enouqh... :eek: Could you please help?? Thanks!
-
Printing Excel sheet
hobbes2103 replied to hobbes2103's topic in Interoperation / Office Integration
Thanks, it works -
Hi ! I have a form1 and when i press on button1 i want to open an existing Excel file, i write in it, i print it and then close it without saving changes. 'Opening the existing file Dim xlApp As Excel.Application Dim xlbook As Excel.Workbook Dim xlsheet As Excel.Worksheet xlApp = New Excel.Application xlbook = xlApp.Workbooks.Open(C:\Model.xls") xlsheet = xlApp.Sheets(1) xlsheet.Name = "Hello" '(Then comes all the writing in the sheet) 'Printing without saving xlsheet.PrintOut() xlApp.Quit() xlsheet = Nothing xlbook = Nothing xlApp = Nothing Now the problem is that when i execute the program, VB opens the files, writes an prints but when it closes the file i get the usual message from Excel asking me if i want to save the changes in the initial file. I don't want this message to appear, i want VB to automatically say "No" to it... How do i do that? Help is needed urgently... :eek: Thank you!!!!!
-
Hi! I have a form1 and when i press on button1 it opens an Excel sheet, copies the text in cell A1 and pastes it in A2. I've tried this copy-paste code : xlsheet.Range("A1").Copy() xlsheet.Range("A2").Paste() Of course it doesn't work and i get an error message : i think i have to select A2 before pasting in it, but i can't figure ou the code for it... :confused: Can someone help me with the copy-paste syntax for Excel in VB.Net? Thank you!!!
-
Hi! I have a form1 with a textbox1. When i press Enter another textbox appears below. As many textboxes as i want can appear. When i click on button1 i want textbox1 to reset and all the other textboxes to disappear. To do this i want to Reload form1 but i can't find the syntax (no Me.Reload found...! :mad: ) What is the syntax to reload a form by pressing on button1? Thank you!
-
[VB .NET] Problem with the AutoScroll property
hobbes2103 replied to hobbes2103's topic in Windows Forms
Thanks for your help, now the textboxes appear jsut regularly... Another problem though has appeares (i think it is bound to the autoscroll property) : when i press Enter, my next textbox appears (thank you!) and the form scrolls down a little bit so that i can see it. But this new text box is at the very botto of the form and partyl hidden (not very pretty)...! Is there a way that when the textbox is at the very bottom of the form, the form scrolls down a long way so that the textbox now appears at the top or middle of the form? -
[VB .NET] Problem with the AutoScroll property
hobbes2103 replied to hobbes2103's topic in Windows Forms
The location of the twentifirst textbox should be (100,200 + 50*21) and that is not what is happening. -
[VB .NET] Problem with the AutoScroll property
hobbes2103 replied to hobbes2103's topic in Windows Forms
No, i mean with the code txt.Location = New Point(100, 200 + 50 * i) the textboxes should be regularly positionned (with a distance of 50 between each of them) But when the scrolling happens, the textboxes are nor regularly disposed anymore : the distance between the twentifirst textbox and the twentieth is not 50 anymore. -
I have a form with a textbox on top of it. When i press Enter a new textbox appears below and gets the focus. I can add 50 textboxes this way The code for textbox number i is : Dim txt As New TextBox txt.Location = New Point(100, 200 + 50 * i) Me.Controls.Add(txt) AddHandler txt.KeyPress, AddressOf txt_keypress Now when i come to the twentieth textbox of course i'm at the bottom of the form and if i add more textboxes i don't see them. So i have activated the property AutoScroll. But there is a problem : now the form does scroll and i can see the new textboxes. The first textboxes appear just right, but when the form starts to scroll, they don't appear in their right location anymore (as if the location was modified by the scrolling) What is happening??? please help!!:eek:
-
Thank you! (and don't worry it is not obvious at all to me)
-
I have this problem with the Addhandler syntax : Tutorials all give this syntax AddHandler obj.event, AdressOf obj_event But I have the following code : Dim x As New TextBox() x.Name = "TextBox3" x.Location = New Point(112, 416) Me.Controls.Add(x) AddHandler x.MouseEnter, AddressOf textbox3_MouseEnter And 'TextBox3_MouseEnter' is underlined and i'm asked to declare it (and the prog won't work) Do i really have to declare it and if yes, how should i declare it? Please help me!! :eek:
-
I've tries to paste this code but i get an error message that i have too declare myTxt_click and i dont't know what to declare it. And when i have created this myTxt_click sub, do i have to call 'private sub myTxt_click....' or 'private sub text(i)_click...'? I'm sorry i begin in vb.net