646 Posted Topics
Re: Not sure how this works with Crystal Report, it works with "normal" forms. Trap Resize event and if minimizing, set WindowState back to normal [CODE=VB.NET] Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize ' If Me.WindowState = FormWindowState.Minimized Then Me.WindowState = FormWindowState.Normal End If End Sub[/CODE] | |
Re: It seems that .NET does not support Indian formatting for some reason. You have to implement formatting yourself, for example write your own (overloaded) ToString method. Shouldn't be that hard to write code for this. I did find a one .NET implementation for this (both numbers and dates [URL="http://www.codeproject.com/KB/cs/NumberDateFormat.aspx"]Indian Number … | |
Re: Hi Todor! This is VB 4/5/6 (i.e. classic Visual Basic) forum. Post your question to [URL="http://www.daniweb.com/forums/forum58.html"]DaniWeb's VB.NET[/URL] forum, you're more likely get your question answered there. | |
Re: Use parenthesis [CODE=VB]Text3.Text = (3 ^ 1 + 3 ^ 2) - (3 ^ 0 + 3 ^ 1 + 3 ^ 2 + 3 ^ 3)[/CODE] | |
Re: I don't do PocketPC programming but I think [ICODE]System.Threading.Thread.Sleep(240)[/ICODE] makes your "main" thread to sleep instead of "current" thread. As you can see, I'm not that familiar with threading either ;) | |
Re: [CODE=VB.NET]My.Computer.FileSystem.CopyFile(Application.ExecutablePath, "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\" & My.Application.Info.AssemblyName & ".exe")[/CODE] In my XP machine, Windows Defender warned about changes in Startup apps. I didn't test it in Vista, but I know for sure it won't work in Vista machine ;) Creating and copying a link would be one solution. But … | |
Re: You're not sending 300 bytes, you're trying to send integer "300" [CODE=VB.NET]Try Dim ping As New System.Net.NetworkInformation.Ping Dim Buffer(299) As Byte ' A buffer for 300 bytes ' Fill Buffer() Return ping.Send(hostNameOrAddress, 5000, Buffer).RoundtripTime Catch ex As Exception MsgBox("Computer Ping Could Not Be Called") End Try[/CODE] | |
Re: You haven't assigned the number of elements in the second dimension of the array: [ICODE]Dim a(20)() As Integer[/ICODE] either [ICODE]Dim a(20)(10) As Integer ' For example 10[/ICODE] or later in the code [ICODE]ReDim a(20)(10)[/ICODE] or from a variable [ICODE]ReDim a(20)(SomeVariable)[/ICODE] | |
Re: Classes have properties and methods. You pass an array between class instances either with properties which are of array type or by method's arguments which is an array type. | |
Re: Set WindowState on form's Load event to Normal state: [CODE=VB.NET]Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Me.WindowState = FormWindowState.Normal End Sub[/CODE] | |
Re: Check these examples [URL="http://www.vbforums.com/showthread.php?t=390875"]Client/Server Socket classes for file transfer[/URL] [URL="http://www.codeproject.com/KB/vb/Chatting_Application.aspx"]Chatting Application Using DotNet[/URL] to get started with sockets. Personally I would write two classes. First one to be a "server" (listener) and the second one "client" (connects to the listener). Then drop server and the client objects to both forms … | |
Re: I'm not any MySQL guru. I use MySQL ODBC and the connection string: "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=test; UID=root; PWD=XXXX;" If the problem comes from the connection string and/or you're not using ODBC, see [URL="http://connectionstrings.com/mysql"]http://connectionstrings.com/mysql[/URL] for proper connection strings. | |
Re: Here's an answer to the first question: If you want to [I]"exit"[/I] and stay in the system tray, trap FormClosing event [CODE=VB.NET]Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing ' Hide from taskbar Me.ShowInTaskbar = False ' Set window state to minimized Me.WindowState = FormWindowState.Minimized ' … | |
Re: Why do use COM component in the first place? .NET has a WebBrowser control. It works with UNC paths. | |
Re: Use the same handler for all link labels and a global variable to hold information which link label was clicked. [CODE=VB.NET] ' Save last clicked link label Private m_Link As String = "a" Private Sub LinkHandler(ByVal sender As Object, ByVal e As System.EventArgs) Handles a.Click, b.Click, c.Click ' Trap all … | |
Re: MSDN Library is also an invaluable (online) source of information and a great reference. [URL="http://msdn.microsoft.com/en-us/library/default.aspx"]MSDN Library[/URL] [URL="http://msdn.microsoft.com/en-us/library/bb966997.aspx"].NET Framework 2.0[/URL] [URL="http://msdn.microsoft.com/en-us/library/ms950416.aspx"]Visual Studio 2005[/URL] [URL="http://msdn.microsoft.com/en-us/library/2x7h1hfk(VS.80).aspx"]Visual Basic (2005)[/URL] Of course MSDN contains information to all the other .NET and VS versions too. | |
Re: For some reason I didn't get DataReader to work. But with DataAdapter and DataSet I got images from DB. I used SQL Server but that shouldn't make any difference. [CODE=VB.NET]'start query ' Declare a DataSet object Dim Images As New DataSet() myAdapter.Fill(Images, "Eyes") ' With DataAdapter you can close connection, … | |
Re: Your link didn't work. If you mean working with IDE, code displayed in one pane and running app in the second pane, the answer is no way. Since VB code is compiled before execution, running the app would "lock" the exe file which prevents compiling the code. The best you … | |
Re: There's no API calls needed. If you have a picturebox control and an image file, you just do the following: [CODE=VB.NET]PictureBox1.Image = Image.FromFile("C:\somepic.jpg")[/CODE] Of cource, there are other ways to get and display images depending on the source of the image. | |
Re: Set TopMost property of your pop up form [CODE=VB.NET]Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Me.TopMost = True End Sub[/CODE] After the user has somehow "reacted" to your pop up, you may set TopMost = False to allow user send your form to background. | |
Re: VB does not support direct PDF output. You need a third-party component or library for that. Try some googling [URL="http://www.google.com/search?q=pdf+.net"]http://www.google.com/search?q=pdf+.net[/URL]. There was quite a many interesting links. | |
Re: Here's an easier way to do that: [CODE=VB.NET]' Write byte array My.Computer.FileSystem.WriteAllBytes(_fileName, _byte, False) ' Read byte array _byte = My.Computer.FileSystem.ReadAllBytes(_fileName) [/CODE] But if you still want to use the FileStream: [CODE=VB.NET]Dim _FileSize As Long _FileSize = _file.Length For _i As Long = 0 To _FileSize - 1 _byte(CInt(_i)) = … | |
Re: The error message you get is "Conversion from DBNull to type String is [B]not[/B] valid". It means that you have a null value in LastName and/or FirstName fields. I assume ID field can't contain null values. You can drop nulls in the query by changing the select statement: [ICODE]...WHERE (LastName … | |
Re: Since rtb does not have a Justify property, you have to do it with API calls. Here's a one example [URL="http://www.vbforums.com/showthread.php?t=275310"]VB6 - Justify text in RichTextBox[/URL] to start with. | |
Re: You didn't mention, how the information is stored. But if you have numbers in your combo box and you can fetch the information with that number, you need to trap SelectedIndexChanged for the combo box: [CODE=VB.NET]Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged ' Get selected … | |
Re: If you declare a (global) variable in your main form: [CODE=VB.NET]Public Class Form1 Friend MyGlobal As Integer End Class[/CODE] you'll have to qualify variable's name with Form1 [CODE=VB.NET]Public Class Form2 Dim a As Integer = Form1.MyGlobal End Class[/CODE] [QUOTE]And how can I use radio button for choose statement?[/QUOTE] You mean, … | |
Re: What is the exact error message that you get? What error number you get from oConn.Errors(0).NativeError (oConn being your connection object)? A few things come to my mind straight away. Are the tables identical? Is any of the fields char/varchar type and contains '-character in the source table? Null values? … | |
Re: Try Daniweb's site search first. I've answered the same or at least very similar question quite a few times. A pretty good search phrase is "image SQL Server VB.NET" (without quotes). Here's a link to one thread "[URL="http://www.daniweb.com/forums/thread159832.html"]upload image in vb.net[/URL]" I answered earlier today. I haven't used Report Viewer … | |
Re: Dealing with images and databases is basically done with byte arrays. Here's a one starting point with VB.NET code samples from my blog: [URL="http://windevblog.blogspot.com/2008/08/convert-image-to-byte-array-and-vice.html"]Convert image to byte array and vice versa[/URL] [URL="http://windevblog.blogspot.com/2008/08/save-binary-data-to-sql-server-with.html"]Save binary data to SQL Server with VB.NET[/URL] You may also try Daniweb's site search. I've answered the same … | |
Re: Here are the things to consider: - what does an elevator do? - how do you represent 4 floors in VB (a clue: you need a data structure) | |
Re: You may try to ask that in [URL="http://www.daniweb.com/forums/forum127.html"]MS SQL[/URL] forum. I think that's something you have to do at the database side. | |
Re: A short answer: no. There's a [URL="http://www.vbrezq.com/"]VB RezQ[/URL]. I haven't tried it. I highly doubt it can do what it claims to do and definitely I wouldn't pay $149 for a piece of s**tware. And here's a quote from their site: [QUOTE]Note: VB RezQ produces empty subroutines - it does … | |
Re: Like you said, there are attributes to hide folders. And also to unhide them. If your purpose is to "hide" information, I suggest using an encrypted file. You'll find encryption algorithms and sample codes with a little googling. | |
Re: I haven't used this myself and I'm not sure if it suits for your purposes, but you can check it out [URL="http://support.microsoft.com/default.aspx?scid=kb;en-us;310618"]Microsoft Cabinet Software Development Kit[/URL] | |
Re: Not sure how detailed or "basic" help you need but let's start with this. 1) Create a VB.NET project and add a class in it. [CODE=VB.NET]Public Class Class1 Public Sub New() ' Initialize class End Sub ' Add properties ' Add methods End Class[/CODE] I created a project ClassLibrary1 with … | |
Re: You mean that you want to start up your application from the registry? Install application to run from the registry: [CODE=VB.NET]''' <summary> ''' Installs an application to start from the registry when Windows starts ''' </summary> ''' <param name="AppName">Application's name</param> ''' <param name="AppPath">Full path to the application</param> ''' <param name="InstallToLocalMachine">Install … | |
Re: And the problem is??? And where should I look at??? | |
Re: Even better solution is to use Array.Sort in the .NET. Declare an integer array, put your numbers there call sort method [CODE=VB.NET]Dim IntArr(3) As Integer IntArr(0) = 5 IntArr(1) = 8 IntArr(2) = 9 IntArr(3) = 2 Array.Sort(IntArr)[/CODE] Sort method sorts in the ascending order. To get smallest and largest … | |
Re: You can set values in code too: [CODE=VB.NET]ComboBox1.Items.Clear() ComboBox1.Items.Add("Import") ComboBox1.Items.Add("Overwrite") ' Predefined values, no user input allowed ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList[/CODE] And to check for the user's choice [CODE=VB.NET]Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged ' Check user selection If ComboBox1.SelectedIndex = 0 Then ' Import … | |
Re: Most likely Rediffmailpro allows only mails from its own domain. This is to prevent sender forgery and spamming. If you want to send mail from Gmail (or Yahoo) you have to have an account there and set SMTP server to smtp.googlemail.com (or smtp.gmail.com). Smtp.googlemail.com also uses port 587, requires SSL … | |
Re: Trap SelectedIndexChanged event of the combo box [CODE=VB.NET]Private Sub cboCustomer_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCustomer.SelectedIndexChanged txtCustID.Text = Custds.Tables(0).Rows(cboCustomer.SelectedIndex).Item("custno") End Sub[/CODE] | |
Re: I wouldn't do that. Programming so large and complex application would take too much time and money. I would check existing open source/freeware alternatives for eLearning. Or if you have $$$ why not buy Captivate. This is my personal opinion. | |
Re: So you need a tiny parser: [CODE=VB.NET]Dim StringIn As String Dim StrArr() As String Dim TempText As String Dim TempNumber As String Dim TempPos As Integer Dim i As Integer StringIn = TextBox1.Text TempText = "" TempNumber = "" ' Split to lines StrArr = StringIn.Split(CChar(Environment.NewLine)) For i = 0 … | |
Re: Color.FromName accepts only predefined known colors like [CODE=VB.NET]Dim testcolor As Color testcolor = Color.FromName("AliceBlue") Me.BackColor = testcolor[/CODE] If you have, for some reason, color information in "Color [A=255, R=255, G=128, B=128]" format, you have to parse color component values and use Color.FromArgb. I don't write the parser, but it should … | |
Re: I tried your code and it changes bg-color just fine. I changed FlatStyle.Flat and bg-color still changes fine. If you set FlatStyle.Flat, have you checked FlatAppearance properties (borders & colors)? It seems FlatAppearance properties are design time props and are ReadOnly in the run-time. Anyway, changing FlatAppearance may solve your … | |
Re: Basically you convert an image to an array of bytes and store the byte array to image- or blob-typed field. This same principal applies to most databases, not just SQL Server. There's a code snippets in my blog which can be used to insert pictures to DB: - converting image … | |
Re: You may get an answer to your question by posting it to [URL="http://www.daniweb.com/forums/forum18.html"]Web Development\ASP.NET[/URL] forum. | |
Re: Do you need [ICODE]adorset.Move 0[/ICODE] ? However, you do have a connection object. Check from the connection object which is the native error and description [ICODE]oConn.Errors(0).NativeError oConn.Errors(0).Description[/ICODE] where oConn is your connection object. | |
Re: You must double double quotes inside double quotes: [ICODE]LoadCommand = "(load \""S:\Tools\Tools_Subfolder\MyStuff\test.txt \"")"[/ICODE] | |
Re: Save your HTML editor code to a file and put a webbrowser control on the preview form to open that file. Here's a "Preview"-button skeleton: [CODE=VB.NET]Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ' Dim PreviewFileHTML As String Dim PreviewFileName As String PreviewFileName = "C:\temp.html" PreviewFileHTML … |
The End.