646 Posted Topics

Member Avatar for MxDev

RichTextBox control uses RTF color codes. What color coding does that library use? I couldn't find any documentation for the library from CodePlex.

Member Avatar for Teme64
0
700
Member Avatar for kingofnothing

[QUOTE]show me error with com.ExecuteNonQuery()[/QUOTE] Could you please post the exact error message that you get. It would help a lot. I also suggest using Try...Catch...Finally blocks when you deal with databases: [CODE=VB.NET]Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New System.Data.SqlClient.SqlConnection con.ConnectionString …

Member Avatar for Oxiegen
0
274
Member Avatar for praveenpvs

I haven't used that much SharpDevelop, but I suppose it creates files Form1.vb, Form1.resx and Form1.Designer.vb for a form like VS IDE. There's something wrong in the Form1.Designer.vb file (Form1 is your form's name). Open the form in the design mode and remove TextBox1 (and that [ICODE]private withevents textBox1 as …

Member Avatar for Teme64
0
449
Member Avatar for DaveTran

[ICODE]List<ResourcePool<T>> pools = new List<ResourcePool<T>>();[/ICODE] T has to be a class. I would use an interface for Ammo-classes: [CODE=C#]public interface IAmmo { } public class PlasmaAmmo : IAmmo { } public class LazerAmmo : IAmmo { } public class HappyAmmo : IAmmo { }[/CODE]After that you declare ResourcePools for different …

Member Avatar for DaveTran
0
136
Member Avatar for selle05

If you have only a few users, you could use something like this: [CODE=VB.NET]Dim oFormForJohn As Form2 ' This is for John Dim oFormForJane As Form3 ' This is for Jane Select txtUsername.Text.ToLower() Case "john" oFormForJohn = New Form2 ' Set properties if form has any oFormForJohn.ShowDialog() ' Modal, use …

Member Avatar for Teme64
0
81
Member Avatar for ChroNoS

In what way it's not working properly? I tried: [CODE=VB6]Dim strOut As String strOut = HexString("ABC") [/CODE]and strOut was " 41 42 43" which is correct.

Member Avatar for Teme64
0
5K
Member Avatar for p@rse

A checkbox control's value is a tri-state value: unchecked, checked or indeterminate. In code that is one of the following CheckStates: [CODE=VB.NET]CheckBox1.CheckState = CheckState.Unchecked CheckBox1.CheckState = CheckState.Checked CheckBox1.CheckState = CheckState.Indeterminate[/CODE]where CheckState.Indeterminate means "greyed-out" value. [QUOTE]All i have seen was indeterminate but it doesnt necessarily grey it out, i dont like …

Member Avatar for p@rse
0
99
Member Avatar for Darkicon

Open your application project to IDE (VB.NET editor). Select menu "Project" -> "<Project Name> Properties..." -> select tab "Application" -> press button "Assembly Information..." -> type the description in the "Title" field. Press Ok and recompile the project. HTH

Member Avatar for Teme64
0
83
Member Avatar for TommyRay

KeyPressEventArgs [B]is[/B] a type. Procedure OnKeyPress(ByVal e As KeyPressEventArgs) requires one argument [B]of[/B] type KeyPressEventArgs. Create an argument of type KeyPressEventArgs and pass that to the procedure. For example: [CODE=VB.NET]objcboBox.OnKeyPress(New KeyPressEventArgs(CChar("a")))[/CODE]Is (almost) the same as user pressed 'a'-key. HTH

Member Avatar for TommyRay
0
948
Member Avatar for MxDev

[QUOTE]Does anyone here know where I can get C# class library documentation, I've search the interenet but I couldn't get what I need.[/QUOTE] Not sure what you mean by "C# class library documentation" but MSDN is always a good place to start with. If you need help with C# itself: …

Member Avatar for Teme64
0
174
Member Avatar for leahrose87

ToolStripMenuItem can contain pipe-character (see the pic). If you want that the MenuStrip itself looks like "File | Edit", you have to build your own menu system. That's not a standard Windows application style, more like something you see in the web-pages (like in this page too). Why would you …

Member Avatar for leahrose87
0
2K
Member Avatar for neolyte120109

[QUOTE]this code is running but it only reads the first column in my database.[/QUOTE] Do you mean first [B]row[/B]? You reference the second row: [ICODE]If ds.Tables("accesscode").Rows(1).Item("username") = txtuser.Text And _ ds.Tables("accesscode").Rows(1).Item("password").ToString = txtPass.Text Then[/ICODE] and I think you're trying to lookup a matching username/password pair so you'll need a loop: …

Member Avatar for Teme64
0
160
Member Avatar for litlemaster

[QUOTE]GSMComm object comm has a SendMessage[/QUOTE] The code in the article uses GSMComm library. If you only need to send SMS, why not use GSMComm library directly. Basically all you need is 1) connect to mobile, 2) call SendMessage and 3) disconnect. You could even make it as a console …

Member Avatar for Teme64
0
93
Member Avatar for theemerchant

[QUOTE]the shutdown button is working, the problem is, when i open again the computer that is being shutdown on the workstation, it is not appearing on the server's list.[/QUOTE] Your code shuts down a computer, but how did you get NetBIOS/DNS names in the first place? I assume TVComputers holds …

Member Avatar for Teme64
0
119
Member Avatar for bchaney

[QUOTE]i got all kinds of not parsing query errors.[/QUOTE] Keep it simple. First make a simple insert, once it works, add fields one by one and test again. You'll find the offending part. I used 2008R2, not SQL Server CE, but it doesn't make any difference. I also dropped If-statements …

Member Avatar for bchaney
0
1K
Member Avatar for adams161

After answering your previous AD question, I found these two articles (haven't had time to read them myself yet): [URL="http://www.codeproject.com/Articles/90142/Everything-in-Active-Directory-via-Csharp-NET-3-5-.aspx"]Everything in Active Directory via C#.NET 3.5 (Using System.DirectoryServices.AccountManagement)[/URL] and [URL="http://www.codeproject.com/Articles/67524/Active-Directory-Objects-and-Csharp.aspx"]Active Directory Objects and C#[/URL] but I took a quick peek at them. I suggest reading them. Are you sure that …

Member Avatar for Teme64
0
173
Member Avatar for onlinessp

There are usually two things that go wrong when starting processes. First is command arguments and second is the command itself i.e. the command isn't found as expected. Testing arguments is easy, just dump them to screen. In order to test if the command can be found, I usually try …

Member Avatar for onlinessp
1
548
Member Avatar for Brandrune

I found two articles yesterday: [URL="http://www.codeproject.com/Articles/90142/Everything-in-Active-Directory-via-Csharp-NET-3-5-.aspx"]Everything in Active Directory via C#.NET 3.5 (Using System.DirectoryServices.AccountManagement)[/URL] and [URL="http://www.codeproject.com/Articles/67524/Active-Directory-Objects-and-Csharp.aspx"]Active Directory Objects and C#[/URL]. I hope you can read C# ;) Last week I answered a thread here in DaniWeb: [URL="http://www.daniweb.com/forums/post1264820.html"]how update a property on directory entry (Active Directory)[/URL]. None of those links give …

Member Avatar for Teme64
0
121
Member Avatar for Member 785224

There's plenty of examples how to transfer data over net. To find good examples you need correct keywords: socket and tcpsocket. You could start by searching from DaniWeb, there's a search box in the upper right corner. Your question has been answered quite a many times in here :) Second …

Member Avatar for Teme64
0
104
Member Avatar for Lanaaa

[QUOTE]I guess I have an error in the insert statement[/QUOTE] Not necessarily. A [U]foreign key[/U] is a field in a table that is some other table's primary key (field). A [U]foreign key constraint[/U] tells that this field has a value which [B]exists[/B] as a primary key in the other table. …

Member Avatar for Lanaaa
0
104
Member Avatar for Mikey12345

There's a pretty good online conversion tool in [URL="http://www.developerfusion.com/tools/convert/vb-to-csharp/"]Developer Fusion[/URL] website. You can convert from VB.NET or C# to VB.NET, C#, Python and Ruby. And you can try to convert VB6 and VBA code too. So here's the conversion (I added type definitions for variables) [CODE=C#]public void AddUP() { int …

Member Avatar for Zinderin
0
171
Member Avatar for Zinderin

Microsoft's SQL Server Express has also 4GB limitation. I'm not sure about SQL Server CE -edition. Anyway, if you really need to handle multi-GB amounts of data and you have to do it efficiently, you'll end up using some "real" database like SQL Server or MySQL. If you're still in …

Member Avatar for Zinderin
0
167
Member Avatar for iHacker

.NET Framework has [URL="http://msdn.microsoft.com/en-us/library/9eat8fht.aspx"]System.Security.Cryptography Namespace[/URL]. The namespace contains SHA1 and MD5 classes among other things. Using those classes requires only a few lines of code and you'll find code samples from MSDN or by googling. HTH

Member Avatar for Teme64
0
286
Member Avatar for adobe71

You'll find the content of the C:/windows/media folder from your original Win7 installation DVD. Or try to restore folder from your recovery DVD. If you're using a laptop, the recovery files are usually stored on a separate disk partition. Anyway, you can restore the folder by yourself because you have …

Member Avatar for Teme64
-4
32
Member Avatar for Krstevski

The whole idea of destructor is to release the resources your class instance has allocated during its lifetime and do other "cleanup" work. For example [CODE=C#]private byte[] _Big; public test() { // Allocate memory _Big = new byte[60000]; } ~test() { // Release _Big = null; }[/CODE]In fact C# (.NET …

Member Avatar for Krstevski
0
114
Member Avatar for dxmedia

Not sure if you've seen this from MSDN: [URL="http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/d5b6ae25-eac8-4e3d-9782-53059de04628/"]TCP keepAlive settings problem[/URL]. Near the end of the page is VB.NET version [ICODE]Private Function SetKeepAlive(ByVal sock As Socket, ByVal time As ULong, ByVal interval As ULong) As Boolean[/ICODE] which sets (after setting TcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.KeepAlive, 1)) also TcpClient.Client.IOControl(IOControlCode.KeepAliveValues, <inValue>, <outvalue>) i.e. low-level …

Member Avatar for dxmedia
0
454
Member Avatar for dghervas

Could you please post your code, or at least relevant parts of the code here. Someone will take a look at it and help you. Thanks!

Member Avatar for dghervas
0
1K
Member Avatar for Denxerator

[QUOTE]I want to know the file path of the "resources" folder[/QUOTE] Relative path to your resource folder is [CODE=VB.NET]Dim resourcePath As String resourcePath = My.Resources.ResourceManager.BaseName [/CODE] and to get fully qualified path [CODE=VB.NET]Dim fullPath As String fullPath = Path.GetFullPath(My.Resources.ResourceManager.BaseName) [/CODE] You can also create your own resource manager and decide …

Member Avatar for Teme64
0
3K
Member Avatar for dxmedia

I assume your "main thread" is UI thread i.e. the function you're trying to call is inside a form class. The code in the UI thread should be similar to this: [CODE=VB.NET]Private Delegate Sub DelegateForSomeSub(ByVal arg0 As Integer, ByVal arg1 As Integer) Public Sub SomeSub(ByVal arg0 As Integer, ByVal arg1 …

Member Avatar for Teme64
0
2K
Member Avatar for bigtreeworld

[QUOTE]I saw a tutorial for C#[/QUOTE] In a web site? Could you please post a link to the tutorial.

Member Avatar for TheDevelopper
0
466
Member Avatar for DaveTran

[QUOTE]I would like to select an enum based on the index of the list[/QUOTE] You would need some sort of mapping between index values and enum values for that. Since you actually fill combobox with enum values, all you need is to cast combobox items back to enums: [CODE=C#]class EnumHelper …

Member Avatar for DaveTran
0
103
Member Avatar for adams161

Here's how I would do it with VBScript: [CODE=VB]strNewTitle = "New Title" Set objUser = GetObject("LDAP://cn=johndoe,dc=acme,dc=com") objUser.Put "title", strNewTitle objUser.SetInfo[/CODE] and with DirectoryServices and VB.NET: [CODE=VB.NET]Dim oUser As New DirectoryEntry() ' Set target oUser.Path = "LDAP://CN=johndoe, DC=acme, DC=com" ' Set a new value to "title" property oUser.InvokeSet("title", "New Title") ' …

Member Avatar for adams161
0
4K
Member Avatar for DartDemon

[QUOTE]It will put it in the Label but wants to scroll like in the textbox.[/QUOTE] Maybe I didn't quite get that, but instead of appending new messages to the label you should replace previous text with the new message text(?): [CODE=VB.NET]lblDisplay.Text = msg[/CODE] Or if you did mean that the …

Member Avatar for dghervas
0
112
Member Avatar for Duki

Here's a small example. One form with two buttons and few other controls. Button1 "initializes" AutoSize property. Button2 toggles controls on and off, except Button controls. [CODE=C#]private void button1_Click(object sender, EventArgs e) { this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; // this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowOnly; this.AutoSize = true; } private void button2_Click(object sender, EventArgs e) …

Member Avatar for Duki
0
2K
Member Avatar for Acidburn

I found this article: [URL="http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=582"]Asynchronous Web Requests[/URL]. Maybe it will get you started with asynchronously loading data. HTH

Member Avatar for Teme64
0
97
Member Avatar for bchaney

[QUOTE]shouldn't this always run whenever the index changes?[/QUOTE] Yes, it should and it will run. In your code change the line 9 to use SelectedValue property: [CODE=VB.NET]cline = linecbo.SelectedValue[/CODE] Also, do you store LineNumber as a numeric value or as a textual value in your DB? If LineNumber field is …

Member Avatar for Teme64
0
397
Member Avatar for Sherlok

You're not the first one doing login screens. Did you try DaniWeb's search (that's in the upper right corner of this page) with words "VB.NET login"? Or [URL="http://www.google.com/search?hl=en&site=&q=vb.net+login&btnG=Search"]googling[/URL] with the words "VB.NET login"? You could also read some [URL="http://www.google.com/search?hl=en&q=vb.net+sql+tutorial&btnG=Search"]SQL tutorials[/URL] if you want to learn the basics of the database …

Member Avatar for hirenpatel53
0
114
Member Avatar for zixizx

Check Environment class. There's Environment.SpecialFolder enumeration and Environment.GetFolderPath method. For example [CODE=C#]string myFullPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\" + @"Enter Your Ascii Picture here.txt"; StreamReader objReader = new StreamReader(myFullPath);[/CODE] would work with Win XP as well as Win 7 and with all users of the PC. HTH

Member Avatar for zixizx
0
141
Member Avatar for smita mone

AFAIK nothing built-in in the .NET. A little [URL="http://www.google.com/search?hl=en&site=&q=csharp+rpc&btnG=Search"]googling[/URL] will give you sample code to start with.

Member Avatar for nick.crane
0
88
Member Avatar for virendra_sharma

Procedure signature [ICODE]void sort(int *a, int size)[/ICODE] without any pointers is [ICODE]void sort(int[] a, int size)[/ICODE] You can do the rest by yourself by copy/pasting the code to the editor which will tell you about syntax errors. Procedure [ICODE]void swap(int a, int b)[/ICODE] simply swaps the values of a and …

Member Avatar for bbman
0
177
Member Avatar for kenny22

All you need is to make [CODE]itemSelected[/CODE] variable global in that class. Here's a one way to do it. I used a separate textbox for renaming. I suppose you're doing some kind of "inplace" renaming? [CODE=C#] // A global variable to hold index of the renamed listbox item private int …

Member Avatar for kenny22
0
131
Member Avatar for TsadokBlok

[QUOTE]The SQL DataTable contains columnname "picture" - Varbinary(Max) I am using a Class that holds Public Values (like FirstName). In this class 'IdentityPicture' and 'PictureDlgFileName' are declared as Image Type.[/QUOTE] [QUOTE]I am staring myself blind on this[/QUOTE] I can see that. In Persons-table you have following fields: [ICODE]PersonId INT IDENTITY(1,1) …

Member Avatar for ghdfans2010
0
272
Member Avatar for onlinessp

Here's some code I grabbed from my old app [CODE=C#]using System.Security.Cryptography; /// <summary> /// Calculate MD5 for the bytes in a stream object /// </summary> /// <param name="StreamIn">A stream in</param> /// <param name="ResultMD5">Returns MD5 as a byte array</param> private void CalculateMD5(Stream StreamIn, ref byte[] ResultMD5) { MD5 ProvMD5; ProvMD5 = …

Member Avatar for Teme64
0
178
Member Avatar for muldrok

You should first ask yourself what you want to do after the studies. Are you better to see the big picture or do you like to play around with data structures? Are you more business oriented than a nerd? What sort of "supporting" subjects do you take in the college? …

Member Avatar for mmanceli2010
0
206
Member Avatar for cdgregory

[QUOTE]I want to be able to work through subdirectories even if the parent has an exception[/QUOTE] The exception occurs most likely because of the missing privileges. Assuming you're reading file system while inside Windows and you have admin rights you could take the ownership of some folders and files. Still …

Member Avatar for cdgregory
0
112
Member Avatar for ajwei810192

I think you have a tiny logical error. Shouldn't your code be [CODE=VB.NET]songList = document.SelectNodes("/music_songs/song[category='" & drop1.SelectedItem.Text & "'][" & item_number_first & "<=position()<=" & item_number_last & "]")[/CODE]now if item_number_first were 1 and item_number_last were 10, the expression would evaluate to a string: [ICODE]...SelectNodes("...[1<=position()<=10]")[/ICODE] HTH

Member Avatar for ajwei810192
0
116
Member Avatar for Darrin Crow

Here's two ways to do it. Straight from the OpenFileDialog's property: [CODE=VB.NET]TextBox1.Text = OpenFile.InitialDirectory[/CODE] or by using GetDirectoryName method from the Path class: [CODE=VB.NET]TextBox1.Text = Path.GetDirectoryName(OpenFile.FileName)[/CODE] HTH

Member Avatar for Teme64
0
88
Member Avatar for mazdaspeed6

[QUOTE]someone meantioned using a WHERE query[/QUOTE] Yes, that's correct. Modify your filter (after adding the datetime filter) [CODE=VB.NET]filterString = filterString & " AND ([Status] like 'c' OR [Status] like 'b' OR [Status] like 'v' OR [Status] like 'o' OR [Status] like 'm')" [/CODE] HTH

Member Avatar for Teme64
0
110
Member Avatar for adams161

You didn't show any code so I assume you're using DirectorySearcher [CODE=C#]private DirectorySearcher _Searcher; _Searcher = new DirectorySearcher(); _Searcher.CacheResults = false; // Set the rest of the properties[/CODE] This disables local caching. If you have to repeat the query, the data is fetched from the DC again and this may …

Member Avatar for adams161
0
159
Member Avatar for zuve_fox

Use command line compiler. This example is taken from the MSDN [QUOTE]To Compile File.vb and create File.exe vbc /reference:Microsoft.VisualBasic.dll File.vb[/QUOTE] Replace File.vb with, for example, test.foo. You can read more about [URL="http://msdn.microsoft.com/en-us/library/s4kbxexc(VS.80).aspx"]Visual Basic Compiler[/URL] from MSDN.

Member Avatar for Teme64
0
306

The End.