2,245 Posted Topics

Member Avatar for laailalalaa

[code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace daniweb { public partial class frmFileStuff : Form { public frmFileStuff() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { const string inFile = @"C:\file.txt"; string outFile = Path.GetTempFileName(); …

Member Avatar for sknake
0
115
Member Avatar for sudharani
Member Avatar for IdanS
0
144
Member Avatar for turbomen

[code=delphi] procedure TForm1.Button1Click(Sender: TObject); Var i1, iResult: Integer; begin iResult := 0; for i1 := 2 to 20 do begin if ((i1 mod 2) = 0) then Inc(iResult, i1); end; ShowMessage(IntToStr(iResult)); end; [/code]

Member Avatar for EdFallon
0
229
Member Avatar for Ihab Salamin

Add print lines to see if your values are being set properly for @Semester and @AcademicYear See what this turns up: [code=sql] Declare @StudentNo int Set @StudentNo = 12345 -- DECLARE @Semester int DECLARE @AcademicYear int SET @Semester = (SELECT TOP (1) SemesterNo FROM ppu_RegistrationInfo AS ppu_RegistrationInfo_1 WHERE (StudentNo = …

Member Avatar for padtes
0
104
Member Avatar for Diamonddrake

No -- you either need to handle the reflection yourself, serialize all the data, or mark the members you want serialized. Here is how you can serialize the data yourself. This is on a form with two buttons: [code=c#] using System; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Windows.Forms; using …

Member Avatar for Diamonddrake
0
194
Member Avatar for Salem

I was looking around my profile and I clicked on "All threads started by sknake" and this thread came up: [url]http://www.daniweb.com/forums/thread210944.html[/url] I didn't start that thread -- someone posted a question in the shell scripting or nix software forum and I flagged the post and it was moved. Now somehow …

Member Avatar for MosaicFuneral
1
984
Member Avatar for EvilLinux
Member Avatar for EvilLinux
0
2K
Member Avatar for arelius

This is part of my Project.sln file: [code] Microsoft Visual Studio Solution File, Format Version 10[B].[/B]00 # Visual Studio 2008 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp", "[COLOR="red"]MyApp\MyApp.csproj[/COLOR]", "{58F9C679-A58F-4942-AE06-C4B03E398256}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Core", "[COLOR="Red"]MyApp.Core\MyApp.Core.csproj[/COLOR]", "{DD7B354E-20F2-405C-95BE-67E6E94EBB53}" EndProject [/code] You need to update the fields marked in red above. In this case the projects were housed …

Member Avatar for arelius
0
105
Member Avatar for adam1991

On your data adapter check for a property named "ClearBeforeFill" -- I believe it is a designer generated property for typed table adapters. Another solution is to clear the database before you refresh: [code=vb.net] Public Sub loaddata() Try connection.Open() Catch ex As Exception MsgBox(" " & ex.Message) End Try datatable.Clear() …

Member Avatar for zakarneh
0
98
Member Avatar for sherrys

Are you sure the button on your taskbar is not pointed the wrong site? Also can you navigate to the site manually by typing in [url]http://www.hotmail.com/[/url] ? What happens when you try to navigate to the site?

Member Avatar for sherrys
0
207
Member Avatar for Moirae

Upload your project. You're not posting the relevant information needed to solve the issue you're having.

Member Avatar for sknake
0
1K
Member Avatar for floydus

[code=c#] System.Runtime.InteropServices.Marshal.PtrToStringAnsi() [/code] It accepts a pointer and an integer as parameters to read the string [edit] There are many different encoding types for strings, look at all PtrToString(() [/edit]

Member Avatar for sknake
0
129
Member Avatar for asmith3006

A hash table cannot be serialized but you can move the keys and values over to an array and use the [icode]XmlSerializer[/icode] to get a [icode]byte[][/icode] array and then base64 encode the bytes to send it across the network as string. This should get you started: [code=c#] object[] keys = …

Member Avatar for sknake
0
467
Member Avatar for bshyama24@gmail

Where is [icode]Application.Lock()[/icode] defined at? I have never heard of it. What is it supposed to do? Can you provide some URLs to read about it?

Member Avatar for bshyama24@gmail
0
115
Member Avatar for m_shanak

You're trying to return the value of multiple select statements in a single stored procedure?

Member Avatar for m_shanak
0
199
Member Avatar for pilipino93

Use a timer. [code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Timer = System.Timers.Timer; namespace daniweb.timer { public partial class frmBlink : Form { private Timer timer; private long syncPoint; public frmBlink() { InitializeComponent(); timer = new Timer(); timer.Interval = …

Member Avatar for serkan sendur
0
2K
Member Avatar for Mongz

Do you receive an error .... or ? You provided a lot of code but not much information on the behavior of the problem.

Member Avatar for sknake
0
93
Member Avatar for saj_amo

An example of adding a parameter: [code=c#] using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.Parameters.Add(new SqlParameter("@Loc", Loc)); cmd.Parameters.Add(new SqlParameter("@Lab", Lab)); cmd.Parameters.Add(new SqlParameter("@Tot", Tot)); return (Convert.ToInt32(cmd.ExecuteScalar()) > 0); } [/code] You are using a variable reference in your query but not giving the variable to the command: [code] strSQL = …

Member Avatar for sknake
0
139
Member Avatar for Corner

Is your app multithreaded -- do you create a new thread, use a timer, or a background worker? If so then all calls to your grid or its underlying datasource should be [icode].Invoke()[/icode]'d instead of running on the non-gui thread. If i'm way off track then I will wait to …

Member Avatar for sknake
0
261
Member Avatar for serkan sendur

Diamonddrake is right here. Why do you want to add a circular reference though? I thought I had cases in the past where it would be useful but after thinking about it I was always able to come up with another library design that would serve the same purpose and …

Member Avatar for sknake
0
78
Member Avatar for TomB1988

Use a windows form application -- you have more control over the screen painting so you can hide the application borders. As for the BI projects I have no idea, you need to elaborate.

Member Avatar for serkan sendur
0
69
Member Avatar for arunkumars

You can also store the image in memory: [code=csharp] public partial class frmFormPaint : Form { private Image img; public frmFormPaint() { InitializeComponent(); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (img != null) e.Graphics.DrawImage(img, 20, 145); } private void button1_Click(object sender, EventArgs e) { img = Image.FromFile(@"C:\picture.bmp"); } …

Member Avatar for serkan sendur
0
193
Member Avatar for asmith3006

When you create a thread you create it with a callback delegate and when you want to start it you call [icode]thread.Start()[/icode] with an optional object as a parameter for information you want to pass to the thread. If this operation is really as simple as you have indicated it …

Member Avatar for serkan sendur
0
385
Member Avatar for praveen_dusari
Member Avatar for george_82

Here is an example TCP client-server application: [url]http://www.codeproject.com/KB/IP/tcpclientserver.aspx[/url]

Member Avatar for george_82
1
124
Member Avatar for lllllIllIlllI

It means you have added them as a contact, or you are friends. Check the users that have a + then check your contact/buddy list: [url]http://www.daniweb.com/forums/profile.php?do=buddylist[/url]

Member Avatar for lllllIllIlllI
0
92
Member Avatar for VibhorG

[code=csharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace daniweb { public partial class frmRes : Form { public frmRes() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { decimal discrimation = 0.75M; string formHeading = "The brown …

Member Avatar for VibhorG
0
288
Member Avatar for Dukane
Member Avatar for Dani
0
121
Member Avatar for sardonic

Tools -- Import and Export Settings -- Reset. You want to "Create a new horizontal tab group" but I don't know how to create it from the IDE. I just reset VS' IDE when it screws up. I gave up trying to customize it because I frequently blow away the …

Member Avatar for sardonic
0
100
Member Avatar for cguan_77

What OS is your computer with two nics running? In Windows I don't believe you can take advantage of it. I have seen Linux setups that can. If you are running a *nix I will run down the links.

Member Avatar for rashid47010
0
122
Member Avatar for fayola

Change it to this: [code=dos] call getlogs.bat site1 call getlogs.bat site2 [/code] Without the [icode]call[/icode] it will exit after the first call

Member Avatar for fayola
-1
134
Member Avatar for Slippy-D

[code=csharp] private void button3_Click(object sender, EventArgs e) { const string fName = @"C:\file.txt"; string txt = @"#redirect to production store" + Environment.NewLine + @"SDPORT=BGIT-SDIRLAUTO:4086" + Environment.NewLine + @"SDCLIENT=CTN610"; if (System.IO.File.Exists(fName)) System.IO.File.Delete(fName); System.IO.File.WriteAllText(@"C:\File.txt", txt); } [/code]

Member Avatar for Slippy-D
0
101
Member Avatar for serkan sendur

So if you use Visual Studio to run the app on the pocket PC you do not get an error? But if you build an installer you do get an error?

Member Avatar for serkan sendur
0
424
Member Avatar for thilinam
Member Avatar for stoymigo

[code=csharp] using System.Runtime.InteropServices; // DllImport using System.Security.Principal; // WindowsImpersonationContext using System.Security.Permissions; // PermissionSetAttribute ... public WindowsImpersonationContext ImpersonateUser(string sUsername, string sDomain, string sPassword) { // initialize tokens IntPtr pExistingTokenHandle = new IntPtr(0); IntPtr pDuplicateTokenHandle = new IntPtr(0); pExistingTokenHandle = IntPtr.Zero; pDuplicateTokenHandle = IntPtr.Zero; // if domain name was blank, assume local …

Member Avatar for stoymigo
-1
529
Member Avatar for chanlichin

Which query is giving you the error -- you have two? Also can you please post the exception you're receiving?

Member Avatar for chanlichin
0
132
Member Avatar for serkan sendur

Does this only happen in RELEASE mode when you build the installers or does it happen all of the time? Do the projects have references to each other as "Project References" and not referencing their DLL output? The primary output of a project is a single DLL or EXE -- …

Member Avatar for serkan sendur
0
102
Member Avatar for khakilang

Can you post the error messages you are receiving? It might be a parsing error versus disk corruption issue. We need more information.

Member Avatar for sknake
0
159
Member Avatar for udhayakumar_g
Member Avatar for manutd4life

That all depends on what your final query is evaluated as. We can't see what your user input is. One piece of advise: [b]use parameterized queries![/b] [url]http://forums.devx.com/showthread.php?t=160026[/url] Put a break point on the line [icode]com.ExecuteNonQuery()[/icode] and evaluate the value of [icode]com.CommandText[/icode] and post it back here.

Member Avatar for yorro
0
110
Member Avatar for densman

densman: You posted this question in the VB.NET forum. VB 4,5,6 question are in a different forum: [url]http://www.daniweb.com/forums/forum4.html[/url] [b]Please[/b] do not create another thread for this. A moderator will be along shortly to move the thread for you. elangosugi: You also posted a VB5 question in the .NET forum, and …

Member Avatar for sknake
0
93
Member Avatar for Piya27

That is unfortunate. Why don't you post the query and related code to the update so we can see where the problem may exist?

Member Avatar for samir_ibrahim
0
253
Member Avatar for learningthings

Do you mean you want to draw a rectangle around area that have all-white pixels? This will work OK if the areas are in fact only rectangular but I highly suspect you will find jagged edges with white pixels. How should that be handled?

Member Avatar for sknake
0
1K
Member Avatar for perumar
Member Avatar for ITech

You may consider using [icode]Path.Combine()[/icode] when assembling full paths :) -- it can help if you're unsure that the first directory path ends with a path delimiter.

Member Avatar for serkan sendur
1
353
Member Avatar for nanoh2001

I have also done something similar and posted the code in C#. However the real work is all done by reading a [icode]DataTable[/icode] from OleDbCommand, OleDbConnection, OleDbDatatReader, etc. so you can modify it for any oledb accessible data. [url]http://www.daniweb.com/forums/thread221141.html[/url]

Member Avatar for nanoh2001
0
1K
Member Avatar for pilipino93

Form1: [code=c#] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb.formtalking { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Form2 frm = FindOpenForm2(); if (frm != null) frm.SetText(textBox1.Text); } …

Member Avatar for sknake
0
153
Member Avatar for ctrl-alt-del

I suspect danny is right... we don't know what ClickPic is Here is code to center a control and a call to suspend the layout to reduce screen flicker [code=csharp] private void button4_Click(object sender, EventArgs e) { this.button4.SuspendLayout(); button4.Left = (this.Width - this.button4.Width) / 2; button4.Top = (this.Height - this.button4.Height) …

Member Avatar for sknake
0
136
Member Avatar for ak.royan

Some people have other ways but I have had problems doing it any way except this way. Assume we have two projects: "Source Project" and "Destination Project". The source project contains the form we want to copy to the destination project. In the destination project create a new form with …

Member Avatar for ddanbe
0
90
Member Avatar for Mongz

Try this out Here is the meat of what you're requesting (I think): [code=c#] using System; using System.Windows.Forms; using Timer = System.Timers.Timer; namespace daniweb.timer { public partial class frmSystemTime : Form { private Timer timer; public frmSystemTime() { InitializeComponent(); timer = new Timer(); timer.Interval = (1000 * 1); //1 sec …

Member Avatar for sknake
0
175

The End.