Answer Questions
Loopsludge how to not show a column in a DataGridView that's using a BindingSource
I am tring to get my ID column in the DateGridView not to show. I went in the properties of my DataGridView under columns and then under my ID column properties put visible equals False. However, when I run my application my ID column still appears. Does anyone have any idea as to why my ID column is still showing when the application is run If you are using a dataadapter to fill the datagridview, the columns that will be shown are those in sql query. Then you have to put the visible = false after the datagrid has been filled private sub where the grid is filled.. filling the datagrid... datagridview1.columns("ID").visible=false end sub Try this and see if its better.. ...Show All
MA2005 Looking for a property creater
Hi, Just curious to wether there is a quicker way to create properties in 2005, I've seen the code snippet for properties but I'm wondering if there is anything that can do it quicker. An idea would be to only have to define the variables and then a macro of some sort would create the Properties. Any ideas Mat I think snippet is the fastest way. Macro is another good idea, but you have to write yourself to access VS accessibility layer (DTE stuff) which may not be very easy to code. . Thats quality, I'm well on the way now but you any ideas how i could start a macro of by selecting text and then running it and having access to that text in the macro Mat ...Show All
Deraldo Toggle capslock
How can I toggle capslock Visual basic 2005. Windows XP. I'd like to capslock on when the form load. This code doesn't work: Public Class Form1 Private Declare Sub keybd_event Lib "user32" ( ByVal bVk As Byte , ByVal bScan As Byte , ByVal dwFlags As Long , ByVal dwExtraInfo As Long ) Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Call keybd_event(System.Windows.Forms.Keys.CapsLock, &H14, 1, 0) Call keybd_event(System.Windows.Forms.Keys.CapsLock, &H14, 3, 0) End Sub End Class The error is: PinvokeStackImbalance was detected. Hi, You could also use.>> Sendkeys.Send("{CAPS ...Show All
daxu Problem saving graphics to a file
Hi, I have an application in which the PaintEvent calls up a procedure to get data from four Sql tables, and produce drawings. This part of the app works fine. I am now trying to copy these drawing one at a time to a Bitmap file, and not having much success. I've omitted the the Sql statement sections in the following code as they are not the problem. Private curFileName As String Private curImage As Image Dim ImageNo As Int32 = 0 ' This procedure adds the drawings ands text to the appropriate rectangle. Private Sub DrawDetails(ByVal e As Graphics) If ImageNo = 0 Then ImageNo = 1 Else ImageNo = ImageNo + 1 End If curFileName = "Drawing " & ImageNo & ".bmp& ...Show All
Aaron Oneal How do I make this flicker-free?
The following code draws line numbers next to a RichtextBox control I have on my form. However, the code causes the LineNumbers picture box to flicker rapidly while being drawn, I was wondering if anyone could help Private Sub DrawRichTextBoxLineNumbers( ByRef g As Graphics) 'Calculate font heigth as the difference in Y coordinate 'between line 2 and line 1 'Note that the RichTextBox text must have at least two lines. ' So the initial Text property of the RichTextBox ' should not be an empty string. It could be something ' like vbcrlf & vbcrlf & vbcrlf With RichTextBox1 Dim font_height As Single font_height = .GetPositionFromCharIndex(.GetFirstCharIndexFromLine(2)).Y _ - ...Show All
Peto_SVK plugin made from VBA script
Hello! I created a macro for Outlook 2003 which loads data from a txt file and create a new contact from that data. I can add a button to that macro to the outlook toolbar manually, but my question is how can i make a plugin for Outlook with setup or sth like that. I mean sth like SalesForce. It adds an icon to the outlook toolbar, you dont have to to it manually, it has to be a way to do it without installing VS .net and stuff like that. I wasnt sure where exactly i should put my post so sorry for any inconveniences. thanks in advance! Jack Using the Visual Studio Tools for Office (VSTO) is by far the easiest way to create an Outlook addin. Short of that, you should be able to do it manually with so ...Show All
Nordsee WebBrowser will not work with Flash. ANYBODY HAVE A FIX
I have created a web browser and after like 2 clicks on any flash enabled web page it disables and i cannot click any type of flash anything it doesnt work. Does anyone know a fix to this oatman, Add the following VBScript code in your web browser: <script language= "VBScript" > sub fs_fscommand( ByVal command, ByVal args) Call fs_doFSCommand(command, agrs) End Sub </script> <script language= "VBScript" > sub fs_fscommand( ByVal command, ByVal args) Call fs_doFSCommand(command, agrs) End Sub </script> Brun, A fuller explanation and description of this would be helpful. oatman, ...Show All
debraj dhar IDE Broken -> Doesn't display error
At some point something I installed (I suspect Resharper) broke the IDE. When I am running my code in the debugger if an error occurs the code stops, highlights the problem line but no text pops up to tell me what the error is. Without having to do a full reinstall does anyone know what may have been disabled or changed to cause this Thanks, Shane The problem is gone. I think this problem may actually be related to the fact I switched from project references to file references in a solution. I'm reinstalling ReSharper and I'll see if the problem comes back. ...Show All
Price Brattin Sleep() Function VB2005 Equivalent
Hi everyone, I would like to how to do the equivalent of this Public Declare Sub Sleep Lib " kernel32 " Alias " Sleep " (ByVal dwMilliseconds) ... In visual basic 6.0 it works fine. I have a snippet of code below written in 2005, and I want a fixed time delay between loop iteration. How do I sleep between points The system.Threading.... does not work. It freezes the entire application. Can someone help me I have experience in VB6 and I am trying to migrate to 2005, but I can't even do a simple task. I am beginning to feel like I have to re-learn the entire language semantics. Please help! Private Sub cmd_Plot_Click_1( ByVal sender As System.Object, ByVal e As System.EventArgs) ...Show All
SarasMax efficient storing and programming for data (moving from another forum)
Rebuilding an application from DOS to Visual Basic, I have several questions, mainly concerning storing the (relational) data (SQL). If I want to reuse code, I could use classes. I.e.: there are employees, customers, company's. They all have names, adresses, phone numbers, etc. I could build a class with these fields and create other classes which reference to this one. But how do I save the data stored in the objects created from the classes to an SQL server By programming to populate each and every field of database with the data in the objects This doesn't seem very efficient. And if I add a field, I have to rewrite the code. Could you just store the entire object as a record in the database Databinding is another option, but then I al ...Show All
Jolly Joker FTP Using IP Address Through VisualBasic 2005 Programming
Hi , My requirement is to develop an application which could receive (get) file from Mainframe ( which supports FTP using it's IP address ) . Currently , I have designed the application in VisualBasic , such that it creates a batch (.bat) file dynamically ( based on the user inputs , i.e., user-id , password ... ) and the bat file will be invoked and executed in the background. In this methodology , I was not able to provide the progressbar showing the status of file transfer. But , instead of doing in the above manner , I think it could be more effectively done through VisualBasic 2005 Programming itself ( without the help of bat files ) , if so please kindly help me out , how to accomplish this in a better way . As I am new to ...Show All
Dark Pontiac TO CREATE A EXE FILE OF VISUAL BASIC EXPRESS 2005 PROJECT
HOW CAN I CREATE A EXE FILE OF MY PROJECT SO THAT IT CAN BE REDISTRIBUTED & RUN WITHOUT VISUAL BASIC ON ANY COMPUTER THAT DO NOT HAVE VISUAL BASIC Hi, No need to make EXE file because it is there in the "Debug" folder but make shur that you test the programe at first and to run it in any pc has no VB installed on it, you need to install "Dot Net Framework 2.0" on that PC and that's all I hope it helps you ...Show All
HuberSepp The application failed to initialize properly (0xc0000005)
I'm not sure how to troubleshoot this error I seem to be getting, it compiles fine no problems but when I try to run the program I get "The application failed to initialize properly (0xc0000005)" it only happens on the one system that I run it, every other system I've tested it on it executes fine, unfortunitly this is the system that the program needs to run on and its not. I've tried running it in safe mode and it seems to run so I've installed all current drivers and disabled all services except those that are required for windows to run and yet I still get the same problem, I've also turned off every other application before running it. Any help anyone can offer would be much appreciated. ...Show All
Kevin Hoffman is it possible to tel wich control raised the event?
is it possible to tel wich control raised the event Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click ' Add event-handler code here. End Sub For example i want to disable button wich raised this event How can i do that But in the example you sent both controls used to fire the event were buttons. If they were different control types then you need to ensure that you cast to the correct type of control. But either way the sender parameter is what you need to look at. If you used a subroutine as a handler for an event for many different types of control then it is error prone and more fool you if you ...Show All
Marcos Torres EMAIL
I am using this code in vb.net 2005 to sent an email but an error FAILURE SENDING MAIL is allways appearing. Can someone show me where I am duing wrong. Try Dim SmtpClient As New System.Net.Mail.SmtpClient SmtpClient.Host = "localhost" SmtpClient.Port = 25 SmtpClient.UseDefaultCredentials = True SmtpClient.Send("glennzarb@gmail.com", "glenn_zarb@hotmail.com", "Test", "hi") MsgBox("sent") Catch ex As Exception MsgBox("Send failure:" & ex.Message) End Try I haven't installed any other programs or smpt's the code is pretty much the same as you have done, except replacing the email ad ...Show All
