Posts
 
Reputation
Joined
Last Seen
Ranked #171
Strength to Increase Rep
+13
Strength to Decrease Rep
-3
99% Quality Score
Upvotes Received
111
Posts with Upvotes
101
Upvoting Members
81
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
52 Commented Posts
11 Endorsements
Ranked #154
Ranked #96
~407.37K People Reached
About Me

I started "computing" as a hobby with Commodore 64 in 1984. Went a few years later to study computer science and math in university. My first PC had a 80286, 1MB RAM and Windows 2.01 in 1990. I programmed with COBOL, C and VB6 in 90's.…

Interests
Downhill skiing, badminton, swimming and sports in general. Sailing, good movies and good books (like…
PC Specs
Processor: Intel Core2 Quad Q8400 @ 2.66GHzRAM: 8 GB Disk: 2x Western Digital RE3 WD5002ABYS-01B1B0…
Favorite Tags
Member Avatar for lolwtf

I don't have a tablet PC to test with, but if things work in the same way as with WinForms, your code should be following [CODE=VB.NET]InkPicture1.Image.Save(IO.Directory.GetCurrentDirectory() & "\test_out.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) [/CODE] The code saves the image from the InkPicture1 control, not from the rectangle. I wasn't sure which one you actually …

Member Avatar for Nathan_20
0
2K
Member Avatar for swathi sajja

Use a loop to add multiple files: With AxVLCPlugin21 .CtlVisible = True .playlist.items.clear() ' Loop until user presses Cancel button and ' add files to the playlist. The code _does not_ check the type of the file! Do Until OpenFileDialog1.ShowDialog() <> Windows.Forms.DialogResult.OK .playlist.add(OpenFileDialog1.FileName) Loop .playlist.play() .Toolbar = True .Show() End …

Member Avatar for André_15
0
3K
Member Avatar for zebnoon1

Passing data between forms has been asked many times. The easiest way is to use a custom property to pass data or a reference to control to hold the data. public partial class Form3 : Form // This is your Form1 { public Form3() { InitializeComponent(); } private void button1_Click(object …

Member Avatar for Teme64
0
1K
Member Avatar for Reverend Jim

I have been a Windows user since version 2.0 and I have never seen "checking for a solution to the problem" to provide any solution. I guess that is a feature, not any actual problem solver ;)

Member Avatar for diafol
1
499
Member Avatar for Reverend Jim

When tossing a coin we can (and will) make following assumptions: 1. the result will allways only be tails or heads 2. the coin is fair i.e. the probability of tails is the same as heads, P(T) <=> P(H) 3. the coin tossing is stateless operation i.e. the coin does …

Member Avatar for xrjf
0
2K
Member Avatar for daveofgv

There are quite a few examples how to open and read an Excel file here in DaniWeb. Like [URL="http://www.daniweb.com/software-development/vbnet/threads/81298"]this[/URL] or [URL="http://www.daniweb.com/software-development/vbnet/threads/29055"]this[/URL]. Just remember to add a reference to Excel (COM component). If you need more examples, there's a search box in the upper right corner of this page. After opening …

Member Avatar for muoixd
0
2K
Member Avatar for murid

You should read data from the socket in "chunks". Here's a snippet from asynchronous socket data transfer [CODE=VB.NET] Private PACKET_SIZE As UInt16 = 4096 . . SyncLock Client.GetStream Reader = New BinaryReader(Client.GetStream) 'next we expect a pass-through byte Client.GetStream.Read(ReadByte, 0, 1) PassThroughByte = ReadByte(0) 'next expect length of data (Int32) …

Member Avatar for Haleem_1
0
2K
Member Avatar for Roger_2

JamesCherrill is correct about O(N). Worst case happens when a binary tree with N nodes is fully biased to left (or right). In your code, null check is always same, that is, it takes a constant time and therefore recursive call to rSize(node.right) takes a constant time. Recursive call rSize(node.left) …

Member Avatar for Mickey_2
0
419
Member Avatar for wael meto

[QUOTE]ChrisPadgham combobox.refreshitems[/QUOTE] AFAIK there isn't such a method in VB.NET. [QUOTE]how can i Refresh ComboBox After Adding New Values via a Seperate Form in vbnet[/QUOTE] Could you post some relevant code how you reference the combobox, call the form, exit form and how you add a new value.

Member Avatar for Alan_10
0
5K
Member Avatar for Joseph_18

Why you use the second combobox??? Simply string[] lineOfContents = File.ReadAllLines(comboBox1.Text); this.richTextBox1.Lines = lineOfContents; or // Now you have a file content in a single string string lineOfContents = File.ReadAllText(comboBox1.Text); // Split string to tokens string[] tokens = lineOfContents.Split(','); // Now tokens is an array of all strings from the …

Member Avatar for tinstaafl
0
308
Member Avatar for Simple man

You have done keyboard hook with SetWindowsHookEx() API call, right? When your keyboard delegate gets keycode for S-key, it replaces it with D-key's keycode (for some reason I do not understand), right? You do know that Ctrl+S sends **two separate keycodes**, one for Ctrl-key and one for S-key, right? Now …

Member Avatar for Teme64
0
256
Member Avatar for alvoryx

Here's how I'd do it [CODE=C#]string myFileData; // File in myFileData = File.ReadAllText(@"D:\test.csv"); // Remove last CR/LF // 1) Check that the file has CR/LF at the end if (myFileData.EndsWith(Environment.NewLine)) { // Yes. 2) Remove CR/LF from the end and write back to file (new file) // File.WriteAllText(@"D:\test_backup.csv", myFileData.TrimEnd(null)); // …

Member Avatar for Ahmad_13
0
8K
Member Avatar for JOSheaIV

First you have to extract the embedded resourse itself to a some temporary file. Then you read and unzip temporary file to the final file. I grabbed these code snippets from a setup program I wrote. It shows how to output an embedded resource and how to deflate (unzip) a …

Member Avatar for JOSheaIV
0
259
Member Avatar for kiran_10

This can be done with a simple Excel formula so you don't need any VBA scripting for this. First you have to figure out how the column number is related to input value (1-5). I used MOD() function to find out when a row "matches" the input value. Cell range …

Member Avatar for Teme64
0
291
Member Avatar for LinaAshaji

Setting panel.BackColor = Color.Transparent does not work like you already noticed. The trick is to use transparency of the form as ddanbe hinted. Here's two overlapping panels on a form. First one is a green square which is drawn behind the "transparent" panel. Second panel is the "transparent" panel. I …

Member Avatar for JOSheaIV
0
308
Member Avatar for Suzie999

> I've tried deleting everything in the release folder, to no avail Have you deleted also `app.config` file from your source code/project folder?

Member Avatar for Teme64
0
175
Member Avatar for zachattack05

ExecuteScalar() method is the correct choice. However returning identity value is not done correctly. Here's a rewritten code. I also replaced questionmarks with parameter names. private bool EventLog(int userNumber, int userID, UserEventTypes eventType, out int recordID) { string ConnectionString; object scalarObject; // Identity value to be returned // Return '0' …

Member Avatar for zachattack05
0
319
Member Avatar for Mike Askew

Here is a one solution TimeSpan timeSpan; string timeStr; int totalHours; int totalMinutes; // 1 day, 6 hrs, 32 mins, 0 secs, 0 msecs timeSpan = new TimeSpan(1, 6, 32, 0, 0); // Get hours and minutes // TotalHours is of type double, cast it to integer (truncate to integer) …

Member Avatar for Teme64
0
2K
Member Avatar for Papa_Don

Before doing any coding you have to consider what will be the environment where your application will be used: - is Office (i.e. Excel) installed - is Office (i.e. Excel) installed with .NET programming support - is reading Excel file(s) all you really need - is there a possibility you …

Member Avatar for Teme64
0
17K
Member Avatar for ddanbe
Member Avatar for LukeJWhitworth

The easiest way to get system information is through Windows Management Instrumentation (WMI). There's a Win32_UserAccount class which provides information about user accounts including SID and Name properties which you asked for. I've been using WMI Code Creator utility to create "code skeletons" and then modified the code to match …

Member Avatar for Teme64
0
924
Member Avatar for Suzie999

Here's another solution. It has some advantages: - user can open context menu over any cell in DGV - you get both column index and row index if you need to remove/add rows too Context menu creation is inside button click handler but probably should be in the code which …

Member Avatar for Teme64
0
381
Member Avatar for Suzie999

Rows and Columns are collections in datagridview control. Both collections have Clear method: dataGridView1.Rows.Clear(); dataGridView1.Columns.Clear(); Now you should have an "empty" datagridview control. HTH

Member Avatar for Suzie999
0
279
Member Avatar for Papa_Don

StartInfo class has Arguments property where you can pass parameters. In your case it is the name of the file you want to open. Add following line after line 5 `.StartInfo.Arguments = "O:\Revenue Management\RM -- Specialty Select Brands\Analytics\Tableau Extracts\Pace\SSB_FR_FUTURE_PACE_LOC.twbx"` Now "O:\Revenue Management\RM -- Specialty Select Brands\Analytics\Tableau Extracts\Pace\SSB_FR_FUTURE_PACE_LOC.twbx" is passed as …

Member Avatar for Papa_Don
0
231
Member Avatar for jakub.peciak

One solution would be to use FileSystemWatcher class which would raise an event when the folder content has changed. After that you would scan the files. BackgroundWorker should be fine for scanning the folder. I didn't test this idea but you could raise ProgressChanged event from your BackgroundWorker thread and …

Member Avatar for Reverend Jim
0
205
Member Avatar for Jun_2

Line 14 should be: `Dim raw_col As Integer = 6 'column # of raw data` Column ordinals are zero-based so indices are as follows - id = 0 - doc_name = 1 - created_by = 2 - date_uploaded = 3 - client_name = 4 - description = 5 - raw_file …

Member Avatar for Teme64
0
446
Member Avatar for zachattack05

First > but I thought with the qualifier of FileSystemWatcher FileSystemWatcher is a type, not a qualifier. When you use foreach loop, your loop variable's type has to match with the collection item's type. So when you loop this.Controls collection you're dealing with a type Control. Here's a sample how …

Member Avatar for zachattack05
0
412
Member Avatar for Darth Vader

ProcessStartInfo class has WindowStyle property: System.Diagnostics.ProcessStartInfo startInfo; startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.FileName = "opera.exe"; startInfo.Arguments = "http://google.com"; // Set WindowStyle property for the new process startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized; System.Diagnostics.Process.Start(startInfo); HTH

Member Avatar for Teme64
0
519
Member Avatar for crazyhorse09

For some reason it actually does work. Have you tried to change the text's color: [ICODE]Label1.ForeColor = Color.White[/ICODE] ? Here's the code I tested and it works fine[CODE=VB.NET] Label2.Parent = PictureBox1 Label2.BackColor = Color.Transparent Label2.BringToFront() Label2.ForeColor = Color.White Label2.Text = "foo bar" Label2.Location = New Point(20, 20) PictureBox1.Image = Image.FromFile("D:\image.jpg")[/CODE]

Member Avatar for Yunoos Shiddique
0
15K
Member Avatar for Rogel_1

Here's a simple example how to create a custom autocomplete collection: ' Declare a collection public autoComp As AutoCompleteStringCollection ' Create a new collection instance autoComp = new AutoCompleteStringCollection() ' Or clear existing collection autoComp.Clear() ' Add your items to the collection autoComp.Add("first") autoComp.Add("fish") autoComp.Add("fast") ' Set these two properties …

Member Avatar for Teme64
0
196